Ejemplo n.º 1
0
     $sqlyj = "select pv1,num_2,year,month,day from {$db_prefix}tdpv where username='******'";
     $result = $db->query($sqlyj);
     if ($db->num_rows($result) > 0) {
         while ($rsyj = $db->fetch_array($result)) {
             $year = $rsyj['year'];
             $month = $rsyj['month'];
             $day = $rsyj['day'];
             $bdpv = $rsyj['pv1'];
             $bdnum = $rsyj['num_2'];
             if ($bdpv > 0 || $bdnum > 0) {
                 foreach ($glnetary as $u => $u1) {
                     updateglnetusertdpv2($u1, $bdpv, $bdnum);
                     updateglnettdpv($year, $month, $day, $u1, $bdpv, $bdnum, $rsyj['type']);
                 }
                 foreach ($oldglnetary as $u => $u1) {
                     updateglnetusertdpv2($u1, -$bdpv, -$bdnum);
                     updateglnettdpv($year, $month, $day, $u1, -$bdpv, -$bdnum, $rsyj['type']);
                 }
             }
         }
     }
 }
 $sql5 = "select gldept from {$db_prefix}users where username='******'";
 $rs5 = $db->get_one($sql5);
 $gldept = $rs5['gldept'] - $rs2['gldept'];
 $sql7 = "update {$db_prefix}users set prename='" . trim($tousername) . "',pos='{$pos}',gldept=gldept-'{$gldept}' where username='******'";
 $db->query($sql7);
 $db->query("update {$db_prefix}users set gldept=gldept-'" . $gldept . "' where find_in_set(" . $rs1['id'] . ",glstr)>0");
 $sqlgx = "select glstr from {$db_prefix}users where username='******'";
 $rsgx = $db->get_one($sqlgx);
 if ($rsgx['glstr']) {
Ejemplo n.º 2
0
         exit;
     }
 }
 if ($glo_sjleijipv == 1) {
     $sql = "update {$db_prefix}users set bdmoney=bdmoney+'{$span_bdmoney}',bdnum=bdnum+'{$span_num}',bdnum_team=bdnum_team+'{$span_num}',pv_reg=pv_reg+'{$span_bdmoney}',pv_team_reg=pv_team_reg+'{$span_bdmoney}',pv_team_regp=pv_team_regp+'{$span_bdmoney}' where username='******'";
     $db->query($sql);
     $year = date("Y", $modtime);
     $month = date("m", $modtime);
     $day = date("d", $modtime);
     editpv($year, $month, $day, trim($rr["username"]), $span_bdmoney, $span_num);
     if (trim($prename)) {
         $glnetupstr = "";
         getglnetupstr(trim($prename));
         $glnetary = explode(",", $glnetupstr);
         foreach ($glnetary as $u => $u1) {
             updateglnetusertdpv2($u1, $span_bdmoney, $span_num);
             updateglnettdpv($year, $month, $day, $u1, $span_bdmoney, $span_num);
         }
     }
     if (trim($tjrname)) {
         $tjnetupstr = "";
         gettjnetupstr(trim($tjrname));
         $tjnetary = explode(",", $tjnetupstr);
         foreach ($tjnetary as $u => $u1) {
             updatetjnetusertdpv2($u1, $span_bdmoney);
             updatetjnettdpv($year, $month, $day, $u1, $span_bdmoney);
         }
     }
     $db->query("update {$db_prefix}users set tjbdnum=tjbdnum+'{$span_num}' where username='******' limit 1");
 }
 if ($glo_sjkoumoney || $glo_sjleijipv) {
Ejemplo n.º 3
0
 $rs1 = $db->get_one($sql1);
 if (!empty($rs1["id"])) {
     die("<center>参与过结算的会员不允许删除 </center>");
 }
 $sqlyj = "select pv_1,num_1,year,month,day from {$db_prefix}tdpv where username='******' and pv_1>0 and type=0";
 $result = $db->query($sqlyj);
 if ($db->num_rows($result) > 0) {
     while ($rsyj = $db->fetch_array($result)) {
         $year = $rsyj['year'];
         $month = $rsyj['month'];
         $day = $rsyj['day'];
         $glnetupstr = "";
         getglnetupstr(trim($prename));
         $glnetary = explode(",", $glnetupstr);
         foreach ($glnetary as $u => $u1) {
             updateglnetusertdpv2($u1, -$rsyj['pv_1'], -$rsyj['num_1']);
             updateglnettdpv($year, $month, $day, $u1, -$rsyj['pv_1'], -$rsyj['num_1']);
         }
         $tjnetupstr = "";
         gettjnetupstr(trim($tjrname));
         $tjnetary = explode(",", $tjnetupstr);
         foreach ($tjnetary as $u => $u1) {
             updatetjnetusertdpv2($u1, -$rsyj['pv_1']);
             updatetjnettdpv($year, $month, $day, $u1, -$rsyj['pv_1']);
         }
     }
 }
 $db->query("update {$db_prefix}users set tjnum=tjnum-1,tjbdnum=tjbdnum-'" . $bdnum . "' where username='******'");
 $sql_1 = "delete from {$db_prefix}users where id='" . $id . "'";
 $db->query($sql_1);
 $db->query("update {$db_prefix}users set timeok=0 where state=1 order by id desc limit 1");