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


PHP need_manager函数代码示例

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


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

示例1: include

<?php
include(dirname(dirname(dirname(__FILE__))) . '/app.php');

need_manager();
need_auth('market');

	include('./public_func.php');
	$func = new func();
//显示灯鹭设置页面上是文字
$arr_cache[] = $func->show_onoff('denglu_top',$denglu_cache['denglu_top'],$Dlang['denglu_top'],$Dlang['denglu_top_comment']);
	$arr_cache[] = $func->show_onoff('denglu_force_bind',$denglu_cache['denglu_force_bind'],$Dlang['denglu_force_bind'],$Dlang['denglu_force_bind_comment']);
	$arr_cache[] = $func->show_onoff('denglu_login_syn',$denglu_cache['denglu_login_syn'],$Dlang['denglu_login_syn'],$Dlang['denglu_login_syn_comment']);
//	$arr_cache[] = show_onoff('denglu_ignore_checkmail',$denglu_cache['denglu_ignore_checkmail'],$Dlang['denglu_ignore_checkmail'],$Dlang['denglu_ignore_checkmail_comment']);
//	$arr_cache[] = show_onoff('denglu_syn_source',$denglu_cache['denglu_syn_source'],$Dlang['denglu_syn_source'],$Dlang['denglu_syn_source_comment']);
//	$arr_cache[] = $func->show_onoff('denglu_syn_goods',$denglu_cache['denglu_syn_goods'],$Dlang['denglu_syn_goods'],$Dlang['denglu_syn_goods_comment']);
	$arr_cache[] = $func->show_onoff('denglu_syn_comment',$denglu_cache['denglu_syn_comment'],$Dlang['denglu_syn_comment'],$Dlang['denglu_syn_comment_comment']);
	$arr_cache[] = $func->show_input('denglu_appid',$denglu_cache['denglu_appid'],$Dlang['denglu_appid'],$Dlang['denglu_appid_comment']);
	$arr_cache[] = $func->show_input('denglu_appkey',$denglu_cache['denglu_appkey'],'APPKEY',$Dlang['denglu_appkey_comment']);
	
	///////////保存设置 
if($_GET['act']=='do_denglu_set'){

	
	unset($_POST['submit']);unset($_POST['reset']);
	$denglu_cache = $_POST;
	!is_writeable(dirname(dirname(dirname(__FILE__))).'/denglu/lib') && exit($Dlang['lib_cannot_write']);
	$str = "<?php\r\n \$denglu_cache = ".var_export($denglu_cache,1)."\r\n\n?>";
	
	if($fp = fopen(dirname(dirname(dirname(__FILE__))).'/denglu/lib/denglu_cache.php','wb')){
		fwrite($fp,$str);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:index.php

示例2: require_once

<?php
require_once(dirname(dirname(dirname(__FILE__))) . '/app.php');

need_manager();

need_rbac_auth('system_index');

$s = isset($_GET['s']) ? strval($_GET['s']) : null;
$ts = $s ? '_' . $s : null;

$system = Table::Fetch('system', 1);

if ($_POST) {
	need_manager(true);
	unset($_POST['commit']);
	$INI = Config::MergeINI($INI, $_POST);
	$INI = ZSystem::GetUnsetINI($INI);

	$INI['system']['gzip'] = abs(intval($INI['system']['gzip']>0));
	$INI['system']['partnerdown'] = abs(intval($INI['system']['partnerdown']>0));
	$INI['system']['conduser'] = abs(intval($INI['system']['conduser']>0));
	$INI['system']['currencyname'] = strtoupper($INI['system']['currencyname']);
	//2013.07.29
	$sorts = array('MO', 'NO', 'AF', 'NI');
	$sorts_key = array_search($INI['system']['sorttype'], $sorts);
	if(!$sorts_key) $sorts_key = 0;
	$INI['system']['sorttype'] = $sorts[($sorts_key + 1)%4];
	
	save_config();

	$value = Utility::ExtraEncode($INI);
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:index.php

示例3: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
if (!need_manager(true)) {
    need_permission('modify', 'team/create');
}
if ($_POST) {
    $team = $_POST;
    $insert = array('title', 'market_price', 'team_price', 'end_time', 'begin_time', 'expire_time', 'min_number', 'max_number', 'summary', 'notice', 'product', 'image', 'detail', 'userreview', 'systemreview', 'image1', 'image2', 'flv', 'mobile', 'address', 'fare', 'express', 'delivery', 'credit', 'user_id', 'state', 'city_id', 'group_id', 'partner_id');
    $team['user_id'] = $login_user_id;
    $team['state'] = 'none';
    $team['begin_time'] = strtotime($team['begin_time']);
    $team['end_time'] = strtotime($team['end_time']);
    $team['expire_time'] = strtotime($team['expire_time']);
    $team['image'] = upload_image('upload_image', null, 'team');
    $team['image1'] = upload_image('upload_image1', null, 'team', 380);
    $team['image2'] = upload_image('upload_image2', null, 'team', 380);
    $table = new Table('team', $team);
    $table->SetStrip('summary', 'detail', 'systemreview', 'notice');
    if ($team_id = $table->insert($insert)) {
        if ($team['charity_id'] != 0) {
            $dealcharity['charity_id'] = $team['charity_id'];
            $dealcharity['value'] = str_replace('%', '', $team['value']);
            $dealcharity['deal_id'] = $team_id;
            $dcTable = new Table('deals_charity', $dealcharity);
            $dealinsert = array('charity_id', 'value', 'deal_id');
            $dcTable->insert($dealinsert);
        }
        Utility::Redirect(WEB_ROOT . "/manage/team/index.php");
    }
} else {
开发者ID:jowino,项目名称:bd786110cact,代码行数:31,代码来源:create.php

示例4: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
if (!need_manager()) {
    need_permission('access', 'customer/index');
}
$like = strval($_GET['like']);
$cs = strval($_GET['cs']);
$usergroup = Table::Fetch('user_group', 'customer', 'name');
/* build condition */
//$condition = array();
if ($like) {
    if (empty($usergroup)) {
        $condition = array('user_group_id' => 0, "email like '%" . mysql_escape_string($like) . "%'");
    } else {
        $condition = array('or' => array('and' => array('user_group_id' => 0, "email like '%" . mysql_escape_string($like) . "%'"), 'user_group_id' => $usergroup['id']), "email like '%" . mysql_escape_string($like) . "%'");
    }
} else {
    if (empty($usergroup)) {
        $condition = array('user_group_id' => 0);
    } else {
        $condition = array('or' => array('and' => array('user_group_id' => 0, "1=1"), 'user_group_id' => $usergroup['id']));
    }
}
$condition[] = "manager='N'";
$count = Table::Count('user', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$users = DB::LimitQuery('user', array('condition' => $condition, 'order' => 'ORDER BY id DESC', 'size' => $pagesize, 'offset' => $offset));
include template('manage_customer_index');
开发者ID:jowino,项目名称:bd786110cact,代码行数:29,代码来源:index.php

示例5: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_manager('admin');
$root = DIR_TEMPLATE;
$template_id = trim(strval($_GET['id']));
$template_id = str_replace('\\', '_', $template_id);
$template_id = str_replace('/', '_', $template_id);
if ($_POST) {
    $path = "{$root}/{$template_id}";
    if (is_writable($path) && !is_dir($path) && is_file($path)) {
        $flag = file_put_contents($path, stripslashes(trim($_POST['content'])));
    }
    if ($flag) {
        Session::Set('notice', "模板 {$template_id} 修改成功");
    } else {
        Session::Set('error', "模板 {$template_id} 修改失败");
    }
    Utility::Redirect(WEB_ROOT . "/manage/system/template.php?id={$template_id}");
}
$handle = opendir($root);
$may = array();
while ($one = readdir($handle)) {
    if (is_dir("{$root}/{$one}")) {
        continue;
    }
    if (!is_writable("{$root}/{$one}")) {
        continue;
    }
    $may[] = $one;
开发者ID:yunsite,项目名称:hhzuitu,代码行数:31,代码来源:template.php


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