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


PHP Banner类代码示例

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


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

示例5: 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

示例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" => "heymandan@gmail.com", "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


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