当前位置: 首页>>代码示例>>PHP>>正文


PHP Banner::getImage方法代码示例

本文整理汇总了PHP中Banner::getImage方法的典型用法代码示例。如果您正苦于以下问题:PHP Banner::getImage方法的具体用法?PHP Banner::getImage怎么用?PHP Banner::getImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Banner的用法示例。


在下文中一共展示了Banner::getImage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * 返回国家列表
  * @access public
  */
 function index()
 {
     $category = get_post_value('category');
     $language = get_post_value('language');
     $key = get_post_value('key');
     $field = array('category_id', 'type', 'title', 'created', 'start_time', 'end_time', 'status', 'language');
     $m = new Banner();
     $m->clear();
     $m->setField($field);
     $m->setTable('vcb_banner_categor');
     $m->setWhere('status', '!=', '60000');
     if ($category > 0) {
         $m->setWhere('category', '=', $category);
     }
     if ($language != '') {
         $m->setWhere('language', '=', $language);
     }
     if ($key != '') {
         $m->setWhere('title', 'LIKE', '%' . $key . '%');
     }
     $m->setOrderBy(array('created' => 'DESC'));
     $data = $m->select();
     //状态标题
     $count = count($data);
     for ($i = 0; $i < $count; $i++) {
         $data[$i]['status_cn'] = $m->getStatus('cn', $data[$i]['status']);
         $data[$i]['status_th'] = $m->getStatus('th', $data[$i]['status']);
         $data[$i]['type_caption'] = $m->getTypeCaption($data[$i]['type']);
         $data[$i]['image_url'] = $m->getImage($data[$i]['category_id']);
     }
     $this->assign('data', $data);
 }
开发者ID:koery,项目名称:Vcanbuy,代码行数:36,代码来源:BannerController.class.php

示例2: date_default_timezone_set

?>
				</tr>
				
				<?php 
date_default_timezone_set('America/Mexico_City');
foreach ($banners as $banner) {
    $date1 = new fDate($banner->getCreated_at());
    $id = $banner->prepareId_banner();
    //$category = new Category(array('id_category' => $article->prepareId_category(), 'id_section' => $section_id));
    //$user = new User($article->prepareId_user());
    $status = $banner->getStatus();
    $status = $status == true || $status == "Yes" || $status == 1 ? "Publicado" : "No publicado";
    echo '<tr>
								<td> <input type="checkbox" class="check" value="' . $id . '" name="args[]" /> </td>
						';
    $image = Banner::getImage($id, 1);
    if (!empty($image)) {
        echo '
							<td> <img width="200" height="80" src="../uploads/banner/thumbs/' . $image . '"/> </td>';
    } else {
        echo '<td> - </td>';
    }
    echo '
								<td> ' . $banner->prepareLink() . ' </td>
								<td> ' . BannerSection::findName($banner->prepareId_section()) . ' </td>
						';
    echo ' <td> <center> ' . $banner->getOrder() . ' </center> </td>
						<td> ' . $status . ' </td>
								<td> <center>' . $date1->format('d-m-Y') . '</center> </td>';
    if ($canEdit) {
        echo '<td><center><a href="edit.php?id=' . $id . '"><img src="' . ICON . 'edit.png" /></a> </center></td>';
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:31,代码来源:banner_search.php

示例3: Index

 function Index()
 {
     //echo "session=";
     // print_r($_SESSION);
     // echo "<br>cookie=";
     // print_r($_COOKIE);
     if (isset($_SESSION['username']) && !empty($_SESSION['username'])) {
         //检测session
         $this->assign('username', $_SESSION['username']);
     } else {
         if (!empty($_COOKIE["username"])) {
             //检测cookie
             $userCookie = $_COOKIE["username"];
             $this->assign('username', $userCookie);
         } else {
             //游客登陆
             $tourists_id = Login::getTouristsId();
             if ($tourists_id == null) {
                 Login::setTouristsId();
             }
             //
         }
     }
     //else结束
     //
     $c = new Category();
     $category_1 = $c->getCategory_1_id();
     $this->assign('category_1', $category_1);
     $f = new Floor();
     $floor_1 = $f->getFloor_1_id();
     $this->assign('floor_1', $floor_1);
     //
     $m = new Category();
     $num = count($m->getCategory_1_id()) * 10000;
     $category_2_all = $this->get_category_2();
     $this->assign('category_2_all', $category_2_all);
     //var_dump($category_2_all);
     //echo $num1."<br>";
     $category_3_all = $this->get_category_3();
     //echo "oh:".$num2."<br>";
     //$this->assign('category_3_'.$i."_".$j.$k, $category_3_1[$k]);
     //var_dump($category_3_all);
     $this->assign('category_3_all', $category_3_all);
     //$a=new Banner();
     $floor_2_all = $this->get_floor_2();
     $floor_3_all = $this->get_floor_3();
     $this->assign('floor_2_all', $floor_2_all);
     $this->assign('floor_3_all', $floor_3_all);
     //********************************
     $type = get_post_value('type');
     $language = get_post_value('language');
     $key = get_post_value('key');
     $field = array('category_id', 'type', 'title', 'created', 'start_time', 'end_time', 'status', 'language');
     $m = new Banner();
     $m->clear();
     $m->setField($field);
     $m->setTable('vcb_banner_categor');
     //$m->setWhere('status', '!=', '60000');//暂不设置
     if ($type != '') {
         $m->setWhere('type', '=', $type);
     }
     if ($language != '') {
         $m->setWhere('language', '=', $language);
     }
     if ($key != '') {
         $m->setWhere('title', 'LIKE', '%' . $key . '%');
     }
     $m->setOrderBy('type');
     $data = $m->select();
     //状态标题    在每一条数据后加上4个数据
     $count = count($data);
     for ($i = 0; $i < $count; $i++) {
         $data[$i]['status_cn'] = $m->getStatus('cn', $data[$i]['status']);
         $data[$i]['status_th'] = $m->getStatus('th', $data[$i]['status']);
         //$data[$i]['type'] = $m->getTypeCaption($data[$i]['type']);//返回位置对应描述
         $data[$i]['dataInformation'] = $m->getImage($data[$i]['category_id']);
     }
     //print_r($data);
     $this->assign('dataOfBanner', $data);
 }
开发者ID:koery,项目名称:Vcanbuy,代码行数:80,代码来源:IndexController1.class.php


注:本文中的Banner::getImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。