} if (!empty($zip) && !$gvalObj->isZipCode($zip)) { $msg = $msg . "Invalid zip code<br>"; $status = "NOTOK"; } } if ($status == "NOTOK") { $msg = "<div class='alert alert-error' id='error_box'>" . $msg . "</div>"; } else { $gbizObj = new Business(); $package = $gbizObj->getPkg($requested_pkg); $gbizObj->setBizInfo($id, $title, $tagline, $category, $subCategory, $description, $listingUrl); $gbizObj->setContactInfo($email, $phone, $fax, $mobile, $contactP); $gbizObj->setLocationInfo($street, $city, $country, $zip, $latitude, $longitude); $gbizObj->setKeywordInfo($keywords); $gbizObj->setPkg($package); $result = $gbizObj->add(); // Cause insert a new business record in to the database if ($result) { $bizId = $gbizObj->business_id; $gbannerObj = new Banner(); $gbannerObj->setBannerInfo($banerType, $caption, $adUrl, $bizId, $id); $gbannerObj->add(); $bannerId = $gdbObj->insert_id(); $msg .= "<b>You have successfully added a new business with the Id of " . $bizId . "</b>"; $msg = "<div class='alert alert-info' id='error_box'>" . $msg . "</div>"; //upload the logo file mkdir(SITE_ROOT . "/biz/{$bizId}", 0755); $tmp_file = $_FILES['file_upload']['tmp_name']; $originalFile = basename($_FILES['file_upload']['name']); $extension = substr($originalFile, strripos($originalFile, '.'), strlen($originalFile));