當前位置: 首頁>>代碼示例>>PHP>>正文


PHP admin::update方法代碼示例

本文整理匯總了PHP中admin::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin::update方法的具體用法?PHP admin::update怎麽用?PHP admin::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在admin的用法示例。


在下文中一共展示了admin::update方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dmsg

     break;
 case 'delete':
     if ($do->delete_admin($username)) {
         dmsg('撤銷成功', $this_forward);
     }
     msg($do->errmsg);
     break;
 case 'right':
     if (!$userid) {
         msg();
     }
     $user = $do->get_one($userid, 0);
     if ($submit) {
         $right[0]['action'] = $right[0]['action'] ? implode('|', $right[0]['action']) : '';
         $right[0]['catid'] = $right[0]['catid'] ? implode('|', $right[0]['catid']) : '';
         if ($do->update($userid, $right, $user['admin'])) {
             dmsg('更新成功', '?file=' . $file . '&action=right&userid=' . $userid);
         }
         msg($do->errmsg);
     } else {
         $username = $user['username'];
         $drights = $do->get_right($userid);
         $dmenus = $do->get_menu($userid);
         include tpl('admin_right');
     }
     break;
 case 'ajax':
     @(include DT_ROOT . '/' . ($mid == 1 ? 'admin' : 'module/' . $MODULE[$mid]['module'] . '/admin') . '/config.inc.php');
     if (isset($fi)) {
         if (isset($RT) && isset($RT['action'][$fi])) {
             $action_select = '<select name="right[0][action][]" size="2" multiple  style="height:200px;width:150px;"><option value="">選擇動作[按Ctrl鍵多選]</option>';
開發者ID:hiproz,項目名稱:zhaotaoci.cc,代碼行數:31,代碼來源:admin.inc.php

示例2: admin

     $admin = new admin();
     $rows = $admin->getAdminInfo($id);
     $currency = $rows[0]['currency'];
     $accesslevel = $rows[0]['accesslevel'];
     $app->view->setData('currencies', $admin->EditAllCurrency($currency));
     $app->view->setData('user_permission', $admin->EditUserPermission($accesslevel));
     $app->view->setData('rows', $rows);
     $app->view->setData('form_action', "dashboard/admin/editconfirm");
     $app->view->setData('page_title', "Edit Admin");
     $app->render(new u('admin.edit'));
 });
 $app->post('/editconfirm/', function () use($app) {
     $POST = $app->request()->post();
     $admin = new admin();
     $admin->form_post_values = $POST;
     $admin->update();
     if ($admin->fails()) {
         $app->view->setData('error', "1");
         $app->view->setData('msg', $admin->getError());
         $app->render(new u('msg'));
     } else {
         $app->view->setData('success', "1");
         $app->view->setData('msg', "Successfully User Updated");
         $app->render(new u('msg'));
     }
 });
 /***********************************SEARCH*************************************************/
 $app->post('/search', function () use($app) {
     $POST = $app->request()->post();
     $SearchDb = new SearchDb('admininfo', 'username', $POST);
     $app->view->setData('rows', $SearchDb->getSearchResult());
開發者ID:bogiesoft,項目名稱:Slim_PHP_Project,代碼行數:31,代碼來源:admin_route.php

示例3: Copyright

<?php

/*
	[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
	This is NOT a freeware, use is subject to license.txt
*/
defined('DT_ADMIN') or exit('Access Denied');
require DT_ROOT . '/admin/admin.class.php';
$do = new admin();
$menus = array(array('我的麵板', '?file=' . $file));
if ($submit) {
    if ($do->update($_userid, $right, $_admin)) {
        dmsg('更新成功', '?file=' . $file . '&update=1');
    }
    msg($do->errmsg);
} else {
    $dmenus = $do->get_menu($_userid);
    include tpl('mymenu');
}
開發者ID:hiproz,項目名稱:zhaotaoci.cc,代碼行數:19,代碼來源:mymenu.inc.php


注:本文中的admin::update方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。