当前位置: 首页>>代码示例>>PHP>>正文


PHP cpurl函数代码示例

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


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

示例1: exit

<?php

/**
 * 应用 >> 安米手机客户端 >> 更新缓存
 *
 * @author 谢建平 <jianping_xie@aliyun.com>
 * @copyright 2012-2014 Appbyme
 * @license http://opensource.org/licenses/LGPL-3.0
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
set_time_limit(0);
require_once dirname(__FILE__) . '/appbyme.class.php';
Appbyme::init();
$baseUrl = rawurldecode(cpurl());
$step = max(1, intval($_GET['step']));
$cleanImage = true;
showsubmenusteps('nav_updatecache', array(array('nav_updatecache_confirm', $step == 1), array('nav_updatecache_verify', $step == 2), array('nav_updatecache_completed', $step == 3)));
showtips(Appbyme::lang('mobcent_tips_updatecache'));
switch ($step) {
    case 1:
        $thumbTaskList = Appbyme::getDzPluginCache('thumb_task_list');
        $thumbTaskList === false && ($thumbTaskList = array());
        $thumbTaskCount = (int) count($thumbTaskList);
        cpmsg(sprintf('
            <input type="checkbox" name="type[]" value="cleandata" id="clean_datacache" class="checkbox" checked />
            <label for="clean_datacache">%s</label>
            <input type="checkbox" name="type[]" value="updatedata" id="update_datacache" class="checkbox" checked />
            <label for="update_datacache">%s</label>
            <input type="checkbox" name="type[]" value="cleanthumb" id="clean_thumbcache" class="checkbox" />
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:31,代码来源:cache.inc.php

示例2: lang

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: admincp_main.php 32459 2013-01-22 02:01:02Z monkey $
 *	Modified by Valery Votintsev at sources.ru
 */

if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

lang('admincp_menu');

$extra = cpurl('url');
$extra = $extra && getgpc('action') ? $extra : 'action=index';
$charset = CHARSET;
$title = cplang('admincp_title');
$header_welcome = cplang('header_welcome');
$header_logout = cplang('header_logout');
$header_bbs = cplang('header_bbs');
if(isfounder()) {
	cplang('founder_admin');
} else {
	if($GLOBALS['admincp']->adminsession['cpgroupid']) {
		$cpgroup = C::t('common_admincp_group')->fetch($GLOBALS['admincp']->adminsession['cpgroupid']);
		$cpadmingroup = $cpgroup['cpgroupname'];
	} else {
		cplang('founder_master');
	}
开发者ID:xDiglett,项目名称:discuzx30,代码行数:30,代码来源:admincp_main.php

示例3: check_user_login

 function check_user_login()
 {
     global $_G;
     $admin_username = isset($_POST['admin_username']) ? trim($_POST['admin_username']) : '';
     if ($admin_username != '') {
         require_once libfile('function/member');
         if (logincheck($_POST['admin_username'])) {
             if ((empty($_POST['admin_questionid']) || empty($_POST['admin_answer'])) && $_G['config']['admincp']['forcesecques']) {
                 $this->do_user_login();
             }
             $result = userlogin($_POST['admin_username'], $_POST['admin_password'], $_POST['admin_questionid'], $_POST['admin_answer']);
             if ($result['status'] == 1) {
                 $cpgroupid = DB::result_first("SELECT uid FROM " . DB::table('common_admincp_member') . " WHERE uid='{$result['member']['uid']}'");
                 if ($cpgroupid || $this->checkfounder($result['member'])) {
                     DB::insert('common_admincp_session', array('uid' => $result['member']['uid'], 'adminid' => $result['member']['adminid'], 'panel' => $this->panel, 'dateline' => TIMESTAMP, 'ip' => $this->core->var['clientip'], 'errorcount' => -1), false, true);
                     setloginstatus($result['member'], 0);
                     dheader('Location: ' . ADMINSCRIPT . '?' . cpurl('url', array('sid')));
                 } else {
                     $this->cpaccess = -2;
                 }
             } else {
                 loginfailed($_POST['admin_username']);
             }
         } else {
             $this->cpaccess = -4;
         }
     }
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:28,代码来源:class_admincp.php

示例4: check_user_login

 function check_user_login()
 {
     global $_G;
     $admin_email = isset($_POST['admin_email']) ? trim($_POST['admin_email']) : '';
     if ($admin_email != '') {
         if (logincheck($_POST['admin_email'])) {
             if ((empty($_POST['admin_questionid']) || empty($_POST['admin_answer'])) && ($_G['config']['admincp']['forcesecques'] || $_G['group']['forcesecques'])) {
                 $this->do_user_login();
             }
             $result = userlogin($_POST['admin_email'], $_POST['admin_password'], $_POST['admin_questionid'], $_POST['admin_answer'], 'auto', $this->core->var['clientip']);
             if ($result['status'] == 1) {
                 if ($this->checkfounder($result['member']) || $result['member']['groupid'] == 1 || $result['member']['groupid'] == 2) {
                     C::t('admincp_session')->insert(array('uid' => $result['member']['uid'], 'adminid' => $result['member']['adminid'], 'panel' => $result['member']['groupid'], 'dateline' => TIMESTAMP, 'ip' => $this->core->var['clientip'], 'errorcount' => -1), false, true);
                     setloginstatus($result['member'], 0);
                     dheader('Location: ' . ADMINSCRIPT . '?' . cpurl('url', array('sid')));
                 } else {
                     $this->cpaccess = -2;
                 }
             } else {
                 loginfailed($_POST['admin_email']);
             }
         } else {
             $this->cpaccess = -4;
         }
     }
 }
开发者ID:druphliu,项目名称:dzzoffice,代码行数:26,代码来源:dzz_admincp.php

示例5: shownav

function shownav($header = '', $menu = '', $nav = '')
{
    global $action, $operation;
    $title = 'cplog_' . $action . ($operation ? '_' . $operation : '');
    if (in_array($action, array('home', 'custommenu'))) {
        $customtitle = '';
    } elseif (cplang($title, false)) {
        $customtitle = $title;
    } elseif (cplang('nav_' . ($header ? $header : 'index'), false)) {
        $customtitle = 'nav_' . $header;
    } else {
        $customtitle = rawurlencode($nav ? $nav : ($menu ? $menu : ''));
    }
    $title = cplang('header_' . ($header ? $header : 'index')) . ($menu ? '&nbsp;&raquo;&nbsp;' . cplang($menu) : '') . ($nav ? '&nbsp;&raquo;&nbsp;' . cplang($nav) : '');
    $ctitle = cplang('header_' . ($header ? $header : 'index'));
    if ($menu) {
        $ctitle = cplang($menu);
    }
    if ($nav) {
        $ctitle = cplang($nav);
    }
    $addtomenu = "&nbsp;&nbsp;<a target=\"main\" title=\"" . cplang('custommenu_addto') . "\" href=\"" . ADMINSCRIPT . "?action=misc&operation=custommenu&do=add&title=" . rawurlencode($ctitle) . "&url=" . rawurlencode(cpurl()) . "\">[+]</a>";
    $dtitle = str_replace("'", "\\'", cplang('admincp_title') . ' - ' . str_replace('&nbsp;&raquo;&nbsp;', ' - ', $title));
    echo '<script type="text/JavaScript">parent.document.title = \'' . $dtitle . '\';if(parent.$(\'admincpnav\')) parent.$(\'admincpnav\').innerHTML=\'' . $title . $addtomenu . '\';</script>';
}
开发者ID:softhui,项目名称:discuz,代码行数:25,代码来源:function_admincp.php

示例6: showSourceView

 public static function showSourceView()
 {
     $url = rawurldecode(cpurl());
     showtips(Appbyme::lang('mobcent_tips_portal_module_source'));
     showtableheader(Appbyme::lang('mobcent_portal_module_source_edit'));
     showsubtitle(array('', 'display_order', 'id', Appbyme::lang('mobcent_portal_module_source_type'), 'name'));
     $mid = (int) $_GET['moduleid'];
     $page = isset($_GET['page']) ? $_GET['page'] : 1;
     $page >= 1 || ($page = 1);
     $pagesize = 10;
     $disableSourceTypeFid = PortalModule::getSourceCount($mid, PortalModule::SOURCE_TYPE_NORMAL, array('idtype' => array(PortalModule::SOURCE_TYPE_CATID))) > 0;
     $disableSourceTypeCatid = PortalModule::getSourceCount($mid, PortalModule::SOURCE_TYPE_NORMAL, array('idtype' => array(PortalModule::SOURCE_TYPE_FID))) > 0;
     $sourceCount = PortalModule::getSourceCount($mid);
     $sourceList = PortalModule::getSources($mid, PortalModule::SOURCE_TYPE_NORMAL, $page, $pagesize);
     foreach ($sourceList as $source) {
         showtablerow('', array('class="td25"', 'class="td28"'), array(sprintf('<input type="checkbox" class="checkbox" name="delete[]" value="%d" />', $source['sid']), sprintf('<input type="text" class="txt" size="2" name="displayorder_new[%d]" value="%d" />', $source['sid'], $source['displayorder']), sprintf('<input type="text" size="40" name="id_new[%d]" value="%s" />', $source['sid'], $source['id']), sprintf('
                 <select name="idtype_new[%d]">
                     <option value="%s" %s>%s</option>
                     <option value="%s" %s>%s</option>
                     <option value="%s" %s>%s</option>
                     <option value="%s" %s %s>%s</option>
                     <option value="%s" %s %s>%s</option>
                 </select>', $source['sid'], PortalModule::SOURCE_TYPE_AID, $source['idtype'] == PortalModule::SOURCE_TYPE_AID ? 'selected' : '', Appbyme::lang('mobcent_portal_module_source_type_aid'), PortalModule::SOURCE_TYPE_TID, $source['idtype'] == PortalModule::SOURCE_TYPE_TID ? 'selected' : '', Appbyme::lang('mobcent_portal_module_source_type_tid'), PortalModule::SOURCE_TYPE_BID, $source['idtype'] == PortalModule::SOURCE_TYPE_BID ? 'selected' : '', Appbyme::lang('mobcent_portal_module_source_type_bid'), PortalModule::SOURCE_TYPE_FID, $source['idtype'] == PortalModule::SOURCE_TYPE_FID ? 'selected' : '', $disableSourceTypeFid ? 'disabled' : '', Appbyme::lang('mobcent_portal_module_source_type_fid'), PortalModule::SOURCE_TYPE_CATID, $source['idtype'] == PortalModule::SOURCE_TYPE_CATID ? 'selected' : '', $disableSourceTypeCatid ? 'disabled' : '', Appbyme::lang('mobcent_portal_module_source_type_catid')), $source['title']));
     }
     $multipage = multi($sourceCount, $pagesize, $page, sprintf('%s?%s&pagesize=%d', ADMINSCRIPT, $url, $pagesize), 0, 6);
     showtablerow('', array('class="td25"', 'class="td28"'), array(cplang('add_new'), sprintf('<input type="text" class="txt" size="2" maxlength="4" name="new_displayorder" value="" />'), sprintf('<input type="text" size="40" name="new_ids" value="" />%s', Appbyme::lang('mobcent_tips_portal_module_source_add')), sprintf('
             <select name="new_idtype">
                 <option value="%s">%s</option>
                 <option value="%s">%s</option>
                 <option value="%s">%s</option>
                 <option value="%s" %s>%s</option>
                 <option value="%s" %s>%s</option>
             </select>', PortalModule::SOURCE_TYPE_AID, Appbyme::lang('mobcent_portal_module_source_type_aid'), PortalModule::SOURCE_TYPE_TID, Appbyme::lang('mobcent_portal_module_source_type_tid'), PortalModule::SOURCE_TYPE_BID, Appbyme::lang('mobcent_portal_module_source_type_bid'), PortalModule::SOURCE_TYPE_FID, $disableSourceTypeFid ? 'disabled' : '', Appbyme::lang('mobcent_portal_module_source_type_fid'), PortalModule::SOURCE_TYPE_CATID, $disableSourceTypeCatid ? 'disabled' : '', Appbyme::lang('mobcent_portal_module_source_type_catid'))));
     showsubmit('portal_submit', 'submit', 'del', '', $multipage);
     showtablefooter();
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:36,代码来源:portal.inc.php

示例7: s_shownav

function s_shownav($header = '', $menu = '', $nav = '')
{
    global $action, $operation, $plugin;
    $title = 'cplog_' . $action . ($operation ? '_' . $operation : '');
    if (in_array($action, array('home', 'custommenu'))) {
        $customtitle = '';
    } elseif (cplang($title, false)) {
        $customtitle = $title;
    } elseif (cplang('nav_' . ($header ? $header : 'index'), false)) {
        $customtitle = 'nav_' . $header;
    } else {
        $customtitle = rawurlencode($nav ? $nav : ($menu ? $menu : ''));
    }
    $title = cplang('header_' . ($header ? $header : 'index')) . ($menu ? '&nbsp;&raquo;&nbsp;' . cplang($menu) : '') . ($nav ? '&nbsp;&raquo;&nbsp;' . cplang($nav) : '');
    $ctitle = cplang('header_' . ($header ? $header : 'index'));
    if ($menu) {
        $ctitle = cplang($menu);
    }
    if ($nav) {
        $ctitle = cplang($nav);
    }
    $s_shownav_lang = lang('pl' . 'ugin/s' . 'tu' . 'dy_n' . 'ge');
    $ctitle = str_replace('"', "", $plugin['name'] . $ctitle);
    $addtomenu = "&nbsp;&nbsp;<a target=\"main\" title=\"" . cplang('custommenu_addto') . "\" href=\"" . ADMINSCRIPT . "?action=misc&operation=custommenu&do=add&title=" . rawurlencode($ctitle) . "&url=" . rawurlencode(cpurl()) . "\">[+]</a>";
    $dtitle = str_replace("'", "\\'", $s_shownav_lang['a' . 'dm' . 'in_t' . 'it' . 'le']);
    $title = '<' . 'fo' . 'nt c' . 'olo' . 'r=' . '"red"' . '><' . 'b' . '>&#x672C;&#x63D2;&#x4EF6;&#x7531;1314&#x5B66;&#x4E60;&#x7F51;&#x5F00;&#x53D1;&#xFF0C;&#x4F7F;&#x7528;&#x95EE;&#x9898;&#x8BF7;&#x5230;1314&#x5B66;&#x4E60;&#x7F51;&#xFF08;<' . 'a hr' . 'ef' . '="htt' . 'p:/' . '/ww' . 'w.1' . '314s' . 'tud' . 'y.co' . 'm/" tar' . 'get="_blank">ww' . 'w.13' . '14' . 'st' . 'udy.co' . 'm</' . 'a>&#xFF09;&#x53CD;&#x9988;<b' . '></f' . 'ont' . '>';
    echo '<script type="text/JavaScript">parent.document.title = \'' . $dtitle . '\';if(parent.$(\'admincpnav\')) parent.$(\'admincpnav\').innerHTML=\'' . $title . $addtomenu . '\';</script>';
}
开发者ID:sayhanabi,项目名称:sayhanabi_forum,代码行数:28,代码来源:pluginvar.func.php

示例8: trim

            default:
                $extralog = '';
        }
        $extralog = trim(str_replace(array('GET={};', 'POST={};'), '', $extralog));
        $extralog = $action == 'home' && isset($securyservice) || $action == 'insenz' && in_array($operation, array('register', 'binding')) ? '' : $extralog;
        writelog('cplog', implode("\t", clearlogstring(array($timestamp, $discuz_userss, $adminid, $onlineip, $action, $extralog))));
        unset($extralog);
    }
    $isfounder = $adminsession->isfounder = isfounder();
    if (empty($action) || isset($frames)) {
        $extra = cpurl('url');
        $extra = $extra && $action ? $extra : (!empty($runwizard) ? 'action=runwizard' : 'action=home');
        require_once DISCUZ_ROOT . './admin/main.inc.php';
    } elseif ($action == 'logout') {
        $adminsession->destroy();
        dheader("Location: {$indexname}");
    } else {
        checkacpaction($action, $operation);
        if (in_array($action, array('home', 'settings', 'members', 'profilefields', 'admingroups', 'usergroups', 'ranks', 'forums', 'threadtypes', 'threads', 'moderate', 'attach', 'smilies', 'recyclebin', 'prune', 'styles', 'plugins', 'tasks', 'magics', 'medals', 'google', 'qihoo', 'video', 'announce', 'faq', 'ec', 'tradelog', 'creditwizard', 'jswizard', 'project', 'counter', 'misc', 'adv', 'insenz', 'logs', 'tools', 'checktools', 'search', 'upgrade')) || $isfounder && in_array($action, array('runwizard', 'templates', 'db'))) {
            require_once DISCUZ_ROOT . './admin/' . $action . '.inc.php';
            $title = 'cplog_' . $action . ($operation ? '_' . $operation : '');
            if (!in_array($action, array('home', 'custommenu')) && lang($title, false)) {
                strtolower($_SERVER['REQUEST_METHOD']) == 'get' && admincustom($title, cpurl('url'));
            }
        } else {
            cpheader();
            cpmsg('noaccess');
        }
        cpfooter();
    }
}
开发者ID:AlexChien,项目名称:EY_BBS,代码行数:31,代码来源:admincp.php

示例9: shownav

function shownav($header = '', $menu = '', $nav = '')
{
    global $action, $operation, $BASESCRIPT;
    $title = 'cplog_' . $action . ($operation ? '_' . $operation : '');
    if (in_array($action, array('home', 'custommenu'))) {
        $customtitle = '';
    } elseif (lang($title, false)) {
        $customtitle = $title;
    } else {
        $customtitle = rawurlencode($nav ? $nav : ($menu ? $menu : ''));
    }
    echo '<script type="text/JavaScript">if(parent.$(\'admincpnav\')) parent.$(\'admincpnav\').innerHTML=\'' . lang('nav_' . ($header ? $header : 'index')) . ($menu ? '&nbsp;&raquo;&nbsp;' . lang($menu) : '') . ($nav ? '&nbsp;&raquo;&nbsp;' . lang($nav) : '') . '\';' . 'if(parent.$(\'add2custom\')) parent.$(\'add2custom\').innerHTML=' . ($customtitle ? '\'<a href="' . $BASESCRIPT . '?action=misc&operation=custommenu&do=add&title=' . $customtitle . '&url=' . cpurl() . '" target="main"><img src="images/admincp/btn_add2menu.gif" title="' . lang('custommenu_add') . '" width="19" height="18" /></a>\';' : '\'\'') . '</script>';
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:13,代码来源:global.func.php

示例10: showsubmenuanchors

function showsubmenuanchors($title, $menus = array(), $right = '')
{
    global $BASESCRIPT;
    if (!$title || !$menus || !is_array($menus)) {
        return;
    }
    echo <<<EOT
<script type="text/JavaScript">var currentAnchor = '{$GLOBALS['anchor']}';</script>
EOT;
    $s = '<div class="itemtitle">' . $right . '<h3>' . lang($title) . '</h3>';
    $s .= '<ul class="tab1" id="submenu">';
    foreach ($menus as $menu) {
        if ($menu && is_array($menu)) {
            $s .= '<li' . (!$menu[3] ? ' id="nav_' . $menu[1] . '" onclick="showanchor(this)"' : '') . ($menu[2] ? ' class="current"' : '') . '><a href="' . ($menu[3] ? $BASESCRIPT . '?action=' . $menu[1] : '#') . '"><span>' . lang($menu[0]) . '</span></a></li>';
        }
    }
    $s .= '</ul>';
    $s .= '</div>';
    echo !empty($menus) ? '<div class="floattop">' . $s . '</div><div class="floattopempty"></div>' : $s;
    echo '<script type="text/JavaScript">' . 'if(parent.$(\'custombar_add\')) parent.$(\'custombar_add\').innerHTML=\'<span onclick="ajaxget(\\\'' . $BASESCRIPT . '?action=misc&operation=custombar&title=' . rawurlencode($title) . '&url=' . cpurl() . '\\\', \\\'custombar\\\', \\\'\\\', \\\'\\\', \\\'\\\', function () { top.custombar_resize();});doane(event);" title="' . lang('custombar_add_tips') . '" />&nbsp;&nbsp;&nbsp;&nbsp;' . lang('custombar_add') . '</span>\';' . 'top.custombar_resize();' . '</script>';
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:21,代码来源:global.func.php


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