Skip to content

Commit

Permalink
修复二次更新处理。
Browse files Browse the repository at this point in the history
  • Loading branch information
magicblack committed Aug 12, 2021
1 parent 5d1f7cc commit 1788ac2
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion admin/admin_conn.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
define('MAC_ADMIN', preg_replace("|[/\\\]{1,}|",'/',dirname(__FILE__) ) );
require(MAC_ADMIN."/../inc/conn.php");
require(MAC_ADMIN.'/../inc/common/phplib.php');
define('MAC_VERSION','2022.3001');
define('MAC_VERSION','2022.3002');
define('MAC_MODULE','admin');

if(strpos($_SERVER["SCRIPT_NAME"],'/admin/')>0){
Expand Down
33 changes: 17 additions & 16 deletions admin/tpl/module/collect.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,25 +470,24 @@

$colarr = array();
$valarr = array();
array_push($colarr,'d_time');
array_push($valarr,time());

if(strpos(','.$uprule,'a') && $ct!=1){

if(strpos(','.$uprule,'a') && $ct!=1 && $rc){
array_push($colarr,'d_playfrom','d_playserver','d_playnote','d_playurl');
array_push($valarr,$n_from,$n_server,$n_note,$n_url);
}
if(strpos(','.$uprule,'b') && $ct==1){
if(strpos(','.$uprule,'b') && $ct==1 && $rc){
array_push($colarr,'d_downfrom','d_downserver','d_downnote','d_downurl');
array_push($valarr,$n_from,$n_server,$n_note,$n_url);
}
if(strpos(','.$uprule,'c')){ array_push($colarr,'d_state'); array_push($valarr,$d_state); }
if(strpos(','.$uprule,'d')){ array_push($colarr,'d_remarks'); array_push($valarr,$d_remarks); }
if(strpos(','.$uprule,'e')){ array_push($colarr,'d_directed'); array_push($valarr,$d_directed); }
if(strpos(','.$uprule,'f')){ array_push($colarr,'d_starring'); array_push($valarr,$d_starring); }
if(strpos(','.$uprule,'g')){ array_push($colarr,'d_year'); array_push($valarr,$d_year); }
if(strpos(','.$uprule,'h')){ array_push($colarr,'d_area'); array_push($valarr,$d_area); }
if(strpos(','.$uprule,'i')){ array_push($colarr,'d_lang'); array_push($valarr,$d_lang); }
if(strpos(','.$uprule,'j')){
if(strpos(','.$uprule,'c') && $row['d_state'] != $d_state){ array_push($colarr,'d_state'); array_push($valarr,$d_state); }
if(strpos(','.$uprule,'d') && $row['d_remarks'] != $d_remarks){ array_push($colarr,'d_remarks'); array_push($valarr,$d_remarks); }
if(strpos(','.$uprule,'e') && $row['d_directed'] != $d_directed){ array_push($colarr,'d_directed'); array_push($valarr,$d_directed); }
if(strpos(','.$uprule,'f') && $row['d_starring'] != $d_starring){ array_push($colarr,'d_starring'); array_push($valarr,$d_starring); }
if(strpos(','.$uprule,'g') && $row['d_year'] != $d_year){ array_push($colarr,'d_year'); array_push($valarr,$d_year); }
if(strpos(','.$uprule,'h') && $row['d_area'] != $d_area){ array_push($colarr,'d_area'); array_push($valarr,$d_area); }
if(strpos(','.$uprule,'i') && $row['d_lang'] != $d_lang){ array_push($colarr,'d_lang'); array_push($valarr,$d_lang); }
if(strpos(','.$uprule,'j') && $row['d_pic'] !=$d_pic){
if($MAC['collect']['vod']['pic']==1){
$ext = @substr($d_pic,strlen($d_pic)-3);
if($ext!='jpg' || $ext!='bmp' || $ext!='gif'){$ext='jpg';}
Expand All @@ -507,11 +506,13 @@
array_push($colarr,'d_picthumb'); array_push($valarr,$d_picthumb);
}
}
if(strpos(','.$uprule,'k')){ array_push($colarr,'d_content'); array_push($valarr,$d_content); }
if(strpos(','.$uprule,'l')){ array_push($colarr,'d_tag'); array_push($valarr,$d_tag); }
if(strpos(','.$uprule,'m')){ array_push($colarr,'d_subname'); array_push($valarr,$d_subname); }
if(strpos(','.$uprule,'k') && $row['d_content'] != $d_content){ array_push($colarr,'d_content'); array_push($valarr,$d_content); }
if(strpos(','.$uprule,'l') && $row['d_tag'] != $d_tag){ array_push($colarr,'d_tag'); array_push($valarr,$d_tag); }
if(strpos(','.$uprule,'m') && $row['d_subname'] != $d_subname){ array_push($colarr,'d_subname'); array_push($valarr,$d_subname); }

if(count($colarr)>0){
array_push($colarr,'d_time');
array_push($valarr,time());
$des .= '<font color="green">字段更新,成功。</font>';
$db->Update("{pre}vod",$colarr,$valarr,"d_id=".$row["d_id"] );
}
Expand Down
70 changes: 35 additions & 35 deletions inc/timming/collect.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,48 +330,48 @@ function cj(){

$colarr = array();
$valarr = array();
array_push($colarr,'d_time');
array_push($valarr,time());

if(strpos(','.$uprule,'a') && $ct!=1){
if(strpos(','.$uprule,'a') && $ct!=1 && $rc){
array_push($colarr,'d_playfrom','d_playserver','d_playnote','d_playurl');
array_push($valarr,$n_from,$n_server,$n_note,$n_url);
}
if(strpos(','.$uprule,'b') && $ct==1){
if(strpos(','.$uprule,'b') && $ct==1 && $rc){
array_push($colarr,'d_downfrom','d_downserver','d_downnote','d_downurl');
array_push($valarr,$n_from,$n_server,$n_note,$n_url);
}
if(strpos(','.$uprule,'c')){ array_push($colarr,'d_state'); array_push($valarr,$d_state); }
if(strpos(','.$uprule,'d')){ array_push($colarr,'d_remarks'); array_push($valarr,$d_remarks); }
if(strpos(','.$uprule,'e')){ array_push($colarr,'d_directed'); array_push($valarr,$d_directed); }
if(strpos(','.$uprule,'f')){ array_push($colarr,'d_starring'); array_push($valarr,$d_starring); }
if(strpos(','.$uprule,'g')){ array_push($colarr,'d_year'); array_push($valarr,$d_year); }
if(strpos(','.$uprule,'h')){ array_push($colarr,'d_area'); array_push($valarr,$d_area); }
if(strpos(','.$uprule,'i')){ array_push($colarr,'d_lang'); array_push($valarr,$d_lang); }
if(strpos(','.$uprule,'j')){
if($MAC['collect']['vod']['pic']==1){
$ext = @substr($d_pic,strlen($d_pic)-3);
if($ext!='jpg' || $ext!='bmp' || $ext!='gif'){$ext='jpg';}
$fname = time() .$i .'.'. $ext;
$path = "upload/vod/" . getSavePicPath('') . "/";
$thumbpath = "upload/vodthumb/" . getSavePicPath('vodthumb') . "/";
$ps = savepic($d_pic,$path,$thumbpath,$fname,'vod',$msg);
if($ps){
$d_pic=$path.$fname; $d_picthumb= $thumbpath.$fname;
array_push($colarr,'d_pic'); array_push($valarr,$d_pic);
array_push($colarr,'d_picthumb'); array_push($valarr,$d_picthumb);
}
}
else{
array_push($colarr,'d_pic'); array_push($valarr,$d_pic);
array_push($colarr,'d_picthumb'); array_push($valarr,$d_picthumb);
}
}
if(strpos(','.$uprule,'k')){ array_push($colarr,'d_content'); array_push($valarr,$d_content); }
if(strpos(','.$uprule,'l')){ array_push($colarr,'d_tag'); array_push($valarr,$d_tag); }
if(strpos(','.$uprule,'m')){ array_push($colarr,'d_subname'); array_push($valarr,$d_subname); }

if(count($colarr)>0){
if(strpos(','.$uprule,'c') && $row['d_state'] != $d_state){ array_push($colarr,'d_state'); array_push($valarr,$d_state); }
if(strpos(','.$uprule,'d') && $row['d_remarks'] != $d_remarks){ array_push($colarr,'d_remarks'); array_push($valarr,$d_remarks); }
if(strpos(','.$uprule,'e') && $row['d_directed'] != $d_directed){ array_push($colarr,'d_directed'); array_push($valarr,$d_directed); }
if(strpos(','.$uprule,'f') && $row['d_starring'] != $d_starring){ array_push($colarr,'d_starring'); array_push($valarr,$d_starring); }
if(strpos(','.$uprule,'g') && $row['d_year'] != $d_year){ array_push($colarr,'d_year'); array_push($valarr,$d_year); }
if(strpos(','.$uprule,'h') && $row['d_area'] != $d_area){ array_push($colarr,'d_area'); array_push($valarr,$d_area); }
if(strpos(','.$uprule,'i') && $row['d_lang'] != $d_lang){ array_push($colarr,'d_lang'); array_push($valarr,$d_lang); }
if(strpos(','.$uprule,'j') && $row['d_pic'] !=$d_pic){
if($MAC['collect']['vod']['pic']==1){
$ext = @substr($d_pic,strlen($d_pic)-3);
if($ext!='jpg' || $ext!='bmp' || $ext!='gif'){$ext='jpg';}
$fname = time() .$i .'.'. $ext;
$path = "upload/vod/" . getSavePicPath('') . "/";
$thumbpath = "upload/vodthumb/" . getSavePicPath('vodthumb') . "/";
$ps = savepic($d_pic,$path,$thumbpath,$fname,'vod',$msg);
if($ps){
$d_pic=$path.$fname; $d_picthumb= $thumbpath.$fname;
array_push($colarr,'d_pic'); array_push($valarr,$d_pic);
array_push($colarr,'d_picthumb'); array_push($valarr,$d_picthumb);
}
}
else{
array_push($colarr,'d_pic'); array_push($valarr,$d_pic);
array_push($colarr,'d_picthumb'); array_push($valarr,$d_picthumb);
}
}
if(strpos(','.$uprule,'k') && $row['d_content'] != $d_content){ array_push($colarr,'d_content'); array_push($valarr,$d_content); }
if(strpos(','.$uprule,'l') && $row['d_tag'] != $d_tag){ array_push($colarr,'d_tag'); array_push($valarr,$d_tag); }
if(strpos(','.$uprule,'m') && $row['d_subname'] != $d_subname){ array_push($colarr,'d_subname'); array_push($valarr,$d_subname); }

if(count($colarr)>0){
array_push($colarr,'d_time');
array_push($valarr,time());
$des .= '<font color="green">字段更新,成功。</font>';
$db->Update ("{pre}vod",$colarr,$valarr,"d_id=".$row["d_id"] );
}
Expand Down

0 comments on commit 1788ac2

Please sign in to comment.