<?php
 
include('./fancyurls.config.php');
include('./config.php');
 
$data = explode("/",serverVar('PATH_INFO'));
//$blogid = intval($data[1]);
if (count($data) == 5) {
	$year = intval($data[1]);
	$month = intval($data[2]);
	$day = intval($data[3]);
	$title = $data[4];
 
	// get the itemid from the name and date.  (Note, if you have two posts with the same name on the same day, it'll be screwed up.)
	$query  = 'SELECT iblog, inumber FROM '.sql_table('item').' WHERE iurltitle=\'' . $title . '\' ';
	$query .= "AND (YEAR(itime) = $year AND MONTH(itime) = $month AND DAYOFMONTH(itime) = $day)";
 
	$res = sql_query($query);
	$obj = mysql_fetch_object($res);
 
	$blogid = $obj->iblog;
	$itemid = $obj->inumber;
} else {
	$itemid = intval($data[1]);
}
 
selector();
 
?>
fancierurlitem.txt · Last modified: 2006/07/05 13:03 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki