當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Banner::setBannerInfo方法代碼示例

本文整理匯總了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']);
開發者ID:rajitha-bandara,項目名稱:odwlbs-peoject,代碼行數:31,代碼來源:process_add_listings.php

示例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>";
開發者ID:rajitha-bandara,項目名稱:odwlbs-peoject,代碼行數:31,代碼來源:process_edit_listings.php


注:本文中的Banner::setBannerInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。