本文整理汇总了PHP中Banner::setBannerInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Banner::setBannerInfo方法的具体用法?PHP Banner::setBannerInfo怎么用?PHP Banner::setBannerInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Banner
的用法示例。
在下文中一共展示了Banner::setBannerInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Business
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));
$renamedFile = "logo" . $extension;
$upload_dir = "biz/{$bizId}";
move_uploaded_file($tmp_file, $upload_dir . "/" . $renamedFile);
//upload banner image file
$tmp_file = $_FILES['banner_upload']['tmp_name'];
$originalFile = basename($_FILES['banner_upload']['name']);
示例2: Banner
$destination = $_POST['txtDestination'];
$adUrl = $urlProtocol . $destination;
if ($destination == NULL) {
$adUrl = "";
} else {
if ($destination != NULL && !$gvalObj->isURL($adUrl)) {
$msg = $msg . "Invalid banner URL<br>";
$status = "NOTOK";
}
}
if ($status == "NOTOK") {
$msg = "<div class='alert alert-error' id='error_box'>" . $msg . "</div>";
} else {
$gbannerObj = new Banner();
$gbannerObj->setListingId($lid);
$gbannerObj->setBannerInfo($banerType, $caption, $adUrl);
$result = $gbannerObj->add();
$bannerID = $gbannerObj->getBannerId();
if ($result) {
//upload banner image file
$tmp_file = $_FILES['banner_upload']['tmp_name'];
$originalFile = basename($_FILES['banner_upload']['name']);
$extension = substr($originalFile, strripos($originalFile, '.'), strlen($originalFile));
$renamedFile = $bannerID . "" . $extension;
$upload_dir = "ads/{$banerType}";
move_uploaded_file($tmp_file, $upload_dir . "/" . $renamedFile);
$msg .= "<b>Listing updated successfully</b>";
$msg = "<div class='alert alert-info'>" . $msg . "</div>";
} else {
$msg .= "An error occurred while updating data. Please try again.";
$msg = "<div class='alert alert-error' id='error_box'>" . $msg . "</div>";