require_once("/home/onebee/porter/phplib/connect.inc"); include_once("$libdir/log.inc"); include("$incdir/site-top.inc"); if($_GET["issue"]) $issue = "and o.id='$_GET[issue]'"; $sql = ($_SELECT["articlesql"])? $_SELECT["articlesql"]:"select a.id,a.title,a.contributor,b.body,c.name,a2o.repeat,d.title as 'photo',d.med_filename,d.med_width,d.med_height,d.caption from article a left join articlevar b on b.id=a.id left join articletosection a2s on a2s.articleid=a.id left join section c on c.id=a2s.sectionid left join imagetoarticle i2s on i2s.articleid=a.id and i2s.homepage=0 left join imageset d on d.id=i2s.imageid left join articletoissue a2o on a2o.articleid=a.id left join issue o on o.id=a2o.issueid where a.id='$_GET[id]' and o.date <= curdate() and o.status='publish' and a2s.sectionid!=1 $issue order by o.date desc"; $res = mysql_query($sql); if(mysql_numrows($res)){ $_ARTICLE = mysql_fetch_array($res); if(!$_SELECT["preview"]) logWrite('art',$_ARTICLE["id"]); } else { print "Error."; exit; } $_ARTICLE["graphicname"] = strtolower($_ARTICLE["name"]); $_ARTICLE["graphicname"] = str_replace(" ","_",$_ARTICLE["graphicname"]); /* detect IF CLASSIC */ if($_ARTICLE["repeat"]) $_ARTICLE["graphicname"] = "classicporter"; /* detect IF OLD */ $sql = "select unix_timestamp(o.date) as 'date',o.id from articletoissue a2o left join issue o on o.id=a2o.issueid where a2o.articleid='$_ARTICLE[id]' and o.date <= curdate() and o.status='publish' order by o.date desc"; $res = mysql_query($sql); if(mysql_numrows($res)){ while($row = mysql_fetch_array($res)){ if($row["id"] != $_ISSUE["id"] && $row["date"] != $_ISSUE["date"]){ $_ARTICLE["origdate"] = $row["date"]; } } } $imagesize = getImageSize("$imgdir/sections/$_ARTICLE[graphicname].gif"); $width = $imagesize[0]; $height = $imagesize[1]; ?>
.gif" width="= $width ?>" height="= $height ?>" hspace="5" vspace="5" border="0"> | ||||||||||||||||||||||||||||||||||
= $_ARTICLE["title"] ?> if($_ARTICLE["origdate"]){ ?> Originally posted = date('n/j/Y',$_ARTICLE["origdate"]) ?> } ?> |
||||||||||||||||||||||||||||||||||
if($_ARTICLE["med_filename"]){
?>
} ?> = nl2br($_ARTICLE["body"]) ?> |
||||||||||||||||||||||||||||||||||