array( "info"=>array("id"=>-1,"name"=>"","description"=>""), "locations"=>array(), "categories"=>array() ), "premium"=>false, "expires"=>"Not Available" ); $_POST["listing"]["new"]=$_POST["listing"]["current"]; } if(!isset($_POST["listing"]["new"]["locations"])) $_POST["listing"]["new"]["locations"]=array(); if(!isset($_POST["listing"]["new"]["categories"])) $_POST["listing"]["new"]["categories"]=array(); if(!isset($_POST["listing"]["current"]["locations"])) $_POST["listing"]["current"]["locations"]=array(); if(!isset($_POST["listing"]["current"]["categories"])) $_POST["listing"]["current"]["categories"]=array(); //get required data require_once $_SERVER['DOCUMENT_ROOT']."/includes/dbi.inc"; $db=new Database(); $sqls=array(); $sqls["countries"]="select * from countries order by name"; $sqls["provinces"]="select * from prov_state order by name"; $sqls["business_types"]="select * from businesstypes order by name"; foreach($sqls as $sql_name=>$sql){ if(isset($_SESSION[$sql_name])){ $sqls[$sql_name]=$_SESSION[$sql_name]; } else { $sqls[$sql_name]=$db->get_data($sql,array("id"=>$_REQUEST["listing_id"])); $_SESSION[$sql_name]=$sqls[$sql_name]; } } if($_POST["listing"]["current"]["info"]["id"]==-1) $_POST["listing"]["premium"]=false; ?>
Search Oildirectory | |||||
---|---|---|---|---|---|
Business Name
|