本文整理匯總了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;