Beispiel #1
0
<?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);
	}
Beispiel #2
0
<?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);
Beispiel #3
0
<?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 {
Beispiel #4
0
<?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');
Beispiel #5
0
<?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;