⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shopcar.php

📁 服务饿沃尔沃饿 威尔威尔威尔威尔沃尔沃而我额外而我而 威尔威尔威尔威尔威尔威尔而 威尔
💻 PHP
字号:
<?php
	/*
	+-------------------------------------------
	|
	|   Technology of Wane netware
	|   ========================================
	|   Powered by wan-e.net inc 
	|   (c) 2004 wane.net Power Services
	|   http://www.wan-e.net
	|   ========================================
	|   Web: http://www.wan-e.net
	|
	+-------------------------------------------
	|   Autohr	:	wsfuyibing
	+-------------------------------------------
	*/
	eval($function->load_lang('shopcar'));
	if (!$RIGHT['SHOPCAR'])
	{
		$function->clickback($LANG_CAR[ACCESS_DENIED]);
	}
	elseif ($paysubmit)
	{
		if (!$USER_CFG['LOGINED'])
		{
			$backurl = $default_url.'index.php?action=car&carsubmit=1&submitorder=setorder';
			require $wane_root.'globals/source/login.php';
		}
		else
		{
			if (empty($truename))
			{
				$function->clickback($LANG_PAY['PAYB_UNTRUENAME']);
			}
			elseif (empty($phone))
			{
				$function->clickback($LANG_PAY['PAYB_UNPHONE']);
			}
			elseif (empty($address))
			{
				$function->clickback($LANG_PAY['PAYB_UNADDRESS']);
			}
			elseif (empty($zipcode))
			{
				$function->clickback($LANG_PAY['PAYB_UNZIPCODE']);
			}
			elseif (!is_numeric($zipcode) || strlen($zipcode)!=6)
			{
				$function->clickback($LANG_PAY[PAYB_ERRORZIPCODE]);
			}
			else
			{
				$paywayfile = $wane_root.'globals/source/pay/'.$payway.'.php';
				if ($payway == 'online')
				{
					require $paywayfile;
				}
				elseif ($payway == 'bank')
				{
					require $paywayfile;
				}
				elseif ($payway == 'home')
				{
					require $paywayfile;
				}
				elseif ($payway == 'other')
				{
					require $paywayfile;
				}
				else
				{
					$function->showmsg($default_url.'index.php?action=car&carsubmit=yes&submitorder=setorder','Access Denied');
				}
			}		
		}
	}
	elseif ($carsubmit)
	{
		if ($submitorder=='setcount')
		{
			if (!isset($sps) || empty($sps))	
			{
				$function->showmsg($default_url.'index.php?action=car',$LANG_CAR['SUBMIT_DELETE_UNSELECT'],'10');
			}			
			else
			{
				foreach ($sps as $sp)
				{
					$scount	=	${'scount'.$sp};
					if ($scount<1){$function->showmsg($default_url.'index.php?action=car',$LANG_CAR['SUBMIT_COUNT_DENIED'],'10');}
					$db->query("UPDATE {$tablepre}shopcar SET scount='$scount' WHERE wane_hash='$wane_hash' and sid='$sp'");
				}
				$function->showmsg($default_url.'index.php?action=car',$LANG_CAR['SUBMIT_COUNT_SUCCESS']);
			}
		}
		elseif ($submitorder=='setorder' && $submit)
		{
			$merchant_sendout_file = $wane_root.'upload/sendout/'.$merchantuid.'.php';
			if (!$USER_CFG['LOGINED'] && !$allow_guestbuy)
			{
				$backurl = $default_url.'index.php?action=car&carsubmit=yes&submitorder=setorder';
				require $wane_root.'globals/source/login.php';
			}
			elseif (!$USER_CFG['INFOSIGN'] && $USER_CFG['INFOSIGN']!=$RIGHT['INFOSIGN'])
			{
				$function->showmsg($default_url.'index.php?action=car',$LANG_PAY['ACCESS_DENIED'],'10');
			}
			elseif (!$RIGHT['BUYSP'])
			{
				$function->showmsg($default_url.'index.php?action=car',$LANG_PAY['ACCESS_DENIED_SYS'],'10');
			}
			else
			{
				if (file_exists($merchant_sendout_file) && (empty($sendoutway) || !is_numeric($sendoutway) || $sendoutway < 1))
				{
					$function->clickback($LANG_PAY['PAY_SENDOUT_UNSELECT']);
				}
				else
				{
					if (file_exists($merchant_sendout_file))
					{
						require $merchant_sendout_file;
						$sendout_file_exists	=	'1';
					}
					else
					{
						$sendout_file_exists	=	'0';
					}
					$query=$db->query("select 
							c.*,
							s.sid,s.bid,s.uid,s.spname,s.htmlroot,s.price_market,s.price_member,s.price_vip,
							st.uid as stuid,st.storename 
						from 		
							{$tablepre}shopcar c ,
							{$tablepre}spinfo s		
							left join {$tablepre}storeinfo st on (st.uid=s.uid) 
						where 
							c.wane_hash='$wane_hash' and c.orderid = '' and c.sid=s.sid and s.uid='$merchantuid'order by s.uid,c.addtime desc");
					if (!$db->num($query))
					{
						$function->showmsg($default_url.'index.php?action=car',$LANG_CAR['CAR_PAY_NONE'],'10');
					}
					else
					{
						$total_sps=$db->num($query);
						$sps = 0;
						eval($tpl->set_var(array(
							'WEBTITLE'	=>	$function->headtitle('['.$webtitle.']  '.$LANG_CAR['CAR_TITLE']),
							'NAVIGATA'	=>	'<a class=\'navigata\' href=\''.$default_url.'index.php?action=idx\'>'.$webtitle.'</a>&nbsp;'.$category_separate.'&nbsp;'.$LANG_CAR[CAR_TITLE],
							'USER_SPEND'	=>	$altogether,
							"USERINFO_HIDDEN"	=>	in_array('userinfo',$userinfo_display) ? 'show' : 'none',
							"USERINFO_SHOW"		=>	!in_array('userinfo',$userinfo_display) ? 'show' : 'none',						
							'CTT_TRUENAME' 	=>	$USER_CFG['CTT_TRUENAME'],
							'CTT_PHONE' 	=>	$USER_CFG['CTT_PHONE'],
							'CTT_ADDRESS' 	=>	$USER_CFG['CTT_ADDRESS'],
							'CTT_ZIPCODE' 	=>	$USER_CFG['CTT_ZIPCODE'],
							'CTT_QQ' 		=>	$USER_CFG['CTT_QQ'],
							'CTT_ICQ' 		=>	$USER_CFG['CTT_ICQ'],
							'CTT_MSN' 		=>	$USER_CFG['CTT_MSN'],
							'CTT_YAHOO' 	=>	$USER_CFG['CTT_YAHOO'],
							'CTT_MAIL' 		=>	$USER_CFG['CTT_MAIL'],
						)));
						$keep_cars = array('0','0');
						$tplfiles	=	array('header','shopcar_pay','footer');	
					}
				}
			}
		}
		elseif ($submitorder=='setdelete')
		{
			if (!isset($selects) || empty($selects))	
			{
				$function->showmsg($default_url.'index.php?action=car',$LANG_CAR[SUBMIT_DELETE_UNSELECT],'10');
			}
			else
			{
				$sids=$comma="";
				foreach ($selects as $sid)
				{
					$sids.=	"$comma'$sid'";
					$comma=",";
				}
				$db->query("DELETE FROM {$tablepre}shopcar WHERE sid in ($sids) and wane_hash='$wane_hash'");
				$function->showmsg($default_url.'index.php?action=car',$LANG_CAR['SUBMIT_DELETE_SUCCESS']);
			}
		}
		else
		{
			$function->showmsg($default_url.'index.php?action=car','Access Denied.');
		}
	}
	else
	{
		$tplfiles	=	array('header','shopcar','footer');	
		eval($tpl->set_var(array(
			'WEBTITLE'	=>	$function->headtitle('['.$webtitle.']  '.$LANG_CAR['CAR_TITLE']),
			'NAVIGATA'	=>	'<a class=\'navigata\' href=\''.$default_url.'index.php?action=idx\'>'.$webtitle.'</a>&nbsp;'.$category_separate.'&nbsp;'.$LANG_CAR[CAR_TITLE],
			"USERINFO_HIDDEN"	=>	in_array('userinfo',$userinfo_display) ? 'show' : 'none',
			"USERINFO_SHOW"		=>	!in_array('userinfo',$userinfo_display) ? 'show' : 'none',
		)));
		$deletetime	=	$timestamp-$shopcar_time;
		$db->query("DELETE FROM {$tablepre}shopcar WHERE addtime < '$deletetime'");
		$query=$db->query("select s.sid,s.bid,s.uid,s.spname,s.htmlroot,s.price_market,s.price_member,s.price_vip,c.*,st.uid as stuid,st.storename,st.sendtext from {$tablepre}spinfo s,{$tablepre}shopcar c left join {$tablepre}storeinfo st on (st.uid=s.uid) where c.wane_hash='$wane_hash' and c.sid=s.sid order by s.uid,c.addtime desc");
		$total_sps = $db->num($query);
		$keep_cars = array('0','0');
	}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -