• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP admin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中admin的典型用法代码示例。如果您正苦于以下问题:PHP admin类的具体用法?PHP admin怎么用?PHP admin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了admin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: check_power

function check_power()
{
    global $global;
    $flag = 0;
    if ($global['admin_id']) {
        $obj = new admin();
        $obj->set_where('adm_id = ' . $global['admin_id']);
        $one = $obj->get_one();
        if ($one['adm_power'] == 'all') {
            $flag = 1;
        } elseif ($one['adm_power'] != '') {
            $val = $global['channel'] . '/mod-' . $global['mod'];
            $urls = explode('|', $one['adm_power']);
            for ($i = 0; $i < count($urls); $i++) {
                if ($urls[$i] == '/' . $val . '/') {
                    $flag = 1;
                    break;
                }
            }
            if ($flag == 0) {
                $obj = new menu();
                $obj->set_where('');
                $obj->set_where("men_url like '%" . $val . "%'");
                if ($obj->get_count() == 0) {
                    $flag = 1;
                }
            }
        }
    }
    return $flag;
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:31,代码来源:common.func.php


示例2: module_admin_power

function module_admin_power()
{
    global $global, $smarty;
    $obj = new admin();
    $obj->set_where('adm_id = ' . $global['id']);
    $one = $obj->get_one();
    $power = get_power_arr();
    if ($one['adm_power'] == 'all') {
        for ($i = 0; $i < count($power); $i++) {
            $power[$i]['set'] = 1;
        }
    } elseif ($one['adm_power'] != '') {
        $urls = explode('|', $one['adm_power']);
    } else {
        $urls = array();
    }
    if ($one['adm_power'] != 'all') {
        for ($i = 0; $i < count($power); $i++) {
            for ($j = 0; $j < count($urls); $j++) {
                if ($power[$i]['url'] == $urls[$j]) {
                    $power[$i]['set'] = 1;
                    break;
                } else {
                    $power[$i]['set'] = 0;
                }
            }
        }
    }
    $smarty->assign('admin', $one);
    $smarty->assign('power', $power);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:31,代码来源:admin_power.php


示例3: module_admin_edit

function module_admin_edit()
{
    global $global, $smarty;
    $obj = new admin();
    $obj->set_where('adm_id = ' . $global['id']);
    $smarty->assign('admin', $obj->get_one());
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:7,代码来源:admin_edit.php


示例4: module_admin_list

function module_admin_list()
{
    global $global, $smarty;
    $obj = new admin();
    $list = $obj->get_list();
    $smarty->assign('admin', $list);
    $obj->set_where('adm_id = ' . $global['admin_id']);
    $one = $obj->get_one();
    $smarty->assign('me', $one);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:10,代码来源:admin_list.php


示例5: sux

/**
* controller
*
* @author     Dac Chartrand <[email protected]>
* @license    http://www.fsf.org/licensing/licenses/gpl-3.0.html
*/
function sux($action, $params = null)
{
    switch ($action) {
        case 'access':
            // --------------------------------------------------------------------
            // Access
            // --------------------------------------------------------------------
            if (empty($params[0])) {
                suxFunct::redirect(suxFunct::makeUrl('/admin'));
            }
            $edit = new adminAccess($params[0]);
            if ($edit->formValidate($_POST)) {
                $edit->formProcess($_POST);
                $edit->formSuccess();
            } else {
                $edit->formBuild($_POST);
            }
            break;
        case 'log':
            // --------------------------------------------------------------------
            // Log
            // --------------------------------------------------------------------
            $nickname = null;
            if (!empty($params[0])) {
                $nickname = $params[0];
            }
            $admin = new adminLog($nickname);
            $admin->display();
            break;
        case 'purge':
            // --------------------------------------------------------------------
            // Purge logs
            // --------------------------------------------------------------------
            $edit = new adminPurge();
            if ($edit->formValidate($_POST)) {
                $edit->formProcess($_POST);
                $edit->formSuccess();
            } else {
                $edit->formBuild($_POST);
            }
            break;
        default:
            // --------------------------------------------------------------------
            // Default
            // --------------------------------------------------------------------
            $admin = new admin();
            if ($admin->formValidate($_POST)) {
                $admin->formProcess($_POST);
                $admin->formSuccess();
            } else {
                $admin->formBuild($_POST);
            }
            break;
    }
}
开发者ID:hashimmm,项目名称:sux0r,代码行数:61,代码来源:controller.php


示例6: selectAdmin

 function selectAdmin(admin $ad)
 {
     try {
         $conexao = parent::getConexao();
         $login = $ad->getLogin();
         $senha = $ad->getSenha();
         $comando = $conexao->prepare("select id,nome,email,login,senha from admin where login=? and senha=?");
         $comando->bindParam(1, $login);
         $comando->bindParam(2, $senha);
         $comando->execute();
         return $comando->fetchall(PDO::FETCH_ASSOC);
     } catch (Exception $ex) {
         parent::setErros($ex->getCode() . $ex->getMessage());
     }
 }
开发者ID:rodrigoDesenvolvimento,项目名称:jrscrum,代码行数:15,代码来源:adminBD.php


示例7: edit

 function edit()
 {
     events::observe('save', 'templates', 'apps', '_save');
     events::observer();
     $tmpl_file = events::get('tmpl_file');
     $app = events::get('app');
     if (events::detect('restore')) {
         self::restoreVersion($app, $tmpl_file, events::get('restore'));
     }
     admin::components('tabs', 'validator');
     f::set('app', $app);
     f::set('tmpl_file', $tmpl_file);
     s::set('app', $app);
     s::set('tmpl_file', $tmpl_file);
     $file = SYS_ROOT . 'tmpls/' . ADMIN_SITE . '/' . $app . '/' . $tmpl_file;
     $code = files::get($file);
     f::set('tmpl_code', $code);
     self::getApps();
     /*
     	Load versions
     */
     db::table('templates_versions');
     db::where('app', $app);
     db::where('tmpl_file', $tmpl_file);
     db::order('version_date', 'DESC');
     $res = db::select();
     while ($row = mysql_fetch_assoc($res)) {
         $row['version_date'] = dt::date2print('%H:%i %d.%m.%Y', $row['version_date']);
         $row['version_code'] = '{non}' . htmlspecialchars($row['version_code']) . '{/non}';
         s::roll('versions', $row);
     }
 }
开发者ID:rigidus,项目名称:ea,代码行数:32,代码来源:apps.module.php


示例8: __construct

 function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('workflow_model');
     $this->admin_db = pc_base::load_model('admin_model');
     $this->siteid = $this->get_siteid();
 }
开发者ID:qingae,项目名称:huluphp,代码行数:7,代码来源:workflow.php


示例9: cache

 function cache()
 {
     admin::components('shiftable');
     db::table('pages');
     db::where('site_id', ADMIN_SITE_ID);
     db::where('page_pub', '2', '!=');
     db::order('page_map');
     $res = db::select();
     while ($row = mysql_fetch_assoc($res)) {
         if ($row['page_cache'] == '1') {
             $row['page_cache'] = ' checked="checked"';
         } else {
             $row['page_cache'] = '';
         }
         if ($row['page_folder'] == '/') {
             $page_path = 'http://' . ADMIN_SITE;
         } else {
             $page_path = 'http://' . ADMIN_SITE . '' . $row['page_folder'];
         }
         $row['page_line'] = $row['page_title'];
         if ($row['page_dynamic'] == '0') {
             $row['page_line'] = $row['page_line'] . '&nbsp;<a href="' . $page_path . '" style="top: 0;" class="ico ico16 ico_goto" title="Посмотреть на сайте">&nbsp;</a>';
         }
         $page_tree[$row['page_parent']][$row['page_id']] = $row;
     }
     s::tree('page_tree', $page_tree);
 }
开发者ID:rigidus,项目名称:ea,代码行数:27,代码来源:map.module.php


示例10: defaultAction

 function defaultAction()
 {
     global $HTTP_SERVER_VARS;
     include "./lib/config.inc.php";
     $db = new sql();
     $db->connect();
     $result = $db->query('SELECT VERSION() AS version');
     if ($result != FALSE && $db->num_rows($result) > 0) {
         $row = $db->fetch_array($result);
         $match = $row['version'];
     } else {
         $result = $db->query('SHOW VARIABLES LIKE \'version\'');
         if ($result != FALSE && $db->num_rows($result) > 0) {
             $row = $db->fetch_array($result);
             $match = $row[1];
         }
     }
     $this->MYSQL_VER = $match;
     $this->PHP_OS = PHP_OS;
     $this->PHP_VERSION = PHP_VERSION;
     $this->CMS = $admin_config["name"] . " " . $admin_config["version"];
     $this->AUTHOR = $admin_config["author"];
     $this->HOME_PAGE = $admin_config["home_page"];
     $content = admin::template("info", $this);
     $this->elements["content"] = $content;
 }
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:26,代码来源:content.class.php


示例11: insert

 public function insert()
 {
     $msg = array();
     $path = isset($_POST['path']) ? _encrypt($_POST['path'], 'DECODE') : '';
     $size = isset($_POST['size']) ? _encrypt($_POST['size'], 'DECODE') : 0;
     $type = isset($_POST['type']) ? _encrypt($_POST['type'], 'DECODE') : 'image';
     $type = explode(',', $this->getUPtype($type, true));
     $watermark = $_POST['iswatermark'] == "true" ? "yes" : "no";
     if (!is_dir(G_UPLOAD . $path)) {
         $msg['ok'] = 'no';
         $msg['text'] = $path . "文件夹不存在";
         echo json_encode($msg);
         exit;
     }
     System::load_app_class("admin", G_ADMIN_DIR, "no");
     $admincheck = admin::StaticCheckAdminInfo() ? 1 : 0;
     if (is_array($_FILES['Filedata'])) {
         System::load_sys_class('upload', 'sys', 'no');
         upload::upload_config($type, $size, $path);
         upload::go_upload($_FILES['Filedata'], $watermark);
         if (!upload::$ok) {
             $msg['ok'] = 'no';
             $msg['text'] = upload::$error;
         } else {
             $msg['ok'] = 'yes';
             $msg['text'] = $path . '/' . upload::$filedir . "/" . upload::$filename;
         }
         echo json_encode($msg);
     }
 }
开发者ID:think-css,项目名称:yungou,代码行数:30,代码来源:uploadify.action.php


示例12: __construct

 function __construct()
 {
     parent::__construct();
     $this->sites = pc_base::load_app_class('sites', 'admin');
     $this->db = pc_base::load_model('wap_model');
     $this->type_db = pc_base::load_model('wap_type_model');
 }
开发者ID:ahmatjan,项目名称:huluphp,代码行数:7,代码来源:wap_admin.php


示例13: __construct

 function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('admin_model');
     $this->role_db = pc_base::load_model('admin_role_model');
     $this->op = pc_base::load_app_class('admin_op');
 }
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:7,代码来源:admin_manage.php


示例14: defaultAction

 function defaultAction()
 {
     $db = new sql();
     $db->connect();
     $chid = $this->chid;
     include "lib/pagination.class.php";
     include "lib/orderby.class.php";
     $adminConfig = admin::adminConfig();
     for ($i = 1; $i < 4; $i++) {
         $voteTR = "";
         $orderBy = new orderBy("?chid=" . $this->chid . "&", array("id" => "№", "time" => "Дата", "name" => "Заголовок", "company" => "Компания", "gsum" => "Средний бал", "gcount" => "Проголосовало"), array("gsum" => "desc"), $this->field[$i], $this->order[$i], array("field[{$i}]", "order[{$i}]"));
         $pagination = new pagination($orderBy->urlForPage(), $this->page, $adminConfig["recPerPage"], '', "projects", "id");
         $res = $db->query("select projects.id, name, company, category_name, date, sum(IF(grade is null,0, grade))/count(IF(grade is null,0, grade)) as gsum, count(grade) as gcount FROM (projects LEFT JOIN categories ON projects.category = categories.category_id) left join votes on projects.id=votes.id where category={$i} group by projects.id, name, company, category_name, date " . $orderBy->orderByQuery() . " " . $pagination->limit());
         $page = $this->page ? "&page=" . $this->page : "";
         while ($data = $db->fetch_array($res)) {
             $data["date"] = date("d.m.Y", $data["date"]);
             eval('$voteTR.="' . admin::template("voteTR") . '";');
         }
         $pageBar = $pagination->bar();
         $th = $orderBy->bar();
         eval('$content.="' . admin::template("voteMain") . '";');
         $content .= "<br>";
     }
     $this->elements["content"] = $content;
 }
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:25,代码来源:vote.class.php


示例15: __construct

 public function __construct()
 {
     parent::__construct();
     //if (!module_exists(ROUTE_M)) showmessage(L('module_not_exists'));
     $this->username = param::get_cookie('admin_username');
     $this->db = pc_base::load_model('announce_model');
 }
开发者ID:zhouzhouxs,项目名称:Progect,代码行数:7,代码来源:admin_announce.php


示例16:

 function __construct()
 {
     parent::__construct();
     $this->M = new_html_special_chars(getcache('link', 'commons'));
     $this->db = pc_base::load_model('link_model');
     $this->db2 = pc_base::load_model('type_model');
 }
开发者ID:baowzh,项目名称:fulianweb,代码行数:7,代码来源:link.php


示例17: Main

 function Main()
 {
     if (isset($_GET['action']) && $_GET['action'] == 'step2') {
         $this->checkUser();
         //验证身份,这一步很重要。
         $this->step2();
     } else {
         if (isset($_GET['action']) && $_GET['action'] == 'step3') {
             $this->checkUser();
             //验证身份,这一步很重要。
             $this->step3();
         } else {
             if (isset($_GET['action']) && $_GET['action'] == 'step2_1') {
                 $this->checkUser();
                 //验证身份,这一步很重要。
                 $this->step2_1();
             } else {
                 if (isset($_GET['action']) && $_GET['action'] == 'step2_2') {
                     $this->checkUser();
                     //验证身份,这一步很重要。
                     $this->step2_2();
                 } else {
                     if (isset($_GET['action']) && $_GET['action'] == 'step4') {
                         $this->checkUser();
                         //验证身份,这一步很重要。
                         $this->step4();
                     } else {
                         parent::Main();
                     }
                 }
             }
         }
     }
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:34,代码来源:consume.php


示例18: array

 function __construct()
 {
     parent::__construct();
     $this->db = pc_base::load_model('collection_node_model');
     $this->siteid = get_siteid();
     $this->url_list_type = array('1' => L('sequence'), '2' => L('multiple_pages'), '3' => L('single_page'), '4' => 'RSS');
 }
开发者ID:shenhua4286,项目名称:gxw,代码行数:7,代码来源:node.php


示例19:

 function __construct()
 {
     parent::__construct();
     $setting = new_html_special_chars(getcache('poster', 'commons'));
     $this->M = $setting[$this->get_siteid()];
     $this->db = pc_base::load_model('poster_space_model');
 }
开发者ID:klj123wan,项目名称:czsz,代码行数:7,代码来源:space.php


示例20:

 function __construct()
 {
     parent::__construct();
     $this->load->model('users_model');
     $this->load->model('site/stripe_model');
     $this->load->model('plans_model');
 }
开发者ID:masitsa,项目名称:installify2,代码行数:7,代码来源:plans.php



注:本文中的admin类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP adminBase类代码示例发布时间:2022-05-23
下一篇:
PHP add类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap