diff --git a/admin/admin_conn.php b/admin/admin_conn.php index d92c7a8..782d7e0 100644 --- a/admin/admin_conn.php +++ b/admin/admin_conn.php @@ -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){ diff --git a/admin/tpl/module/collect.php b/admin/tpl/module/collect.php index 3f58fd9..3f8b1ae 100644 --- a/admin/tpl/module/collect.php +++ b/admin/tpl/module/collect.php @@ -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';} @@ -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 .= '字段更新,成功。'; $db->Update("{pre}vod",$colarr,$valarr,"d_id=".$row["d_id"] ); } diff --git a/inc/timming/collect.php b/inc/timming/collect.php index b63153e..2fca36d 100644 --- a/inc/timming/collect.php +++ b/inc/timming/collect.php @@ -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 .= '字段更新,成功。'; $db->Update ("{pre}vod",$colarr,$valarr,"d_id=".$row["d_id"] ); }