当前位置: 首页>>代码示例>>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;未经允许,请勿转载。