本文整理汇总了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>
示例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> </p></div>";
$this->view->myvends = $worksheetlisting;
if (isset($_POST['clientid'])) {
echo $worksheetlisting;
} elseif (isset($_POST['rec'])) {
echo $worksheetlisting;
} else {
$this->view->render("support/worksheetlist");
}
}
示例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;
}