Exemple #1
0
        function edit()
    {
    	$this->CheckAdminPrivs('catalog');
		$id = post('id', 'int');
    	if ($id> 0) {
    		$data = ini('catalog.icon');
	        $script = post('script', 'string');
	        $result = logic('upload')->Save('catalog_image', false, false);
	        $data[$id] = array('icon'=>$result['url'],'script'=>$script);
	        ini('catalog.icon', $data);
	        $this->Messager('分类配置已经更新!', '?mod=catalog');
    	}else{
    		$id = get('id', 'int');
    		$data = ini('catalog.icon');
			if($data && is_array($data)){
    		foreach ($data as $key => $value) {
    			if ($key != $id) {
    				unset($data[$key]);
    			}
    			$data[$key]['script'] = stripcslashes($value['script']);
    		}
			}
    		include handler('template')->file('@admin/catalog_edit');
    	}

    }
Exemple #2
0
    function ModuleObject( $config )
    {
        $this->MasterObject($config);
                $rtype = user()->get('role_type');
        $rtype || $rtype = 'normal';
        $artypes = explode(',', ini('upload.role'));
        if (false === array_search($rtype, $artypes))
        {
            $msg = 'Access Deined';
			if ($this->Code == 'image')
			{
				$ops = array(
					'status' => 'fails',
					'msg' => $msg
				);
			}
			elseif ($this->Code == 'editor')
			{
				$ops = array(
					'error' => 1,
					'message' => $msg
				);
			}
			else
			{
				exit($msg);
			}
			exit(jsonEncode($ops));
        }
        $runCode = Load::moduleCode($this);
        $this->$runCode();
    }
Exemple #3
0
	function Main()
	{
		$clientUser = get('u', 'int');
		if ( $clientUser != '' )
		{
			handler('cookie')->setVar('finderid', $clientUser);
			handler('cookie')->setVar('findtime', time());
		}

		$data = logic('product')->display();
				if (!$data && get('page', 'int') == 0)
		{
			header('Location: '.rewrite('?mod=subscribe&code=mail'));
			exit;
		}
		$product = $data['product'];
		$this->Title = $data['mutiView'] ? '' : $product['name'];
		$data['mutiView'] || mocod('product.view');
		$data['mutiView'] || productCurrentView($product);
				$favorited = logic('favorite')->get_one($product['id']);
				if(INDEX_DEFAULT === true && ini('settings.template_path') == 'meituan'){
			$new_product = logic('product')->GetNewList(10, true);
			if(empty($new_product)) {
				$new_product = logic('product')->GetNewList(10);
			}
		}
		include handler('template')->file($data['file']);
	}
Exemple #4
0
    private function INITParameter_all($payment, $parameter)
    {
								$this->api()->hd('request')->setParameter("partner", $payment['config']['bargainor']);
		$this->api()->hd('request')->setParameter("out_trade_no", $parameter['sign']);
		$this->api()->hd('request')->setParameter("total_fee", $parameter['price'] * 100);
		$this->api()->hd('request')->setParameter("return_url", $parameter['notify_url']);
		$this->api()->hd('request')->setParameter("notify_url", $parameter['notify_url']);
		$this->api()->hd('request')->setParameter("body", cut_str($parameter['detail'], 88));
		$this->api()->hd('request')->setParameter("bank_type", 'DEFAULT');
				$this->api()->hd('request')->setParameter("spbill_create_ip", $_SERVER['REMOTE_ADDR']);
		$this->api()->hd('request')->setParameter("fee_type", "1");
		$this->api()->hd('request')->setParameter("subject", $parameter['name']);
				$this->api()->hd('request')->setParameter("sign_type", "MD5");
		$this->api()->hd('request')->setParameter("service_version", "1.0");
		$this->api()->hd('request')->setParameter("input_charset", ini('settings.charset'));
		$this->api()->hd('request')->setParameter("sign_key_index", "1");
				$this->api()->hd('request')->setParameter("attach", "");
		$this->api()->hd('request')->setParameter("product_fee", "");
		$this->api()->hd('request')->setParameter("transport_fee", "0");
		$this->api()->hd('request')->setParameter("time_start", date("YmdHis"));
		$this->api()->hd('request')->setParameter("time_expire", "");
		$this->api()->hd('request')->setParameter("buyer_id", "");
		$this->api()->hd('request')->setParameter("goods_tag", "");
		$this->api()->hd('request')->setParameter("transport_desc","");
		$this->api()->hd('request')->setParameter("trans_type","1");
		$this->api()->hd('request')->setParameter("agentid","");
		$this->api()->hd('request')->setParameter("agent_type","");
		$this->api()->hd('request')->setParameter("seller_id","");
				if ($payment['config']['service'] == 'direct')
		{
			 $this->api()->hd('request')->setParameter("trade_mode", 1); 		}
		if ($payment['config']['service'] == 'medi')
		{
			 $this->api()->hd('request')->setParameter("trade_mode", 2); 		}
    }
Exemple #5
0
/**
 * @copyright (C)2014 Cenwor Inc.
 * @author Cenwor <www.cenwor.com>
 * @package php
 * @name install.live.php
 * @date 2014-09-05 16:22:08
 */
 


function install_links()
{
	$zzxgj = ini('link.link_list.zzxgj');
	if (!$zzxgj)
	{
		$zzxgj_link_list = array(
			array (
				'name' => _getaarrayrandval(array('企业微博系统','企业2.0系统','企业社交平台','企业社会化交流平台','企业微博系统','企业社交网络','企业微博程序',)),
				'url' => 'http:/'.'/www.wangqibao.com',
			),
			array (
				'name' => _getaarrayrandval(array('微博系统下载','开源微博系统','PHP微博程序','企业微博系统','企业微博程序',)),
				'url' => 'http:/'.'/jishigou.net',
			),
			array (
				'name' => _getaarrayrandval(array('天天团购系统','团购系统','php团购系统','免费团购程序','开源团购程序','天天团购','团购网站程序','团购网站源码','团购源码下载','团购程序',)),
							'url' => 'http:/'.'/www.tttuangou.net',
			),

		);
		$links['zzxgj'] = _getaarrayrandval($zzxgj_link_list);
		$links['zzxgj1'] = _getaarrayrandval($zzxgj_link_list);
		$links['zzxgj']['order'] = $links['zzxgj1']['order'] = 100;
		if($links['zzxgj']['url'] == $links['zzxgj1']['url']) {
			unset($links['zzxgj1']);
		}
		ini('link.link_list', $links);
	}
}
Exemple #6
0
 public function Set()
 {
     $path = get('path', 'txt');
     $data = get('data');
             $data = (strlen($data) <= 5) ? (($data == 'true') ? true : (($data == 'false') ? false : $data)) : $data;
             exit(jsonEncode(ini($path, $data)));
 }
Exemple #7
0
	function Main()
	{
		$pid = get('pid');
		$pid || $pid = post('pid');
		$pid || exit($this->Ends());
		preg_match('/^[a-z0-9]+$/i', $pid) || exit($this->Ends());
		
		$payment = logic('pay')->GetOne($pid);
		$payment || exit($this->Ends());
		$status = logic('pay')->Verify($payment);
		$status || exit($this->Ends());
		$trade = logic('pay')->TradeData($payment);
		$trade || exit($this->Ends());
				if ($payment['code'] == 'alipay' || $payment['code'] == 'tenpay')
		{
			if (ini('payment.lp.enabled'))
			{
				if (MEMBER_ID)
				{
										header('Location: '.rewrite('index.php?mod=buy&code=order&op=process&sign='.$trade['sign']));
					exit;
				}
			}
		}
		$parserAPI = logic('callback')->Parser($trade);
		$parserAPI->MasterIframe($this);
		preg_match('/^[a-z_]+$/i', $status) || exit($this->Ends());
		$code = 'Parse_'.$status;
		method_exists($parserAPI, $code) || exit($this->Ends());
		$parserAPI->$code($payment);
	}
Exemple #8
0
	function Batch()
	{
		$this->CheckAdminPrivs('ordermanage');
		$searchWhere = get('ssrc') ? ini('isearcher.map.'.get('ssrc').'.name') : '任意';
		$searchValue = get('sstr') ? get('sstr') : '任意';
		$ordSTA = get('ordsta', 'number');
		is_numeric($ordSTA) || $ordSTA = ORD_STA_ANY;
		$searchSTA = logic('order')->STA_Name($ordSTA);
		$ordPROC = get('ordproc', 'string');
		$ordSPROC = $ordPROC ? $ordPROC : '*';
		$ordPROC = $ordPROC ? ('process="'.$ordPROC.'"') : '1';
		$searchPROC = logic('order')->PROC_Name($ordSPROC);
				$_GET[EXPORT_GENEALL_FLAG] = EXPORT_GENEALL_VALUE;
		$_GET['code'] = 'vlist';
				if(MEMBER_ROLE_TYPE == 'seller'){
			$pids = logic('product')->GetUserSellerProduct(MEMBER_ID);
			$asql = 0;
			if($pids){
				$asql = implode(',',$pids);
			}
			$ordPROC .=  ' AND productid IN('.$asql.')';
		}
		$list = logic('order')->GetList(0, $ordSTA, ORD_PAID_ANY, $ordPROC);
		$allCount = $list ? count($list) : 0;
				$_GET['code'] = 'batch';
				$ccURL = str_replace('code=batch', 'code=batch&op=done', page_moyo_request_uri());
		include handler('template')->file('@admin/order_process_batch');
	}
Exemple #9
0
	function TemplateHandler(&$config=null)
	{
		if (!is_null($config))
		{
			$this->TemplateRootPath=isset($config['template_root_path'])?$config['template_root_path']:"./templates/";
			$this->TemplateDir=$config['template_path'];
			$this->TemplatePath=$this->TemplateRootPath.$this->TemplateDir.'/';
			if(!isset($config['compiled_root_path']) or $config['compiled_root_path']=='')
			{
				$this->CompiledPath=$this->TemplatePath.$this->CompiledFolder;
			}
			else
			{
				$this->CompiledPath=$config['compiled_root_path'].'/'.$this->TemplateDir.'/';
			}
		}
		else
		{
			$this->TemplateRootPath = ini('settings.template_root_path');
			$this->TemplateDir = ini('settings.template_path');
			$this->TemplatePath=$this->TemplateRootPath.$this->TemplateDir.'/';
			$cpl_path = ini('settings.compiled_root_path');
			if(!$cpl_path || $cpl_path == '')
			{
				$this->CompiledPath=$this->TemplatePath.$this->CompiledFolder;
			}
			else
			{
				$this->CompiledPath = $cpl_path.'/'.$this->TemplateDir.'/';
			}
		}
			}
Exemple #10
0
    public function load($idx)
    {
		        $map = ini('isearcher.map');
        $fidString = ini('isearcher.idx.'.$idx);
        $fids = explode(',', $fidString);
		        $filter = ini('isearcher.filter');
        $ffsString = ini('isearcher.frc.'.$idx);
        $frcs = explode(',', $ffsString);
				$timev = ini('isearcher.timev');
		$tvString = ini('isearcher.tvs.'.$idx);
		$tvss = explode(',', $tvString);
				$tvinputs = array();
		foreach ($tvss as $tvsk)
		{
			if (isset($_GET['iscp_tvbegin_'.$tvsk]))
			{
				$tvinputs[$tvsk]['begin'] = get('iscp_tvbegin_'.$tvsk, 'txt');
			}
			if (isset($_GET['iscp_tvfinish_'.$tvsk]))
			{
				$tvinputs[$tvsk]['finish'] = get('iscp_tvfinish_'.$tvsk, 'txt');
			}
		}
		$iscp_input_value = ($_GET['iscp_input_value'] ? $_GET['iscp_input_value'] : $_POST['iscp_input_value']);
		        include handler('template')->file('@html/isearcher/index');
    }
Exemple #11
0
	function load( $area = '' )
	{
		if ($area == '')
		{
			$area = str_replace('.', '_', mocod());
		}
		$pox = 'widget.'.$area.'.blocks';
		$list = ini($pox);
		if ( false === $list )
		{
			if (substr($area, 0, 5) == 'html_')
			{
								$html = logic('html')->query(substr($area, 5));
				ini('widget.'.$area, array('name' => $html['title'], 'blocks' => array()));
			}
			else
			{
				ini('widget.~@config.listener.enabled') && ini($pox, array());
			}
			return;
		}
		echo '<!'.'-- widget @ [ '.$area.' ] --'.'>';
		foreach ( $list as $name => $one )
		{
			if (isset($one['enabled']) && $one['enabled'])
			{
				handler('template')->load('@widget/' . $name);
			}
		}
	}
Exemple #12
0
	public function add_score($pid=0,$uid=0,$score=0,$type='buy',$share=''){
		$info = '';
		if(!in_array($type,array('buy','reply','forward'))){
			$type='buy';
		}
		if($type != 'buy'){
			$set_scores = ini('credits.config');
			$score = (int)$set_scores[$type];
		}
		$products = dbc(DBCMax)->select('product')->in('name')->where('`id`='. (int)$pid)->limit(1)->done();
		if($products['name']){
			if($type == 'buy'){
				$info = '购买产品:'.$products['name'];
			}elseif($type == 'reply'){
				$info = '评论产品:'.$products['name'];
			}elseif($type == 'forward' && $share && $uid > 0){
				$chx = dbc(DBCMax)->select('credit')->where(array('uid'=>$uid,'pid'=>$pid,'type'=>'forward'))->limit(1)->done();
				if(!$chx){
					$info = '分享产品:'.$products['name'].' 到:'.$share;
				}
			}
		}
		if($uid > 0 && $score > 0 && $info){
			$data = array(
				'uid'  => $uid,
				'pid'  => $pid,
				'info' => $info,
				'score'=> $score,
				'type' => $type,
				'gettime' => time(),
			);
			dbc(DBCMax)->insert('credit')->data($data)->done();
			dbc(DBCMax)->update('members')->data('scores=scores+'.$score)->where('uid='.(int)$uid)->done();
		}
	}
Exemple #13
0
 public function get_all()
 {
     $tpl_root = handler('template')->TemplateRootPath.'themes/';
     $styles_io = handler('io')->ReadDir($tpl_root);
     $styles_lc = ini('styles.local');
     $styles_lc || $styles_lc = array();
     $styles_ms = $styles_lc;
     foreach ($styles_io as $i => $style_name)
     {
         $style_name = str_replace($tpl_root, '', $style_name);
         if (isset($styles_lc[$style_name]))
         {
             unset($styles_ms[$style_name]);
         }
         else
         {
                             $styles_lc[$style_name] = array(
                 'name' => '新增皮肤',
                 'enabled' => false
             );
         }
     }
     foreach ($styles_ms as $style_name => $style_data)
     {
         $styles_lc[$style_name] = array(
             'name' => $style_data['name'].'[已失效]',
             'enabled' => false
         );
     }
     return $styles_lc;
 }
Exemple #14
0
    function iGOS_save()
    {
        $this->CheckAdminPrivs('uiigos');
		$style = post('style', 'txt');
        ini('ui.igos.style', $style);
        $this->Messager(__('保存成功!'));
    }
Exemple #15
0
 function Import()
 {
 	$flag = get('flag', 'txt');
     if (!$flag || !ini('alipay.address.import.source.'.$flag)) exit('ERROR: no Import Source');
     $html = logic('address')->import()->linker($flag);
     logic('address')->import()->referer($_SERVER['HTTP_REFERER']);
     include handler('template')->file('@address/import/redirect');
 }
Exemple #16
0
	function ModuleObject($config)
	{
		$this->MasterObject($config);
		if (MEMBER_ID>0) {
				}
		$this->iiConfig = ini('settings');
		Load::moduleCode($this);$this->Execute();
	}
Exemple #17
0
 public static function load($path, $type = 'js', $extra = null)
 {
     $media_url = ini('base/MEDIA_URL');
     $file = Package::get_file('statics/' . $path, $type);
     if (is_file($file)) {
         return sprintf(self::$elements[$type], $media_url . $path, $extra);
     }
 }
Exemple #18
0
 public function load($block)
 {
     $masterFile = handler('template')->TemplateRootPath.'html/ad/'.$block.'.html';
     if (!is_file($masterFile)) return;
     if (!ini('ad.'.$block.'.enabled')) return;
     $cfg = ini('ad.'.$block.'.config');
     include handler('template')->file('@html/ad/'.$block);
 }
Exemple #19
0
	function Mail_balance()
	{
		$this->CheckAdminPrivs('service');
		$power = get('power', 'txt');
		$tf = ($power == 'on') ? true : false;
		ini('service.mail.balance', $tf);
		$this->Messager('更新完成!');
	}
Exemple #20
0
	public function creditsave(){
		$this->CheckAdminPrivs('creditset');
		$config = post('config');
		foreach ($config as $k => $v) {
			$config[$k] = max(0,(int)$v);
		}
		ini('credits.config', $config);
		$this->Messager('积分设置成功!', 'admin.php?mod=account&code=credit');
	}
Exemple #21
0
	function main()
	{
		$this->CheckAdminPrivs('appmanage');
		$iphone = ini('iphone');
		$app_img_d = base64_decode('aHR0cDovL3NlcnZlci50dHR1YW5nb3UubmV0L3FyY29kZS8/ZGF0YT0=') . urlencode(ini('settings.site_url').'/index.php?mod=downapp&code=down');
		$app_img_x = base64_decode('aHR0cDovL3NlcnZlci50dHR1YW5nb3UubmV0L3FyY29kZS8/c2l6ZT1zbWFsbCZkYXRhPQ==') . urlencode(ini('settings.site_url').'/index.php?mod=downapp&code=down');
		$from = 'app';
		include handler('template')->file('@admin/app_config');
	}
Exemple #22
0
 public static function start()
 {
     if (ini('base/SESSION/CUSTOM')) {
         if (ini('base/SESSION/SAVE') == 'file') {
             ini_set('session.save_path', Package::get_folder(ini('base/SESSION/DIR')));
         }
     }
     @session_start();
     self::$started = true;
 }
Exemple #23
0
 public function __construct($form, $application, array $data = null)
 {
     $application = $application ? $application : ini('runtime/application');
     $this->fields = YamlBackend::load(sprintf('applications/%s/forms/%s.yml', $application, $form));
     if ($data) {
         $this->data = $data;
         $this->is_bound = true;
     }
     $this->clean();
 }
Exemple #24
0
	public function linker()
	{
				$post = array(
			'service' => 'user.logistics.address.query',
			'partner' => $this->config['partner'],
			'return_url' => ini('settings.site_url').'/index.php?mod=address&code=import&op=callback&from=alipay',
			'_input_charset' => ini('settings.charset')
		);
		$post['extend_param'] = 'isv^tt11';
		return $this->__BuildForm($this->config, $post);
	}
Exemple #25
0
	public function config($data = null)
	{
		$pox = 'service.__app__.smsw';
		if (is_null($data))
		{
			return ini($pox);
		}
		if ((int)$data['interval'] <= 0) $data['interval'] = 12;
		if ((int)$data['surplus'] <= 0) $data['surplus'] = 100;
		if ((float)$data['phone'] <= 0) $data['serviceID'] = 0;
		return ini($pox, $data);
	}
Exemple #26
0
	public function linker()
	{
				$post = array(
			'service' => 'alipay.auth.authorize',
			'target_service' => 'user.auth.quick.login',
			'partner' => $this->config['partner'],
			'return_url' => ini('settings.site_url').'/index.php?mod=account&code=login&op=callback&from=alipay',
			'_input_charset' => ini('settings.charset')
		);
		$post['extend_param'] = 'isv^tt11';
		return $this->__BuildForm($this->config, $post);
	}
Exemple #27
0
    public function __default($class, $uid, $data)
    {
        return '';
        if (!is_numeric($uid)) return;
        $qq = user($uid)->get('qq');
        if (!preg_match('/[0-9]{5,11}/', $qq)) return;
        $msg = ini('notify.event.'.$class.'.msg.qqrobot');
        if (!$msg) return false;

        $this->FlagParser($class.'.qqrobot', $data, $msg);
        return $this->SendMsg($qq, $msg);
    }
Exemple #28
0
	public function status_ajax()
	{
		$this->CheckAdminPrivs('wips','ajax');
		if (ini('wips.sql.enabled'))
		{
			$string = 'WIPS已开启';
			if (ini('wips.sql.autoups') == 'true')
			{
				$lastc = fcache('wips.sql.rule.sync', 86400);
				if ($lastc)
				{

				}
				else
				{
															$server = base64_decode('aHR0cDovL3NxbC50dHR1YW5nb3UubmV0L3dpcHMvdXBkYXRlLnBocA==');
					$r = dfopen($server, 10485760, '', '', true, 10, 'CENWOR.TTTG.WIPS.SYNC.AGENT.'.SYS_VERSION.'.'.SYS_BUILD);
					if ($r)
					{
						$data = (array)json_decode($r, true);
						if (isset($data['hash']) && $data['hash'])
						{
							foreach ($data['rules'] as $rk => $rv)
							{
								if (substr($rk, 0, -4) == '.md5')
								{
									continue;
								}
								if (md5($rv) == $data['rules'][$rk.'.md5'])
								{
									if (ini('wips.sql.'.$rk) != $rv)
									{
																				ini('wips.sql.'.$rk, $rv);
										$updated = true;
									}
								}
							}
						}
					}
					fcache('wips.sql.rule.sync', 'lastCheck @ '.date('Y-m-d H:i:s', time()));
					if ($updated)
					{
						$string = 'WIPS自动升级完成';
					}
				}
			}
		}
		else
		{
			$string = 'WIPS未开启,有风险';
		}
		exit('<a href="admin.php?mod=wips">'.$string.'</a>');
	}
Exemple #29
0
 private static function BuildEnvironment($run_mode = 'deploy')
 {
     $base_run_mode = ini('base/RUN_MODE');
     $run_mode = $base_run_mode ? $base_run_mode : $run_mode;
     $run_mode = strtolower($run_mode);
     !defined('RUN_MODE') && define('RUN_MODE', $run_mode);
     import('system/environment/base');
     import(sprintf('system/environment/%s', $run_mode));
     import('system/share/config/runtime');
     RuntimeConfig::__init__($run_mode);
     $run_mode_classname = ucfirst($run_mode) . 'Environment';
     $runtime_environment = new $run_mode_classname();
 }
Exemple #30
0
	public function load($product)
	{
		$style = ini('ui.igos.style');
		$style || $style = 'lashou';
		if(!in_array($style,array('lashou','meituan'))){
			$style = 'lashou';
		}
		if(INDEX_DEFAULT === true && false == ini('ui.igos.oldindex')){
			include handler('template')->file('@html/igos/'.$style.'/default');
		}else{
			include handler('template')->file('@html/igos/'.$style.'/index');
		}
	}