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


PHP Modules::find_by_module方法代码示例

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


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

示例1: foreach

?>
"><?php 
echo $this->aticketcount;
?>
, View listing</a></p></div>
        </div>
    </div>
</div>

    <div class="row">
        <?php 
if (Session::getRole()) {
    if (true) {
        $modules = $_SESSION['emp_role_module'];
        foreach ($modules as $module) {
            $thisModule = Modules::find_by_module($module);
            echo "\n            <div class='large-3  columns'><a href='" . $uri->link($module . '/' . $thisModule->link) . "'><div class='" . $thisModule->css_class . "'>\n             {$thisModule->description}</div></a>\n            </div>";
        }
    } else {
        $this->view->render("access/restricted");
    }
}
?>




    </div>


开发者ID:runningjack,项目名称:RobertJohnson,代码行数:28,代码来源:index.php

示例2: worksheetlist

 /**
  * this section is
  * needed to list out worksheets
  */
 public function worksheetlist()
 {
     $worksheetlisting = "";
     $this->loadModel("Support");
     $datum = $this->model->getWorkSheetList("", "support");
     $this->view->worksheets = $datum['worksheet'];
     $uri = new Url("");
     $worksheetlisting .= "<div class='row'><div class='large-12 columns'>" . $datum['mypagin'];
     $worksheetlisting .= "</div></div><div class='row'><div class='large-12 columns'><table  width='100%'>\n<thead><tr>\n\t<th>S/N</th><th>Product/Machine</th><th>Issue</th><th>Status</th><th>Technician</th><th>Date Generated </th><th>Expenses</th><th></th><th></th><th></th>\n</tr>\n</thead>\n<tbody>";
     if ($this->view->worksheets) {
         $x = 1;
         foreach ($this->view->worksheets as $worksheet) {
             $worksheetlisting .= "<tr>\n    \t<td>{$x}</td><td>";
             $cprod = $this->model->getClientProdByID($worksheet->prod_id);
             $worksheetlisting .= $cprod->prod_name . " " . $cprod->install_address . " " . $cprod->install_city;
             //print_r($worksheet->cse_emp_id);
             $worksheetlisting .= "</td><td>{$worksheet->problem}</td><td>{$worksheet->status} </td><td>";
             $emp = $this->model->getEmployee((int) preg_replace('#[^0-9]#i', '', $worksheet->cse_emp_id));
             //print_r($cprod);
             $worksheetlisting .= $emp->emp_fname . " " . $emp->emp_lname;
             $worksheetlisting .= "</td><td>" . date_format(date_create($worksheet->sheet_date), "M d Y H:i:s") . "</td><td>" . Worksheet::getExpensesById($worksheet->id) . "</td>";
             /**
              * section to set grant and\
              * previledge
              */
             global $session;
             foreach ($session->employee_role as $erole) {
                 $emodule = Modules::find_by_module($erole->module);
                 $grant = array();
                 $grant = explode(",", $erole->access);
                 if ($erole->module == "worksheetform") {
                     if (in_array("Modify", $grant)) {
                         $worksheetlisting .= "<td><a href='" . $uri->link("support/tasksupport/" . $worksheet->id . "") . "'>Allocate Resource</a></td>";
                     } elseif (in_array("Modify", $grant)) {
                         $worksheetlisting .= "<td><a href='" . $uri->link("support/worksheetedit/" . $worksheet->id . "") . "'>Edit</a></td>";
                     } elseif ($session->employee_role == '10') {
                         $worksheetlisting .= "<td><a href='" . $uri->link("support/worksheetedit/" . $worksheet->id . "") . "'>Edit</a></td>";
                     } else {
                         $worksheetlisting .= "<td></td>";
                     }
                     if (in_array("View", $grant)) {
                         $worksheetlisting .= "<td><a href='" . $uri->link("support/worksheetdetail/" . $worksheet->id . "") . "'>View Detail</a></td>";
                     } else {
                         $worksheetlisting .= "<td></td>";
                     }
                     if (in_array("Delete", $grant)) {
                         $worksheetlisting .= "<td></td>";
                     } else {
                         $worksheetlisting .= "<td></td>";
                     }
                 }
             }
             $worksheetlisting .= "</tr>";
             $x++;
         }
     } else {
         $worksheetlisting .= "<tr><td colspan='9'>No record to display</td></tr>";
     }
     $worksheetlisting .= "</tbody>\n</table></div></div><div class='row'><div class='large-12 columns'>";
     $worksheetlisting .= $datum['mypagin'] . "</div><p>&nbsp;</p></div>";
     $this->view->myvends = $worksheetlisting;
     if (isset($_POST['clientid'])) {
         echo $worksheetlisting;
     } elseif (isset($_POST['rec'])) {
         echo $worksheetlisting;
     } else {
         $this->view->render("support/worksheetlist");
     }
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:73,代码来源:support.php

示例3: sche

 public function sche()
 {
     $worksheetlisting = "";
     $this->loadModel("Itdepartment");
     $datum = $this->model->getWorkSheetList("", "Itdepartment");
     $this->view->worksheets = $datum['worksheet'];
     $uri = new Url("");
     $worksheetlisting .= "<table  width='100%'>\n<thead><tr>\n\t<th>S/N</th><th>Prod ID</th><th>Status</th><th>Emp ID</th><th>Issue</th><th>Date Generated </th><th></th><th></th><th></th>\n</tr>\n</thead>\n<tbody>";
     if ($this->view->worksheets) {
         $x = 1;
         foreach ($this->view->worksheets as $worksheet) {
             $worksheetlisting .= "<tr>\n    \t<td>{$x}</td><td>{$worksheet->prod_id}</td><td>{$worksheet->status} </td><td>{$worksheet->cse_emp_id}</td><td>{$worksheet->problem}</td><td>{$worksheet->sheet_date}</td>";
             /**
              * section to set grant and\
              * previledge
              */
             global $session;
             foreach ($session->employee_role as $erole) {
                 $emodule = Modules::find_by_module($erole->module);
                 $grant = array();
                 $grant = explode(",", $erole->access);
                 if ($erole->module == "worksheetform") {
                     if (in_array("Modify", $grant) && $emodule->module == "support" && $worksheet->status == "Open") {
                         $worksheetlisting .= "<td><a href='" . $uri->link("itdepartment/tasksupport/" . $worksheet->id . "") . "'>Allocate Resource</a></td>";
                     } elseif (in_array("Modify", $grant) && $worksheet->status == "Open") {
                         $worksheetlisting .= "<td><a href='" . $uri->link("itdepartment/taskedit/" . $worksheet->id . "") . "'>Edit</a></td>";
                     } elseif ($session->employee_role == '10') {
                         $worksheetlisting .= "<td><a href='" . $uri->link("itdepartment/taskedit/" . $worksheet->id . "") . "'>Edit</a></td>";
                     } else {
                         $worksheetlisting .= "<td></td>";
                     }
                     if (in_array("View", $grant)) {
                         $worksheetlisting .= "<td><a href='" . $uri->link("itdepartment/worksheetdetail/" . $worksheet->id . "") . "'>View Detail</a></td>";
                     } else {
                         $worksheetlisting .= "<td></td>";
                     }
                     if (in_array("Delete", $grant)) {
                         $worksheetlisting .= "<td><a href='" . $uri->link("employees/doDelete/" . $emp->id . "") . "'>Delete</a></td>";
                     } else {
                         $worksheetlisting .= "<td></td>";
                     }
                 }
             }
             $worksheetlisting .= "</tr>";
             $x++;
         }
     } else {
         $worksheetlisting .= "<tr><td colspan='7'>No record to display</td></tr>";
     }
     $worksheetlisting .= "</tbody>\n</table>";
     return $worksheetlisting;
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:52,代码来源:itdepartment.php


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