查看文件: testcode.php
大小: 4.03 KB
类型: application/octet-stream
<?php /* $a = "mem_time,company_num,p_check,p_check_time,p_check_time2,p_hot,p_hot2,pic_num,p_tag,meta_img,p_title,p_explan,p_content,p_size,p_new,p_money,p_num,p_express,p_count,p_percent31,p_percent32,p_percent33,p_percent34,p_percent35"; $b = "'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s' ,'%s'"; $c = "date('Y-m-d'),_SESSION['login_memid'],_POST['p_check'],_POST['p_check_time'],_POST['p_check_time2'],_POST['p_hot'],_POST['p_hot2'],_POST['pic_num'],imgext,img,_POST['p_title'],_POST['p_explan'],_POST['p_content'],_POST['p_size'],'1',_POST['p_money'] ,_POST['p_num'] ,_POST['p_express'],_POST['p_count'],_POST['p_percent31'],_POST['p_percent32'],_POST['p_percent33'],_POST['p_percent34'],_POST['p_percent35']"; //$a = sprintf("insert into product_data (mem_time,company_num,p_check,p_check_time,p_check_time2,p_hot,p_hot2,pic_num,p_tag,meta_img,p_title,p_explan,p_content,p_size,p_new,p_money,p_num,p_express,p_count,p_percent31,p_percent32,p_percent33,p_percent34,p_percent35)VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s' ,'%s')",date('Y-m-d'),$_SESSION['login_memid'],$_POST['p_check'],$_POST['p_check_time'],$_POST['p_check_time2'],$_POST['p_hot'],$_POST['p_hot2'],$_POST['pic_num'],$imgext,$img,$_POST['p_title'],$_POST['p_explan'],$_POST['p_content'],$_POST['p_size'],'1',$_POST['p_money'] ,$_POST['p_num'] ,$_POST['p_express'],$_POST['p_count'],$_POST['p_percent31'],$_POST['p_percent32'],$_POST['p_percent33'],$_POST['p_percent34'],$_POST['p_percent35']); //$a = sprintf("insert into product_data (mem_time,company_num,p_check,p_check_time,p_check_time2,p_hot,p_hot2,pic_num,p_tag,meta_img,p_title,p_explan,p_content,p_size,p_new,p_money,p_num,p_express,p_count,p_percent31,p_percent32,p_percent33,p_percent34,p_percent35)VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s' ,'%s')",date('Y-m-d'),$_SESSION['login_memid'],$_POST['p_check'],$_POST['p_check_time'],$_POST['p_check_time2'],$_POST['p_hot'],$_POST['p_hot2'],$_POST['pic_num'],$imgext,$img,$_POST['p_title'],$_POST['p_explan'],$_POST['p_content'],$_POST['p_size'],'1',$_POST['p_money'] ,$_POST['p_num'] ,$_POST['p_express'],$_POST['p_count'],$_POST['p_percent31'],$_POST['p_percent32'],$_POST['p_percent33'],$_POST['p_percent34'],$_POST['p_percent35']); $a1=explode(",",$a); $b1=explode(",",$b); $c1=explode(",",$c); echo count($a1)."<br>"; echo count($b1)."<br>"; echo count($c1)."<br>"; for($i=0;$i<10;$i++){ $vdata = "sky".rand(1,9999); $CheckValue =sha1($vdata); echo $CheckValue."<br>"; } */ $puser=1; $duser=2; $ppuser=3; $td=4; // 直銷獎金 $insertSQLp3 =sprintf("insert into order_percent(ccid,puid,duid,pmoney,pdate,pkid) select ccid,concat('%s'),concat('%s'),p_percent6,concat('%s'), concat('6') from order_datas where p_percent7>0 AND dcode='%s'",$puser,$duser,date('Y-m-d'),$td); // mysql_select_db($database_BE2, $BE2); // mysql_query($insertSQLp3, $BE2) or die(mysql_error()); echo $insertSQLp3; if($ppuser>0){ $insertSQLp2 =sprintf("insert into order_percent(ccid,puid,duid,pmoney,pdate,pkid) select ccid,concat('%s'),concat('%s'),p_percent2,concat('%s'),concat('2') from order_datas where p_percent2>0 AND dcode='%s'",$ppuser,$duser,date('Y-m-d'),$td); echo $insertSQLp2; } $insertSQLp2a =sprintf("insert into order_percent(ccid,puid,duid,depmoney,pdate,pkid) select ccid,concat('%s'),concat('%s'),p_demoney,concat('%s'),concat('4') from order_datas where p_demoney>0 AND dcode='%s'",$duser,$duser,date('Y-m-d'),$td); echo $insertSQLp2a; // $insertSQLp2a /* order_datas,mem_auto - 2% to 抽成 order_rtype */ $insertSQL3 =sprintf("insert into order_point(eccid,euid,e_type,e_ival,e_date) select ccid,concat('%s'),concat('%s'),(p_money*0.03),concat('%s') from order_datas where p_percent=0 AND dcode='%s'",$puser,"1",date('Y-m-d'),$td); echo $insertSQL3; ?>
保存
取消
返回文件列表