HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/ww.snodshop.com/Home/Lib/Action/WidgetsAction.class.php
<?php
defined('THINK_PATH') OR exit();
class WidgetsAction extends akmallAction{
	public function form($request){
		$page = strtolower(MODULE_NAME);
		if($page=='order'){
			$page = isset($_GET['tpl'])?trim($_GET['tpl']):'single';
		}
		$sn = trim($request['id']);
		$akmallConfig = parent::akmallConfig();
		$info = getCache('Item',array('sn'=>$sn));
		$shipping = empty($info['shipping_id'])?array('id'=>0):getCache('Shipping',array('id'=>$info['shipping_id']));
		$cookie = array();
		if($akmallConfig['record_order']==1){$cookie = cookie('order');$cookie['region'] = explode(' ',$cookie['region']);}
		$cookie['ac']=cookie('ac');
		$cookie['uid']=cookie('uid');
		if(in_array($page,array('index','item')) &&$request['page']!='detail'){
			$template = array(
				'options'=>$akmallConfig['order_options'],
				'theme'=>$akmallConfig['system_theme'],
				'show_notice'=>$akmallConfig['show_notice'],
			);
		}else{
			$template = getCache('ItemTemplate',array('id'=>$info['id']),true);
			$template['extend'] = json_decode($template['extend'],true);
			if($template['template']){
				$config = include('Home/Tpl/akmall/'.$template['template'].'/config.php');
				$request['options'] = $config['TEMPLATE_OPTIONS'];
			}
		}
		if(!empty($request['template'])) $template = $template['template'] = $request['template'];
		$list = array(
			'params'=>parent::getItemParams($template['options'],$request['options']),
			'product'=>json_decode($info['params'],true),
			'extends'=>json_decode($info['extends'],true),
			'payment'=>parent::getakmallPayment($sn,'',explode(',', $info['appoint_payment'])), // 增加第三个参数是为指定显示支付方式 Jerry
			'akmallConfig'=>$akmallConfig,
			'cookie'=>$cookie,
			'color'=>json_decode($template['color'],true),
			'token'=>password($info['id'].get_client_ip()),
		);
		foreach($list['payment'] as $payment){$list['paymentDefault'] = $payment;break;}
		extract($list);
		$html = include("./Public/Common/akmall.form.{$template['theme']}.php");
		if(!$html){
			$tpl = isset($request['formTemplate'])?$request['formTemplate']:'order';
			$html = include('./Public/Common/akmall.form.'.$tpl.'.php');
		}
		return $html;
	}
	public function comment($request,$num=1){
		$sn = trim($request['id']);
		$akmallConfig = parent::akmallConfig();
		$info = getCache('Item',array('sn'=>$sn));
		return include("./Public/Common/akmall.comment-{$num}.php");
	}
	public function scroll($request,$num=1){
		$sn = trim($request['id']);
		$akmallConfig = parent::akmallConfig();
		$info = getCache('Item',array('sn'=>$sn));
		return include("./Public/Common/akmall.scroll-{$num}.php");
	}
}