本文整理汇总了PHP中PageController::Set_UpdateDashboard方法的典型用法代码示例。如果您正苦于以下问题:PHP PageController::Set_UpdateDashboard方法的具体用法?PHP PageController::Set_UpdateDashboard怎么用?PHP PageController::Set_UpdateDashboard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageController
的用法示例。
在下文中一共展示了PageController::Set_UpdateDashboard方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
<?php
include '../../../Conf/Include.php';
set_dependencies(array("PageController", "AdminController"));
$id = $_REQUEST['id'] ?: null;
$status = $_REQUEST['status'] ?: null;
if ($id == null && $status == null) {
exit;
}
if ($status == 0) {
$status = 1;
} elseif ($status == 1) {
$status = 0;
}
$page = new PageController();
$page->Set_UpdateDashboard($id, array("status" => $status), " id_dashboard LIKE {$id}");
示例2: explode
<?php
include '../../../Conf/Include.php';
set_dependencies(array("PageController", "AdminController"));
$id = $_REQUEST['id'];
$titulo = $_REQUEST['titulo'];
$icono = $_REQUEST['icono'];
$link = $_REQUEST['link'];
$seccion = $_REQUEST['seccion'];
$priv = $_REQUEST['priv'];
//COMENZAMOS A VERIFICAR LOS IDS DE LOS PRIVILEGIOS OTORGADOS
$pieces_priv = explode(",", $priv);
$admin = new AdminController();
$admin_priv = $admin->Get_MasterPrivilegios();
unset($admin);
$priv_ids = array();
foreach ($pieces_priv as $pieces) {
foreach ($admin_priv as $val) {
if ($pieces === $val['nombre']) {
array_push($priv_ids, $val['nivel']);
}
}
}
//TERMINAMOS DE OBTENER LOS IDS DE LOS PRIVILEGIOS O NIVELES DE ELLOS
$priv_ids = implode(",", $priv_ids);
//pegamos los ids en texto plano separado por coma
$page = new PageController();
$array_data = array("id_seccion" => $seccion, "icono" => $icono, "link" => $link, "titulo" => $titulo, "privilegios" => $priv_ids);
$result = $page->Set_UpdateDashboard($id, $array_data);
echo $result;