From f20595ee4a32b668963a70e291bc5d424e22c0ba Mon Sep 17 00:00:00 2001 From: tianya Date: Wed, 18 Nov 2020 21:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=94=AF=E6=8C=81mp?= =?UTF-8?q?4=E8=A7=86=E9=A2=91=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dede/dialog/select_media_post.php | 17 +- src/dede/dialog/select_soft_post.php | 115 +-- src/dede/inc/inc_archives_functions.php | 616 +++++------- src/dede/sys_data_done.php | 225 ++--- src/dede/sys_sql_info.php | 152 --- src/dede/templets/article_add.htm | 56 +- src/dede/templets/lurd/lurd-add.htm | 42 - src/dede/templets/lurd/lurd-edit.htm | 46 - src/dede/templets/lurd/lurd-list.htm | 83 -- src/dede/templets/sys_data.htm | 56 +- src/dede/templets/sys_sql_query.htm | 1 - src/include/Lurd.class.php | 1143 ----------------------- src/include/common.func.php | 212 ++--- src/include/inc/inc_fun_funAdmin.php | 4 +- src/templets/lurd/lurd-add.htm | 42 - src/templets/lurd/lurd-edit.htm | 46 - src/templets/lurd/lurd-list.htm | 84 -- 17 files changed, 531 insertions(+), 2409 deletions(-) delete mode 100755 src/dede/sys_sql_info.php delete mode 100755 src/dede/templets/lurd/lurd-add.htm delete mode 100755 src/dede/templets/lurd/lurd-edit.htm delete mode 100755 src/dede/templets/lurd/lurd-list.htm delete mode 100755 src/include/Lurd.class.php delete mode 100755 src/templets/lurd/lurd-add.htm delete mode 100755 src/templets/lurd/lurd-edit.htm delete mode 100755 src/templets/lurd/lurd-list.htm diff --git a/src/dede/dialog/select_media_post.php b/src/dede/dialog/select_media_post.php index 46eca0cb..3fa7252e 100755 --- a/src/dede/dialog/select_media_post.php +++ b/src/dede/dialog/select_media_post.php @@ -1,4 +1,5 @@ ':\/|]#", "", $newname) ); +if (empty($uploadfile)) $uploadfile = ''; +if (empty($uploadmbtype)) $uploadmbtype = '软件类型'; +if (empty($bkurl)) $bkurl = 'select_soft.php'; +$CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; +$newname = (empty($newname) ? '' : preg_replace("#[\\ \"\*\?\t\r\n<>':\/|]#", "", $newname)); + +$uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; +$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; -if(!is_uploaded_file($uploadfile)) -{ +if (!is_uploaded_file($uploadfile)) { ShowMsg("你没有选择上传的文件或选择的文件大小超出限制!", "-1"); exit(); } //软件类型所有支持的附件 $cfg_softtype = $cfg_softtype; + $cfg_softtype = str_replace('||', '|', $cfg_softtype); $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); -if(!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) -{ - ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!",""); +if (!preg_match("#\.(" . $cfg_softtype . ")#i", $uploadfile_name)) { + ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); exit(); } $nowtme = time(); -if($activepath==$cfg_soft_dir) -{ +if ($activepath == $cfg_soft_dir) { $newdir = MyDate($cfg_addon_savetype, $nowtme); - $activepath = $activepath.'/'.$newdir; - if(!is_dir($cfg_basedir.$activepath)) - { - MkdirAll($cfg_basedir.$activepath,$cfg_dir_purview); + $activepath = $activepath . '/' . $newdir; + if (!is_dir($cfg_basedir . $activepath)) { + MkdirAll($cfg_basedir . $activepath, $cfg_dir_purview); CloseFtp(); } } //文件名(前为手工指定, 后者自动处理) -if(!empty($newname)) -{ +if (!empty($newname)) { $filename = $newname; - if(!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); + if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); else $fs = explode('.', $filename); - if(preg_match("#".$cfg_not_allowall."#", $fs[count($fs)-1])) - { - ShowMsg("你指定的文件名被系统禁止!",'javascript:;'); + if (preg_match("#" . $cfg_not_allowall . "#", $fs[count($fs) - 1])) { + ShowMsg("你指定的文件名被系统禁止!", 'javascript:;'); exit(); } - if(!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs)-1]; -}else{ - $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis',$nowtme)); + if (!preg_match("#\.#", $filename)) $filename = $filename . '.' . $fs[count($fs) - 1]; +} else { + $filename = $cuserLogin->getUserID() . '-' . dd2char(MyDate('ymdHis', $nowtme)); $fs = explode('.', $uploadfile_name); - if(preg_match("#".$cfg_not_allowall."#", $fs[count($fs)-1])) - { - ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!",'javascript:;'); + if (preg_match("#" . $cfg_not_allowall . "#", $fs[count($fs) - 1])) { + ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); exit(); } - $filename = $filename.'.'.$fs[count($fs)-1]; + $filename = $filename . '.' . $fs[count($fs) - 1]; } -$fullfilename = $cfg_basedir.$activepath.'/'.$filename; -$fullfileurl = $activepath.'/'.$filename; -move_uploaded_file($uploadfile,$fullfilename) or die("上传文件到 $fullfilename 失败!"); +$fullfilename = $cfg_basedir . $activepath . '/' . $filename; +$fullfileurl = $activepath . '/' . $filename; +move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); @unlink($uploadfile); -if($cfg_remote_site=='Y' && $remoteuploads == 1) -{ +if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { //分析远程文件路径 $remotefile = str_replace(DEDEROOT, '', $fullfilename); - $localfile = '../..'.$remotefile; + $localfile = '../..' . $remotefile; //创建远程文件夹 - $remotedir = preg_replace('/[^\/]*\.('.$cfg_softtype.')/', '', $remotefile); + $remotedir = preg_replace('/[^\/]*\.(' . $cfg_softtype . ')/', '', $remotefile); $ftp->rmkdir($remotedir); $ftp->upload($localfile, $remotefile); } -if($uploadfile_type == 'application/x-shockwave-flash') -{ - $mediatype=2; -} -else if(preg_match('#image#i', $uploadfile_type)) -{ - $mediatype=1; -} -else if(preg_match('#audio|media|video#i', $uploadfile_type)) -{ - $mediatype=3; -} -else -{ - $mediatype=4; +if ($uploadfile_type == 'application/x-shockwave-flash') { + $mediatype = 2; +} else if (preg_match('#image#i', $uploadfile_type)) { + $mediatype = 1; +} else if (preg_match('#audio|media|video#i', $uploadfile_type)) { + $mediatype = 3; +} else { + $mediatype = 4; } + $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; + VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','" . $cuserLogin->getUserID() . "'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $fullfileurl); -ShowMsg("成功上传文件!",$bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); -exit(); \ No newline at end of file +if ($ck == 1) { + $funcNum = isset($_GET['CKEditorFuncNum']) ? $_GET['CKEditorFuncNum'] : 1; + $url = $fullfileurl; + $arr = array( + "uploaded" => 1, + "fileName" => $filename, + "url" => $url, + ); + echo json_encode($arr); +} else { + ShowMsg("成功上传文件!", $bkurl . "?comeback=" . urlencode($filename) . "&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=" . urlencode($activepath) . "&d=" . time()); + exit(); +} diff --git a/src/dede/inc/inc_archives_functions.php b/src/dede/inc/inc_archives_functions.php index f75fc7df..4c6b3898 100755 --- a/src/dede/inc/inc_archives_functions.php +++ b/src/dede/inc/inc_archives_functions.php @@ -1,4 +1,5 @@ 记忆的列表页  " : ''; -if(!isset($_NOT_ARCHIVES)) -{ - require_once(DEDEINC.'/customfields.func.php'); +if (!isset($_NOT_ARCHIVES)) { + require_once(DEDEINC . '/customfields.func.php'); } /** @@ -30,71 +30,64 @@ if(!isset($_NOT_ARCHIVES)) */ function GetCurContentAlbum($body, $rfurl, &$firstdd) { - global $dsql,$cfg_multi_site,$cfg_basehost,$cfg_ddimg_width; - global $cfg_basedir,$pagestyle,$cuserLogin,$cfg_addon_savetype; - require_once(DEDEINC.'/dedecollection.func.php'); - if(empty($cfg_ddimg_width)) $cfg_ddimg_width = 320; + global $dsql, $cfg_multi_site, $cfg_basehost, $cfg_ddimg_width; + global $cfg_basedir, $pagestyle, $cuserLogin, $cfg_addon_savetype; + require_once(DEDEINC . '/dedecollection.func.php'); + if (empty($cfg_ddimg_width)) $cfg_ddimg_width = 320; $rsimg = ''; $cfg_uploaddir = $GLOBALS['cfg_image_dir']; $cfg_basedir = $GLOBALS['cfg_basedir']; - $basehost = 'http://'.$_SERVER['HTTP_HOST']; + $basehost = 'http://' . $_SERVER['HTTP_HOST']; $img_array = array(); - preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU",$body,$img_array); + preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU", $body, $img_array); $img_array = array_unique($img_array[2]); - $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); - $imgPath = $cfg_basedir.$imgUrl; - if(!is_dir($imgPath.'/')) - { - MkdirAll($imgPath,$GLOBALS['cfg_dir_purview']); + $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); + $imgPath = $cfg_basedir . $imgUrl; + if (!is_dir($imgPath . '/')) { + MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); CloseFtp(); } - $milliSecond = 'co'.dd2char( MyDate('ymdHis',time())) ; - foreach($img_array as $key=>$value) - { + $milliSecond = 'co' . dd2char(MyDate('ymdHis', time())); + foreach ($img_array as $key => $value) { $value = trim($value); - if(preg_match("#".$basehost."#i", $value) || !preg_match("#^http:\/\/#i", $value) - || ($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value))) - { + if ( + preg_match("#" . $basehost . "#i", $value) || !preg_match("#^http:\/\/#i", $value) + || ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) + ) { continue; } $itype = substr($value, -4, 4); - if( !preg_match("#\.(gif|jpg|png)#", $itype) ) $itype = ".jpg"; - - $rndFileName = $imgPath.'/'.$milliSecond.'-'.$key.$itype; - $iurl = $imgUrl.'/'.$milliSecond.'-'.$key.$itype; - + if (!preg_match("#\.(gif|jpg|png)#", $itype)) $itype = ".jpg"; + + $rndFileName = $imgPath . '/' . $milliSecond . '-' . $key . $itype; + $iurl = $imgUrl . '/' . $milliSecond . '-' . $key . $itype; + //下载并保存文件 $rs = DownImageKeep($value, $rfurl, $rndFileName, '', 0, 30); - if($rs) - { + if ($rs) { $info = ''; $imginfos = GetImageSize($rndFileName, $info); $fsize = filesize($rndFileName); - $filename = $milliSecond.'-'.$key.$itype; + $filename = $milliSecond . '-' . $key . $itype; //保存图片附件信息 $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$iurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; + VALUES ('0','$filename','$iurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $iurl); - if($pagestyle > 2) - { + if ($pagestyle > 2) { $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); - } - else - { + } else { $litpicname = $iurl; } - if(empty($firstdd) && !empty($litpicname)) - { + if (empty($firstdd) && !empty($litpicname)) { $firstdd = $litpicname; - if(!file_exists($cfg_basedir.$firstdd)) - { + if (!file_exists($cfg_basedir . $firstdd)) { $firstdd = $iurl; } } @WaterImg($rndFileName, 'down'); - $rsimg .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + $rsimg .= "{dede:img ddimg='$litpicname' text='' width='" . $imginfos[0] . "' height='" . $imginfos[1] . "'} $iurl {/dede:img}\r\n"; } } return $rsimg; @@ -109,75 +102,62 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) */ function GetCurContent($body) { - global $cfg_multi_site,$cfg_basehost,$cfg_basedir,$cfg_image_dir,$arcID,$cuserLogin,$dsql; + global $cfg_multi_site, $cfg_basehost, $cfg_basedir, $cfg_image_dir, $arcID, $cuserLogin, $dsql; $cfg_uploaddir = $cfg_image_dir; $htd = new DedeHttpDown(); - $basehost = "http://".$_SERVER["HTTP_HOST"]; + $basehost = "http://" . $_SERVER["HTTP_HOST"]; $img_array = array(); - preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU",$body,$img_array); - + preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); + $img_array = array_unique($img_array[1]); - $imgUrl = $cfg_uploaddir.'/'.MyDate("ymd", time()); - $imgPath = $cfg_basedir.$imgUrl; - if(!is_dir($imgPath.'/')) - { + $imgUrl = $cfg_uploaddir . '/' . MyDate("ymd", time()); + $imgPath = $cfg_basedir . $imgUrl; + if (!is_dir($imgPath . '/')) { MkdirAll($imgPath, $GLOBALS['cfg_dir_purview']); CloseFtp(); } - $milliSecond = MyDate('His',time()); - foreach($img_array as $key=>$value) - { - if(preg_match("#".$basehost."#i", $value)) - { + $milliSecond = MyDate('His', time()); + foreach ($img_array as $key => $value) { + if (preg_match("#" . $basehost . "#i", $value)) { continue; } - if($cfg_basehost != $basehost && preg_match("#".$cfg_basehost."#i", $value)) - { + if ($cfg_basehost != $basehost && preg_match("#" . $cfg_basehost . "#i", $value)) { continue; } - if(!preg_match("#^(http|https):\/\/#i", $value)) - { + if (!preg_match("#^(http|https):\/\/#i", $value)) { continue; } $htd->OpenUrl($value); $itype = $htd->GetHead("content-type"); $itype = substr($value, -4, 4); - if(!preg_match("#\.(jpg|gif|png)#i", $itype)) - { - if($itype=='image/gif') - { + if (!preg_match("#\.(jpg|gif|png)#i", $itype)) { + if ($itype == 'image/gif') { $itype = ".gif"; - } - else if($itype=='image/png') - { + } else if ($itype == 'image/png') { $itype = ".png"; - } - else - { + } else { $itype = '.jpg'; } } - $milliSecondN = dd2char($milliSecond.mt_rand(1000, 8000)); + $milliSecondN = dd2char($milliSecond . mt_rand(1000, 8000)); $value = trim($value); - $rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype; - $fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype; + $rndFileName = $imgPath . '/' . $milliSecondN . '-' . $key . $itype; + $fileurl = $imgUrl . '/' . $milliSecondN . '-' . $key . $itype; $rs = $htd->SaveToBin($rndFileName); - if($rs) - { - $info = ''; - $imginfos = GetImageSize($rndFileName, $info); - $fsize = filesize($rndFileName); - //保存图片附件信息 - $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$arcID}','$rndFileName','$fileurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $fileurl); - if($cfg_multi_site == 'Y') - { - $fileurl = $cfg_basehost.$fileurl; + if ($rs) { + $info = ''; + $imginfos = GetImageSize($rndFileName, $info); + $fsize = filesize($rndFileName); + //保存图片附件信息 + $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('{$arcID}','$rndFileName','$fileurl','1','{$imginfos[0]}','$imginfos[1]','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $fileurl); + if ($cfg_multi_site == 'Y') { + $fileurl = $cfg_basehost . $fileurl; } $body = str_replace($value, $fileurl, $body); @WaterImg($rndFileName, 'down'); @@ -195,48 +175,37 @@ function GetCurContent($body) * @param int $uid 用户id * @return array */ -function GetRemoteImage($url, $uid=0) +function GetRemoteImage($url, $uid = 0) { global $cfg_basedir, $cfg_image_dir, $cfg_addon_savetype; $cfg_uploaddir = $cfg_image_dir; - $revalues = Array(); + $revalues = array(); $ok = false; $htd = new DedeHttpDown(); $htd->OpenUrl($url); - $sparr = Array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); - if(!in_array($htd->GetHead("content-type"),$sparr)) - { + $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); + if (!in_array($htd->GetHead("content-type"), $sparr)) { return ''; - } - else - { - $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); - $imgPath = $cfg_basedir.$imgUrl; + } else { + $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); + $imgPath = $cfg_basedir . $imgUrl; CreateDir($imgUrl); $itype = $htd->GetHead("content-type"); - if($itype=="image/gif") - { + if ($itype == "image/gif") { $itype = '.gif'; - } - else if($itype=="image/png") - { + } else if ($itype == "image/png") { $itype = '.png'; - } - else if($itype=="image/wbmp") - { + } else if ($itype == "image/wbmp") { $itype = '.bmp'; - } - else - { + } else { $itype = '.jpg'; } - $rndname = dd2char($uid.'_'.MyDate('mdHis',time()).mt_rand(1000,9999)); - $rndtrueName = $imgPath.'/'.$rndname.$itype; - $fileurl = $imgUrl.'/'.$rndname.$itype; + $rndname = dd2char($uid . '_' . MyDate('mdHis', time()) . mt_rand(1000, 9999)); + $rndtrueName = $imgPath . '/' . $rndname . $itype; + $fileurl = $imgUrl . '/' . $rndname . $itype; $ok = $htd->SaveToBin($rndtrueName); @WaterImg($rndtrueName, 'down'); - if($ok) - { + if ($ok) { $data = GetImageSize($rndtrueName); $revalues[0] = $fileurl; $revalues[1] = $data[0]; @@ -255,7 +224,7 @@ function GetRemoteImage($url, $uid=0) * @param int $uid 用户id * @return string */ -function GetRemoteFlash($url, $uid=0) +function GetRemoteFlash($url, $uid = 0) { global $cfg_addon_savetype, $cfg_media_dir, $cfg_basedir; $cfg_uploaddir = $cfg_media_dir; @@ -263,22 +232,18 @@ function GetRemoteFlash($url, $uid=0) $sparr = 'application/x-shockwave-flash'; $htd = new DedeHttpDown(); $htd->OpenUrl($url); - if($htd->GetHead("content-type")!=$sparr) - { + if ($htd->GetHead("content-type") != $sparr) { return ''; - } - else - { - $imgUrl = $cfg_uploaddir.'/'.MyDate($cfg_addon_savetype, time()); - $imgPath = $cfg_basedir.$imgUrl; + } else { + $imgUrl = $cfg_uploaddir . '/' . MyDate($cfg_addon_savetype, time()); + $imgPath = $cfg_basedir . $imgUrl; CreateDir($imgUrl); $itype = '.swf'; - $milliSecond = $uid.'_'.MyDate('mdHis', time()); - $rndFileName = $imgPath.'/'.$milliSecond.$itype; - $fileurl = $imgUrl.'/'.$milliSecond.$itype; + $milliSecond = $uid . '_' . MyDate('mdHis', time()); + $rndFileName = $imgPath . '/' . $milliSecond . $itype; + $fileurl = $imgUrl . '/' . $milliSecond . $itype; $ok = $htd->SaveToBin($rndFileName); - if($ok) - { + if ($ok) { $revalues = $fileurl; } } @@ -297,10 +262,10 @@ function GetRemoteFlash($url, $uid=0) function CheckChannel($typeid, $channelid) { global $dsql; - if($typeid==0) return TRUE; + if ($typeid == 0) return TRUE; $row = $dsql->GetOne("SELECT ispart,channeltype FROM `#@__arctype` WHERE id='$typeid' "); - if($row['ispart']!=0 || $row['channeltype'] != $channelid) return FALSE; + if ($row['ispart'] != 0 || $row['channeltype'] != $channelid) return FALSE; else return TRUE; } @@ -316,7 +281,7 @@ function CheckArcAdmin($aid, $adminid) { global $dsql; $row = $dsql->GetOne("SELECT mid FROM `#@__archives` WHERE id='$aid' "); - if($row['mid']!=$adminid) return FALSE; + if ($row['mid'] != $adminid) return FALSE; else return TRUE; } @@ -331,8 +296,7 @@ function CheckArcAdmin($aid, $adminid) */ function SpLongBody($mybody, $spsize, $sptag) { - if(strlen($mybody) < $spsize) - { + if (strlen($mybody) < $spsize) { return $mybody; } $mybody = stripslashes($mybody); @@ -340,45 +304,34 @@ function SpLongBody($mybody, $spsize, $sptag) $npageBody = ''; $istable = 0; $mybody = ''; - foreach($bds as $i=>$k) - { - if($i==0) - { - $npageBody .= $bds[$i]; continue; + foreach ($bds as $i => $k) { + if ($i == 0) { + $npageBody .= $bds[$i]; + continue; } - $bds[$i] = "<".$bds[$i]; - if(strlen($bds[$i])>6) - { - $tname = substr($bds[$i],1,5); - if(strtolower($tname)=='table') - { + $bds[$i] = "<" . $bds[$i]; + if (strlen($bds[$i]) > 6) { + $tname = substr($bds[$i], 1, 5); + if (strtolower($tname) == 'table') { $istable++; - } - else if(strtolower($tname)=='/tabl') - { + } else if (strtolower($tname) == '/tabl') { $istable--; } - if($istable>0) - { - $npageBody .= $bds[$i]; continue; - } - else - { + if ($istable > 0) { + $npageBody .= $bds[$i]; + continue; + } else { $npageBody .= $bds[$i]; } - } - else - { + } else { $npageBody .= $bds[$i]; } - if(strlen($npageBody)>$spsize) - { - $mybody .= $npageBody.$sptag; + if (strlen($npageBody) > $spsize) { + $mybody .= $npageBody . $sptag; $npageBody = ''; } } - if($npageBody!='') - { + if ($npageBody != '') { $mybody .= $npageBody; } return addslashes($mybody); @@ -393,11 +346,11 @@ function SpLongBody($mybody, $spsize, $sptag) * @param int $isremote 是否远程 * @return string */ -function MakeArt($aid, $mkindex=FALSE, $ismakesign=FALSE, $isremote=0) +function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) { global $envs, $typeid; - require_once(DEDEINC.'/arc.archives.class.php'); - if($ismakesign) $envs['makesign'] = 'yes'; + require_once(DEDEINC . '/arc.archives.class.php'); + if ($ismakesign) $envs['makesign'] = 'yes'; $arc = new Archives($aid); $reurl = $arc->MakeHtml($isremote); return $reurl; @@ -413,13 +366,12 @@ function MakeArt($aid, $mkindex=FALSE, $ismakesign=FALSE, $isremote=0) function GetDDImgFromBody(&$body) { $litpic = ''; - preg_match_all("/(src)=[\"|'| ]{0,}([^>]*\.(gif|jpg|bmp|png))/isU",$body,$img_array); + preg_match_all("/(src)=[\"|'| ]{0,}([^>]*\.(gif|jpg|bmp|png))/isU", $body, $img_array); $img_array = array_unique($img_array[2]); - if(count($img_array)>0) - { + if (count($img_array) > 0) { $picname = preg_replace("/[\"|'| ]{1,}/", '', $img_array[0]); - if(preg_match("#_lit\.#", $picname)) $litpic = $picname; - else $litpic = GetDDImage('ddfirst', $picname,1); + if (preg_match("#_lit\.#", $picname)) $litpic = $picname; + else $litpic = GetDDImage('ddfirst', $picname, 1); } return $litpic; } @@ -435,87 +387,68 @@ function GetDDImgFromBody(&$body) */ function GetDDImage($litpic, $picname, $isremote) { - global $cuserLogin,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir,$ddcfg_image_dir,$cfg_addon_savetype; + global $cuserLogin, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir, $ddcfg_image_dir, $cfg_addon_savetype; $ntime = time(); - if( ($litpic != 'none' || $litpic != 'ddfirst') && - !empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name'])) - { + if (($litpic != 'none' || $litpic != 'ddfirst') && + !empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name']) + ) { //如果用户自行上传缩略图 $istype = 0; - $sparr = Array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); + $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); $_FILES[$litpic]['type'] = strtolower(trim($_FILES[$litpic]['type'])); - if(!in_array($_FILES[$litpic]['type'], $sparr)) - { - ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!","-1"); + if (!in_array($_FILES[$litpic]['type'], $sparr)) { + ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); exit(); } - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + $savepath = $ddcfg_image_dir . '/' . MyDate($cfg_addon_savetype, $ntime); CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - if(strtolower($_FILES[$litpic]['type']) == "image/gif") - { - $fullUrl = $fullUrl.".gif"; - } - else if(strtolower($_FILES[$litpic]['type']) == "image/png") - { - $fullUrl = $fullUrl.".png"; - } - else - { - $fullUrl = $fullUrl.".jpg"; + $fullUrl = $savepath . '/' . dd2char(MyDate('mdHis', $ntime) . $cuserLogin->getUserID() . mt_rand(1000, 9999)); + if (strtolower($_FILES[$litpic]['type']) == "image/gif") { + $fullUrl = $fullUrl . ".gif"; + } else if (strtolower($_FILES[$litpic]['type']) == "image/png") { + $fullUrl = $fullUrl . ".png"; + } else { + $fullUrl = $fullUrl . ".jpg"; } - @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir.$fullUrl); + @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir . $fullUrl); $litpic = $fullUrl; - if($GLOBALS['cfg_ddimg_full']=='Y') @ImageResizeNew($cfg_basedir.$fullUrl,$cfg_ddimg_width,$cfg_ddimg_height); - else @ImageResize($cfg_basedir.$fullUrl,$cfg_ddimg_width,$cfg_ddimg_height); - - $img = $cfg_basedir.$litpic; + if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir . $fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); + else @ImageResize($cfg_basedir . $fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); - } - else - { + $img = $cfg_basedir . $litpic; + } else { $picname = trim($picname); - if($isremote==1 && preg_match("#^http:\/\/#i", $picname)) - { + if ($isremote == 1 && preg_match("#^http:\/\/#i", $picname)) { $litpic = $picname; $ddinfos = GetRemoteImage($litpic, $cuserLogin->getUserID()); - if(!is_array($ddinfos)) - { + if (!is_array($ddinfos)) { $litpic = ''; - } - else - { + } else { $litpic = $ddinfos[0]; - if($ddinfos[1] > $cfg_ddimg_width || $ddinfos[2] > $cfg_ddimg_height) - { - if($GLOBALS['cfg_ddimg_full']=='Y') @ImageResizeNew($cfg_basedir.$litpic,$cfg_ddimg_width,$cfg_ddimg_height); - else @ImageResize($cfg_basedir.$litpic,$cfg_ddimg_width,$cfg_ddimg_height); + if ($ddinfos[1] > $cfg_ddimg_width || $ddinfos[2] > $cfg_ddimg_height) { + if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir . $litpic, $cfg_ddimg_width, $cfg_ddimg_height); + else @ImageResize($cfg_basedir . $litpic, $cfg_ddimg_width, $cfg_ddimg_height); } } - } - else - { - if($litpic=='ddfirst' && !preg_match("#^http:\/\/#i", $picname)) - { - $oldpic = $cfg_basedir.$picname; + } else { + if ($litpic == 'ddfirst' && !preg_match("#^http:\/\/#i", $picname)) { + $oldpic = $cfg_basedir . $picname; $litpic = str_replace('.', '-lp.', $picname); - if($GLOBALS['cfg_ddimg_full']=='Y') @ImageResizeNew($oldpic,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir.$litpic); - else @ImageResize($oldpic,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir.$litpic); - if(!is_file($cfg_basedir.$litpic)) $litpic = ''; - } - else - { + if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir . $litpic); + else @ImageResize($oldpic, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir . $litpic); + if (!is_file($cfg_basedir . $litpic)) $litpic = ''; + } else { $litpic = $picname; return $litpic; } } } - if($litpic=='litpic' || $litpic=='ddfirst') $litpic = ''; + if ($litpic == 'litpic' || $litpic == 'ddfirst') $litpic = ''; return $litpic; } @@ -542,7 +475,7 @@ function GetFormItemA($ctag) * @param string $addvar * @return string */ -function GetFieldValueA($dvalue, $dtype, $aid=0, $job='add', $addvar='') +function GetFieldValueA($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') { return GetFieldValue($dvalue, $dtype, $aid, $job, $addvar, 'admin'); } @@ -568,25 +501,24 @@ function GetFormItemValueA($ctag, $fvalue) * @param string $loadtype 载入类型 * @return string */ -function PrintAutoFieldsAdd(&$fieldset, $loadtype='all') +function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') { $dtp = new DedeTagParse(); - $dtp->SetNameSpace('field','<','>'); + $dtp->SetNameSpace('field', '<', '>'); $dtp->LoadSource($fieldset); $dede_addonfields = ''; - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $tid=>$ctag) - { - if($loadtype!='autofield' - || ($loadtype=='autofield' && $ctag->GetAtt('autofield')==1) ) - { - $dede_addonfields .= ( $dede_addonfields=="" ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type') ); + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $tid => $ctag) { + if ( + $loadtype != 'autofield' + || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) + ) { + $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); echo GetFormItemA($ctag); } } } - echo "\r\n"; + echo "\r\n"; } /** @@ -598,25 +530,24 @@ function PrintAutoFieldsAdd(&$fieldset, $loadtype='all') * @param string $loadtype 载入类型 * @return string */ -function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype='all') +function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') { $dtp = new DedeTagParse(); $dtp->SetNameSpace("field", "<", ">"); $dtp->LoadSource($fieldset); $dede_addonfields = ""; - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $tid=>$ctag) - { - if($loadtype != 'autofield' - || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) ) - { - $dede_addonfields .= ( $dede_addonfields=='' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type') ); + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $tid => $ctag) { + if ( + $loadtype != 'autofield' + || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) + ) { + $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName() . "," . $ctag->GetAtt('type') : ";" . $ctag->GetName() . "," . $ctag->GetAtt('type')); echo GetFormItemValueA($ctag, $fieldValues[$ctag->GetName()]); } } } - echo "\r\n"; + echo "\r\n"; } @@ -632,48 +563,42 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype='all') * @param string $dtype 类型 * @return string */ -function AnalyseHtmlBody($body,&$description,&$litpic,&$keywords,$dtype='') +function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '') { - global $autolitpic,$remote,$dellink,$autokey,$cfg_basehost,$cfg_auot_description,$id,$title,$cfg_soft_lang; - global $cfg_bizcore_appid,$cfg_bizcore_key,$cfg_bizcore_hostname,$cfg_bizcore_port; + global $autolitpic, $remote, $dellink, $autokey, $cfg_basehost, $cfg_auot_description, $id, $title, $cfg_soft_lang; + global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port; $autolitpic = (empty($autolitpic) ? '' : $autolitpic); $body = stripslashes($body); //远程图片本地化 - if($remote==1) - { + if ($remote == 1) { $body = GetCurContent($body); } //删除非站内链接 - if($dellink==1) - { + if ($dellink == 1) { $allow_urls = array($_SERVER['HTTP_HOST']); // 读取允许的超链接设置 - if(file_exists(DEDEDATA."/admin/allowurl.txt")) - { - $allow_urls = array_merge($allow_urls, file(DEDEDATA."/admin/allowurl.txt")); + if (file_exists(DEDEDATA . "/admin/allowurl.txt")) { + $allow_urls = array_merge($allow_urls, file(DEDEDATA . "/admin/allowurl.txt")); } $body = Replace_Links($body, $allow_urls); } //自动摘要 - if($description=='' && $cfg_auot_description>0) - { - $description = cn_substr(html2text($body),$cfg_auot_description); - $description = trim(preg_replace('/#p#|#e#/','',$description)); + if ($description == '' && $cfg_auot_description > 0) { + $description = cn_substr(html2text($body), $cfg_auot_description); + $description = trim(preg_replace('/#p#|#e#/', '', $description)); $description = addslashes($description); } //自动获取缩略图 - if($autolitpic==1 && $litpic=='') - { + if ($autolitpic == 1 && $litpic == '') { $litpic = GetDDImgFromBody($body); } //自动获取关键字 - if($autokey==1 && $keywords=='') - { + if ($autokey == 1 && $keywords == '') { $subject = $title; $message = $body; // 采用DedeBIZ Core分词组件分词 @@ -682,51 +607,42 @@ function AnalyseHtmlBody($body,&$description,&$litpic,&$keywords,$dtype='') $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); $client->appid = $cfg_bizcore_appid; $client->key = $cfg_bizcore_key; - $data = $client->Spliteword($subject.Html2Text($message)); + $data = $client->Spliteword($subject . Html2Text($message)); $keywords = $data->data; $client->Close(); } else { - include_once(DEDEINC.'/splitword.class.php'); + include_once(DEDEINC . '/splitword.class.php'); $keywords = ''; $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); $sp->SetSource($subject, $cfg_soft_lang, $cfg_soft_lang); $sp->StartAnalysis(); - $titleindexs = preg_replace("/#p#|#e#/",'',$sp->GetFinallyIndex()); + $titleindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); $sp->SetSource(Html2Text($message), $cfg_soft_lang, $cfg_soft_lang); $sp->StartAnalysis(); - $allindexs = preg_replace("/#p#|#e#/",'',$sp->GetFinallyIndex()); - - if(is_array($allindexs) && is_array($titleindexs)) - { - foreach($titleindexs as $k => $v) - { - if(strlen($keywords.$k)>=60) - { + $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); + + if (is_array($allindexs) && is_array($titleindexs)) { + foreach ($titleindexs as $k => $v) { + if (strlen($keywords . $k) >= 60) { break; - } - else - { - if(strlen($k) <= 2) continue; - $keywords .= $k.','; + } else { + if (strlen($k) <= 2) continue; + $keywords .= $k . ','; } } - foreach($allindexs as $k => $v) - { - if(strlen($keywords.$k)>=60) - { + foreach ($allindexs as $k => $v) { + if (strlen($keywords . $k) >= 60) { break; - } - else if(!in_array($k,$titleindexs)) - { - if(strlen($k) <= 2) continue; - $keywords .= $k.','; + } else if (!in_array($k, $titleindexs)) { + if (strlen($k) <= 2) continue; + $keywords .= $k . ','; } } } $sp = null; } } - $body = GetFieldValueA($body,$dtype,$id); + $body = GetFieldValueA($body, $dtype, $id); $body = addslashes($body); return $body; } @@ -739,7 +655,7 @@ function AnalyseHtmlBody($body,&$description,&$litpic,&$keywords,$dtype='') * @param array $allow_urls 允许的超链接 * @return string */ -function Replace_Links( &$body, $allow_urls=array() ) +function Replace_Links(&$body, $allow_urls = array()) { $host_rule = join('|', $allow_urls); $host_rule = preg_replace("#[\n\r]#", '', $host_rule); @@ -747,22 +663,18 @@ function Replace_Links( &$body, $allow_urls=array() ) $host_rule = str_replace('/', "\\/", $host_rule); $arr = array(); preg_match_all("#]*)>(.*)<\/a>#iU", $body, $arr); - if( is_array($arr[0]) ) - { + if (is_array($arr[0])) { $rparr = array(); $tgarr = array(); - foreach($arr[0] as $i=>$v) - { - if( $host_rule != '' && preg_match('#'.$host_rule.'#i', $arr[1][$i]) ) - { + foreach ($arr[0] as $i => $v) { + if ($host_rule != '' && preg_match('#' . $host_rule . '#i', $arr[1][$i])) { continue; } else { $rparr[] = $v; $tgarr[] = $arr[2][$i]; } } - if( !empty($rparr) ) - { + if (!empty($rparr)) { $body = str_replace($rparr, $tgarr, $body); } } @@ -782,22 +694,22 @@ function GetImageMapDD($filename, $maxwidth) { global $cuserLogin, $dsql, $cfg_ddimg_height, $cfg_ddimg_full; $ddn = substr($filename, -3); - $ddpicok = preg_replace("#\.".$ddn."$#", "-lp.".$ddn, $filename); - $toFile = $GLOBALS['cfg_basedir'].$ddpicok; - - if($cfg_ddimg_full=='Y') ImageResizeNew($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); - else ImageResize($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); - + $ddpicok = preg_replace("#\." . $ddn . "$#", "-lp." . $ddn, $filename); + $toFile = $GLOBALS['cfg_basedir'] . $ddpicok; + + if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'] . $filename, $maxwidth, $cfg_ddimg_height, $toFile); + else ImageResize($GLOBALS['cfg_basedir'] . $filename, $maxwidth, $cfg_ddimg_height, $toFile); + //保存图片附件信息 $fsize = filesize($toFile); $ddpicoks = explode('/', $ddpicok); - $filename = $ddpicoks[count($ddpicoks)-1]; + $filename = $ddpicoks[count($ddpicoks) - 1]; $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$ddpicok','1','0','0','0','$fsize','".time()."','".$cuserLogin->getUserID()."'); "; + VALUES ('0','$filename','$ddpicok','1','0','0','0','$fsize','" . time() . "','" . $cuserLogin->getUserID() . "'); "; $dsql->ExecuteNoneQuery($inquery); $fid = $dsql->GetLastID(); AddMyAddon($fid, $ddpicok); - + return $ddpicok; } @@ -812,11 +724,10 @@ function GetImageMapDD($filename, $maxwidth) * @param string $ntitle 注解文字 如果表单有 title 字段可不管 * @return mixed */ -function UploadOneImage($upname,$handurl='',$isremote=1,$ntitle='') +function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') { - global $cuserLogin,$cfg_basedir,$cfg_image_dir,$title, $dsql; - if($ntitle!='') - { + global $cuserLogin, $cfg_basedir, $cfg_image_dir, $title, $dsql; + if ($ntitle != '') { $title = $ntitle; } $ntime = time(); @@ -825,92 +736,72 @@ function UploadOneImage($upname,$handurl='',$isremote=1,$ntitle='') $handurl = trim($handurl); //如果用户自行上传了图片 - if(!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) - { + if (!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) { $istype = 0; - $sparr = Array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); + $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); $_FILES[$upname]['type'] = strtolower(trim($_FILES[$upname]['type'])); - if(!in_array($_FILES[$upname]['type'], $sparr)) - { - ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!","-1"); + if (!in_array($_FILES[$upname]['type'], $sparr)) { + ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); exit(); } - if(!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir.$handurl) ) - { - if(!is_object($dsql)) - { + if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir . $handurl)) { + if (!is_object($dsql)) { $dsql = new DedeSql(); } $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '$handurl' "); $fullUrl = preg_replace("#\.([a-z]*)$#i", "", $handurl); - } - else - { - $savepath = $cfg_image_dir.'/'.strftime("%Y-%m",$ntime); + } else { + $savepath = $cfg_image_dir . '/' . strftime("%Y-%m", $ntime); CreateDir($savepath); - $fullUrl = $savepath.'/'.strftime("%d",$ntime).dd2char(strftime("%H%M%S", $ntime).'0'.$cuserLogin->getUserID().'0'.mt_rand(1000, 9999)); - } - if(strtolower($_FILES[$upname]['type'])=="image/gif") - { - $fullUrl = $fullUrl.".gif"; - } - else if(strtolower($_FILES[$upname]['type'])=="image/png") - { - $fullUrl = $fullUrl.".png"; + $fullUrl = $savepath . '/' . strftime("%d", $ntime) . dd2char(strftime("%H%M%S", $ntime) . '0' . $cuserLogin->getUserID() . '0' . mt_rand(1000, 9999)); } - else - { - $fullUrl = $fullUrl.".jpg"; + if (strtolower($_FILES[$upname]['type']) == "image/gif") { + $fullUrl = $fullUrl . ".gif"; + } else if (strtolower($_FILES[$upname]['type']) == "image/png") { + $fullUrl = $fullUrl . ".png"; + } else { + $fullUrl = $fullUrl . ".jpg"; } //保存 - @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir.$fullUrl); + @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir . $fullUrl); $filename = $fullUrl; //水印 - @WaterImg($cfg_basedir.$fullUrl, 'up'); + @WaterImg($cfg_basedir . $fullUrl, 'up'); $isrm_up = TRUE; } //远程或选择本地图片 - else - { - if($handurl=='') - { + else { + if ($handurl == '') { return ''; } //远程图片并要求本地化 - if($isremote==1 && preg_match("#^http[s]?:\/\/#i", $handurl)) - { + if ($isremote == 1 && preg_match("#^http[s]?:\/\/#i", $handurl)) { $ddinfos = GetRemoteImage($handurl, $cuserLogin->getUserID()); - if(!is_array($ddinfos)) - { + if (!is_array($ddinfos)) { $litpic = ""; - } - else - { + } else { $filename = $ddinfos[0]; } $isrm_up = TRUE; //本地图片或远程不要求本地化 - } - else - { + } else { $filename = $handurl; } } - $imgfile = $cfg_basedir.$filename; - if(is_file($imgfile) && $isrm_up && $filename!='') - { + $imgfile = $cfg_basedir . $filename; + if (is_file($imgfile) && $isrm_up && $filename != '') { $info = ""; $imginfos = GetImageSize($imgfile, $info); //把新上传的图片信息保存到媒体文档管理档案中 $inquery = " INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$title','$filename','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".time()."','".$cuserLogin->getUserID()."'); + VALUES ('$title','$filename','1','" . $imginfos[0] . "','" . $imginfos[1] . "','0','" . filesize($imgfile) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); "; $dsql->ExecuteNoneQuery($inquery); } @@ -927,20 +818,17 @@ function GetUpdateTest() { global $arcID, $typeid, $cfg_make_andcat, $cfg_makeindex, $cfg_make_prenext; $revalue = $dolist = ''; - if($cfg_makeindex=='Y' || $cfg_make_andcat=='Y' || $cfg_make_prenext=='Y') - { - if($cfg_make_prenext=='Y' && !empty($typeid)) $dolist = 'makeprenext'; - if($cfg_makeindex=='Y') $dolist .= empty($dolist) ? 'makeindex' : ',makeindex'; - if($cfg_make_andcat=='Y') $dolist .= empty($dolist) ? 'makeparenttype' : ',makeparenttype'; + if ($cfg_makeindex == 'Y' || $cfg_make_andcat == 'Y' || $cfg_make_prenext == 'Y') { + if ($cfg_make_prenext == 'Y' && !empty($typeid)) $dolist = 'makeprenext'; + if ($cfg_makeindex == 'Y') $dolist .= empty($dolist) ? 'makeindex' : ',makeindex'; + if ($cfg_make_andcat == 'Y') $dolist .= empty($dolist) ? 'makeparenttype' : ',makeparenttype'; $dolists = explode(',', $dolist); - $jumpUrl = "task_do.php?typeid={$typeid}&aid={$arcID}&dopost={$dolists[0]}&nextdo=".preg_replace("#".$dolists[0]."[,]{0,1}#", '', $dolist); + $jumpUrl = "task_do.php?typeid={$typeid}&aid={$arcID}&dopost={$dolists[0]}&nextdo=" . preg_replace("#" . $dolists[0] . "[,]{0,1}#", '', $dolist); $revalue = "\r\n"; $revalue .= "\r\n"; $revalue .= "
 正在进行相关内容更新,请完成前不要进行其它操作:\r\n
\r\n\r\n
"; - } - else - { + } else { $revalue = ''; } return $revalue; -} \ No newline at end of file +} diff --git a/src/dede/sys_data_done.php b/src/dede/sys_data_done.php index d5a517d5..304b7d05 100755 --- a/src/dede/sys_data_done.php +++ b/src/dede/sys_data_done.php @@ -1,4 +1,5 @@ $gotojs"; @@ -27,97 +28,68 @@ $dojs = ""; 备份数据 function __bak_data(); --------------------*/ -if($dopost=='bak') -{ - if(empty($tablearr)) - { +if ($dopost == 'bak') { + if (empty($tablearr)) { ShowMsg('你没选中任何表!', 'javascript:;'); exit(); } - if(!is_dir($bkdir)) - { + if (!is_dir($bkdir)) { MkdirAll($bkdir, $cfg_dir_purview); CloseFtp(); } //初始化使用到的变量 $tables = explode(',', $tablearr); - if(!isset($isstruct)) - { + if (!isset($isstruct)) { $isstruct = 0; } - if(!isset($startpos)) - { + if (!isset($startpos)) { $startpos = 0; } - if(!isset($iszip)) - { + if (!isset($iszip)) { $iszip = 0; } - if(empty($nowtable)) - { + if (empty($nowtable)) { $nowtable = ''; } - if(empty($fsize)) - { + if (empty($fsize)) { $fsize = 2048; } $fsizeb = $fsize * 1024; //第一页的操作 - if($nowtable=='') - { + if ($nowtable == '') { $tmsg = ''; $dh = dir($bkdir); - while($filename = $dh->read()) - { - if(!preg_match("#txt$#", $filename)) - { + while ($filename = $dh->read()) { + if (!preg_match("#txt$#", $filename)) { continue; } - $filename = $bkdir."/$filename"; - if(!is_dir($filename)) - { + $filename = $bkdir . "/$filename"; + if (!is_dir($filename)) { unlink($filename); } } $dh->close(); $tmsg .= "清除备份目录旧数据完成...
"; - if($isstruct==1) - { - $bkfile = $bkdir."/tables_struct_".substr(md5(time().mt_rand(1000,5000).$cfg_cookie_encode),0,16).".txt"; + if ($isstruct == 1) { + $bkfile = $bkdir . "/tables_struct_" . substr(md5(time() . mt_rand(1000, 5000) . $cfg_cookie_encode), 0, 16) . ".txt"; $mysql_version = $dsql->GetVersion(); $fp = fopen($bkfile, "w"); - foreach($tables as $t) - { + foreach ($tables as $t) { fwrite($fp, "DROP TABLE IF EXISTS `$t`;\r\n\r\n"); - $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$t); + $dsql->SetQuery("SHOW CREATE TABLE " . $dsql->dbName . "." . $t); $dsql->Execute('me'); $row = $dsql->GetArray('me', MYSQL_BOTH); - //去除AUTO_INCREMENT + // 去除AUTO_INCREMENT $row[1] = preg_replace("#AUTO_INCREMENT=([0-9]{1,})[ \r\n\t]{1,}#i", "", $row[1]); - //4.1以下版本备份为低版本 - if($datatype==4.0 && $mysql_version > 4.0) - { - $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=".$cfg_db_language."#i"; - $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); - } + $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=" . $cfg_db_language . "#i"; + $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); - //4.1以下版本备份为高版本 - else if($datatype==4.1 && $mysql_version < 4.1) - { - $eng1 = "#ENGINE=MyISAM DEFAULT CHARSET={$cfg_db_language}#i"; - $tableStruct = preg_replace("TYPE=MyISAM", $eng1, $row[1]); - } - //普通备份 - else - { - $tableStruct = $row[1]; - } - fwrite($fp,''.$tableStruct.";\r\n\r\n"); + fwrite($fp, '' . $tableStruct . ";\r\n\r\n"); } fclose($fp); $tmsg .= "备份数据表结构信息完成...
"; @@ -135,8 +107,7 @@ if($dopost=='bak') exit(); } //执行分页备份 - else - { + else { $j = 0; $fs = array(); $bakStr = ''; @@ -144,32 +115,28 @@ if($dopost=='bak') //分析表里的字段信息 $dsql->GetTableFields($nowtable); $intable = "INSERT INTO `$nowtable` VALUES("; - while($r = $dsql->GetFieldObject()) - { - + while ($r = $dsql->GetFieldObject()) { + $fs[$j] = trim($r->name); $j++; } - $fsd = $j-1; + $fsd = $j - 1; //读取表的内容 $dsql->SetQuery("SELECT * FROM `$nowtable` "); $dsql->Execute(); $m = 0; - $bakfilename = "$bkdir/{$nowtable}_{$startpos}_".substr(md5(time().mt_rand(1000,5000).$cfg_cookie_encode),0,16).".txt"; - while($row2 = $dsql->GetArray()) - { - if($m < $startpos) - { + $bakfilename = "$bkdir/{$nowtable}_{$startpos}_" . substr(md5(time() . mt_rand(1000, 5000) . $cfg_cookie_encode), 0, 16) . ".txt"; + while ($row2 = $dsql->GetArray()) { + if ($m < $startpos) { $m++; continue; } //检测数据是否达到规定大小 - if(strlen($bakStr) > $fsizeb) - { - $fp = fopen($bakfilename,"w"); - fwrite($fp,$bakStr); + if (strlen($bakStr) > $fsizeb) { + $fp = fopen($bakfilename, "w"); + fwrite($fp, $bakStr); fclose($fp); $tmsg = "完成到{$m}条记录的备份,继续备份{$nowtable}..."; $doneForm = "
@@ -180,22 +147,18 @@ if($dopost=='bak') \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg,$doneForm); + PutInfo($tmsg, $doneForm); exit(); } //正常情况 $line = $intable; - - for($j=0; $j<=$fsd; $j++) - { - if($j < $fsd) - { - $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."',"; - } - else - { - $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."');\r\n"; + + for ($j = 0; $j <= $fsd; $j++) { + if ($j < $fsd) { + $line .= "'" . RpLine(addslashes($row2[$fs[$j]])) . "',"; + } else { + $line .= "'" . RpLine(addslashes($row2[$fs[$j]])) . "');\r\n"; } } $m++; @@ -203,24 +166,19 @@ if($dopost=='bak') } //如果数据比卷设置值小 - if($bakStr!='') - { - $fp = fopen($bakfilename,"w"); - fwrite($fp,$bakStr); + if ($bakStr != '') { + $fp = fopen($bakfilename, "w"); + fwrite($fp, $bakStr); fclose($fp); } - for($i=0; $i \r\n\r\n{$dojs}\r\n"; - PutInfo($tmsg,$doneForm); + PutInfo($tmsg, $doneForm); exit(); } //分页备份代码结束 @@ -240,45 +198,35 @@ if($dopost=='bak') /*------------------------- 还原数据 function __re_data(); --------------------------*/ -else if($dopost=='redat') -{ - if($bakfiles=='') - { +-------------------------*/ else if ($dopost == 'redat') { + if ($bakfiles == '') { ShowMsg('没指定任何要还原的文件!', 'javascript:;'); exit(); } $bakfilesTmp = $bakfiles; $bakfiles = explode(',', $bakfiles); - if(empty($structfile)) - { + if (empty($structfile)) { $structfile = ""; } - if(empty($delfile)) - { + if (empty($delfile)) { $delfile = 0; } - if(empty($startgo)) - { + if (empty($startgo)) { $startgo = 0; } - if($startgo==0 && $structfile!='') - { + if ($startgo == 0 && $structfile != '') { $tbdata = ''; $fp = fopen("$bkdir/$structfile", 'r'); - while(!feof($fp)) - { + while (!feof($fp)) { $tbdata .= fgets($fp, 1024); } fclose($fp); $querys = explode(';', $tbdata); - foreach($querys as $q) - { - $dsql->ExecuteNoneQuery(trim($q).';'); + foreach ($querys as $q) { + $dsql->ExecuteNoneQuery(trim($q) . ';'); } - if($delfile==1) - { + if ($delfile == 1) { @unlink("$bkdir/$structfile"); } $tmsg = "完成数据表信息还原,准备还原数据..."; @@ -289,30 +237,24 @@ else if($dopost=='redat') \r\n{$dojs}\r\n"; PutInfo($tmsg, $doneForm); exit(); - } - else - { + } else { $nowfile = $bakfiles[0]; - $bakfilesTmp = preg_replace("#".$nowfile."[,]{0,1}#", "", $bakfilesTmp); - $oknum=0; - if( filesize("$bkdir/$nowfile") > 0 ) - { + $bakfilesTmp = preg_replace("#" . $nowfile . "[,]{0,1}#", "", $bakfilesTmp); + $oknum = 0; + if (filesize("$bkdir/$nowfile") > 0) { $fp = fopen("$bkdir/$nowfile", 'r'); - while(!feof($fp)) - { - $line = trim(fgets($fp, 512*1024)); - if($line=="") continue; + while (!feof($fp)) { + $line = trim(fgets($fp, 512 * 1024)); + if ($line == "") continue; $rs = $dsql->ExecuteNoneQuery($line); - if($rs) $oknum++; + if ($rs) $oknum++; } fclose($fp); } - if($delfile==1) - { + if ($delfile == 1) { @unlink("$bkdir/$nowfile"); } - if($bakfilesTmp=="") - { + if ($bakfilesTmp == "") { ShowMsg('成功还原所有的文件的数据!', 'javascript:;'); exit(); } @@ -327,19 +269,16 @@ else if($dopost=='redat') } } -function PutInfo($msg1,$msg2) +function PutInfo($msg1, $msg2) { - global $cfg_dir_purview,$cfg_soft_lang; + global $cfg_soft_lang; $msginfo = "\n - DEDECMS 提示信息 - \n\n\n
-
-
DEDECMS 提示信息!
-
-
{$msg1}
-

\r\n{$msg2}"; - echo $msginfo."
\n\n"; + + + DedeCMS 提示信息 + \n\n\n
{$msg2}"; + echo $msginfo . "\n\n"; } function RpLine($str) @@ -347,4 +286,4 @@ function RpLine($str) $str = str_replace("\r", "\\r", $str); $str = str_replace("\n", "\\n", $str); return $str; -} \ No newline at end of file +} diff --git a/src/dede/sys_sql_info.php b/src/dede/sys_sql_info.php deleted file mode 100755 index f988694c..00000000 --- a/src/dede/sys_sql_info.php +++ /dev/null @@ -1,152 +0,0 @@ -show(); - -class MakeDBDocument -{ - var $dsql; - function __construct() - { - global $dsql; - $this->dsql = $dsql; - } - //分析具体表 - function analyse_table(&$tableinfo, $tablename) - { - $flines = explode("\n", $tableinfo); - $addinfo = $tbinfo = $tb_comment = ''; - $fields = array(); - foreach($flines as $line) - { - $line = trim($line); - if( $line=='' ) continue; - if( preg_match('/CREATE TABLE/i', $line) ) continue; - if( !preg_match('/`/', $line) ) - { - $arr = ''; - preg_match("/ENGINE=([a-z]*)(.*)DEFAULT CHARSET=([a-z0-9]*)/i", $line, $arr); - $tbinfo = "ENGINE=".$arr[1].'/CHARSET='.$arr[3]; - $arr = ''; - preg_match("/comment='([^']*)'/i", $line, $arr); - if( isset($arr[1]) ) - { - $tb_comment = $arr[1]; - } - continue; - } - if( preg_match('/KEY/', $line) ) - { - $addinfo .= $line."
\n"; - } - else - { - $arr = ''; - $nline = preg_replace("/comment '([^']*)'/i", '', $line); - preg_match("/`([^`]*)` (.*)[,]{0,1}$/U", $nline, $arr); - $f = $arr[1]; - $fields[ $f ][0] = $arr[2]; - $fields[ $f ][1] = ''; - $arr = ''; - preg_match("/comment '([^']*)'/i", $line, $arr); - if( isset($arr[1]) ) - { - $fields[ $f ][1] = $arr[1]; - } - - } - } - $tablehtml = " - - - - - - - - \n"; - foreach($fields as $k=>$v) - { - $tablehtml .= " - - - - \n"; - } - $tablehtml .= " - - -
- - - - - - -
表名:{$tablename}
($tbinfo)
说明:{$tb_comment}
字段名说明描述具体参数
{$k}{$v[1]}{$v[0]}
- 索引:
- {$addinfo} -
"; - return $tablehtml; - } - //列出数据库的所有表 - function show( $type='' ) - { - global $cfg_soft_lang; - $namehtml = $tablehtml = ''; - $this->dsql->Execute('me', ' SHOW TABLES; '); - if (version_compare(PHP_VERSION, '7.0.0', '>=')) { - define("MYSQL_NUM", MYSQLI_NUM); - } - while( $row = $this->dsql->GetArray('me', MYSQL_NUM) ) - { - $this->dsql->Execute('dd', " Show CREATE TABLE `{$row[0]}` "); - $row2 = $this->dsql->GetArray('dd', MYSQL_NUM); - - if( $type=='' ) - { - if( preg_match("/^cms_/", $row[0]) ) continue; - } - else - { - if( !preg_match("/^".$type."_/", $row[0]) ) continue; - } - - $namehtml .= "{$row[0]} | "; - $tablehtml .= $this->analyse_table( $row2[1], $row[0]); - } - $htmlhead = " - - - - - -数据库说明文档 - -"; - echo $htmlhead; - echo "
".$namehtml."
"; - echo $tablehtml; - echo "\n"; - exit(); - }//end show -} \ No newline at end of file diff --git a/src/dede/templets/article_add.htm b/src/dede/templets/article_add.htm index f3a1d336..318e0f03 100755 --- a/src/dede/templets/article_add.htm +++ b/src/dede/templets/article_add.htm @@ -69,7 +69,8 @@  文章列表 >> 发布文章 -   栏目管理 +   栏目管理 @@ -85,8 +86,8 @@ - +
@@ -191,7 +192,7 @@ - + 选择图片 @@ -279,11 +280,11 @@ + value="" />
 关键字:
+ value="1" /> + 自动获取,手动填写用","分开
@@ -308,7 +309,7 @@
 文章内容:
- +
@@ -322,17 +323,17 @@  附加选项: + /> + 下载远程图片和资源 [设置] + /> + 删除非站内链接 [设置] + /> + 提取第一个图片为缩略图 + /> + 图片是否加水印 @@ -345,11 +346,11 @@  分页方式: + /> + 手动  大小: + /> + 自动 大小: K (分页符为: #p#分页标题#e# ) @@ -388,10 +389,10 @@  评论选项: + /> 允许评论   + /> 禁止评论 浏览次数: @@ -420,7 +421,8 @@ 标题颜色: - + @@ -464,9 +466,9 @@ 发布选项: - + 生成HTML + diff --git a/src/dede/templets/lurd/lurd-add.htm b/src/dede/templets/lurd/lurd-add.htm deleted file mode 100755 index 81b8cbad..00000000 --- a/src/dede/templets/lurd/lurd-add.htm +++ /dev/null @@ -1,42 +0,0 @@ - - - -增加数据 -- ~appname~ - - - - - - - - - - - - - - - -
- - - - - -
 ~appname~ > 增加数据 
-
- - - - - - ~fields~ -
字段
-
-   -   - -
- - - \ No newline at end of file diff --git a/src/dede/templets/lurd/lurd-edit.htm b/src/dede/templets/lurd/lurd-edit.htm deleted file mode 100755 index 5bad1a11..00000000 --- a/src/dede/templets/lurd/lurd-edit.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - -修改/查看 -- ~appname~ - - - - -
- - - - - - - - - - - -
- - - - - -
  ~appname~ > 修改/查看 
-
-{dede:datalist} -~primarykey~ - - - - - - ~fields~ -
字段
-{/dede:datalist} -
-   -   - -
-
- - \ No newline at end of file diff --git a/src/dede/templets/lurd/lurd-list.htm b/src/dede/templets/lurd/lurd-list.htm deleted file mode 100755 index 7bd817a4..00000000 --- a/src/dede/templets/lurd/lurd-list.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - -~appname~ - - - - - - - - -
- -
- - - - - -~titleitem~ - - - -{dede:datalist} - -~fielditem~ -{/dede:datalist} - - - - - - - -
- - - - - -
~appname~
-
-   -   -   -   -   -
- {dede:pagelist listsize='5' listitem='info,index,end,pre,next,pageno,form' /} -
- - \ No newline at end of file diff --git a/src/dede/templets/sys_data.htm b/src/dede/templets/sys_data.htm index f97082f7..673620b7 100755 --- a/src/dede/templets/sys_data.htm +++ b/src/dede/templets/sys_data.htm @@ -5,8 +5,8 @@ 数据库维护 - - + + \r\n\r\n\r\n\r\n"; - $litime = ($limittime==0 ? 1000 : $limittime); + $litime = ($limittime == 0 ? 1000 : $limittime); $func = ''; - if($gourl=='-1') - { - if($limittime==0) $litime = 5000; + if ($gourl == '-1') { + if ($limittime == 0) $litime = 5000; $gourl = "javascript:history.go(-1);"; } - if($gourl=='' || $onlymsg==1) - { - $msg = ""; - } - else - { + if ($gourl == '' || $onlymsg == 1) { + $msg = ""; + } else { //当网址为:close::objname 时, 关闭父框架的id=objname元素 - if(preg_match('/close::/',$gourl)) - { + if (preg_match('/close::/', $gourl)) { $tgobj = trim(preg_replace('/close::/', '', $gourl)); $gourl = 'javascript:;'; $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n"; @@ -316,27 +239,21 @@ function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) $rmsg = $func; $rmsg .= "document.write(\"
\");\r\n"; $rmsg .= "setTimeout('JumpUrl()',$litime);"; - } - else - { + } else { $rmsg .= "
\");\r\n"; } - } - else - { + } else { $rmsg .= "\");\r\n"; } - $msg = $htmlhead.$rmsg.$htmlfoot; + $msg = $htmlhead . $rmsg . $htmlfoot; } echo $msg; } @@ -348,7 +265,7 @@ function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) */ function GetCkVdValue() { - @session_id($_COOKIE['PHPSESSID']); + @session_id($_COOKIE['PHPSESSID']); @session_start(); return isset($_SESSION['securimage_code_value']) ? $_SESSION['securimage_code_value'] : ''; } @@ -364,12 +281,14 @@ function ResetVdValue() $_SESSION['securimage_code_value'] = ''; } -function IndexSub($idx, $num) { - return intval($idx - $num) == 0? '0 ' : intval($idx - $num); +function IndexSub($idx, $num) +{ + return intval($idx - $num) == 0 ? '0 ' : intval($idx - $num); } // 用来返回index的active -function IndexActive($idx){ +function IndexActive($idx) +{ if ($idx == 1) { return ' active'; } else { @@ -379,7 +298,6 @@ function IndexActive($idx){ // 自定义函数接口 // 这里主要兼容早期的用户扩展,v5.7之后我们建议使用小助手helper进行扩展 -if( file_exists(DEDEINC.'/extend.func.php') ) -{ - require_once(DEDEINC.'/extend.func.php'); +if (file_exists(DEDEINC . '/extend.func.php')) { + require_once(DEDEINC . '/extend.func.php'); } diff --git a/src/include/inc/inc_fun_funAdmin.php b/src/include/inc/inc_fun_funAdmin.php index 3f56e13e..429743d9 100755 --- a/src/include/inc/inc_fun_funAdmin.php +++ b/src/include/inc/inc_fun_funAdmin.php @@ -170,8 +170,8 @@ function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype } else if ($GLOBALS['cfg_html_editor'] == 'ckeditor') { $addConfig = ""; if (defined("DEDEADMIN")) { - // $addConfig = ",{filebrowserImageUploadUrl:'./dialog/select_images_post.php',filebrowserUploadUrl:'./dialog/select_media_post.php'}"; - $addConfig = ",{filebrowserImageUploadUrl:'./dialog/select_images_post.php'}"; + $addConfig = ",{filebrowserImageUploadUrl:'./dialog/select_images_post.php',filebrowserUploadUrl:'./dialog/select_media_post.php?ck=1'}"; + // $addConfig = ",{filebrowserImageUploadUrl:'./dialog/select_images_post.php'}"; } $code = << diff --git a/src/templets/lurd/lurd-add.htm b/src/templets/lurd/lurd-add.htm deleted file mode 100755 index 94ca2fe3..00000000 --- a/src/templets/lurd/lurd-add.htm +++ /dev/null @@ -1,42 +0,0 @@ - - - -增加数据 -- ~appname~ - - -
- - - - - - - - - - - - -
- - - - - -
 增加数据 -- ~appname~ 
-
- - - - - - ~fields~ -
字段
-
-   -   - -
-
- - \ No newline at end of file diff --git a/src/templets/lurd/lurd-edit.htm b/src/templets/lurd/lurd-edit.htm deleted file mode 100755 index b92bde69..00000000 --- a/src/templets/lurd/lurd-edit.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - -修改/查看 -- ~appname~ - - - -
- - - - - - - - - - - - -
- - - - - -
 修改/查看 -- ~appname~ 
-
-{dede:datalist} -~primarykey~ - - - - - - ~fields~ -
字段
-{/dede:datalist} -
-   -   - -
-
- - \ No newline at end of file diff --git a/src/templets/lurd/lurd-list.htm b/src/templets/lurd/lurd-list.htm deleted file mode 100755 index f2940e1d..00000000 --- a/src/templets/lurd/lurd-list.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - -~appname~ - - - - - - - - -
-   -   - -
- - - - - -~titleitem~ - - - - -{dede:datalist} - -~fielditem~ -{/dede:datalist} - - - - - - - -
- - - - - -
~appname~
-
-   -   -   -
- {dede:pagelist listsize='5' listitem='info,index,end,pre,next,pageno,form' /} -
- - \ No newline at end of file