Article Date:
$months=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
selectDatabase('coredatabase');
$SQL="SELECT * FROM newsdb WHERE visible='1' ORDER BY itemDate DESC";
$result=mysql_query($SQL, $link_id);
$firstRef="";
while($thisRow=mysql_fetch_row($result)){
if ($firstRef==""){
$firstRef=$thisRow[3];
}
$authID=$row[1];
$title=$thisRow[2];
$date=$thisRow[3];
$y=substr($date,0,4);
$m=substr($date,4,2);
$d=substr($date,6,2);
$m=$months[$m-1];
$abstract=$thisRow[4];
$detail=$thisRow[5];
echo("$m $d, $y ");
}
echo(" | ");
?>
|
selectDatabase('coredatabase');
if ($_GET[linktype]==""){
if ($_GET[mId]==""){
$SQL="SELECT * FROM newsdb WHERE visible='1' ORDER BY itemDate DESC";
}else{
$SQL="SELECT * FROM newsdb WHERE id=$_GET[mId]";
}
$result=mysql_query($SQL, $link_id);
$thisRow=mysql_fetch_row($result);
$authID=$row[1];
$title=$thisRow[2];
$date=$thisRow[3];
$y=substr($date,0,4);
$m=substr($date,4,2);
$d=substr($date,6,2);
$m=$months[$m-1];
$abstract=$thisRow[4];
$detail=$thisRow[5];
echo("");
if($date==$firstRef){
echo("NEW! ");
}
echo("$m $y: ");
echo("$title ");
echo("$abstract");
if ($thisRow[5]<>""){
echo(" >Read Detail");
}else{
}
}else{
$linktype=$_GET[linktype];
//echo("");
//SHOW CHOICE LINKS
if ($linktype=="curator"){
echo("Links for curators");
dumpLinkCollection("EDITORS CHOICE_CURATORS");
}
if ($linktype=="theory"){
echo("Links for theorists");
dumpLinkCollection("EDITORS CHOICE_THEORISTS");
}
if ($linktype=="tech"){
echo("Links for technicians");
dumpLinkCollection("EDITORS CHOICE_TECHNICIAN");
}
}
echo("");
echo("");
?>
|