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


PHP Area::find_all方法代码示例

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


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

示例1: getData

 /**
  * load initail data for employee form needed during 
  * creating and editing employee
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $area = Area::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "area" => $area);
     return $startups;
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:16,代码来源:products_model.php

示例2: getData

 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $area = Area::find_all();
     $issues = Issue::find_all();
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $techEmp = Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept='5'");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "techemp" => $techEmp, "area" => $area, "issues" => $issues);
     return $startups;
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:14,代码来源:clientproduct_model.php

示例3: index

 public function index($mid = 1)
 {
     $productlist = "";
     if (empty($mid)) {
         redirect_to($this->uri->link("error/index"));
         exit;
     }
     $this->loadModel("Clientproduct");
     $datum = $this->model->getList("", "clientproduct");
     $this->view->myclientsproducts = $datum['clientproduct'];
     $this->view->area = Area::find_all();
     global $session;
     $uri = new Url("");
     $productlist .= "<div class='row'><div class='large-12 columns'>";
     $productlist .= "</div></div><div class='row'><div class='large-12 columns'><table  id='dt_basic'>\n            <thead><tr>\n            \t<th>S/N</th><th>Terminal ID</th><th>Product </th><th>Client</th><th>Location</th><th>City </th><th></th><th></th>";
     /**
      * check for priviledge
      * for logged in users
      * at table level
      */
     $productlist .= "<td></td></tr>\n            </thead>\n            <tbody>";
     if ($this->view->myclientsproducts) {
         $x = 1;
         foreach ($this->view->myclientsproducts as $products) {
             $productlist .= "<tr>\n                \t<td>{$x}</td><td>{$products->terminal_id}</td><td><a href='" . $uri->link("clientproduct/detail/" . $products->id) . "'>{$products->prod_name}</a> </td><td>{$products->client_name}</td><td>{$products->install_address}</td><td>{$products->install_city}</td>";
             foreach ($session->employee_role as $erole) {
                 //$emodule = Modules::find_by_module($erole->module);
                 $grant = array();
                 $grant = explode(",", $erole->access);
                 if ($erole->module == "clientproduct") {
                     if (in_array("Modify", $grant)) {
                         $productlist .= "<td><a href='" . $uri->link("clientproduct/edit/" . $products->id . "") . "'>Edit</a></td>";
                     } else {
                         $productlist .= "<td>";
                         $productlist .= "</td>";
                     }
                     if (in_array("Delete", $grant)) {
                         $productlist .= "<td><a class='dataDelete' data-reveal-id='firstModal{$products->id}' href='#'>Delete</a>\n                            \n                            \n                             <div id='firstModal{$products->id}' class='reveal-modal small' style='background-image: linear-gradient(0deg, #f2f9fc, #addcf0 20.0em); border-radius:5px'>\n    <h2>Data Delete Console.</h2>\n    <hr />\n    <p>You are about to delete a record. Any record deleted will not longer be available in the database <br /> Are you sure you want to delete <b>{$products->prod_name}</b> from the database?</p>\n    <p><a href='?url=clientproduct/doCheckTransLog/{$products->main_id}' data-reveal-id='secondModal{$products->id}' class='btn button btn-danger' data-reveal-ajax='true'>Yes</a>&nbsp; &nbsp; &nbsp;<a pdid='{$products->id}' class='btn button btn-danger modalclose'>No</a></p>\n    <a class='close-reveal-modal'>&#215;</a>\n  </div>\n\n  <div id='secondModal{$products->id}' class='reveal-modal small' style='background-image: linear-gradient(0deg, #f2f9fc, #addcf0 20.0em); border-radius:5px'>\n    <h2>This is a second modal.</h2>\n    <hr />\n\n    <a class='close-reveal-modal closemodal'>&#215;</a>\n  </div>\n                            </td><td><a <a href='" . $uri->link("clientproduct/detail/" . $products->id) . "'>Schedule</a></td>";
                     } else {
                         $productlist .= "<td></td>";
                     }
                 }
             }
             $productlist .= "</tr>";
             $x++;
         }
     } else {
         $productlist .= "<tr><td colspan='7'>No record to display</td></tr>";
     }
     $productlist .= "</tbody>\n            </table></div></div><div class='row'><div class='large-12 columns'>";
     $productlist .= "</div><p>&nbsp;</p></div>";
     $this->view->myprods = $productlist;
     /**
      * this aim of doing this check is to
      * ensure that the view is not rendered during
      * when record is being filtered fron the db
      */
     if (Session::getRole()) {
         if (in_array(strtolower(get_class($this)), $_SESSION['emp_role_module'])) {
             if (isset($_POST['areaname'])) {
                 echo $productlist;
             } elseif (isset($_POST['rec'])) {
                 echo $productlist;
             } else {
                 $this->view->render("clientproduct/index");
             }
         } else {
             $this->view->render("access/restricted");
         }
     }
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:71,代码来源:clientproduct.php


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