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


PHP checkpermission函数代码示例

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


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

示例1: elseif

			cpmsg('database_import_format_illegal');
		}

	} elseif(submitcheck('deletesubmit')) {
		if(is_array($delete)) {
			foreach($delete as $filename) {
				@unlink('./forumdata/'.$backupdir.'/'.str_replace(array('/', '\\'), '', $filename));
			}
			cpmsg('database_file_delete_succeed');
		} else {
			cpmsg('database_file_delete_invalid');
		}
	}

} elseif($action == 'runquery') {
	$checkperm = checkpermission('runquery', 0);

	$runquerys = array();
	@include_once(DISCUZ_ROOT.'admin/quickqueries.inc.php');

	if(!submitcheck('sqlsubmit')) {
		shownav('menu_database_query');
		showtips('database_run_query_tips');

		$runqueryselect = '';
		foreach($simplequeries as $key => $query) {
			if(empty($query['sql'])) {
				$runqueryselect .= "<optgroup label=\"$query[comment]\">";
			} else {
				$runqueryselect .= '<option value="'.$key.'">'.$query['comment'].'</option>';
			}
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:database.inc.php

示例2: defined

<?php

/**
 * [WDL] Copyright (c) 2013 wormwood.com
 */
defined('IN_IA') or exit('Access Denied');
$id = intval($_GPC['id']);
if (empty($id)) {
    $id = $_W['weid'];
}
if (!checkpermission('wechats', $id)) {
    message('公众号不存在或是您没有权限操作!');
}
if ($_W['ispost']) {
    $credit = array_elements(array('switch'), $_GPC['credit']);
    $credit['switch'] = $credit['switch'] == 'true';
    $offline = array_elements(array('switch', 'account'), $_GPC['offline']);
    $offline['switch'] = $offline['switch'] == 'true';
    $alipay = array_elements(array('switch', 'account', 'partner', 'secret'), $_GPC['alipay']);
    $alipay['switch'] = $alipay['switch'] == 'true';
    $alipay['account'] = trim($alipay['account']);
    $alipay['partner'] = trim($alipay['partner']);
    $alipay['secret'] = trim($alipay['secret']);
    $delivery = array_elements(array('switch'), $_GPC['delivery']);
    $delivery['switch'] = $delivery['switch'] == 'true';
    if ($alipay['switch'] && (empty($alipay['account']) || empty($alipay['partner']) || empty($alipay['secret']))) {
        message('请输入完整的支付宝接口信息.');
    }
    if ($_GPC['alipay']['t'] == 'true') {
        $params = array();
        $params['tid'] = md5(uniqid());
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:31,代码来源:payment.ctrl.php

示例3: fopen

		}
		$fp = fopen($filename, 'wb');
		flock($fp, 2);
		fwrite($fp, $templatenew);
		fclose($fp);

		if(substr(basename($filename), 0, 3) == 'css') {
			updatecache('styles');
		}

		cpmsg('templates_edit_succeed', "admincp.php?action=templates&edit=$templateid&keyword=$keywordenc");

	}

} elseif($action == 'tpladd') {
	checkpermission('tpledit');
	$query = $db->query("SELECT * FROM {$tablepre}templates WHERE templateid='$edit'");
	if(!$template = $db->fetch_array($query)) {
		cpmsg('templates_add_invalid');
	} elseif(!istpldir($template['directory'])) {
		$directory = $template['directory'];
		cpmsg('templates_directory_invalid');
	} elseif(file_exists(DISCUZ_ROOT."./$template[directory]/$name.htm")) {
		cpmsg('templates_add_duplicate');
	} elseif(!@$fp = fopen(DISCUZ_ROOT."./$template[directory]/$name.htm", 'wb')) {
		cpmsg('templates_add_file_invalid');
	}

	@fclose($fp);
	cpmsg('templates_add_succeed', "admincp.php?action=tpledit&templateid=1&fn=$name.htm");
开发者ID:jonycookie,项目名称:projectm2,代码行数:30,代码来源:templates.inc.php

示例4: die

In memory of my university life
------------------------------------------------------- */
if (!defined('VALIDREQUEST')) {
    die('Access Denied.');
}
$is_save = $is_preview = false;
if (strstr($itemid, 'save_')) {
    @(list($is_save, $itemid) = @explode('_', $itemid));
}
if (strstr($itemid, 'preview_')) {
    $is_preview = true;
}
$itemid = floor($itemid);
$m_b = new getblogs();
if ($is_preview) {
    checkpermission('AddEntry');
    acceptrequest('title,property,category,tags,sticky,html,ubb,emot,sweather,permitgp,pinged,changemytime,resend,autoping,starred,blogpsw,useeditor,summaryway,blogalias,originsrc,comefrom,forcedraft,clearautosaver', 0, 'post');
    $blogid = -1000;
    $category = @floor($category);
    $sticky = @floor($sticky);
    $htmlstat = @floor($html);
    $ubbstat = @floor($ubb);
    $emotstat = @floor($emot);
    $starred = @floor($starred);
    $summaryway = @floor($summaryway);
    $property = $frontpage = 0;
    $entrysummary = $pinged = '';
    $title = safe_convert(stripslashes($title));
    //Get content
    $content = $_POST['content'];
    //If magic quotes is on, strip the slashes automatically added
开发者ID:JJYing,项目名称:Anyway-Website,代码行数:31,代码来源:mod_read.php

示例5: tb_convert

            $excerpt = tb_convert($content);
        } else {
            $excerpt = tb_no_quote($content);
        }
        $ping_show = @explode(' ', $pinged);
        for ($i = 0; $i < count($ping_show); $i++) {
            $ping_urls .= "<input type='hidden' name='pingurl[]' value='{$ping_show[$i]}'>";
        }
        $ping_url_show = @implode('<br>', $ping_show);
        $form = "<div align=center><form action='admin.php?go=edit_sendtb' method='post'><input type='hidden' name='title' value=\"{$title}\"><input type='hidden' name='excerpt' value=\"{$excerpt}\"><input type='hidden' name='blog_name' value=\"{$config['blogname']}\"><input type='hidden' name='url' value='{$config['blogurl']}/" . get_entry_url($currentid, $blogalias) . "'>{$ping_urls}<input type='submit' value='{$lna[310]}' class='formbutton'> <input type='button' value='{$lna[311]}' onclick='window.location=(\"" . get_entry_url($currentid, $blogalias) . "\");' class='formbutton'></form></div>";
        $t = new template();
        $t->showtips($lna[312], $lna[313] . $ping_url_show . "<br><br>{$lna[314]}<br><br>" . $form, "{$backtowhere}|" . get_entry_url($currentid, $blogalias));
    }
}
if ($job == 'sendtb') {
    checkpermission('EditEntry');
    acceptrequest('title,excerpt,url,blog_name,pingurl');
    if (!is_array($pingurl)) {
        catcherror($lna[315]);
    }
    plugin_runphp('trackbacksending');
    @header("Content-Type: text/html; charset=utf-8");
    $url = str_replace('{host}', $_SERVER['HTTP_HOST'], $url);
    foreach ($pingurl as $durl) {
        $result = sendping($durl, $title, $excerpt, $url, $blog_name);
        if (!$result) {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[318]}";
        } elseif ($result == 'ok') {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[319]}<br>";
        } elseif ($result == 'unknown') {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[949]}<br>";
开发者ID:JJYing,项目名称:Anyway-Website,代码行数:31,代码来源:cp_edit.php

示例6: array

    }
}
if ($mbcon['enableopenid'] == '1') {
    $openidloginstat = $logstat == 0 && $_COOKIE['openid_url_id'] ? 1 : 0;
} else {
    $openidloginstat = 0;
}
//Load User Group Permission Cache
$permission = array();
if (file_exists("data/usergroup{$userdetail['usergroup']}.php")) {
    @(include_once "data/usergroup{$userdetail['usergroup']}.php");
} else {
    include_once "data/usergroup0.php";
}
if (!defined('isLogin')) {
    checkpermission('visit');
}
//Check 'Browse' permission
if ($permission['ViewPHPError'] == 0) {
    error_reporting(0);
}
if ($permission['CloseSecurityCode'] == 1 && !defined('VALIDADMIN')) {
    //Disable security code for some usergroups
    $config['validation'] = '0';
    $config['loginvalidation'] = '0';
    $config['applylinkvalidation'] = '0';
}
//Get IP
$ip_tmp = $_SERVER['REMOTE_ADDR'];
$ip_tmp1 = $_SERVER['HTTP_X_FORWARDED_FOR'];
if ($ip_tmp1 != "" && $ip_tmp1 != "unknown") {
开发者ID:JJYing,项目名称:Anyway-Website,代码行数:31,代码来源:global.php

示例7: array

<?php

include "includes/initialize.php";
include DIR_CLASSES . "order.php";
require DIR_CLASSES . "search.php";
require DIR_CLASSES . "splitresults.php";
$perm = array('access_admin', 'add_order', 'update_order_status');
checkpermission($perm);
$tpl = new template();
$order = new Order();
$tpl->Load(TEMPLATE_PATH . "list_orders.tpl");
if (isset($_GET['action']) and $_GET['action'] == 1) {
    messages(ORDER_DELETE_SUCCESS);
}
if (isset($_SESSION['message'])) {
    $tpl->AssignValue("message", $_SESSION['message']);
}
// Delete Order
if (isset($_POST['mode']) and $_POST['mode'] == '_delete_order') {
    header('Content-type: application/json');
    Query("DELETE FROM `order` WHERE id = '" . $_POST['id'] . "'");
    Query("DELETE FROM order_status WHERE order_id = '" . $_POST['id'] . "'");
    Query("DELETE FROM product_order WHERE order_id = '" . $_POST['id'] . "'");
    $data = array('success' => 'yes');
    $output = json_encode($data);
    echo $output;
    exit;
}
//hide business associate name
$bavisibility = '';
if ($_SESSION['utype'] != 'BA') {
开发者ID:exp-nazeem,项目名称:financial,代码行数:31,代码来源:list_orders.php

示例8: defined

<?php
/**
 * [WeEngine System] Copyright (c) 2013 WE7.CC
 */
defined('IN_IA') or exit('Access Denied');

$id = intval($_GPC['id']);
$row = pdo_fetch("SELECT weid, name, uid FROM ".tablename('wechats')." WHERE weid = '$id'");
if (!checkpermission('wechats', $row)) {
	message('抱歉,您没有权限操作该公众号!');
}
if (empty($row)) {
	message('抱歉,该公从号不存在或是已经被删除!', create_url('account/display'));
}
cache_write('weid:' . $_W['uid'], $row['weid']);
isetcookie('weid', $row['weid']);
message($row['name'], '', 'success');
开发者ID:royalwang,项目名称:saivi,代码行数:17,代码来源:switch.ctrl.php

示例9: checkpermission

 if ($job == 'openidaddreply') {
     checkpermission('Reply');
     if ($permission['SeeHiddenEntry'] != 1) {
         $limitmore = "AND `property`<>2";
     }
     $originblog = $blog->getbyquery("SELECT * FROM `{$db_prefix}blogs` WHERE `blogid`='{$v_id}' AND `property`<>1  AND `property`<>3 {$limitmore}");
     if ($originblog['blogid'] != $v_id) {
         $cancel = $lnc[211];
     } else {
         $allowedgp = @explode('|', $originblog['permitgp']);
         if ($originblog['permitgp'] != '' && !@in_array($userdetail['usergroup'], $allowedgp)) {
             $cancel = $lnc[211];
         }
     }
 } else {
     checkpermission('LeaveMessage');
 }
 catcherror($cancel);
 if (preg_search($openid_url, $forbidden['banword']) || preg_search($openid_url, $forbidden['keep'])) {
     $cancel = $lnc[158];
 }
 if ($config['validation'] == 1) {
     if ($db_defaultsessdir != 1) {
         session_save_path("./{$db_tmpdir}");
     }
     session_cache_limiter("private, must-revalidate");
     session_start();
     if ($v_security == '' || strtolower($v_security) != strtolower($_SESSION['code'])) {
         $cancel = $lnc[165];
     }
 }
开发者ID:JJYing,项目名称:Anyway-Website,代码行数:31,代码来源:mod_visit.php

示例10: mysql_query

        if ($_SESSION['type'] == USERTYPE_SUPERVISOR) {
            $res = mysql_query("SELECT * FROM user_info WHERE user_id=\"{$id}\"");
            if (mysql_num_rows($res) == 1 && mysql_result($res, 0, 'grp') == $_SESSION['group']) {
                return TRUE;
            } else {
                return FALSE;
            }
        } else {
            return $id == $_SESSION['id'];
        }
    }
}
$fileid = $_GET['id'];
$pid = $_GET['pid'];
checkauthen();
connect_db();
if (checkpermission($fileid)) {
    $res = mysql_query("SELECT * FROM grd_status WHERE user_id=\"{$fileid}\" " . "AND prob_id=\"{$pid}\"");
    if (mysql_num_rows($res) != 1) {
        echo "Compiler message is not available.";
    } else {
        echo "<html><body>Compiler message of {$fileid}/{$pid}<hr><tt>";
        echo nl2br(htmlspecialchars(mysql_result($res, 0, 'compiler_msg')));
        echo "</body></html>";
    }
} else {
    echo "No permission!<br>";
    echo "This event has been logged:<br>";
    echo "<dd><tt> user " . $_SESSION['id'] . " is trying to access " . $fileid . "-" . $pid . "</tt>";
}
close_db();
开发者ID:elsayhsoft,项目名称:fossil-grader,代码行数:31,代码来源:viewmsg.php

示例11: showmenu

    showmenu($lang['menu_posting'], array(array('name' => $lang['menu_posting_discuzcodes'], 'url' => 'admincp.php?action=discuzcodes'), array('name' => $lang['menu_posting_tags'], 'url' => 'admincp.php?action=tags'), array('name' => $lang['menu_posting_censors'], 'url' => 'admincp.php?action=censor'), array('name' => $lang['menu_posting_smilies'], 'url' => 'admincp.php?action=smilies'), array('name' => $lang['menu_thread_icon'], 'url' => 'admincp.php?action=icons'), array('name' => $lang['menu_posting_attachtypes'], 'url' => 'admincp.php?action=attachtypes'), array('name' => $lang['menu_moderate_recyclebin'], 'url' => 'admincp.php?action=recyclebin')));
    echo '</div><div id="api" style="display: none">';
    showmenu($lang['menu_plugins'], array(array('name' => $lang['menu_plugins_edit'], 'url' => 'admincp.php?action=plugins'), array('name' => $lang['menu_plugins_config'], 'url' => 'admincp.php?action=pluginsconfig')));
    showmenu($lang['menu_supesite'], array(array('name' => $lang['supe_settings'], 'url' => 'admincp.php?action=xspace')));
    showmenu($lang['menu_passport'], array(array('name' => $lang['menu_passport_settings'], 'url' => 'admincp.php?action=passport'), array('name' => $lang['menu_passport_shopex'], 'url' => 'admincp.php?action=shopex')));
    showmenu($lang['menu_google'], array(array('name' => $lang['menu_google_config'], 'url' => 'admincp.php?action=google_config')));
    showmenu($lang['menu_qihoo'], array(array('name' => $lang['menu_qihoo_config'], 'url' => 'admincp.php?action=qihoo_config'), array('name' => $lang['menu_qihoo_topics'], 'url' => 'admincp.php?action=qihoo_topics'), array('name' => $lang['menu_qihoo_relatedthreads'], 'url' => 'admincp.php?action=qihoo_relatedthreads')));
    showmenu($lang['menu_video'], array(array('name' => $lang['menu_video_config'], 'url' => 'admincp.php?action=videoconfig'), array('name' => $lang['menu_video_bind'], 'url' => 'admincp.php?action=videobind'), array('name' => $lang['menu_video_class'], 'url' => 'admincp.php?action=videoclass')));
    showmenu($lang['menu_ecommerce'], array(array('name' => $lang['settings_general'], 'url' => 'admincp.php?action=settings&do=ecommerce'), array('name' => $lang['menu_ecommerce_alipay'], 'url' => 'admincp.php?action=alipay'), array('name' => $lang['menu_ecommerce_credit'], 'url' => 'admincp.php?action=ec_credit'), array('name' => $lang['menu_ecommerce_credit_orders'], 'url' => 'admincp.php?action=orders'), array('name' => $lang['menu_ecommerce_trade_orders'], 'url' => 'admincp.php?action=tradelog')));
    echo '</div><div id="others" style="display: none">';
    showmenu($lang['menu_magics'], array(array('name' => $lang['menu_magics_config'], 'url' => 'admincp.php?action=magic_config'), array('name' => $lang['menu_magics_edit'], 'url' => 'admincp.php?action=magic'), array('name' => $lang['menu_magics_market'], 'url' => 'admincp.php?action=magicmarket')));
    showmenu($lang['menu_misc'], array(array('name' => $lang['menu_misc_announces'], 'url' => 'admincp.php?action=announcements'), array('name' => $lang['menu_misc_medals'], 'url' => 'admincp.php?action=medals'), array('name' => $lang['menu_misc_advertisements'], 'url' => 'admincp.php?action=adv'), array('name' => $lang['menu_misc_links'], 'url' => 'admincp.php?action=forumlinks'), array('name' => $lang['menu_misc_crons'], 'url' => 'admincp.php?action=crons'), array('name' => $lang['menu_misc_help'], 'url' => 'admincp.php?action=faqlist'), array('name' => $lang['menu_misc_onlinelist'], 'url' => 'admincp.php?action=onlinelist')));
    echo '</div><div id="tools" style="display: none">';
    showmenu($lang['menu_tools'], array(array('name' => $lang['menu_members_newsletter'], 'url' => 'admincp.php?action=members&submitname=newslettersubmit'), array('name' => $lang['menu_tools_updatecaches'], 'url' => 'admincp.php?action=updatecache'), array('name' => $lang['menu_tools_updatecounters'], 'url' => 'admincp.php?action=counter'), array('name' => $lang['menu_tools_javascript'], 'url' => 'admincp.php?action=jswizard'), array('name' => $lang['menu_tools_creditwizard'], 'url' => 'admincp.php?action=creditwizard'), array('name' => $lang['menu_tools_fileperms'], 'url' => 'admincp.php?action=fileperms'), array('name' => $lang['menu_tools_filecheck'], 'url' => 'admincp.php?action=filecheck'), array('name' => $lang['menu_maint_pmprune'], 'url' => 'admincp.php?action=pmprune'), array('name' => $lang['menu_forum_scheme'], 'url' => 'admincp.php?action=project')));
    if ($isfounder) {
        showmenu($lang['menu_database'], array(array('name' => $lang['menu_database_export'], 'url' => 'admincp.php?action=export'), checkpermission('dbimport', 0) ? array('name' => $lang['menu_database_import'], 'url' => 'admincp.php?action=import') : array(), array('name' => $lang['menu_database_query'], 'url' => 'admincp.php?action=runquery'), array('name' => $lang['menu_database_optimize'], 'url' => 'admincp.php?action=optimize'), array('name' => $lang['menu_tools_dbcheck'], 'url' => 'admincp.php?action=dbcheck')));
    }
    showmenu($lang['menu_logs'], array(array('name' => $lang['menu_logs_login'], 'url' => 'admincp.php?action=illegallog'), array('name' => $lang['menu_logs_rating'], 'url' => 'admincp.php?action=ratelog'), array('name' => $lang['menu_logs_credit'], 'url' => 'admincp.php?action=creditslog'), array('name' => $lang['menu_logs_mod'], 'url' => 'admincp.php?action=modslog'), array('name' => $lang['menu_logs_medal'], 'url' => 'admincp.php?action=medalslog'), array('name' => $lang['menu_logs_ban'], 'url' => 'admincp.php?action=banlog'), array('name' => $lang['menu_logs_admincp'], 'url' => 'admincp.php?action=cplog'), array('name' => $lang['menu_logs_magic'], 'url' => 'admincp.php?action=magiclog'), array('name' => $lang['menu_logs_invite'], 'url' => 'admincp.php?action=invitelog'), array('name' => $lang['menu_logs_error'], 'url' => 'admincp.php?action=errorlog')));
    echo '</div>';
    echo '</div><div id="insenz" style="display: none">';
    $query = $db->query("SELECT value FROM {$tablepre}settings WHERE variable='insenz'");
    $insenz = ($insenz = $db->result($query, 0)) ? unserialize($insenz) : array();
    showmenu($lang['menu_insenz_settings'], array(array('name' => $lang['menu_insenz_settings_basic'], 'url' => 'admincp.php?action=insenz&operation=settings&do=basic'), array('name' => $lang['menu_insenz_settings_softad'], 'url' => 'admincp.php?action=insenz&operation=settings&do=softad'), array('name' => $lang['menu_insenz_settings_hardad'], 'url' => 'admincp.php?action=insenz&operation=settings&do=hardad'), $insenz['topicrelatedad'] || $insenz['traderelatedad'] ? array('name' => $lang['menu_insenz_settings_relatedad'], 'url' => 'admincp.php?action=insenz&operation=settings&do=relatedad') : '', $insenz['topicstatus'] ? array('name' => $lang['menu_insenz_settings_virtualforum'], 'url' => 'admincp.php?action=insenz&operation=settings&do=virtualforum') : ''));
    showmenu($lang['menu_insenz_softad'], array(array('name' => $lang['menu_insenz_campaigns_new'], 'url' => 'admincp.php?action=insenz&operation=campaignlist&c_status=2'), array('name' => $lang['menu_insenz_campaigns_accepted'], 'url' => 'admincp.php?action=insenz&operation=campaignlist&c_status=6'), array('name' => $lang['menu_insenz_campaigns_finished'], 'url' => 'admincp.php?action=insenz&operation=campaignlist&c_status=7')));
    $insenz['topicstatus'] && showmenu($lang['menu_insenz_virtualforum'], array(array('name' => $lang['menu_insenz_campaigns_new'], 'url' => 'admincp.php?action=insenz&operation=virtualforum&do=&c_status=2'), array('name' => $lang['menu_insenz_campaigns_accepted'], 'url' => 'admincp.php?action=insenz&operation=virtualforum&do=&c_status=6'), array('name' => $lang['menu_insenz_campaigns_finished'], 'url' => 'admincp.php?action=insenz&operation=virtualforum&do=&c_status=7')));
    showmenu($lang['menu_insenz_tools'], array(array('name' => $lang['menu_insenz_tools_myinsenz'], 'url' => 'http://www.insenz.com/publishers/', 'target' => '_blank'), array('name' => $lang['menu_insenz_tools_faq'], 'url' => 'http://www.insenz.com/publishers/faq/', 'target' => '_blank')));
    echo '</div>';
    echo '<table width="146" border="0" cellspacing="0" align="center" cellpadding="0" class="leftmenulist">' . '<tr class="leftmenutext"><td><div style="margin-left:48px;"><a href="admincp.php?action=logout" target="_top">' . $lang['menu_logout'] . '</a></td></tr>' . '</table>';
} else {
    //showmenu($lang['menu_home'],	'admincp.php?action=home');
    $menuarray = array();
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:menu.inc.php

示例12: floor

        } else {
            $eachreply = $try;
        }
        if ($job == 'addreply' || $job == 'editreply') {
            $output_single = $m_b->single_reply($eachreply, floor($onetimecounter));
        } else {
            $output_single = $m_b->single_message($eachreply, floor($onetimecounter));
        }
        catchsuccess($output_single);
    }
}
if ($job == 'search') {
    if ($mbcon['searchon'] == 0) {
        catcherror($lnc[217]);
    }
    checkpermission('AllowSearch');
    //Check post interval
    $lastsearch = $_COOKIE['lastsearch'];
    if (time() - $lastsearch < $permission['SearchInterval']) {
        catcherror($lnc[218] . $permission['SearchInterval'] . $lnc[219]);
    }
    acceptrequest('keyword,searchmethod');
    if (strlen($keyword) < $mbcon['keymin'] || strlen($keyword) > $mbcon['keymax'] || !$searchmethod) {
        catcherror($lnc[220]);
    }
    if (preg_search($keyword, $forbidden['nosearch'])) {
        catcherror($lnc[221]);
    }
    $keyword = safe_convert($keyword);
    if ($searchmethod != 1 && $searchmethod != 5 && $permission['FulltextSearch'] != 1) {
        catcherror($lnc[222]);
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:mod_visit.php

示例13: foreach

}
$firstcat = '';
foreach ($menu as $m) {
    $opener = false;
    $hide = false;
    if (isset($m['opener'])) {
        if ($m['opener'] == 'true') {
            $opener = true;
        }
    }
    if (isset($m['hide'])) {
        if ($m['hide'] == 'true') {
            $hide = true;
        }
    }
    if (isset($m['permissions']) && !checkpermission($m['permissions'])) {
        continue;
    }
    echo '<td style="padding-left: 20px; padding-right: 20px; text-align: center">';
    if ($firstcat == '' && isset($m['link']) && $m['target'] == 'nav') {
        $firstcat = $m['link'];
    }
    if (isset($m['link'])) {
        echo '<a class="toplink" href="' . $m['link'] . '" ';
    }
    if (isset($m['target'])) {
        echo 'target="' . $m['target'] . '" ';
    }
    if (isset($m['link'])) {
        echo '>';
    }
开发者ID:andikoller,项目名称:FHC-3.0-FHBGLD,代码行数:31,代码来源:top.php

示例14: togglemenu

echo $lang['header_topic'];
?>
</a></span></li>
<li><span><a href="#" onclick="sethighlight(4); togglemenu('api'); parent.main.location='admincp.php?action=pluginsconfig';return false;"><?php 
echo $lang['header_extended'];
?>
</a></span></li>
<li><span><a href="#" onclick="sethighlight(5); togglemenu('others'); parent.main.location='admincp.php?action=announcements';return false;"><?php 
echo $lang['header_misc'];
?>
</a></span></li>
<?

	echo '<li><span><a href="#" onclick="sethighlight(6); togglemenu(\'insenz\'); parent.main.location=\'admincp.php?action=insenz&operation=campaignlist&c_status=2\';return false;">'.$lang['header_insenz'].'</a></span></li>';

	if($isfounder && checkpermission('dbimport', 0)) {
		echo '<li><span><a href="#" onclick="sethighlight(7); togglemenu(\'tools\'); parent.main.location=\'admincp.php?action=export\';return false;">'.$lang['header_tools'].'</a></span></li>';
	} else {
		echo '<li><span><a href="#" onclick="sethighlight(7); togglemenu(\'tools\'); parent.main.location=\'admincp.php?action=counter\';return false;">'.$lang['header_tools'].'</a></span></li>';
	}

} else {
?>

<li><span><a href="#" onClick="parent.location='<?php 
echo $indexname;
?>
'"><?php 
echo $lang['header_home'];
?>
</a></span></li>
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:header.inc.php

示例15: array

    $jobs = "login.php?job=doapplylink";
    $formbody .= $t->set('form_eachline', array('text' => "*{$lnc[169]}", 'formelement' => "<input type='text' class='text' size='20' name='sitename' />"));
    $formbody .= $t->set('form_eachline', array('text' => "*{$lnc[170]}", 'formelement' => "<input type='text'  class='text' size='30' name='siteurl' />"));
    $formbody .= $t->set('form_eachline', array('text' => $lnc[171], 'formelement' => "<input type='text'  class='text' size='30' name='sitelogo' /> {$lnc[172]}"));
    $formbody .= $t->set('form_eachline', array('text' => $lnc[173], 'formelement' => "<input type='text'  class='text' size='30' name='siteintro' /> {$lnc[174]}"));
    $formbody .= $t->set('form_eachline', array('text' => $lnc[175], 'formelement' => "{$lnc[176]}<br/><ul><li>{$lnc[177]}<br/><textarea class='text' cols='40' rows='2' name='sitemycode1'>{$mycode1}</textarea></li><li>{$lnc[178]}<br/><textarea class='text' cols='40' rows='2' name='sitemycode2'>{$mycode2}</textarea></li></ul>"));
    if ($config['applylinkvalidation'] == 1) {
        $rand = rand(0, 100000);
        $formbody .= $t->set('form_eachline', array('text' => $lnc[249], 'formelement' => "<span id='securityimagearea'><img src='inc/securitycode.php?rand={$rand}' alt='' title='{$lnc[250]}'/></span> <input name='securitycode' type='text' id='securitycode' size='16' class='text' /> {$lnc[251]} [<a href=\"javascript: refreshsecuritycode('securityimagearea', 'securitycode');\">{$lnc[283]}</a>]"));
    }
    $section_body_main = $t->set('register', array('title' => $actionnow, 'job' => $jobs, 'registerbody' => $formbody));
    announcebar();
    $bodymenu = $t->set('mainpage', array('pagebar' => $pagebar, 'iftoppage' => 'none', 'ifbottompage' => 'none', 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => $section_body_main, 'currentpage' => '', 'previouspageurl' => '', 'nextpageurl' => '', 'turningpages' => '', 'totalpages' => '', 'previouspageexists' => '', 'nextpageexists' => ''));
}
if ($job == 'doapplylink') {
    checkpermission('ApplyLink');
    acceptrequest('sitename,siteurl,sitelogo,siteintro');
    if ($config['applylinkvalidation'] == 1) {
        acceptrequest('securitycode');
        if ($db_defaultsessdir != 1) {
            session_save_path("./{$db_tmpdir}");
        }
        session_cache_limiter("private, must-revalidate");
        session_start();
        if ($securitycode == '' || strtolower($securitycode) != strtolower($_SESSION['code'])) {
            catcherror($lnc[165]);
        }
    }
    $sitename = safe_convert(trimplus($sitename));
    $siteurl = safe_convert(trimplus($siteurl));
    $sitelogo = safe_convert(trimplus($sitelogo));
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:mod_login.php


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