halfgeek.net halfgeek.net $query]\n"; $res = mysqli_query($dbh,$query) or die(mysqli_error()); while ($row = mysqli_fetch_array($res)){ extract($row); } $query = "select date_format(date_add(time,interval (unix_timestamp('1970-01-01')) second),'%Y-%m-%dT%T+00:00') as updated_date from posts where (display = 1 and category_id != ".$shlog_category_id.") order by time desc limit 1"; #print "query:[
$query
]\n"; $res = mysqli_query($dbh,$query) or die(mysqli_error()); while ($row = mysqli_fetch_array($res)){ extract($row); } print "$updated_date\n"; $query = "select p.*, g.id as category_id, g.name as category_name, a.name as author_name, date_format(date_add(p.time,interval (unix_timestamp('1970-01-01')) second),'%Y-%m-%dT%T+00:00') as posted_date, count(c.post_id) as comment_count from posts p left join authors a on p.author_id = a.id left join categories g on g.id = p.category_id left join comments c on p.id = c.post_id where p.display = 1 and (c.display is NULL or c.display = 1) and category_id != ".$shlog_category_id." and p.time >= '$end_date' group by p.id order by p.time desc"; #print "query:[
$query
]\n"; $res = mysqli_query($dbh,$query) or die(mysqli_error()); while ($row = mysqli_fetch_array($res)){ extract($row); print "\n"; print ""; print htmlspecialchars($title); print "\n"; print "\n"; print "tag:halfgeek.net,{gmt_date format=\"%Y\"}:?id=$id\n"; print "$posted_date\n"; print "$posted_date\n"; print "$posted_date\n"; print "$author_name\n"; print "\n"; print "$category_name\n"; # $body = preg_replace('/=start-expand\s*(.*)\r?\n/',"
",$body); # $body = preg_replace('/=end-expand\s*(.*)\r?\n/',"\\1
",$body); $body = preg_replace('/=start-expand\s*(.*)\r?\n/','',$body); $body = preg_replace('/=end-expand\s*(.*)\r?\n/','',$body); $body = preg_replace('/\n/',"
\n",$body); print "\n"; $body = htmlentities($body,ENT_QUOTES); $body = str_replace('©','(C)',$body); $body = str_replace('è','e',$body); $body = str_replace('ñ','n',$body); $body = str_replace('á','a',$body); $body = str_replace('·','.',$body); $body = str_replace('°','^',$body); $body = str_replace('ï','?',$body); $body = str_replace('½','1/2',$body); $body = str_replace(''',"'",$body); $body = str_replace('','"',$body); $body = str_replace('','"',$body); $body = str_replace('',"'",$body); $body = str_replace('',"--",$body); $body = str_replace('','e',$body); # e' print $body; print "\n"; print "\n"; } ?>