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

PHP Area类代码示例

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

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



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

示例1: PlantillaEncabezado

    function PlantillaEncabezado($title)
    {
        $area = new Area($_SESSION['session'][5]);
        ?>

        <table id="cabecera" cellpadding="0" cellspacing="0" width="100%" style="margin:0px;">
    		<tr>
    			<td class="superior"><img src="public_root/imgs/cabecera.jpg" alt="cabecera" border="0" style="margin:0px" width="1000" height="80"/> </td>
    		</tr>
    		<tr>
    			<td class="vertical_line">
                    <table  cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td class="home">  </td>
                        <td align="left" class="usuario"><?php 
        echo ucwords($_SESSION['session'][1]);
        ?>
</td>
                        <td align="center" class="titulo"><?php 
        echo $title;
        ?>
 - <?php 
        echo $area->getNombre();
        ?>
</td>
                        <td align="right" class="cerrar_sesion"><a href="#" onclick="javascript:eliminar_sesion()">CERRAR SESION</a></td>
                    </tr>
                    </table>
                </td>
            </tr>
    	</table>
    	<?php 
    }
开发者ID:electromanlord,项目名称:sgd,代码行数:33,代码来源:class.plantilla.php


示例2: getCommentCountString

 /**
  * Returns a formatted text for the number of comments in the first comment block in the "Entry Comments" area
  * @param string $singular_format
  * @param string $plural_format
  * @param string $disabled_message
  * @return string
  */
 public function getCommentCountString($singular_format, $plural_format, $disabled_message = '')
 {
     $count = 0;
     $comments_enabled = false;
     $c = $this->getCollectionObject();
     $a = new Area('Blog Post Footer');
     $blocks = $a->getAreaBlocksArray($c);
     if (is_array($blocks) && count($blocks) > 0) {
         foreach ($blocks as $b) {
             if ($b->getBlockTypeHandle() == 'guestbook') {
                 $controller = $b->getInstance();
                 $count = $controller->getEntryCount($c->getCollectionID());
                 $comments_enabled = true;
                 break;
                 // stop at the fist guestbook block found
             }
         }
     }
     if ($comments_enabled) {
         $format = $count == 1 ? $singular_format : $plural_format;
         return sprintf($format, $count);
     } else {
         return $disabled_message;
     }
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:32,代码来源:blog_entry.php


示例3: deleting

 /**
  * @param Area $area 
  */
 public function deleting(Area $area)
 {
     $area->groups->each(function ($m) {
         $m->delete();
     });
     $area->categories()->delete();
     $area->sponsors()->detach();
 }
开发者ID:adriancatalinsv,项目名称:fiip,代码行数:11,代码来源:AreaObserver.php


示例4: insert

 /**
  * Inseri um registro na tabela
  *
  * @parametro TematicaMySql tematica
  */
 public function insert(Area $area)
 {
     $sql = "INSERT INTO {$this->table} (nome) VALUES ( :nome)";
     $nome = $area->getNome();
     $stmt = ConnectionFactory::prepare($sql);
     $stmt->bindParam(':nome', $nome);
     return $stmt->execute();
 }
开发者ID:alexdiasgonsales,项目名称:organizador,代码行数:13,代码来源:AreaMySqlDAO.class.php


示例5: listaroptions

 function listaroptions()
 {
     $id = $_REQUEST['id'];
     $area = new Area();
     $data = $area->listadoOptionsarea($id);
     $tot = count($data);
     for ($i = 0; $i < $tot; $i++) {
         echo '<option value="' . $data[$i]['idarea'] . '">' . $data[$i]['nombre'];
     }
 }
开发者ID:luigiguerreros,项目名称:erp,代码行数:10,代码来源:areacontroller.php


示例6: cargar

 /**
  *
  * @param desde
  * @param numeroElementos
  */
 public function cargar($desde = 0, $numeroElementos = 0)
 {
     $db = FabricaBaseDatos::crear();
     $select = $db->select()->from('area')->limit($numeroElementos, $desde);
     $rows = $db->fetchAll($select);
     foreach ($rows as $row) {
         $unArea = new Area($row['id_area']);
         $unArea->set_nombre($row['nombre']);
         $unArea->set_descripcion($row['descripcion']);
         array_push($this->_elementos, $unArea);
     }
     return true;
 }
开发者ID:Anthony2909,项目名称:midocu,代码行数:18,代码来源:Areas.php


示例7: getAreaHelper

 /**
  * @return Area
  */
 protected function getAreaHelper()
 {
     if (null === $this->areaHelper) {
         if (method_exists($this->view, 'plugin')) {
             $this->areaHelper = $this->view->plugin($this->defaultAreaHelper);
         }
         if (!$this->areaHelper instanceof Area) {
             $this->areaHelper = new Area();
             $this->areaHelper->setView($this->getView());
         }
     }
     return $this->areaHelper;
 }
开发者ID:coolms,项目名称:common,代码行数:16,代码来源:Map.php


示例8: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     //
     $rules = array("areaId" => "required", "areaName" => "required");
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->fails()) {
         return Redirect::to('/area/create')->withErrors($validator);
     }
     //
     $area = new Area();
     $area->areaID = Input::get('areaId');
     $area->areaName = Input::get('areaName');
     $area->save();
     return Redirect::to('/area');
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:20,代码来源:AreaController.php


示例9: cargar

 /**
  * 
  * @param desde
  * @param numeroElementos
  */
 public function cargar($desde = 0, $numeroElementos = 0)
 {
     if ($this->_idUsuario) {
         $db = FabricaBaseDatos::crear();
         $select = $db->select()->from('v_usuario_area')->limit($numeroElementos, $desde)->where('id_usuario = ?', $this->_idUsuario);
         $rows = $db->fetchAll($select);
         foreach ($rows as $row) {
             $unArea = new Area($row['id_area']);
             $unArea->set_nombre($row['nombre_area']);
             $unArea->set_descripcion($row['descripcion_area']);
             $this->_areas->add($unArea);
         }
     }
     return true;
 }
开发者ID:Anthony2909,项目名称:midocu,代码行数:20,代码来源:AreasPerteneceUsuario.php


示例10: actionGet_route

 public function actionGet_route()
 {
     $criteria = new CDbCriteria();
     $criteria->limit = 8;
     $area = Area::model()->findAll($criteria);
     $html = '<ul class="local_trip_pro" id="local_trip_content_list" data-blockid="recommend_localjoin">';
     for ($j = 0; $j < count($area); $j++) {
         if ($j) {
             $html .= '<li class="local_trip_pro_li wq_clearfix hide" data-content="lj' . $j . '" style="display:none;">';
         } else {
             $html .= '<li class="local_trip_pro_li wq_clearfix" data-content="lj' . $j . '">';
         }
         $criteria1 = new CDbCriteria();
         $criteria1->condition = "(style & 4) !=0";
         $criteria1->addCondition('area ="' . $area[$j]->name . '"', 'AND');
         $criteria1->limit = 3;
         $route = Route::model()->findAll($criteria1);
         for ($i = 0; $i < count($route); $i++) {
             if ($i) {
                 $html .= '<a class="local_trip_right img_slide_animte_wrapper" href="';
             } else {
                 $html .= '<a class="local_trip_left_l img_slide_animte_wrapper" href="';
             }
             if ($i) {
                 $html .= '#" target="_blank"> <img class="local_trip_img_s img_slide_animte first_page"  src="' . $route[$i]->source . '" data-original="' . $route[$i]->source . '" style="display: block;"> <span class="local_trip_mask_s"></span> <span class="local_trip_txt_s" title="' . $route[$i]->name . '">' . $route[$i]->name . '</span>' . '<span class="local_trip_price_s font_size12"><span class="font_size16">' . $route[$i]->price . '</span>元/人起</span></a>';
             } else {
                 $html .= '#" target="_blank"> <img class="local_trip_img_l img_slide_animte first_page" alt=" ' . $route[$i]->name . '" src="' . $route[$i]->source . '" data-original="' . $route[$i]->source . '" style="display: block;"> <span class="local_trip_mask_l"></span> <span class="local_trip_bl"></span><span class="local_trip_txt_l" title="' . $route[$i]->name . '">' . $route[$i]->name . '</span>' . '<span class="local_trip_price_l font_size14 font_color_orange"><span class="font_size28">' . $route[$i]->price . '</span>元/人起</span></a>';
             }
         }
         $html .= '</li>';
     }
     $html .= '</ul>';
     echo $html;
 }
开发者ID:rocketyang,项目名称:yii2,代码行数:34,代码来源:HomeController.php


示例11: actionWeather

 /**
  * 根据地区woeid获取雅虎天气
  * 获取woeid http://sugg.us.search.yahoo.net/gossip-gl-location/?appid=weather&output=xml&command=地名(如香港)
  * 匹配规则:preg_match('/woeid=(\d+)\&amp;lon=.*?\&amp;lat=.*?\&amp;s=.*?\&amp;c=.*?\&amp;country_woeid/si', $_return,$match);
  * 获取天气:https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.media.weather%20where%20woeid%20in(12523356%2C90717580%2C20069923)&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env&callback=
  */
 public function actionWeather()
 {
     ini_set('memory_limit', '256M');
     ini_set('max_execution_time', '1800');
     $areas = Area::model()->findAll(array('select' => 'woeid', 'condition' => 'woeid>0 AND theorder=3'));
     $woeids = array_keys(CHtml::listData($areas, 'woeid', ''));
     $woeidsStr = join(',', $woeids);
     $dir = Yii::app()->basePath . '/runtime/weather';
     $totalDir = $dir . '/total.log';
     zmf::createUploadDir($dir);
     $start = microtime(true);
     if ($woeidsStr != '') {
         $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.media.weather%20where%20woeid%20in({$woeidsStr})&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env";
         $json = zmf::curlget($url);
         file_put_contents($totalDir, $json);
     }
     $dataArr = CJSON::decode($json, true);
     $data = $dataArr['query'];
     if (!$data) {
         exit('Failed');
     }
     $results = $data['results']['result'];
     $detailDir = $dir . '/detail/';
     zmf::createUploadDir($detailDir);
     foreach ($results as $result) {
         if ($result['location']['woeid']) {
             $_dir = $detailDir . $result['location']['woeid'] . '.log';
             file_put_contents($_dir, CJSON::encode($result));
         }
     }
     echo microtime(true) - $start . '--<br/>';
 }
开发者ID:ph7pal,项目名称:wedding,代码行数:38,代码来源:CronController.php


示例12: getList

 public static function getList()
 {
     $model = Area::model();
     $command = $model->getDbConnection()->CreateCommand();
     $tableName = $model->tableName();
     return $command->select()->from($tableName)->order('create_time DESC')->queryAll();
 }
开发者ID:WalkerDi,项目名称:mama,代码行数:7,代码来源:Area.php


示例13: getInstance

 public static function getInstance()
 {
     if (!Area::$instance) {
         Area::$instance = new Area();
     }
     return Area::$instance;
 }
开发者ID:zuozuoba,项目名称:zpf,代码行数:7,代码来源:Area.php


示例14: get_layout_blocks

 private function get_layout_blocks($cObj, $aHandle)
 {
     $blocks = array();
     $area = new Area($aHandle);
     $layouts = $area->getAreaLayouts($cObj);
     //returns empty array if no layouts
     foreach ($layouts as $layout) {
         $maxCell = $layout->getMaxCellNumber();
         for ($i = 1; $i <= $maxCell; $i++) {
             $cellAreaHandle = $layout->getCellAreaHandle($i);
             $cellBlocks = $cObj->getBlocks($cellAreaHandle);
             $blocks = array_merge($blocks, $cellBlocks);
         }
     }
     return $blocks;
 }
开发者ID:robchenski,项目名称:ids,代码行数:16,代码来源:page_list_teasers.php


示例15: setPermissionObject

 public function setPermissionObject(Area $a)
 {
     $ax = $a;
     if ($a->isGlobalArea()) {
         $cx = Stack::getByName($a->getAreaHandle());
         $a = Area::get($cx, STACKS_AREA_NAME);
     }
     $this->permissionObject = $a;
     // if the area overrides the collection permissions explicitly (with a one on the override column) we check
     if ($a->overrideCollectionPermissions()) {
         $this->permissionObjectToCheck = $a;
     } else {
         if ($a->getAreaCollectionInheritID() > 0) {
             // in theory we're supposed to be inheriting some permissions from an area with the same handle,
             // set on the collection id specified above (inheritid). however, if someone's come along and
             // reverted that area to the page's permissions, there won't be any permissions, and we
             // won't see anything. so we have to check
             $areac = Page::getByID($a->getAreaCollectionInheritID());
             $inheritArea = Area::get($areac, $a->getAreaHandlE());
             if (is_object($inheritArea) && $inheritArea->overrideCollectionPermissions()) {
                 // okay, so that area is still around, still has set permissions on it. So we
                 // pass our current area to our grouplist, userinfolist objects, knowing that they will
                 // smartly inherit the correct items.
                 $this->permissionObjectToCheck = $inheritArea;
             }
         }
         if (!$this->permissionObjectToCheck) {
             $this->permissionObjectToCheck = $a->getAreaCollectionObject();
         }
     }
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:31,代码来源:area.php


示例16: actionView

 /**
  * Displays a particular model.
  * @param integer $id the ID of the model to be displayed
  */
 public function actionView($id)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = 'zone_id=' . $id;
     $area = new CActiveDataProvider(Area::model(), array('criteria' => $criteria));
     $this->render('view', array('model' => $this->loadModel($id), 'area' => $area));
 }
开发者ID:aantonw,项目名称:dcourier.system,代码行数:11,代码来源:ZoneController.php


示例17: getArea

 public function getArea($idArea)
 {
     $connection = parent::initDB();
     $query = "SELECT idArea, nombreArea, departamento FROM area " . "WHERE idArea = {$idArea}";
     $result = mysql_query($query);
     if (mysql_num_rows($result) == 0) {
         throw new Exception('No se pudo obtener el área');
     }
     $row = mysql_fetch_array($result);
     $area = new Area();
     $area->setIdArea($row['idArea']);
     $area->setNombreArea($row['nombreArea']);
     $area->setDepartamento($row['departamento']);
     parent::closeDB($connection);
     return $area;
 }
开发者ID:jorgeeliecerballesteros,项目名称:controldeacceso,代码行数:16,代码来源:AreaDAO.php


示例18: on_start

 public function on_start()
 {
     parent::on_start();
     $this->area = \Area::getOrCreate($this->page, $_REQUEST['arHandle']);
     $this->permissions = new \Permissions($this->area);
     $this->set('a', $this->area);
 }
开发者ID:masteramuk,项目名称:concrete5,代码行数:7,代码来源:design.php


示例19: fire

 /**
  * Execute the console command.
  *
  *	@todo  DON'T UPDATE LOCATIONS IF THEY'RE ALREADY SET
  *
  * @return mixed
  */
 public function fire()
 {
     $Bodmin = Area::firstOrCreate(['name' => 'Bodmin']);
     // Ensure current locations are saved.
     foreach (array_unique(Interview::where('location_id', '=', '')->lists('location')) as $location) {
         if (strlen($location) === 0) {
             continue;
             // don't want to clobber real locations
         }
         $L = Location::firstOrNew(['name' => $location]);
         if ($L->exists) {
             continue;
         }
         $L->area()->associate($Bodmin);
         $L->save();
     }
     Interview::all()->each(function ($Interview) {
         $Location = Location::where('name', '=', $Interview->location);
         if ($Location->count() <= 0) {
             \Log::error("This location not found despite having just been confirmed a few lines above", $Interview->toArray());
             return;
         }
         $Interview->location_id = $Location->first()->id;
         $Interview->save();
     });
 }
开发者ID:mymedialab,项目名称:listenings,代码行数:33,代码来源:MigrateLocations.php


示例20: search

 /**
  * Display a listing of the searched resource.
  *
  * @return Response
  */
 public function search()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4) {
             $data["search_nombre"] = Input::get('search_nombre');
             $data["search_categoria"] = Input::get('search_categoria');
             $data["search_servicio_clinico"] = Input::get('search_servicio_clinico');
             $data["search_departamento"] = Input::get('search_departamento');
             $data["search_responsable"] = Input::get('search_responsable');
             $data["search_fecha_ini"] = Input::get('search_fecha_ini');
             $data["search_fecha_fin"] = Input::get('search_fecha_fin');
             $data["categorias"] = ProyectoCategoria::all()->lists('nombre', 'id');
             $data["servicios"] = Servicio::all()->lists('nombre', 'idservicio');
             $data["departamentos"] = Area::all()->lists('nombre', 'idarea');
             $data["usuarios"] = User::orderBy('nombre')->get()->lists('UserFullName', 'id');
             $data["reportes_data"] = Proyecto::searchReporte($data['search_nombre'], $data['search_categoria'], $data['search_servicio_clinico'], $data['search_departamento'], $data['search_responsable'], $data["search_fecha_ini"], $data["search_fecha_fin"]);
             $data["proyectos_data"] = $data["reportes_data"]->paginate(10);
             return View::make('investigacion.proyecto.documentacion.index', $data);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:33,代码来源:ProyectoDocumentacionController.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Argument类代码示例发布时间:2022-05-23
下一篇:
PHP ArchivedFile类代码示例发布时间: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