• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Banner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: prueba

 /**
  *
  */
 public function prueba()
 {
     $banner = new Banner('55c10856a8269769ac822f9a');
     $banner->getData();
     $vista = $banner->getView();
     return view($vista, ['data' => $banner->getData()]);
 }
开发者ID:jarm-mcs,项目名称:enera_portal,代码行数:10,代码来源:CampaignsController.php


示例2: alterar

 public function alterar(Banner $banner)
 {
     $banner->setUltimaModificacao();
     $idAntigo = $banner->id;
     $this->bannerRepository->update($banner);
     $this->uploadBanner($idAntigo);
     return "Banner alterado com sucesso!";
     //        return $this->bannerRepository->findById($idAntigo);
 }
开发者ID:jhmachado,项目名称:anotation,代码行数:9,代码来源:BannerService.php


示例3: actionManage

 public function actionManage($is_big)
 {
     $model = new Banner('search');
     $model->unsetAttributes();
     if (isset($_GET['Banner'])) {
         $model->attributes = $_GET['Banner'];
     }
     $this->render('manage', array('model' => $model, 'is_big' => $is_big));
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:9,代码来源:BannerAdminController.php


示例4: delete

 function delete($id)
 {
     $banners = new Banner($id);
     if (!$banners->exists()) {
         show_404();
     }
     if ($banners->delete()) {
         flash_message('success', 'Thành công. Thao tác đã được thực hiện.');
         redirect($_SERVER['HTTP_REFERER']);
     }
 }
开发者ID:lxthien,项目名称:batdongsan,代码行数:11,代码来源:banners_bak.php


示例5: click_action

 /**
  * Administration view for banner
  */
 function click_action($id)
 {
     $banner = Banner::find($id);
     $banner->clicks += 1;
     $banner->store();
     $this->redirect($banner->getLink());
 }
开发者ID:ratbird,项目名称:hope,代码行数:10,代码来源:banner.php


示例6: Edit

 public function Edit()
 {
     $input = Input::all();
     $banner_id = $input['id'];
     $banner = Banner::find($banner_id);
     return View::make('admin.banner.add')->with('banner', $banner);
 }
开发者ID:hungleon2112,项目名称:giaymaster,代码行数:7,代码来源:BannerController.php


示例7: run

 public function run()
 {
     Banner::truncate();
     Website::truncate();
     $user = User::create(array("username" => "danheyman", "name" => "Daniel Heyman", "email" => "[email protected]", "password" => "hello", "newsletter" => true, "admin_emails" => true, "membership" => "platinum", "paypal" => "", "membership_expires" => Carbon::now()->addMonth(), "referrals" => 0, "upline" => "", "cash" => 0, "credits" => 0, "credits_today" => 0, "views_total" => 0, "views_today" => 0, 'auto_assign' => 0, 'register_ip' => Request::getClientIp(), 'last_login' => Carbon::now()));
     for ($x = 0; $x < 20; $x++) {
         $website = new Website();
         $website->url = "http://listviral.com";
         $website->enabled = true;
         $website->credits = 10000;
         $website->views = 0;
         $website->days = array();
         $website->hours = array();
         $user->websites()->save($website);
         $banner = new Banner();
         $banner->banner = "http://brisksurf.com/banner.png";
         $banner->url = "http://brisksurf.com";
         $banner->enabled = true;
         $banner->credits = 10000;
         $banner->views = 0;
         $banner->days = array();
         $banner->hours = array();
         $user->banners()->save($banner);
     }
 }
开发者ID:danielheyman,项目名称:TechDimeProjects,代码行数:25,代码来源:SurfSeeder.php


示例8: loadModel

 public function loadModel($id)
 {
     if (($model = Banner::model()->findByPk($id)) === null) {
         throw new CHttpException(404, 'Страница не найдена');
     }
     return $model;
 }
开发者ID:kuzmina-mariya,项目名称:unizaro-kamin,代码行数:7,代码来源:BannerBackendController.php


示例9: delete

 public function delete($id)
 {
     $banner = Banner::find($id);
     $banner->delete();
     Session::flash('success', 'Banner deleted');
     return Redirect::to('admin/banners');
 }
开发者ID:ChavezRuston,项目名称:fansemo,代码行数:7,代码来源:BannerController.php


示例10: directorio

 public function directorio($directorioCategoria)
 {
     $anuncios = Anuncio::all();
     $categoriasClasif = ClasificadoCategoria::all();
     if ($directorioCategoria == 'all') {
         $listaClasificadosPremium = Clasificado::where('premium', '=', 1)->where('habilitar', '=', 1)->orderBy('fecha_publicacion', 'DESC')->get();
         $listaClasificadosNormales = Clasificado::where('premium', '=', 0)->where('habilitar', '=', 1)->orderBy('fecha_publicacion', 'DESC')->get();
     } else {
         $categoria = ClasificadoCategoria::find($directorioCategoria);
         //$clasificados = $categoria->clasificados;
         $listaClasificadosPremium = Clasificado::where('categoria_id', '=', $directorioCategoria)->where('premium', '=', 1)->where('habilitar', '=', 1)->orderBy('fecha_publicacion', 'DESC')->get();
         $listaClasificadosNormales = Clasificado::where('categoria_id', '=', $directorioCategoria)->where('premium', '=', 0)->where('habilitar', '=', 1)->orderBy('fecha_publicacion', 'DESC')->get();
     }
     $bannersizquierda = Banner::where('seccion', '=', 'CLASIFICADOS-IZQUIERDA')->where('habilitar', '=', 1)->orderBy('id', 'asc')->get();
     $bannersderecha = Banner::where('seccion', '=', 'CLASIFICADOS-DERECHA')->where('habilitar', '=', 1)->orderBy('id', 'asc')->get();
     $bannersindexarriba = Banner::where('seccion', '=', 'INDEX-ARRIBA')->where('habilitar', '=', 1)->orderBy('id', 'asc')->get();
     $rolusuarioLogueado = '';
     $mailusuarioLogueado = '';
     $nombreusuarioLogueado = '';
     if (Auth::check()) {
         $authuser = Auth::user();
         $usu = Usuario::find($authuser->id);
         $mailusuarioLogueado = $authuser->email;
         $nombreusuarioLogueado = $authuser->nombre;
         $rolusuarioLogueado = DB::table('usuario_tiene_rol2')->where('usuario_id', '=', $authuser->id)->first();
         $rolusuarioLogueado = UsuarioRol::find($rolusuarioLogueado->rol_id)->rol;
     }
     return View::make('index.directorioClasificados')->with(array('anuncios' => $anuncios, 'categoriasClasif' => $categoriasClasif, 'listaClasificadosPremium' => $listaClasificadosPremium, 'directorioCat' => $directorioCategoria == 'all' ? 'Todos los clasificados' : $categoria->categoria, 'listaClasificadosNormales' => $listaClasificadosNormales, 'bannersizquierda' => $bannersizquierda, 'bannersderecha' => $bannersderecha, 'bannersindexarriba' => $bannersindexarriba, 'username' => $mailusuarioLogueado, 'nameuser' => $nombreusuarioLogueado, 'roluser' => $rolusuarioLogueado));
     //
 }
开发者ID:ubx-caloca,项目名称:todoconstruimos,代码行数:30,代码来源:DirectorioClasifController.php


示例11: actionIndex

 public function actionIndex()
 {
     $this->tituloManual = "Novo pedido";
     $modelPizzaria = Pizzaria::model()->find();
     $modelBanner = Banner::model()->ativos()->find();
     if (!$this->validaSituacao()) {
         $this->render('indisponivel', array('modelPizzaria' => $modelPizzaria, 'modelBanner' => $modelBanner));
         Yii::app()->end();
     }
     $dataBebidas = new Produto();
     $dataPratosLanche = new Produto();
     $dataPromocao = new Promocao();
     $modelSabor = array();
     $modelTamanho = array();
     $arrayTipoSabor = array();
     $listCombinado = array();
     switch ($modelPizzaria->tipo_restaurante) {
         case TipoRestaurante::_TIPO_PIZZARIA_:
             $modelSabor = Sabor::model()->ativos()->findAll();
             $modelTamanho = Tamanho::getArrayTamanho();
             $arrayTipoSabor = TipoSabor::getArrayTipoSabor();
             break;
         default:
             $listCombinado = CHtml::listData(Combinado::model()->ativos()->findAll(), 'id', 'nome');
             break;
     }
     $this->render('index', array('modelPedido' => new Pedido(), 'loginForm' => new LoginForm(), 'modelCliente' => new Cliente(), 'modelUsuario' => new Usuario(), 'dataBebidas' => $dataBebidas->ativos()->bebidas()->search(), 'dataPratosLanche' => $dataPratosLanche->ativos()->pratoLanche()->search(), 'dataPromocao' => $dataPromocao->ativas()->search(), 'modelSabor' => $modelSabor, 'modelTamanho' => $modelTamanho, 'arrayTipoSabor' => $arrayTipoSabor, 'modelPizzaria' => $modelPizzaria, 'arrayBairro' => CHtml::listData(EnderecoPermitido::model()->ativos()->findAll(array('group' => 'bairro', 'distinct' => true)), 'bairro', 'bairro'), 'arrayFormaPagamento' => CHtml::listData(FormaPagamento::model()->ativos()->findAll(), 'id', 'nome'), 'listCombinado' => $listCombinado, 'modelBanner' => $modelBanner));
 }
开发者ID:BrunoCheble,项目名称:novopedido,代码行数:28,代码来源:PedidoController.php


示例12: AdminBanner

 function AdminBanner($row)
 {
     Module::Module($row);
     if (User::is_admin()) {
         switch (Url::get('cmd')) {
             case 'remove_banner':
                 $id = Url::get('id', 0);
                 if (empty($id)) {
                     Url::redirect_url('admin_banner.html');
                     exit;
                 }
                 Banner::delete_banner($id);
                 Url::redirect_url('admin_banner.html');
                 break;
             case 'edit_banner':
                 require_once 'forms/EditBanner.php';
                 $this->add_form(new EditBannerForm());
                 break;
             case 'list_banner':
                 require_once 'forms/ListBanner.php';
                 $this->add_form(new ListBannerForm());
                 break;
             default:
                 require_once 'forms/ListBanner.php';
                 $this->add_form(new ListBannerForm());
                 break;
         }
     } else {
         Url::access_denied();
     }
 }
开发者ID:hqd276,项目名称:bigs,代码行数:31,代码来源:class.php


示例13: jkbanners_display_banners

function jkbanners_display_banners($atts)
{
    $a = shortcode_atts(array('id' => false, 'filter_menu_order' => false, 'template' => 'list'), $atts);
    $output = array();
    //
    $banners = array();
    $banners = Banner::getAll();
    if ($a['filter_menu_order']) {
        foreach ($banners as $bk => $banner) {
            if ($banner->post->menu_order != $a['filter_menu_order']) {
                unset($banners[$bk]);
            }
        }
    }
    //
    $bannerTemplate = new Template();
    //One random banner
    if ($a['template'] == 'random-single') {
        //get a random item
        $banner = $banners[array_rand($banners)];
        //show single banner
        $bannerTemplateResponse = $bannerTemplate->get(__DIR__ . '/templates/single.php', array('banner' => $banner));
        $output[] = $bannerTemplateResponse;
    }
    //List all banners
    if ($a['template'] == 'list') {
        $bannerTemplateResponse = $bannerTemplate->get(__DIR__ . '/templates/list.php', array('banners' => $banners));
        $output[] = $bannerTemplateResponse;
    }
    //
    $output = implode("\n", $output);
    return $output;
}
开发者ID:kilrizzy,项目名称:WP-JK-Banners,代码行数:33,代码来源:jk-banners.php


示例14: directorio

 public function directorio($directorioCategoria)
 {
     $rolusuarioLogueado = '';
     $mailusuarioLogueado = '';
     $nombreusuarioLogueado = '';
     if (Auth::check()) {
         $authuser = Auth::user();
         $usu = Usuario::find($authuser->id);
         $mailusuarioLogueado = $authuser->email;
         $nombreusuarioLogueado = $authuser->nombre;
         $rolusuarioLogueado = DB::table('usuario_tiene_rol2')->where('usuario_id', '=', $authuser->id)->first();
         $rolusuarioLogueado = UsuarioRol::find($rolusuarioLogueado->rol_id)->rol;
     }
     $anuncios = Anuncio::all();
     $bannersizquierda = DB::table('banners')->whereRaw("seccion='DIRECTORIO-IZQUIERDA' and habilitar=1")->orderBy('id', 'asc')->get();
     $bannersderecha = DB::table('banners')->whereRaw("seccion='DIRECTORIO-DERECHA' and habilitar=1")->orderBy('id', 'asc')->get();
     $bannersindexarriba = Banner::where('seccion', '=', 'INDEX-ARRIBA')->where('habilitar', '=', 1)->orderBy('id', 'asc')->get();
     $categorias = DB::table('proveedor_tipo')->get();
     $listaProveedores = DB::select('select * from proveedor_tipo,proveedores,proveedor_detalle where proveedor_tipo.id=proveedores.proveedor_tipo_idproveedor_tipo and proveedores.id=proveedor_detalle.proveedores_idproveedor');
     if ($directorioCategoria == 'all') {
         $listaCategoria = DB::select("select * from proveedor_tipo,proveedores,proveedor_detalle where proveedor_tipo.id=proveedores.proveedor_tipo_idproveedor_tipo and proveedores.id=proveedor_detalle.proveedores_idproveedor");
     } else {
         $listaCategoria = DB::select("select * from proveedor_tipo,proveedores,proveedor_detalle where proveedor_tipo.id=proveedores.proveedor_tipo_idproveedor_tipo and proveedores.id=proveedor_detalle.proveedores_idproveedor and proveedor_tipo.tipo='{$directorioCategoria}'");
     }
     //$proveedores = DB::table('proveedores')->where('nombre_usuario', '=', "$nombre_usuario")->first();
     //$proveedores_detalle = Proveedor_detalle::where('proveedores_idproveedor', '=', $proveedores->id)->first();
     //$galeria = DB::table('proveedor_galeria')->where('proveedores_idproveedor', '=', $proveedores->id)->get();
     //return View::make('index.index')->with(array('proveedores'=>$proveedores,'proveedores_detalle'=>$proveedores_detalle,'galeria'=>$galeria));
     return View::make('index.directorio')->with(array('bannersizquierda' => $bannersizquierda, 'bannersderecha' => $bannersderecha, 'categorias' => $categorias, 'listaProveedores' => $listaProveedores, 'directorioCategoria' => $directorioCategoria, 'listaCategoria' => $listaCategoria, 'username' => $mailusuarioLogueado, 'nameuser' => $nombreusuarioLogueado, 'roluser' => $rolusuarioLogueado, 'anuncios' => $anuncios, 'bannersindexarriba' => $bannersindexarriba));
     //
 }
开发者ID:ubx-caloca,项目名称:todoconstruimos,代码行数:31,代码来源:DirectorioController.php


示例15: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     die;
     $model = new Customer();
     // $jaspers_franchise = JaspersFranchise::model()->findAll();
     $jaspers_companies = JaspersCompanies::model()->findAllByAttributes(array('franchise_id' => Yii::app()->user->franchise));
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     $bannerImg = Banner::model()->findByAttributes(array('isactive' => 1, 'loc' => 1));
     $curUser = User::model()->findByPk(Yii::app()->user->uid);
     if (isset($_POST['Customer'])) {
         $model->attributes = $_POST['Customer'];
         $model->jaspers_franchise = Yii::app()->user->franchise;
         $curUser->name = $model->contact;
         $curUser->save();
         if (Yii::app()->user->isUser()) {
             $model->attendee = Yii::app()->user->uid;
             $model->franchise = Yii::app()->user->franchise;
         }
         if ($model->save()) {
             Yii::app()->session['last_created_user'] = $model->attributes;
             $istApp = new CustAppoint();
             $istApp->app_id = 1;
             $istApp->cus_id = getCurCusId();
             $istApp->status = 0;
             $istApp->save();
             if (isset($_GET['back'])) {
                 $this->redirect(array('site/index'));
             }
             //$this->redirect(array('site/getstarted', 'id' => getCurCusId()));
             $this->redirect(array('workingwell/create', 'id' => getCurCusId()));
         }
     }
     $this->render('create', array('model' => $model, 'bannerImg' => $bannerImg, 'curUser' => $curUser, 'jaspers_companies' => $jaspers_companies));
 }
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:39,代码来源:CustomerController.php


示例16: banner

 public function banner($params = array())
 {
     //获取最新banner图片列表
     $images = Banner::model()->getBannerList();
     //获取通卡信息列表
     $cards = Yii::app()->params['cards'];
     return $this->notice('OK', 0, '成功', ['images' => $images, 'cards' => $cards]);
 }
开发者ID:kl0428,项目名称:urtime,代码行数:8,代码来源:CardService.php


示例17: begin

 public function begin()
 {
     /** @var Html $document */
     $groupId = $this->getParams('banner_group_id');
     if ($groupId) {
         $this->banners = Banner::select()->where('`status`=:status AND `term_id`=:term_id')->setParameters([':status' => 'ACTIVE', ':term_id' => $groupId])->orderBy('ordering')->execute();
     }
 }
开发者ID:hosivan90,项目名称:toxotes,代码行数:8,代码来源:SlideShow.php


示例18: actionCreate

 /**
  * 录入
  *
  */
 public function actionCreate()
 {
     parent::_acl('banner_create');
     $model = new Banner();
     if (isset($_POST['Banner'])) {
         $file = XUpload::upload($_FILES['attach']);
         $model->attributes = $_POST['Banner'];
         if (is_array($file)) {
             $model->image = $file['pathname'];
         }
         if ($model->save()) {
             AdminLogger::_create(array('catalog' => 'create', 'intro' => '录入banner,ID:' . $model->id));
             $this->redirect(array('index'));
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:zywh,项目名称:maplecity,代码行数:21,代码来源:BannerController.php


示例19: getBanner

 public function getBanner()
 {
     $ya = date('Y-m-d H:i:s');
     $c = new CDbCriteria();
     $c->condition = 'estado = :estado AND (inicio_publicacion < :inicio_p OR inicio_publicacion IS NULL) AND (fin_publicacion > :fin_p OR fin_publicacion IS NULL)';
     $c->params = array(':estado' => 1, 'inicio_p' => $ya, 'fin_p' => $ya);
     $dependencia = new CDbCacheDependency("SELECT GREATEST(MAX(creado), MAX(modificado)) FROM banner WHERE estado = 1 AND (inicio_publicacion < '" . $ya . "' OR inicio_publicacion IS NULL) AND (fin_publicacion > '" . $ya . "' OR fin_publicacion IS NULL)");
     return Banner::model()->cache(3600, $dependencia)->find($c);
 }
开发者ID:Telemedellin,项目名称:tm,代码行数:9,代码来源:BannerW.php


示例20: actionSuccess

 public function actionSuccess()
 {
     $criteria = new CDbCriteria();
     $criteria->compare('t.banner_position_id', 4);
     $banner = Banner::model()->localized()->find($criteria);
     $this->pageTitle = Yii::t('common', '反馈中心') . SEPARATOR . Setting::getValueByCode('inside_title', true);
     $this->layout = 'main';
     $this->render('success', array('banner' => $banner));
 }
开发者ID:kinghinds,项目名称:kingtest2,代码行数:9,代码来源:FeedbackController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BannersHelper类代码示例发布时间:2022-05-23
下一篇:
PHP Bank类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap