include "globals.php"; ?>
include "../functions.php"; ?>
/*
$Search=$_POST['Search'];
$Ssub=$_POST['Ssub'];
$Sord=$_POST['Sord'];
$Sdes=$_POST['Sdes'];
$so=$_REQUEST['so'];
$pages=$_REQUEST['pages'];
*/
require_once("function.php");
$table='ordinances';
if (isset($Search))
{
if ($Sord)
{
$Sword=" OrdNum like '%".$Sord."%'";
}
if ($Ssub)
{
$Swsub=" and Subject like '%".$Ssub."%'";
}
if ($Sdes)
{
$Swdes=" and Description like '%".$Sdes."%'";
}
$SWhere = $Sword.$Swsub.$Swdes;
if ( $SWhere == "")
{
$SWhere = "";
}
else if ((substr($SWhere, 0, 4)) == " and")
{
$SWhere=substr($SWhere,4);
$SWhere = "Where ".$SWhere;
}
else
{
$SWhere = "Where ".$SWhere;
}
}
#echo "\n";
?>
**** Please note that occasionally ordinances are amended or repealed with superseding ordinances. **** | |||||||||||||||
$pages=20;
$limit=($start != "")?" Limit $start,$pages":" Limit 0,$pages";
if ($st != "")
{
$sostr=($so)?" ORDER BY $st DESC":" ORDER BY $st";
}
else
{
$sostr=" ORDER BY OrdNum DESC";
}
$sql="SELECT * FROM $table ";
#$sql="SELECT * FROM $table ".$SWhere.$sqlstr;
$result=GetRows($mysqli, $sql);
$total=GetNum($result);
$sql.=$sostr.$limit;
$result=GetRows($mysqli, $sql);
$totalx=GetNum($result);
$sql=Smart($result,'result');
echo "
|