Archives
$monthyear="";
$sql = "Select * from documents where AuthorId='$author' order by TimeStamp";
$tresult = mysql_query($sql) or die(mysql_error());
while ($trow=mysql_fetch_array($tresult)) {
if($monthyear!=date('F Y',$trow['TimeStamp'])) {
$monthyear=date('F Y',$trow['TimeStamp']);
$monthnum=date('m',$trow['TimeStamp']);
$yearnum=date('y',$trow['TimeStamp']);
$firstdayseconds = mktime(0, 0, 0, $monthnum, 1, $yearnum);
$firstdayofmonth=date('m d Y',$lastdayseconds);
$lastdayseconds = mktime(0, 0, 0, $monthnum+1, 0, $yearnum);
$lastdayofmonth=date('m d Y',$lastdayseconds);
?>
-
=$monthyear?>
}}?>
Categories
$sql = "Select * from categories where AuthorId='$author' order by Name";
$cresult = mysql_query($sql) or die(mysql_error());
while ($crow=mysql_fetch_array($cresult)) { ?>
- =$crow['Name']?>
}?>
|
if($fds) {
$sql = "Select * from documents where AuthorId='$author' and TimeStamp >= '$fds' and TimeStamp <= '$lds' order by TimeStamp DESC";
}elseif($catid){
$sql = "Select * from documents where AuthorId='$author' and CategoryId='$catid' order by TimeStamp DESC";
}else{
$thirtydaysago=time() - ('60'*'60'*'24'*'30');
$sql = "Select * from documents where AuthorId='$author' and TimeStamp >= '$thirtydaysago' order by TimeStamp DESC";
}
$result = mysql_query($sql) or die(mysql_error());
while ($row=mysql_fetch_array($result)) { ?>
|
=$row['Title']?> |
$sql = "Select * from categories where Id='{$row['CategoryId']}'";
$cdresult = mysql_query($sql) or die(mysql_error());
$cdrow=mysql_fetch_array($cdresult);
if ($cdrow) {
$catname=$cdrow['Name'];
}else{
$catname="uncategorized";
}?>
|
=$catname?> |
|
=zonedate('l jS \of F Y h:i:s A',$row['TimeStamp'],-6,false)?> |
| |
| =$row['Body']?> |
|
Respond to this Entry
|
| |
$sql = "Select * from responses where DocId='{$row['Id']}' order by TimeStamp";
$rresult = mysql_query($sql) or die(mysql_error());
$firstresponse=true;
$respnum=1;
while ($rrow=mysql_fetch_array($rresult)) {
if($rrow['Status']=='1') {
if ($firstresponse) {
?>
}else{ ?>
| |
}
$firstresponse=false; ?>
| Response =$respnum?> |
| =zonedate('l jS \of F Y h:i:s A',$rrow['TimeStamp'],-6,false)?> |
| Submitted by: if($rrow['Source']){ echo $rrow['Source']; }else{ echo "anonymous"; }?> |
| =$rrow['Body']?> |
$respnum++;
}}?>
}?>
|