require_once("conn.php");
require_once("access.php");
require_once("includes.php");
//if($_SESSION[AccountStatus] != "active")
//{
// header("location:inactive.php");
// exit();
//}
//get the info
if(isset($_POST[s1]))
{
$MyExp = mktime(0,0,0,date(m), date(d) + 60, date(Y));
$LogoImage = $_FILES[logo][name];
if(!empty($LogoImage))
{
$MyLogo = $t."_logo_".$LogoImage;
copy($_FILES[logo][tmp_name], "yellow_images/".$MyLogo);
}
else
{
$MyLogo = "";
}
//manage files
$MyImages = array();
if(!empty($_FILES[ResumeImages][name][0]))
{
while(list($key,$value) = each($_FILES[ResumeImages][name]))
{
if(!empty($value))
{
$NewImageName = $t."_resume_".$value;
copy($_FILES[ResumeImages][tmp_name][$key], "yellow_images/".$NewImageName);
$MyImages[] = $NewImageName;
}
}
if(!empty($MyImages))
{
if(empty($_POST[OldImages]))
{
$ImageStr = implode("|", $MyImages);
}
else
{
$ImageStr = "";
}
}
}
else
{
$ImageStr = "";
}
$q1 = "insert into yellow_posts set
CompanyName = '$_POST[CompanyName]',
CategoryID = '$_POST[CategoryID]',
SubCategoryID = '$_POST[SubCategoryID]',
Price = '$_POST[Price]',
City = '$_POST[city]',
resume = '$_POST[resume]',
logo = '$MyLogo',
ResumeImages = '$ImageStr',
PostDate = '$t',
ExpireDate = '$MyExp',
AgentID = '$_SESSION[AgentID]' ";
mysql_query($q1);
header("location:managelisting.php");
exit();
}
for($z = '1'; $z <= (5 - $i); $z++)
{
$ImageBlock .= "
\n";
}
//get the templates
require_once("templates/HeaderTemplate.php");
require_once("templates/AddListTemplate.php");
require_once("templates/FooterTemplate.php");
?>