www.gusucode.com > 08CMS空白站群系统 3.3 繁体 UTF-8 > upload/adminm/payother.inc.php

    <?php
!defined('M_COM') && exit('No Permission');
load_cache('currencys');
include_once M_ROOT."./include/fields.fun.php";
if(!submitcheck('bpayother')){
	m_guide(7);
	if(!$oldmsg = $db->fetch_one("SELECT * FROM {$tblprefix}pays WHERE mid='$memberid' ORDER BY pid DESC LIMIT 0,1")) $oldmsg = array();
	$pmodearr = array('0' => lang('visiting pay'),'2' => lang('bank transfer'),'3' => lang('postoffice remit'));
	tabheader(lang('cash saving payed message notice administrator'),'payother','adminm.php?action=payother',2,1,1);
	trbasic(lang('pay mode'),'',makeradio('paynew[pmode]',$pmodearr),'');
	trbasic(lang('pay rmbi amount ( yuan )'),'paynew[amount]');
	trbasic(lang('contactor name'),'paynew[truename]',empty($oldmsg['truename']) ? '' : $oldmsg['truename'],'btext');
	trbasic(lang('contact telephone'),'paynew[telephone]',empty($oldmsg['telephone']) ? '' : $oldmsg['telephone'],'btext');
	trbasic(lang('contact email'),'paynew[email]',empty($oldmsg['email']) ? '' : $oldmsg['email'],'btext');
	trbasic(lang('remark'),'paynew[remark]',empty($oldmsg['remark']) ? '' : $oldmsg['remark'],'textarea');
	trspecial(lang('pay warrant'),'warrant','','image');
	$submitstr = '';
	$submitstr .= makesubmitstr('paynew[amount]',1,'number',0,15);
	$submitstr .= makesubmitstr('paynew[truename]',0,0,0,80);
	$submitstr .= makesubmitstr('paynew[telephone]',0,0,0,30);
	$submitstr .= makesubmitstr('paynew[email]',0,'email',0,100);
	$submitstr .= makesubmitstr('paynew[remark]',0,0,0,200);
	$submitstr .= tr_regcode('payonline');
	tabfooter('bpayother');
	check_submit_func($submitstr);
}else{
	if(!regcode_pass('register',empty($regcode) ? '' : trim($regcode))) mcmessage(lang('regcode error'),'adminm.php?action=payother');
	$paynew['amount'] = max(0,round(floatval($paynew['amount']),2));
	empty($paynew['amount']) && mcmessage(lang('please input pay amount'),'adminm.php?action=payother');
	include_once M_ROOT."./include/upload.cls.php";
	$paynew['truename'] = trim(strip_tags($paynew['truename']));
	$paynew['telephone'] = trim(strip_tags($paynew['telephone']));
	$paynew['email'] = trim(strip_tags($paynew['email']));
	$c_upload = new cls_upload;	
	$paynew['warrant'] = upload_s('warrant','','image');
	$c_upload->saveuptotal(1);
	unset($c_upload);
	$db->query("INSERT INTO {$tblprefix}pays SET
				 mid='".$memberid."', 
				 mname='".$curuser->infos['mname']."', 
				 pmode='$paynew[pmode]',
				 amount='$paynew[amount]',
				 truename='$paynew[truename]',
				 telephone='$paynew[telephone]',
				 email='$paynew[email]',
				 remark='$paynew[remark]',
				 warrant='$paynew[warrant]',
				 senddate='$timestamp',
				 ip='$onlineip'
				 ");
	mcmessage(lang('cash saving notice send succeed , please wait administrator deal'),'adminm.php?action=pays');

/*
*/
}
?>