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

PHP auth类代码示例

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

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



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

示例1: show

 public function show($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill_record WHERE 1 " . $condition;
     $q = $this->db->query($sql);
     $data = array();
     $user_id_array = array();
     $user_id = $space = '';
     $bill_id = 0;
     //目前取记录,根据某个订单的来检索
     include_once CUR_CONF_PATH . 'lib/bill.class.php';
     $this->bill = new bill();
     while ($row = $this->db->fetch_array($q)) {
         $checkbool = $row['bill_id'] ? $this->bill->checkLocked($row['bill_id']) : 0;
         $row['locked'] = $checkbool ? 1 : 0;
         if ($row['user_id']) {
             $user_id_array[$row['user_id']] = $row['user_id'];
         }
         $data[] = $row;
     }
     if ($user_id_array) {
         $user_id = implode(',', $user_id_array);
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
         foreach ($data as $k => $v) {
             $data[$k]['user_name'] = $user_info[$v['user_id']];
         }
     }
     return $data;
 }
开发者ID:h3len,项目名称:Project,代码行数:34,代码来源:bill_record.class.php


示例2: logout

 /**
  */
 public function logout()
 {
     if ($access_token = $this->input['access_token']) {
         $data['access_token'] = $access_token;
     } else {
         $this->errorOutput(NO_ACCESS_TOKEN);
     }
     $Members = new members();
     $device_token = $Members->check_device_token(trim($this->input['device_token']));
     $udid = $Members->check_udid(trim($this->input['uuid']));
     if ($device_token === 0) {
         $this->errorOutput(ERROR_DEVICE_TOKEN);
     }
     if ($udid === 0) {
         $this->errorOutput(ERROR_UDID);
     }
     $auth = new auth();
     $logoutInfo = $auth->logout($data);
     //会员痕迹
     $member_trace_data = array('member_id' => $logoutInfo['user_id'], 'member_name' => $logoutInfo['user_name'], 'content_id' => $logoutInfo['user_id'], 'title' => $logoutInfo['user_name'], 'type' => 'logout', 'op_type' => '退出', 'appid' => $logoutInfo['appid'], 'appname' => $logoutInfo['display_name'], 'create_time' => TIMENOW, 'ip' => hg_getip(), 'device_token' => $device_token, 'udid' => $udid);
     $mMember = new member();
     $mMember->member_trace_create($member_trace_data);
     $_logoutInfo = array('member_id' => $logoutInfo['user_id'], 'member_name' => $logoutInfo['user_name'], 'is_member' => $logoutInfo['is_member'], 'logout' => $logoutInfo['logout']);
     $this->addItem($_logoutInfo);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:28,代码来源:logout.php


示例3: detail

 public function detail()
 {
     $id = $this->input['id'];
     if ($id) {
         $info = $this->obj->get_db_first($id);
         $db_relation = $this->obj->get_relation($id);
     }
     //获取支持全文检索的应用模块
     include_once ROOT_PATH . 'lib/class/auth.class.php';
     $auth = new auth();
     $app = $auth->get_app('', '', '', 0, 1000, array('use_textsearch' => 1));
     if ($app && is_array($app)) {
         foreach ($app as $k => $v) {
             $appid[] = $v['bundle'];
             $module = $auth->get_module('', '', implode(',', $appid), '', 0, 1000);
         }
     }
     $result['info'] = $info;
     $result['app'] = $app;
     $result['module'] = $module;
     $result['db_relation'] = $db_relation;
     //		print_r($result);exit;
     $this->addItem($result);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:25,代码来源:textsearch.php


示例4: show

 public function show()
 {
     $uniqueid = '';
     $appname = $record = array();
     $offset = $this->input['offset'] ? intval(urldecode($this->input['offset'])) : 0;
     $count = $this->input['count'] ? intval(urldecode($this->input['count'])) : 1000;
     include_once ROOT_PATH . 'lib/class/auth.class.php';
     $auth = new auth();
     $app = $auth->get_app('', '', '', 0, 1000, array('use_textsearch' => 1));
     if ($app && is_array($app)) {
         foreach ($app as $k => $v) {
             $appid[] = $v['bundle'];
             $module = $auth->get_module('', '', implode(',', $appid), '', 0, 1000);
         }
     }
     if (is_array($module)) {
         foreach ($module as $k => $v) {
             $module_idarr[] = $v['mod_uniqueid'];
         }
         $all_relation = $this->obj->get_relation_by_m(implode("','", $module_idarr));
         //			print_r($all_relation);exit;
         foreach ($module as $k => $v) {
             $server_count[$v['app_uniqueid']][$v['mod_uniqueid']] = count($all_relation[$v['app_uniqueid']][$v['mod_uniqueid']]);
         }
     }
     $result['app'] = $app;
     $result['module'] = $module;
     $result['server_count'] = $server_count;
     $this->addItem($result);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:31,代码来源:memmodule.php


示例5: insert

 function insert($data, $param)
 {
     $user = new auth();
     for ($i = 0; $i < sizeof($param); $i++) {
         $data[$param[$i]] = $user->get($param[$i]);
     }
     db::dbs($GLOBALS['db_name'])->collection("class_blog")->insert($data);
 }
开发者ID:agrawalravi95,项目名称:finna-ninja,代码行数:8,代码来源:blog.php


示例6: main

    function main($id, $mode)
    {
        global $config, $phpbb_root_path, $phpEx;
        global $db, $user, $auth, $template;
        $username = request_var('username', '', true);
        $email = strtolower(request_var('email', ''));
        $submit = isset($_POST['submit']) ? true : false;
        if ($submit) {
            $sql = 'SELECT user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
				FROM ' . USERS_TABLE . "\n\t\t\t\tWHERE user_email = '" . $db->sql_escape($email) . "'\n\t\t\t\t\tAND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
            $result = $db->sql_query($sql);
            $user_row = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);
            if (!$user_row) {
                trigger_error('NO_EMAIL_USER');
            }
            if ($user_row['user_type'] == USER_IGNORE) {
                trigger_error('NO_USER');
            }
            if ($user_row['user_type'] == USER_INACTIVE) {
                if ($user_row['user_inactive_reason'] == INACTIVE_MANUAL) {
                    trigger_error('ACCOUNT_DEACTIVATED');
                } else {
                    trigger_error('ACCOUNT_NOT_ACTIVATED');
                }
            }
            // Check users permissions
            $auth2 = new auth();
            $auth2->acl($user_row);
            if (!$auth2->acl_get('u_chgpasswd')) {
                trigger_error('NO_AUTH_PASSWORD_REMINDER');
            }
            $server_url = generate_board_url();
            $key_len = 54 - strlen($server_url);
            $key_len = max(6, $key_len);
            // we want at least 6
            $key_len = $config['max_pass_chars'] ? min($key_len, $config['max_pass_chars']) : $key_len;
            // we want at most $config['max_pass_chars']
            $user_actkey = substr(gen_rand_string(10), 0, $key_len);
            $user_password = gen_rand_string(8);
            $sql = 'UPDATE ' . USERS_TABLE . "\n\t\t\t\tSET user_newpasswd = '" . $db->sql_escape(phpbb_hash($user_password)) . "', user_actkey = '" . $db->sql_escape($user_actkey) . "'\n\t\t\t\tWHERE user_id = " . $user_row['user_id'];
            $db->sql_query($sql);
            include_once $phpbb_root_path . 'includes/functions_messenger.' . $phpEx;
            $messenger = new messenger(false);
            $messenger->template('user_activate_passwd', $user_row['user_lang']);
            $messenger->to($user_row['user_email'], $user_row['username']);
            $messenger->im($user_row['user_jabber'], $user_row['username']);
            $messenger->assign_vars(array('USERNAME' => htmlspecialchars_decode($user_row['username']), 'PASSWORD' => htmlspecialchars_decode($user_password), 'U_ACTIVATE' => "{$server_url}/ucp.{$phpEx}?mode=activate&u={$user_row['user_id']}&k={$user_actkey}"));
            $messenger->send($user_row['user_notify_type']);
            meta_refresh(3, append_sid("{$phpbb_root_path}index.{$phpEx}"));
            $message = $user->lang['PASSWORD_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.{$phpEx}") . '">', '</a>');
            trigger_error($message);
        }
        $template->assign_vars(array('USERNAME' => $username, 'EMAIL' => $email, 'S_PROFILE_ACTION' => append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=sendpassword')));
        $this->tpl_name = 'ucp_remind';
        $this->page_title = 'UCP_REMIND';
    }
开发者ID:jvinhit,项目名称:php,代码行数:57,代码来源:ucp_remind.php


示例7: show

 public function show()
 {
     include_once ROOT_PATH . 'lib/class/auth.class.php';
     $auth = new auth();
     $apps = $auth->get_app($this->settings['stat_app']);
     foreach ($apps as $k => $v) {
         $m = array('id' => $v['bundle'], "name" => $v['name'], "fid" => $v['bundle'], "depth" => 1, 'is_last' => 1);
         $this->addItem($m);
     }
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:11,代码来源:stat_node.php


示例8: save

 function save($name, $filename, $param)
 {
     //no need to check because in no case will they be executed :p
     $user = new auth();
     for ($i = 0; $i < sizeof($param); $i++) {
         $data[$param[$i]] = $user->get($param[$i]);
     }
     $data["location"] = $filename;
     $data["ip"] = $_SERVER['REMOTE_ADDR'];
     db::dbs($GLOBALS['db_name'])->collection("class_upload")->insert($data);
     move_uploaded_file($_FILES[$name]["tmp_name"], $GLOBALS['path_uploads'] . $filename);
 }
开发者ID:agrawalravi95,项目名称:finna-ninja,代码行数:12,代码来源:upload.php


示例9: show

 public function show($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill WHERE 1 " . $condition;
     $q = $this->db->query($sql);
     $data = array();
     $user_id = $space = '';
     $project_id = $space_second = '';
     while ($row = $this->db->fetch_array($q)) {
         if ($row['user_id']) {
             $user_id .= $space . $row['user_id'];
             $space = ',';
         }
         if ($row['project_id']) {
             $project_id .= $space_second . $row['project_id'];
             $space_second = ',';
         }
         $row['cost_capital'] = hg_cny($row['cost']);
         $row['advice_capital'] = hg_cny($row['advice']);
         $data[] = $row;
     }
     if ($user_id) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
     }
     if ($project_id) {
         include_once CUR_CONF_PATH . 'lib/project.class.php';
         $project = new project();
         $project_info = $tmp = array();
         $tmp = $project->show(' AND id IN(' . $project_id . ')');
         foreach ($tmp as $k => $v) {
             $project_info[$v['id']] = $v['name'];
         }
     }
     foreach ($data as $k => $v) {
         if ($user_info) {
             $data[$k]['user_name'] = $user_info[$v['user_id']];
         }
         if ($project_info) {
             $data[$k]['project_name'] = $project_info[$v['project_id']];
         }
         if (!$v['title']) {
             $data[$k]['title'] = date('Y-m-d', $v['business_time']) . '-' . $data[$k]['project_name'];
         }
     }
     return $data;
 }
开发者ID:h3len,项目名称:Project,代码行数:51,代码来源:bill.class.php


示例10: count_files

function count_files($no = 0, $pref = '')
{
    // 0:DATA, 1:TB, 2:Referer, 3: DIFF, 4:BKUP, 5:CTR
    static $dir = array(DATA_DIR, TRACKBACK_DIR, REFERER_DIR, DIFF_DIR, BACKUP_DIR, COUNTER_DIR);
    static $ext = array('.txt', '.txt', '.ref', '.txt', BACKUP_EXT, '.count');
    // コンテンツ管理者以上は、全てのファイルを対象にする
    if (!auth::check_role('role_adm_contents')) {
        $pages = get_existpages($dir[$no], $ext[$no]);
    } else {
        // 自分が閲覧できるページ数のみ戻す
        $pages = auth::get_existpages($dir[$no], $ext[$no]);
    }
    // 条件なし
    if (empty($pref)) {
        return count($pages);
    }
    // 指定文書のカウント
    $i = 0;
    foreach ($pages as $page) {
        if (strpos($page, $pref) === 0) {
            $i++;
        }
    }
    return $i;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:25,代码来源:count.inc.php


示例11: _show_themed_error_page

 /**
  * Shows a themed error page.
  * @see Kohana_Exception::handle
  */
 private static function _show_themed_error_page(Exception $e)
 {
     // Create a text version of the exception
     $error = Kohana_Exception::text($e);
     // Add this exception to the log
     Kohana_Log::add('error', $error);
     // Manually save logs after exceptions
     Kohana_Log::save();
     if (!headers_sent()) {
         if ($e instanceof Kohana_Exception) {
             $e->sendHeaders();
         } else {
             header("HTTP/1.1 500 Internal Server Error");
         }
     }
     $view = new Theme_View("page.html", "other", "error");
     if ($e instanceof Kohana_404_Exception) {
         $view->page_title = t("Dang...  Page not found!");
         $view->content = new View("error_404.html");
         $user = identity::active_user();
         $view->content->is_guest = $user && $user->guest;
         if ($view->content->is_guest) {
             $view->content->login_form = new View("login_ajax.html");
             $view->content->login_form->form = auth::get_login_form("login/auth_html");
             // Avoid anti-phishing protection by passing the url as session variable.
             Session::instance()->set("continue_url", url::current(true));
         }
     } else {
         $view->page_title = t("Dang...  Something went wrong!");
         $view->content = new View("error.html");
     }
     print $view;
 }
开发者ID:andyst,项目名称:gallery3,代码行数:37,代码来源:MY_Kohana_Exception.php


示例12: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars;
    $_btn_edit = _('Edit');
    $_msg_newpage = _('New page');
    // if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
    if (auth::check_role('readonly')) {
        die_message(_('PKWK_READONLY prohibits editing'));
    }
    if (auth::is_check_role(PKWK_CREATE_PAGE)) {
        die_message(_('PKWK_CREATE_PAGE prohibits editing'));
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $_msg_newpage;
        $retvars['body'] = plugin_newpage_convert();
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        if (isset($vars['refer'])) {
            $r_page = get_fullname($page, $vars['refer']);
            $r_refer = 'refer=' . $vars['refer'];
        } else {
            $r_page = $page;
            $r_refer = '';
        }
        pkwk_headers_sent();
        header('Location: ' . get_page_location_uri($r_page, $r_refer));
        exit;
    }
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:30,代码来源:newpage.inc.php


示例13: plugin_insert_convert

function plugin_insert_convert()
{
    global $script, $vars, $digest;
    static $numbers = array();
    $_btn_insert = _('add');
    // if (PKWK_READONLY) return ''; // Show nothing
    if (auth::check_role('readonly')) {
        return '';
    }
    // Show nothing
    if (!isset($numbers[$vars['page']])) {
        $numbers[$vars['page']] = 0;
    }
    $insert_no = $numbers[$vars['page']]++;
    $s_page = htmlspecialchars($vars['page']);
    $s_digest = htmlspecialchars($digest);
    $s_cols = INSERT_COLS;
    $s_rows = INSERT_ROWS;
    $string = <<<EOD
<form action="{$script}" method="post">
 <div>
  <input type="hidden" name="insert_no" value="{$insert_no}" />
  <input type="hidden" name="refer"  value="{$s_page}" />
  <input type="hidden" name="plugin" value="insert" />
  <input type="hidden" name="digest" value="{$s_digest}" />
  <textarea name="msg" rows="{$s_rows}" cols="{$s_cols}"></textarea><br />
  <input type="submit" name="insert" value="{$_btn_insert}" />
 </div>
</form>
EOD;
    return $string;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:32,代码来源:insert.inc.php


示例14: plugin_deleted_action

function plugin_deleted_action()
{
    global $vars;
    $_deleted_plugin_title = _('The list of deleted pages');
    $_deleted_plugin_title_withfilename = _('The list of deleted pages (with filename)');
    $dir = isset($vars['dir']) ? $vars['dir'] : 'backup';
    $withfilename = isset($vars['file']);
    $_DIR['diff']['dir'] = DIFF_DIR;
    $_DIR['diff']['ext'] = '.txt';
    $_DIR['backup']['dir'] = BACKUP_DIR;
    $_DIR['backup']['ext'] = BACKUP_EXT;
    // .gz or .txt
    //$_DIR['cache' ]['dir'] = CACHE_DIR; // No way to delete them via web browser now
    //$_DIR['cache' ]['ext'] = '.ref';
    //$_DIR['cache' ]['ext'] = '.rel';
    if (!isset($_DIR[$dir])) {
        return array('msg' => 'Deleted plugin', 'body' => 'No such setting: Choose backup or diff');
    }
    $deleted_pages = array_diff(auth::get_existpages($_DIR[$dir]['dir'], $_DIR[$dir]['ext']), auth::get_existpages());
    if ($withfilename) {
        $retval['msg'] = $_deleted_plugin_title_withfilename;
    } else {
        $retval['msg'] = $_deleted_plugin_title;
    }
    $retval['body'] = page_list($deleted_pages, $dir, $withfilename);
    return $retval;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:27,代码来源:deleted.inc.php


示例15: plugin_ls2_show_lists

function plugin_ls2_show_lists($prefix, &$params)
{
    //	global $_ls2_err_nopages;
    $pages = array();
    if ($prefix != '') {
        foreach (auth::get_existpages() as $_page) {
            if (strpos($_page, $prefix) === 0) {
                $pages[] = $_page;
            }
        }
    } else {
        $pages = auth::get_existpages();
    }
    natcasesort($pages);
    if ($params['reverse']) {
        $pages = array_reverse($pages);
    }
    foreach ($pages as $page) {
        $params['page_ ' . $page] = 0;
    }
    if (empty($pages)) {
        return str_replace('$1', htmlspecialchars($prefix), '<p>' . _("There is no child page in ' \$1'") . '</p>');
    } else {
        $params['result'] = $params['saved'] = array();
        foreach ($pages as $page) {
            plugin_ls2_get_headings($page, $params, 1);
        }
        return join("\n", $params['result']) . join("\n", $params['saved']);
    }
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:30,代码来源:ls2.inc.php


示例16: plugin_group_convert

function plugin_group_convert()
{
    global $_group_msg;
    $auth_key = auth::get_user_info();
    if (empty($auth_key['group'])) {
        return '';
    }
    $argv = func_get_args();
    $i = count($argv);
    if ($i < 2) {
        return <<<EOD
<div>
        <label>{$_group_msg['group']}</label>:
        {$auth_key['group']}
</div>

EOD;
    }
    $msg = $argv[$i - 1];
    array_pop($argv);
    if (in_array($auth_key['group'], $argv)) {
        return convert_html(str_replace("\r", "\n", $msg));
    }
    return '';
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:25,代码来源:group.inc.php


示例17: plugin_tb_action

function plugin_tb_action()
{
    global $vars, $trackback;
    if (isset($vars['url'])) {
        // Receive and save a TrackBack Ping (both GET and POST)
        $url = $vars['url'];
        $tb_id = isset($vars['tb_id']) ? $vars['tb_id'] : '';
        plugin_tb_save($url, $tb_id);
        // Send a response (and exit)
    } else {
        if ($trackback && isset($vars['__mode']) && isset($vars['tb_id'])) {
            // Show TrackBacks received (and exit)
            switch ($vars['__mode']) {
                case 'rss':
                    plugin_tb_mode_rss($vars['tb_id']);
                    break;
                    // case 'view': plugin_tb_mode_view($vars['tb_id']); break;
                // case 'view': plugin_tb_mode_view($vars['tb_id']); break;
                case 'view':
                    return plugin_tb_mode_view($vars['tb_id']);
            }
        }
        // Show List of pages that TrackBacks reached
        $pages = auth::get_existpages(TRACKBACK_DIR, '.txt');
        if (!empty($pages)) {
            return array('msg' => 'Trackback list', 'body' => page_list($pages, 'read', FALSE));
        } else {
            return array('msg' => '', 'body' => '');
        }
    }
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:31,代码来源:tb.inc.php


示例18: plugin_mypage_convert

function plugin_mypage_convert()
{
    global $_mypage_msg;
    @(list($is_page) = func_get_args());
    $is_page = empty($is_page) ? false : true;
    $auth_key = auth::get_user_info();
    // 認証確認
    if (empty($auth_key['key'])) {
        return '';
    }
    // マイページ利用の確認
    if (empty($auth_key['mypage'])) {
        return '';
    }
    // マイページの作成により制御
    // マイページ未作成の場合
    // is_page : true  -> プラグイン利用ページに遷移 -> #mypage(1)
    //         : false -> 新規作成画面に遷移         -> #mypage
    // The page cannot be prepared. -> ページの準備ができていません。
    if ($is_page && !is_page($auth_key['mypage'])) {
        return $_mypage_msg['msg_no_page'];
    }
    // 画面に誘導
    header('Location: ' . get_page_location_uri($auth_key['mypage']));
    // 誘導失敗時の対処(ブラウザによる)
    die_message($_mypage_msg['err_jump']);
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:27,代码来源:mypage.inc.php


示例19: plugin_ls_convert

function plugin_ls_convert()
{
    global $vars;
    $with_title = FALSE;
    if (func_num_args()) {
        $args = func_get_args();
        $with_title = in_array('title', $args);
    }
    $prefix = $vars['page'] . '/';
    $pages = array();
    foreach (auth::get_existpages() as $page) {
        if (strpos($page, $prefix) === 0) {
            $pages[] = $page;
        }
    }
    natcasesort($pages);
    $ls = array();
    foreach ($pages as $page) {
        $comment = '';
        if ($with_title) {
            list($comment) = get_source($page);
            // 見出しの固有ID部を削除
            $comment = preg_replace('/^(\\*{1,3}.*)\\[#[A-Za-z][\\w-]+\\](.*)$/', '$1$2', $comment);
            $comment = '- ' . ereg_replace('^[-*]+', '', $comment);
        }
        $ls[] = "-[[{$page}]] {$comment}";
    }
    return convert_html($ls);
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:29,代码来源:ls.inc.php


示例20: plugin_doc_ini_action

function plugin_doc_ini_action()
{
    global $script, $vars, $_doc_ini_msg;
    if (auth::check_role('role_adm_contents')) {
        die_message('NOT AUTHORIZED.');
    }
    if (empty($vars['page'])) {
        return;
    }
    if (!is_pagename($vars['page'])) {
        return '';
    }
    // Invalid page name;
    $action = empty($vars['action']) ? '' : $vars['action'];
    $retval = array();
    $msg_title = sprintf($_doc_ini_msg['msg_confirmation'], $vars['page']);
    if ($action === 'exec') {
        return plugin_doc_ini_exec($vars['page']);
    }
    $retval['body'] = <<<EOD
<form action="{$script}" method="post">
        <div>
\t{$msg_title}
                <input type="hidden" name="plugin" value="doc_ini" />
                <input type="hidden" name="action" value="exec" />
                <input type="hidden" name="page" value="{$vars['page']}" />
                <input type="submit" value="{$_doc_ini_msg['btn_exec']}" />
        </div>
</form>

EOD;
    $retval['msg'] = $_doc_ini_msg['title_confirmation'];
    return $retval;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:34,代码来源:doc_ini.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP auth_admin类代码示例发布时间:2022-05-23
下一篇:
PHP astercrm类代码示例发布时间: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