".$ctag->GetAtt('itemname')." | ";
+ $formitem = '';
+ $formitem .= "".$ctag->GetAtt('itemname')." | ";
$formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string');
$formitem .= " | \r\n";
return $formitem;
@@ -109,14 +109,13 @@ function GetFormItem($ctag)
return $formitem;
} else {
if ($ctag->GetAtt('default') != "") $dfvalue = $ctag->GetAtt('default');
- else $dfvalue = "";
+ else $dfvalue = '';
$innertext = "\r\n";
$formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem);
$formitem = str_replace("~form~", $innertext, $formitem);
return $formitem;
}
}
-
/**
* 处理不同类型的数据
*
@@ -154,7 +153,7 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '')
fclose($fp);
return $addvar;
} else {
- $ipath = $GLOBALS['cfg_cmspath']."/data/textdata";
+ $ipath = '/data/textdata';
$tpath = ceil($aid / 5000);
if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) {
MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview);
@@ -178,7 +177,7 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '')
$imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}";
if (preg_match("#^(http|https):\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) {
//远程图片
- $reimgs = "";
+ $reimgs = '';
if ($isUrlOpen) {
$reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']);
if (is_array($reimgs)) {
@@ -200,7 +199,6 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '')
return $dvalue;
}
}
-
/**
* 获得带值的表单修改时用
*
@@ -212,10 +210,10 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '')
function GetFormItemValue($ctag, $fvalue)
{
$fieldname = $ctag->GetName();
- $formitem = "
+ $formitem = "
- ~name~ |
- ~form~ |
+ ~name~ |
+ ~form~ |
\r\n";
$innertext = trim($ctag->GetInnerText());
@@ -245,7 +243,7 @@ function GetFormItemValue($ctag, $fvalue)
$v = trim($v);
if ($v != '') {
if ($fvalue == $v) {
- $myformItem .= "\r\n";
+ $myformItem .= "\r\n";
} else {
$myformItem .= "\r\n";
}
@@ -265,21 +263,21 @@ function GetFormItemValue($ctag, $fvalue)
if ($ctag->GetAtt("type") == "textdata") {
if (is_file($GLOBALS['cfg_basedir'].$fvalue)) {
$fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r');
- $okfvalue = "";
+ $okfvalue = '';
while (!feof($fp)) {
$okfvalue .= fgets($fp, 1024);
}
fclose($fp);
} else {
- $okfvalue = "";
+ $okfvalue = '';
}
- $formitem = "".$ctag->GetAtt('itemname')." | \r\n";
+ $formitem = "".$ctag->GetAtt('itemname')." | \r\n";
$formitem .= "\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')." | \r\n";
$formitem .= " \r\n";
$formitem .= "\r\n";
return $formitem;
} else if ($ctag->GetAtt("type") == "htmltext") {
- $formitem = "".$ctag->GetAtt('itemname')." | \r\n";
+ $formitem = "".$ctag->GetAtt('itemname')." | \r\n";
$formitem .= "\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')." | \r\n";
$formitem .= " \r\n";
return $formitem;
diff --git a/src/admin/inc/inc_archives_functions.php b/src/admin/inc/inc_archives_functions.php
index 4c85e9e9..eed4053a 100644
--- a/src/admin/inc/inc_archives_functions.php
+++ b/src/admin/inc/inc_archives_functions.php
@@ -1,6 +1,6 @@
记忆的列表页" : '';
if (!isset($_NOT_ARCHIVES)) {
require_once(DEDEINC.'/customfields.func.php');
}
@@ -136,7 +134,7 @@ function GetCurContent($body)
} else {
continue;
}
- $milliSecondN = dd2char($milliSecond.mt_rand(1000,8000));
+ $milliSecondN = dd2char($milliSecond.mt_rand(1000, 9999));
$value = trim($value);
$rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype;
$fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype;
@@ -198,7 +196,7 @@ function GetRemoteImage($url, $uid = 0)
} else {
$itype = '.jpg';
}
- $rndname = dd2char($uid.'_'.MyDate('mdHis', time()).mt_rand(1000,9999));
+ $rndname = dd2char($uid.'_'.MyDate('mdHis', time()).mt_rand(1000, 9999));
$rndtrueName = $imgPath.'/'.$rndname.$itype;
$fileurl = $imgUrl.'/'.$rndname.$itype;
$ok = $htd->SaveToBin($rndtrueName);
@@ -357,7 +355,7 @@ function GetDDImage($litpic, $picname, $isremote)
}
$savepath = $cfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime);
CreateDir($savepath);
- $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000,9999));
+ $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") {
@@ -484,7 +482,7 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all')
$dtp = new DedeTagParse();
$dtp->SetNameSpace("field", "<", ">");
$dtp->LoadSource($fieldset);
- $dede_addonfields = "";
+ $dede_addonfields = '';
if (is_array($dtp->CTags)) {
foreach ($dtp->CTags as $tid => $ctag) {
if (
@@ -679,7 +677,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '')
} else {
$savepath = $cfg_image_dir.'/'.date("%Y-%m", $ntime);
CreateDir($savepath);
- $fullUrl = $savepath.'/'.date("%d", $ntime).dd2char(date("%H%M%S", $ntime).'0'.$cuserLogin->getUserID().'0'.mt_rand(1000,9999));
+ $fullUrl = $savepath.'/'.date("%d", $ntime).dd2char(date("%H%M%S", $ntime).'0'.$cuserLogin->getUserID().'0'.mt_rand(1000, 9999));
}
if (strtolower($_FILES[$upname]['type']) == "image/gif") {
$fullUrl = $fullUrl.".gif";
@@ -712,7 +710,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '')
if ($isremote == 1 && preg_match("#^http[s]?:\/\/#i", $handurl)) {
$ddinfos = GetRemoteImage($handurl, $cuserLogin->getUserID());
if (!is_array($ddinfos)) {
- $litpic = "";
+ $litpic = '';
} else {
$filename = $ddinfos[0];
}
@@ -724,7 +722,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '')
}
$imgfile = $cfg_basedir.$filename;
if (is_file($imgfile) && $isrm_up && $filename != '') {
- $info = "";
+ $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()."');";
@@ -748,9 +746,9 @@ function GetUpdateTest()
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);
- $revalue = "正在进行相关文档更新,未完成前不要执行其它操作:\r\n | \r\n";
- $revalue .= "\r\n\r\n | \r\n";
- $revalue .= " ";
+ $revalue = " ";
+ $revalue .= "";
+ $revalue .= " | ";
} else {
$revalue = '';
}
diff --git a/src/admin/inc/inc_batchup.php b/src/admin/inc/inc_batchup.php
index 4d88a27a..2d8d8932 100644
--- a/src/admin/inc/inc_batchup.php
+++ b/src/admin/inc/inc_batchup.php
@@ -1,6 +1,6 @@
GetOne($query);
@@ -102,11 +102,11 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0)
if (empty($arcRow['ismake'])) $arcRow['ismake'] = 1;
if (empty($arcRow['arcrank'])) $arcRow['arcrank'] = 0;
if (empty($arcRow['filename'])) $arcRow['filename'] = '';
- //删除HTML
+ //删除网页
if ($arcRow['ismake'] == -1 || $arcRow['arcrank'] != 0 || $arcRow['typeid'] == 0 || $arcRow['money'] > 0) {
return TRUE;
}
- //强制转换非多站点模式,以便统一方式获得实际HTML文件
+ //强制转换非多站点模式,以便统一方式获得实际网页文件
$GLOBALS['cfg_multi_site'] = 'N';
$arcurl = GetFileUrl(
$arcRow['aid'],
diff --git a/src/admin/inc/inc_list_functions.php b/src/admin/inc/inc_list_functions.php
index b606edc9..160000ff 100644
--- a/src/admin/inc/inc_list_functions.php
+++ b/src/admin/inc/inc_list_functions.php
@@ -70,7 +70,7 @@ function CheckPic($picname)
if ($picname != "") {
return $picname;
} else {
- return '../static/web/img/thumbnail.jpg';
+ return '/static/web/img/thumbnail.jpg';
}
}
//判断文档是否生成网页
diff --git a/src/admin/inc/inc_menu.php b/src/admin/inc/inc_menu.php
index 7827fccb..df4dcd45 100644
--- a/src/admin/inc/inc_menu.php
+++ b/src/admin/inc/inc_menu.php
@@ -1,6 +1,6 @@
getUserType() >= 10) {
- $adminMenu1 = (DEDEBIZ_SAFE_MODE? "" : "
+ $adminMenu1 = (DEDEBIZ_SAFE_MODE ? "" : "
@@ -43,7 +43,7 @@ if ($cuserLogin->getUserType() >= 10) {
")."
- ".(DEDEBIZ_SAFE_MODE? "" : "")."
+ ".(DEDEBIZ_SAFE_MODE ? "" : "")."
@@ -64,21 +64,21 @@ if ($cuserLogin->getUserType() >= 10) {
- ".(DEDEBIZ_SAFE_MODE? "" : "")."
- ".(DEDEBIZ_SAFE_MODE? "" : "")."
+ ".(DEDEBIZ_SAFE_MODE ? "" : "")."
+ ".(DEDEBIZ_SAFE_MODE ? "" : "")."
";
}
$menusMain = "
-
+
-
-
+
+
$addset
@@ -94,7 +94,7 @@ $adminMenu1
- ".(DEDEBIZ_SAFE_MODE? "" : "")."
+ ".(DEDEBIZ_SAFE_MODE ? "" : "")."
{$GLOBALS['menusMoudle']}
diff --git a/src/admin/inc/inc_menu_func.php b/src/admin/inc/inc_menu_func.php
index c571b1da..e9fd14e6 100644
--- a/src/admin/inc/inc_menu_func.php
+++ b/src/admin/inc/inc_menu_func.php
@@ -1,6 +1,6 @@
GetAtt('addalt');
- $link = "$link";
+ $link = "$link";
} else {
- $link .= "";
+ $link .= '';
}
$itemtmp = str_replace('~link~', $link, $itemTemplet);
echo $itemtmp;
diff --git a/src/admin/inc/inc_menu_module.php b/src/admin/inc/inc_menu_module.php
index fcc792ab..c2adeaa0 100644
--- a/src/admin/inc/inc_menu_module.php
+++ b/src/admin/inc/inc_menu_module.php
@@ -1,6 +1,6 @@
SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
- $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring);
+ $row->menustring = str_replace('', '', $row->menustring);
$plusset .= $row->menustring."\r\n";
}
$adminMenu = '';
if ($cuserLogin->getUserType() >= 10) {
- $adminMenu = DEDEBIZ_SAFE_MODE? "" : "
+ $adminMenu = DEDEBIZ_SAFE_MODE ? "" : "
";
diff --git a/src/admin/index.php b/src/admin/index.php
index e668d235..ce7bf2c8 100644
--- a/src/admin/index.php
+++ b/src/admin/index.php
@@ -16,6 +16,9 @@ if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) {
}
require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC.'/dedetag.class.php');
+require(DEDEADMIN.'/inc/inc_menu.php');
+require(DEDEADMIN.'/inc/inc_menu_func.php');
+$openitem = (empty($openitem) ? 1 : $openitem);
include(DEDEADMIN.'/templets/index.htm');
exit();
?>
\ No newline at end of file
diff --git a/src/admin/index_body.php b/src/admin/index_body.php
index c9915e31..8954e8d2 100644
--- a/src/admin/index_body.php
+++ b/src/admin/index_body.php
@@ -53,9 +53,10 @@ if (empty($dopost)) {
if (trim($row['editcon']) == '') {
$row['editcon'] = 'archives_edit.php';
}
- $rowarcrank = $row['arcrank'] == -1? " 未审核" : "";
+ $rowarcrank = $row['arcrank']==-1 ? '待审核' : '已审核';
$pubdate = GetDateMk($row['pubdate']);
- echo "{$row['title']}{$rowarcrank} | {$pubdate} | ";
+ $row['title'] = cn_substr($row['title'], 70);
+ echo "{$row['title']} | {$rowarcrank} | {$pubdate} | ";
}
} else {
?>
@@ -66,7 +67,7 @@ if (empty($dopost)) {
exit;
} elseif ($dopost == "system_info") {
if (empty(trim($cfg_auth_code))) {
- $indexHTML = "";
+ $indexHTML = '';
if (file_exists(DEDEROOT."/index.html")) {
$indexHTML = file_get_contents(DEDEROOT."/index.html");
} else {
diff --git a/src/admin/index_menu.php b/src/admin/index_menu.php
deleted file mode 100644
index d1c5da8b..00000000
--- a/src/admin/index_menu.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
\ No newline at end of file
diff --git a/src/admin/index_testenv.php b/src/admin/index_testenv.php
index 84579964..735f79fd 100644
--- a/src/admin/index_testenv.php
+++ b/src/admin/index_testenv.php
@@ -129,13 +129,13 @@ if (!IsSSL()) {
$safeMsg[] = '检测到网址非安全链接,建议您部署https';
}
if (IsWritable(DEDEDATA.'/common.inc.php')) {
- $safeMsg[] = '检测到data/common.inc.php数据库文件写入权限,建议您以管理员权限设置禁止写入和执行';
+ $safeMsg[] = '检测到data/common.inc.php数据库配置文件权限可以写入,建议您权限设置禁止写入和执行';
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
$safeMsg[] = '检测到php版本过低会无法正常使用后台,建议您升级到php8.x';
}
if (preg_match("#[\\|/]admin[\\|/]#", $dirname)) {
- $safeMsg[] = '检测到后台管理登录链接带admin,建议您进行修改';
+ $safeMsg[] = '检测到后台管理目录名称中包含admin,强烈建议后台管理目录修改为其它名称';
}
$rs = TestAdminPWD();
if ($rs < 0) {
diff --git a/src/admin/js/search.js b/src/admin/js/search.js
deleted file mode 100644
index 2015d5fe..00000000
--- a/src/admin/js/search.js
+++ /dev/null
@@ -1,23 +0,0 @@
-function selAll() {
- var celements = document.getElementsByName('aids[]');
- for (i=0;i {
- document.form3.dopost.value = 'delall';
- document.form3.submit();
- }).catch((e) => {
- console.log(e);
- });
-}
\ No newline at end of file
diff --git a/src/admin/js/user.js b/src/admin/js/user.js
deleted file mode 100644
index 6bcb1e5a..00000000
--- a/src/admin/js/user.js
+++ /dev/null
@@ -1,53 +0,0 @@
-if (moz == null) {
- var ie = document.all != null;
- var moz = !ie && document.getElementById != null && document.layers == null;
-}
-function delArc(mid) {
- var qstr=getCheckboxItem();
- if (mid==0) mid = getOneItem();
- location="member_do.php?id="+qstr+"&dopost=delmembers";
-}
-function getCheckboxItem() {
- var allSel="";
- if (document.form2.mid.value) return document.form2.mid.value;
- for (i=0;iExecuteNoneQuery("DELETE FROM `#@__log` $dquery");
- ShowMsg("成功删除指定的日志", $bkurl);
+ ShowMsg("成功删除指定日志", $bkurl);
exit();
} else {
- ShowMsg("无法识别您的请求", "javascript:;");
+ ShowMsg("系统无法识别请求", "log_list.php");
exit();
}
?>
\ No newline at end of file
diff --git a/src/admin/log_list.php b/src/admin/log_list.php
index 2bab78cb..bb63e910 100644
--- a/src/admin/log_list.php
+++ b/src/admin/log_list.php
@@ -13,9 +13,9 @@ CheckPurview('sys_Log');
require_once(DEDEINC."/datalistcp.class.php");
require_once(DEDEINC."/common.func.php");
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
-$sql = $where = "";
+$sql = $where = '';
if (empty($adminid)) $adminid = 0;
-if (empty($cip)) $cip = "";
+if (empty($cip)) $cip = '';
if (empty($dtime)) $dtime = 0;
if ($adminid > 0) $where .= " AND #@__log.adminid='$adminid' ";
if ($cip != "") $where .= " AND #@__log.cip LIKE '%$cip%' ";
@@ -25,7 +25,7 @@ if ($dtime > 0) {
$where .= " AND #@__log.dtime>'$starttime' ";
}
$sql = "SELECT `#@__log`.*,`#@__admin`.userid FROM `#@__log` LEFT JOIN `#@__admin` ON `#@__admin`.id=`#@__log`.adminid WHERE 1=1 $where ORDER BY `#@__log`.lid DESC";
-$adminlist = "";
+$adminlist = '';
$dsql->SetQuery("SELECT id,uname FROM `#@__admin`");
$dsql->Execute('admin');
while ($myrow = $dsql->GetObject('admin')) {
diff --git a/src/admin/login.php b/src/admin/login.php
index 702d8771..85e08f49 100644
--- a/src/admin/login.php
+++ b/src/admin/login.php
@@ -30,7 +30,7 @@ if (is_dir(dirname(__FILE__).'/../install')) {
//检测后台目录是否更名
$cururl = GetCurUrl();
if (preg_match('/admin/', $cururl)) {
- $redmsg = '后台管理目录名称中包含admin,强烈建议后台管理目录修改为其它名称 ';
+ $redmsg = '检测到后台管理目录名称中包含admin,强烈建议后台管理目录修改为其它名称 ';
} else {
$redmsg = '';
}
@@ -46,7 +46,7 @@ if ($dopost == 'login') {
$svali = strtolower(GetCkVdValue());
if ($validate == '' || $validate != $svali) {
ResetVdValue();
- ShowMsg('验证码不正确', 'login.php', 0, 1000);
+ ShowMsg('验证码不正确', 'login.php');
exit;
}
}
@@ -62,16 +62,16 @@ if ($dopost == 'login') {
}
} else if ($res == -1) {
ResetVdValue();
- ShowMsg('管理员账号错误', 'login.php', 0, 1000);
+ ShowMsg('管理员账号错误', 'login.php');
exit;
} else {
ResetVdValue();
- ShowMsg('管理员密码错误', 'login.php', 0, 1000);
+ ShowMsg('管理员密码错误', 'login.php');
exit;
}
} else {
ResetVdValue();
- ShowMsg('管理员账号和密码没填完整', 'login.php', 0, 1000);
+ ShowMsg('管理员账号和密码没填完整', 'login.php');
exit;
}
}
diff --git a/src/admin/makehtml_homepage.php b/src/admin/makehtml_homepage.php
index 495150c6..6ea8af51 100644
--- a/src/admin/makehtml_homepage.php
+++ b/src/admin/makehtml_homepage.php
@@ -28,29 +28,29 @@ if ($dopost == "view") {
if ($rs["admin_pwd_exists"] == "false") {
//设定dedebiz admin密码
if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) {
- echo "";
- echo "DedeBIZ操作密码为空或两次指定的密码不符 ";
+ echo "";
+ echo "密码不能为空或密码输入错误 ";
$client->Close();
exit;
}
$data = $client->AdminPWDCreate($dedebiz_admin);
if ($data->data != "ok") {
- echo "";
- echo "DedeBIZ设定操作密码失败:${$data} ";
+ echo "";
+ echo "密码失败:${$data} ";
$client->Close();
exit;
}
} else {
if ($dedebiz_admin == "") {
- echo "";
- echo "DedeBIZ操作密码为空 ";
+ echo "";
+ echo "密码不能为空 ";
$client->Close();
exit;
}
$data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex);
if ($data->data != "ok") {
- echo "";
- echo "DedeBIZ操作密码失败,填写正确的操作密码 ";
+ echo "";
+ echo "密码输入错误,请填写正确密码 ";
$client->Close();
exit;
}
@@ -58,7 +58,7 @@ if ($dopost == "view") {
}
$client->Close();
}
- $remotepos = empty($remotepos) ? '/index.html' : $remotepos;
+ $remotepos = empty($remotepos) ? '../index.html' : $remotepos;
$serviterm = empty($serviterm) ? "" : $serviterm;
if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($position))) {
ShowMsg("文件扩展名已被系统禁止", "javascript:;");
@@ -85,7 +85,7 @@ if ($dopost == "view") {
} else {
//动态浏览
if (file_exists($homeFile)) @unlink($homeFile);
- ShowMsg("更新动态首页,点击浏览", "javascript:;");
+ ShowMsg("更新动态首页,点击浏览", "javascript:;");
}
$iquery = "UPDATE `#@__homepageset` SET showmod='$showmod'";
$dsql->ExecuteNoneQuery($iquery);
diff --git a/src/admin/makehtml_list_action.php b/src/admin/makehtml_list_action.php
index ae14cd4e..9c4b9828 100644
--- a/src/admin/makehtml_list_action.php
+++ b/src/admin/makehtml_list_action.php
@@ -97,7 +97,7 @@ $nextpage = $pageno + 1;
if ($nextpage >= $totalpage && $finishType) {
if ($gotype == '') {
if (empty($reurl)) {
- $reurl = '../apps/list.php?tid='.$tid;
+ $reurl = '/apps/list.php?tid='.$tid;
}
ShowMsg("完成所有栏目更新,点击浏览", "javascript:;");
exit();
diff --git a/src/admin/makehtml_spec.php b/src/admin/makehtml_spec.php
index de17518c..fa72521e 100644
--- a/src/admin/makehtml_spec.php
+++ b/src/admin/makehtml_spec.php
@@ -10,7 +10,7 @@
*/
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_MakeHtml');
-if (empty($dopost)) $dopost = "";
+if (empty($dopost)) $dopost = '';
if ($dopost == "ok") {
require_once(DEDEINC."/archive/specview.class.php");
$sp = new SpecView();
diff --git a/src/admin/makehtml_taglist.php b/src/admin/makehtml_taglist.php
index de13dfad..ce57a7a9 100644
--- a/src/admin/makehtml_taglist.php
+++ b/src/admin/makehtml_taglist.php
@@ -35,5 +35,5 @@ if ($action == "search") {
echo json_encode($result);
exit;
}
-include DedeInclude('templets/makehtml_taglist.htm');
+include DedeInclude('templets/makehtml_tag_list.htm');
?>
\ No newline at end of file
diff --git a/src/admin/makehtml_taglist_action.php b/src/admin/makehtml_taglist_action.php
index bd7f3cdb..6f593fb7 100644
--- a/src/admin/makehtml_taglist_action.php
+++ b/src/admin/makehtml_taglist_action.php
@@ -20,7 +20,7 @@ if (empty($maxpagesize)) $maxpagesize = 30;
$startid = isset($startid) ? intval($startid) : 0;
$endid = isset($endid) ? intval($endid) : 0;
$tagid = isset($tagid) ? intval($tagid) : 0;
-$tagsdir = str_replace("{cmspath}", $cfg_cmspath, $cfg_tags_dir);
+$tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir);
//生成
if ($tagid > 0) {
$upall = 0; //更新单个模式
@@ -50,10 +50,10 @@ if ($ctagid == 0 && $allfinish) {
}
$tag = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id='$ctagid' LIMIT 0,1;");
//创建TAGS目录
-$tagsDir = str_replace("{cmspath}",$cfg_cmspath,$cfg_tags_dir);
+$tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir);
MkdirAll($cfg_basedir.$tagsDir, $cfg_dir_purview);
if (is_array($tag) && count($tag) > 0) {
- $dlist = new TagList($tag['id'], 'taglist.htm');
+ $dlist = new TagList($tag['id'], 'tag_list.htm');
$dlist->CountRecord();
$dlist->SetTagsDir($tagsdir);
$ntotalpage = $dlist->TotalPage;
diff --git a/src/admin/media_add.php b/src/admin/media_add.php
index 770d2605..22f08f48 100644
--- a/src/admin/media_add.php
+++ b/src/admin/media_add.php
@@ -10,7 +10,7 @@
*/
require_once(dirname(__FILE__)."/config.php");
//添加权限检查
-if (empty($dopost)) $dopost = "";
+if (empty($dopost)) $dopost = '';
//上传
if ($dopost == "upload") {
CheckCSRF();
diff --git a/src/admin/media_edit.php b/src/admin/media_edit.php
index 0106c5ba..b14b6296 100644
--- a/src/admin/media_edit.php
+++ b/src/admin/media_edit.php
@@ -11,13 +11,13 @@
require_once(dirname(__FILE__)."/config.php");
//权限检查
CheckPurview('sys_Upload,sys_MyUpload');
-if (empty($dopost)) $dopost = "";
+if (empty($dopost)) $dopost = '';
$backurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "javascript:history.go(-1);";
//删除附件
if ($dopost == 'del') {
CheckPurview('sys_DelUpload');
if (empty($ids)) {
- $ids = "";
+ $ids = '';
}
if ($ids == "") {
$myrow = $dsql->GetOne("SELECT url FROM `#@__uploads` WHERE aid='".$aid."'");
@@ -36,7 +36,7 @@ if ($dopost == 'del') {
exit();
} else {
$ids = explode(',', $ids);
- $idquery = "";
+ $idquery = '';
foreach ($ids as $aid) {
if ($idquery == "") {
$idquery .= " WHERE aid='$aid' ";
@@ -72,7 +72,7 @@ else if ($dopost == 'save') {
CheckPurview('sys_Upload');
}
//检测文件类型
- $addquery = "";
+ $addquery = '';
if (is_uploaded_file($upfile)) {
if ($mediatype == 1) {
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp");
@@ -130,7 +130,7 @@ else if ($dopost == 'save') {
$imgw = 0;
$imgh = 0;
if ($mediatype == 1) {
- $info = "";
+ $info = '';
$sizes[0] = 0;
$sizes[1] = 0;
$sizes = @getimagesize($fullfilename, $info);
diff --git a/src/admin/media_main.php b/src/admin/media_main.php
index c45d79f2..b3fba2d6 100644
--- a/src/admin/media_main.php
+++ b/src/admin/media_main.php
@@ -23,7 +23,7 @@ if ($dopost == 'filemanager') {
exit();
}
//数据库管理
-if (empty($keyword)) $keyword = "";
+if (empty($keyword)) $keyword = '';
$addsql = " WHERE (u.title LIKE '%$keyword%' OR u.url LIKE '%$keyword%') ";
if (empty($membertype)) {
$membertype = 0;
diff --git a/src/admin/member_do.php b/src/admin/member_do.php
index bcfe750a..9e39907d 100644
--- a/src/admin/member_do.php
+++ b/src/admin/member_do.php
@@ -48,7 +48,7 @@ if ($dopost == "delmember") {
$dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid='$id' ");
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid='$id'");
} else {
- ShowMsg("无法删除此会员,如果这个会员是管理员,必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL, 0, 5000);
+ ShowMsg("无法删除此会员,如果这个会员是管理员,必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL);
exit();
}
}
@@ -60,7 +60,7 @@ if ($dopost == "delmember") {
$wintitle = "删除指定会员";
$wecome_info = "会员管理 - 删除会员";
$win = new OxWindow();
- $win->Init("member_do.php", "js/blank.js", "POST");
+ $win->Init("member_do.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("id", $id);
@@ -95,7 +95,7 @@ if ($dopost == "delmember") {
$dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (".str_replace("`", ",", $id).") ");
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (".str_replace("`", ",", $id).")");
} else {
- ShowMsg("无法删除此会员,如果这个会员是管理员关连的id,必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL, 0, 3000);
+ ShowMsg("无法删除此会员,如果这个会员是管理员关连的id,必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL);
exit();
}
}
@@ -107,14 +107,14 @@ if ($dopost == "delmember") {
$wintitle = "删除指定会员";
$wecome_info = "会员管理 - 删除会员";
$win = new OxWindow();
- $win->Init("member_do.php", "js/blank.js", "POST");
+ $win->Init("member_do.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("id", $id);
$win->AddHidden("randcode", $randcode);
$win->AddHidden("safecode", $safecode);
$win->AddTitle("您确定要删除id".$id."会员吗");
- $win->AddMsgItem("验证安全码: (安全码:$safecode) | ");
+ $win->AddMsgItem("验证安全码: (安全码:$safecode) | ");
$winform = $win->GetWindow("ok");
$win->Display();
}
@@ -177,7 +177,7 @@ else if ($dopost == "memberlogin") {
CheckPurview('member_Edit');
PutCookie('DedeUserID', $id, 1800);
PutCookie('DedeLoginTime', time(), 1800);
- if (empty($jumpurl)) header("location:../user/index.php");
+ if (empty($jumpurl)) header("location:$cfg_memberurl/index.php");
else header("location:$jumpurl");
} else if ($dopost == "deoperations") {
$nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid));
diff --git a/src/admin/member_toadmin.php b/src/admin/member_toadmin.php
index 33524370..3971dc10 100644
--- a/src/admin/member_toadmin.php
+++ b/src/admin/member_toadmin.php
@@ -18,7 +18,7 @@ $row = array();
if ($dopost == "toadmin") {
$pwd = trim($pwd);
if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) {
- ShowMsg('密码不合法,使用[0-9a-zA-Z_@!.-]范围以内字符', '-1', 0, 3000);
+ ShowMsg('密码不合法,请使用数字0-9小写a-z大写A-Z符号_@!.-', '-1');
exit();
}
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24);
diff --git a/src/admin/member_type.php b/src/admin/member_type.php
index 6b3981fc..54495f70 100644
--- a/src/admin/member_type.php
+++ b/src/admin/member_type.php
@@ -10,7 +10,7 @@
*/
require_once(dirname(__FILE__)."/config.php");
CheckPurview('member_Type');
-if (empty($dopost)) $dopost = "";
+if (empty($dopost)) $dopost = '';
//保存修改
if ($dopost == "save") {
$startID = 1;
diff --git a/src/admin/module_main.php b/src/admin/module_main.php
index 1601d3d5..6f5b3381 100644
--- a/src/admin/module_main.php
+++ b/src/admin/module_main.php
@@ -17,7 +17,7 @@ require_once(DEDEINC."/dedemodule.class.php");
require_once(DEDEINC."/libraries/oxwindow.class.php");
if (empty($action)) $action = '';
$mdir = DEDEDATA.'/module';
-$mdurl = "";
+$mdurl = '';
function TestWriteAble($d)
{
$tfile = '_dedet.txt';
@@ -67,7 +67,7 @@ if ($action == '') {
$dm->Clear();
exit();
} else if ($action == 'view_developoer') {
- //检验开发者信息
+ //检验贡献者信息
$dm = new DedeModule($mdir);
$info = $dm->GetModuleInfo($hash);
if ($info == null) {
@@ -80,7 +80,7 @@ if ($action == '') {
$dhd->OpenUrl($devURL);
$devContent = $dhd->GetHtml();
$devInfo = (array)json_decode($devContent);
- $offUrl = "";
+ $offUrl = '';
if ($devInfo['dev_type'] == 1) {
$offUrl = "官方网址:{$devInfo['offurl']} ";
}
@@ -89,7 +89,7 @@ if ($action == '') {
$devInfo['dev_name'] = $info['team']."未认证";
$authAt = "未知";
}
- ShowMsg("开发者名称:{$devInfo['dev_name']} 开发者id:{$devInfo['dev_id']} 认证于:{$authAt}", "-1");
+ ShowMsg("贡献者名称:{$devInfo['dev_name']} 贡献者id:{$devInfo['dev_id']} 认证于:{$authAt}", "-1");
exit;
} else if ($action == 'setup') {
$dm = new DedeModule($mdir);
@@ -98,7 +98,7 @@ if ($action == '') {
ShowMsg("获取模块信息错误,模块文件错误", -1);
exit;
}
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
+ $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$filelists = (array)$dm->GetFileLists($hash);
$filelist = '';
$prvdirs = array();
@@ -138,7 +138,7 @@ if ($action == '') {
}
$prvdir .= " ";
$win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
+ $win->Init("module_main.php", "/static/web/js/admin.blank.js", "post");
$wecome_info = "模块管理 - 安装{$infos['name']}";
$devURL = DEDECDNURL."/developers/{$infos['dev_id']}.json";
$dhd = new DedeHttpDown();
@@ -169,7 +169,7 @@ if ($action == '') {
{$infos['filesize']} |
- 开发者id: |
+ 贡献者id: |
{$infos['dev_id']} {$s} |
@@ -181,7 +181,7 @@ if ($action == '') {
浏览 |
- 目录权限说明: ../为根目录 ./表示当前目录 |
+ 目录权限说明: /为根目录 ./表示当前目录 |
$prvdir |
@@ -191,7 +191,7 @@ if ($action == '') {
对于已存在文件处理方法: |
-
+
|
@@ -224,7 +224,7 @@ if ($action == '') {
if (!isset($autodel) || $autodel == 0) $dm->WriteSystemFile($hash, 'uninstall');
$dm->WriteSystemFile($hash, 'readme');
$dm->Clear();
- //用模块的程序安装安装
+ //用模块的程序安装
if (!isset($autosetup) || $autosetup == 0) {
include(DEDEDATA.'/module/'.$filename);
exit();
@@ -240,8 +240,7 @@ if ($action == '') {
$setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql);
}
//_ROOTURL_
- if ($cfg_cmspath == '/') $cfg_cmspath = '';
- $rooturl = $cfg_basehost.$cfg_cmspath;
+ $rooturl = $cfg_basehost;
$setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql);
$setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql);
$sqls = preg_split('/;[ \t]{0,}\n/', $setupsql);
@@ -261,10 +260,10 @@ if ($action == '') {
} else if ($action == 'del') {
$dm = new DedeModule($mdir);
$infos = $dm->GetModuleInfo($hash);
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
+ $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 已认证";
$win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
+ $win->Init("module_main.php", "/static/web/js/admin.blank.js", "post");
$wecome_info = "模块管理 - 删除{$infos['name']}";
$win->AddHidden("hash", $hash);
$win->AddHidden("action", "delok");
@@ -281,7 +280,7 @@ if ($action == '') {
{$infos['filesize']} |
- 开发者id: |
+ 贡献者id: |
{$dev_id} |
@@ -310,7 +309,7 @@ if ($action == '') {
$dm = new DedeModule($mdir);
$infos = $dm->GetModuleInfo($hash);
if ($infos['url'] == '') $infos['url'] = ' ';
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
+ $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$filelists = (array)$dm->GetFileLists($hash);
$filelist = '';
foreach ($filelists as $v) {
@@ -321,7 +320,7 @@ if ($action == '') {
}
$dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 已认证";
$win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
+ $win->Init("module_main.php", "/static/web/js/admin.blank.js", "post");
$wecome_info = "模块管理 - 卸载{$infos['name']}";
$win->AddHidden("hash", $hash);
$win->AddHidden("action", 'uninstallok');
@@ -338,7 +337,7 @@ if ($action == '') {
{$infos['filesize']} |
- 开发者id: |
+ 贡献者id: |
{$dev_id} |
@@ -356,7 +355,7 @@ if ($action == '') {
对于模块的文件处理方法: |
-
+
|
";
@@ -405,7 +404,7 @@ if ($action == '') {
$msg = preg_replace("/<\/body>(.*)/isU", "", $msg);
$dm->Clear();
$win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
+ $win->Init("module_main.php", "/static/web/js/admin.blank.js", "post");
$wecome_info = "模块管理 - 使用说明";
$win->AddMsgItem("$msg | ");
$winform = $win->GetWindow("hand");
@@ -415,7 +414,7 @@ if ($action == '') {
$dm = new DedeModule($mdir);
$infos = $dm->GetModuleInfo($hash);
if ($infos['url'] == '') $infos['url'] = ' ';
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
+ $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : ' 该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$filelists = (array)$dm->GetFileLists($hash);
$filelist = '';
$setupinfo = '';
@@ -439,9 +438,9 @@ if ($action == '') {
} else {
$setupinfo = "未安装 安装";
}
- $dev_id = empty($infos['dev_id'])? "安装{$s}" : "{$infos['dev_id']} 安装{$s}";
+ $dev_id = empty($infos['dev_id'])? "安装{$s}" : "{$infos['dev_id']} 安装{$s}";
$win = new OxWindow();
- $win->Init("", "js/blank.js", "");
+ $win->Init("", "/static/web/js/admin.blank.js", "");
$wecome_info = "模块管理 - {$infos['name']}";
$msg = "
模块名称: |
@@ -456,7 +455,7 @@ if ($action == '') {
{$infos['filesize']} |
- 开发者id: |
+ 贡献者id: |
{$dev_id} |
diff --git a/src/admin/module_make.php b/src/admin/module_make.php
index 0af091f5..1c96a6e6 100644
--- a/src/admin/module_make.php
+++ b/src/admin/module_make.php
@@ -24,14 +24,14 @@ if ($action == '') {
//生成项目
else if ($action == 'make') {
require_once(DEDEINC.'/libraries/dedehttpdown.class.php');
- //校验私钥,确定开发者身份
+ //校验私钥,确定贡献者身份
$devURL = DEDECDNURL."/developers/$dev_id.json";
$dhd = new DedeHttpDown();
$dhd->OpenUrl($devURL);
$devContent = $dhd->GetHtml();
$devInfo = (array)json_decode($devContent);
if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) {
- ShowMsg("您的开发者账号已经过期,登录DedeBIZ官网申请续费", "-1");
+ ShowMsg("您贡献者账号已经过期,登录DedeBIZ官网申请续费", "-1");
exit();
}
$filelist = str_replace("\r", "\n", trim($filelist));
@@ -41,11 +41,11 @@ else if ($action == 'make') {
exit();
}
if (empty($dev_id)) {
- ShowMsg("开发者id不能为空", "-1");
+ ShowMsg("贡献者id不能为空", "-1");
exit();
}
if (empty($priv)) {
- ShowMsg("请填写开发者私钥信息", "-1");
+ ShowMsg("请填写贡献者私钥信息", "-1");
exit();
}
if (strlen($modulname) > 150) {
@@ -63,7 +63,7 @@ else if ($action == 'make') {
openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']);
$minfo = (array)json_decode($decontent);
if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) {
- ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1");
+ ShowMsg("贡献者私钥校验失败,请确保填写正确的贡献者私钥", "-1");
exit();
}
//去除转义
@@ -174,21 +174,21 @@ else if ($action == 'edit') {
exit();
}
if (empty($dev_id)) {
- ShowMsg("开发者id不能为空", "-1");
+ ShowMsg("贡献者id不能为空", "-1");
exit();
}
if (empty($priv)) {
- ShowMsg("请填写开发者私钥信息", "-1");
+ ShowMsg("请填写贡献者私钥信息", "-1");
exit();
}
- //校验私钥,确定开发者身份
+ //校验私钥,确定贡献者身份
$devURL = DEDECDNURL."/developers/$dev_id.json";
$dhd = new DedeHttpDown();
$dhd->OpenUrl($devURL);
$devContent = $dhd->GetHtml();
$devInfo = (array)json_decode($devContent);
if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) {
- ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请", "-1");
+ ShowMsg("您贡献者账号已经过期,请登录www.dedebiz.com重新申请", "-1");
exit();
}
if (strlen($modulname) > 150) {
@@ -206,7 +206,7 @@ else if ($action == 'edit') {
openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']);
$minfo = (array)json_decode($decontent);
if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) {
- ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1");
+ ShowMsg("贡献者私钥校验失败,请确保填写正确的贡献者私钥", "-1");
exit();
}
//已经去除转义
diff --git a/src/admin/module_upload.php b/src/admin/module_upload.php
index 3beda2e6..b1ea8005 100644
--- a/src/admin/module_upload.php
+++ b/src/admin/module_upload.php
@@ -19,7 +19,7 @@ if (empty($action)) $action = '';
$mdir = DEDEDATA.'/module';
if ($action == 'upload') {
if (!is_uploaded_file($upfile)) {
- ShowMsg("请选择上传的模块插件文件", "javascript:;");
+ ShowMsg("请选择上传的模块插件文件", "-1");
exit();
} else {
include_once(DEDEINC."/libraries/zip.class.php");
@@ -30,7 +30,7 @@ if ($action == 'upload') {
if (empty($infos['hash'])) {
unlink($tmpfilename);
$dm->Clear();
- ShowMsg("您上传的插件不是正常模块格式文件", "javascript:;");
+ ShowMsg("您上传的插件不是正常模块格式文件", "-1");
exit();
}
if (preg_match("#[^0-9a-zA-Z]#", $infos['hash'])) {
@@ -40,25 +40,25 @@ if ($action == 'upload') {
if ($dm->HasModule($infos['hash']) && empty($delhas)) {
unlink($tmpfilename);
$dm->Clear();
- ShowMsg("您上传的模块已存在,请删除原模块文件或强制同名模块上传", "javascript:;");
+ ShowMsg("您上传的模块已存在,请删除原模块文件或强制同名模块上传", "-1");
exit();
}
@unlink($okfile);
copy($tmpfilename, $okfile);
@unlink($tmpfilename);
$dm->Clear();
- ShowMsg("成功上传一个新的模块", "module_main.php?action=view&hash={$infos['hash']}");
+ ShowMsg("成功上传一个新模块", "module_main.php?action=view&hash={$infos['hash']}");
exit();
}
} else {
$win = new OxWindow();
- $win->Init("module_upload.php", "js/blank.js", "POST' enctype='multipart/form-data");
+ $win->Init("module_upload.php", "/static/web/js/admin.blank.js", "POST' enctype='multipart/form-data");
$wecome_info = "模块管理 - 上传模块插件";
$win->AddTitle('请选择上传的模块插件文件');
$win->AddHidden("action", 'upload');
$msg = "
文件格式: |
- |
+ |
已有模块: |
diff --git a/src/admin/mychannel_add.php b/src/admin/mychannel_add.php
index 271e09d9..e353493e 100644
--- a/src/admin/mychannel_add.php
+++ b/src/admin/mychannel_add.php
@@ -47,15 +47,15 @@ if ($action == 'add') {
//是否需要摘要字段
$dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;");
if ($issystem != -1) {
- $tabsql = "CREATE TABLE `$trueTable2` (`aid` int(11) NOT NULL default '0',`typeid` int(11) NOT NULL default '0',`redirecturl` varchar(255) NOT NULL default '',`templet` varchar(30) NOT NULL default '',`userip` char(48) NOT NULL default '',";
+ $tabsql = "CREATE TABLE `$trueTable2` (`aid` int(11) NOT NULL DEFAULT '0',`typeid` int(11) NOT NULL DEFAULT '0',`redirecturl` varchar(255) NOT NULL DEFAULT '',`templet` varchar(30) NOT NULL DEFAULT '',`userip` char(48) NOT NULL DEFAULT '',";
} else {
- $tabsql = "CREATE TABLE `$trueTable2` (`aid` int(11) NOT NULL default '0',`typeid` int(11) NOT NULL default '0',`channel` SMALLINT NOT NULL DEFAULT '0',`arcrank` SMALLINT NOT NULL DEFAULT '0',`mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0',`click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',`title` varchar(255) NOT NULL default '',`senddate` int(11) NOT NULL default '0',`flag` set('c','h','p','f','s','j','a','b') default NULL,`litpic` varchar(60) NOT NULL default '',`userip` char(48) NOT NULL default '',`lastpost` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',`scores` MEDIUMINT( 8 ) NOT NULL DEFAULT '0',`goodpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0',`badpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0',
+ $tabsql = "CREATE TABLE `$trueTable2` (`aid` int(11) NOT NULL DEFAULT '0',`typeid` int(11) NOT NULL DEFAULT '0',`channel` SMALLINT NOT NULL DEFAULT '0',`arcrank` SMALLINT NOT NULL DEFAULT '0',`mid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',`click` INT(10) UNSIGNED NOT NULL DEFAULT '0',`title` varchar(255) NOT NULL DEFAULT '',`senddate` int(11) NOT NULL DEFAULT '0',`flag` set('c','h','p','f','s','j','a','b') DEFAULT NULL,`litpic` varchar(60) NOT NULL DEFAULT '',`userip` char(48) NOT NULL DEFAULT '',`lastpost` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',`scores` MEDIUMINT(8) NOT NULL DEFAULT '0',`goodpost` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',`badpost` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
";
}
if ($mysql_version < 4.1) {
- $tabsql .= "PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM;";
+ $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; ";
} else {
- $tabsql .= "PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language.";";
+ $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; ";
}
$rs = $dsql->ExecuteNoneQuery($tabsql);
if (!$rs) {
@@ -74,7 +74,7 @@ if ($action == 'add') {
-
+
diff --git a/src/admin/mychannel_edit.php b/src/admin/mychannel_edit.php
index b7e44f76..57947161 100644
--- a/src/admin/mychannel_edit.php
+++ b/src/admin/mychannel_edit.php
@@ -15,14 +15,14 @@ if (DEDEBIZ_SAFE_MODE) {
CheckPurview('c_Edit');
require_once(DEDEINC."/dedetag.class.php");
require_once(DEDEINC."/libraries/oxwindow.class.php");
-if (empty($dopost)) $dopost = "";
+if (empty($dopost)) $dopost = '';
$id = isset($id) && is_numeric($id) ? $id : 0;
if ($dopost == "show") {
$dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=1 WHERE id='$id' ");
ShowMsg("启用一个文档模型", "mychannel_main.php");
exit();
} else if ($dopost == "hide") {
- $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id'");
+ $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id' ");
ShowMsg("隐藏一个文档模型", "mychannel_main.php");
exit();
} else if ($dopost == "copystart") {
@@ -50,7 +50,7 @@ if ($dopost == "show") {
$wintitle = "复制指定文档模型";
$wecome_info = "文档模型管理 - 复制文档模型";
$win = new OxWindow();
- $win->Init("mychannel_edit.php", "js/blank.js", "post");
+ $win->Init("mychannel_edit.php", "/static/web/js/admin.blank.js", "post");
$win->AddTitle("复制文档模型:".$row['typename']."");
$win->AddHidden("cid", $id);
$win->AddHidden("id", $id);
@@ -74,7 +74,7 @@ if ($dopost == "show") {
复制模板: |
-
+
|
";
@@ -100,14 +100,14 @@ if ($dopost == "show") {
$win = new OxWindow();
$win->Init();
$win->AddTitle("导出{$row['typename']}文档模型规则");
- $winform = $win->GetWindow("hand", "");
+ $winform = $win->GetWindow("hand", "");
$win->Display();
exit();
} else if ($dopost == "exportin") {
$wintitle = "导入指定文档模型规则";
$wecome_info = "文档模型管理 - 导入文档模型规则";
$win = new OxWindow();
- $win->Init("mychannel_edit.php", "js/blank.js", "post");
+ $win->Init("mychannel_edit.php", "/static/web/js/admin.blank.js", "post");
$win->AddHidden("dopost", "exportinok");
$win->AddMsgItem(" | ");
$winform = $win->GetWindow("ok");
@@ -136,7 +136,7 @@ if ($dopost == "show") {
文档模型规则出错 |
- |
+ |
");
$fields = array();
foreach ($dtp->CTags as $ctag) {
@@ -148,7 +148,7 @@ if ($dopost == "show") {
文档模型规则出错 |
- |
+ |
");
}
//正常的导入过程
@@ -159,19 +159,19 @@ if ($dopost == "show") {
已经存在相同的{$fields['nid']}模型 |
- |
+ |
");
}
//创建表
if ($fields['issystem'] != -1) {
- $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}` (`aid` int(11) NOT NULL default '0',`typeid` int(11) NOT NULL default '0',`redirecturl` varchar(255) NOT NULL default '',`templet` varchar(30) NOT NULL default '',`userip` char(46) NOT NULL default '',";
+ $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}` (`aid` int(11) NOT NULL DEFAULT '0',`typeid` int(11) NOT NULL DEFAULT '0',`redirecturl` varchar(255) NOT NULL DEFAULT '',`templet` varchar(30) NOT NULL DEFAULT '',`userip` char(46) NOT NULL DEFAULT '',";
} else {
- $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`(`aid` int(11) NOT NULL default '0',`typeid` int(11) NOT NULL default '0',`channel` SMALLINT NOT NULL DEFAULT '0',`arcrank` SMALLINT NOT NULL DEFAULT '0',`mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0',`click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',`title` varchar(255) NOT NULL default '',`senddate` int(11) NOT NULL default '0',`flag` set('c','h','p','f','s','j','a','b') default NULL,";
+ $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}` (`aid` int(11) NOT NULL DEFAULT '0',`typeid` int(11) NOT NULL DEFAULT '0',`channel` SMALLINT NOT NULL DEFAULT '0',`arcrank` SMALLINT NOT NULL DEFAULT '0',`mid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',`click` INT(10) UNSIGNED NOT NULL DEFAULT '0',`title` varchar(255) NOT NULL DEFAULT '',`senddate` int(11) NOT NULL DEFAULT '0',`flag` set('c','h','p','f','s','j','a','b') DEFAULT NULL,";
}
if ($mysql_version < 4.1) {
- $tabsql .= "PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM;";
+ $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; ";
} else {
- $tabsql .= "PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language.";";
+ $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; ";
}
$rs = $dsql->ExecuteNoneQuery($tabsql);
if (!$rs) {
@@ -179,7 +179,7 @@ if ($dopost == "show") {
创建数据表失败:{$dsql->GetError()} |
- |
+ |
");
exit();
}
@@ -193,13 +193,13 @@ if ($dopost == "show") {
}
$fieldset = $fields['fieldset'];
$fields['fieldset'] = addslashes($fields['fieldset']);
- $inquery = "INSERT INTO `#@__channeltype` (`id`,`nid`,`typename`,`addtable`,`addcon`,`mancon`,`editcon`,`useraddcon`,`usermancon`,`usereditcon`,`fieldset`,`listfields`,`issystem`,`isshow`,`issend`,`arcsta`,`usertype`,`sendrank`) VALUES ('{$fields['newid']}','{$fields['nid']}','{$fields['typename']}','{$fields['addtable']}','{$fields['addcon']}','{$fields['mancon']}','{$fields['editcon']}','{$fields['useraddcon']}','{$fields['usermancon']}','{$fields['usereditcon']}','{$fields['fieldset']}','{$fields['listfields']}','{$fields['issystem']}','{$fields['isshow']}','{$fields['issend']}','{$fields['arcsta']}','{$fields['usertype']}','{$fields['sendrank']}' ); ";
+ $inquery = "INSERT INTO `#@__channeltype` (`id`,`nid`,`typename`,`addtable`,`addcon`,`mancon`,`editcon`,`useraddcon`,`usermancon`,`usereditcon`,`fieldset`,`listfields`,`issystem`,`isshow`,`issend`,`arcsta`,`usertype`,`sendrank`) VALUES ('{$fields['newid']}','{$fields['nid']}','{$fields['typename']}','{$fields['addtable']}','{$fields['addcon']}','{$fields['mancon']}','{$fields['editcon']}','{$fields['useraddcon']}','{$fields['usermancon']}','{$fields['usereditcon']}','{$fields['fieldset']}','{$fields['listfields']}','{$fields['issystem']}','{$fields['isshow']}','{$fields['issend']}','{$fields['arcsta']}','{$fields['usertype']}','{$fields['sendrank']}'); ";
$rs = $dsql->ExecuteNoneQuery($inquery);
if (!$rs) GotoStaMsg("
导入文档模型时发生错误:{$dsql->GetError()} |
- |
+ |
");
$dtp = new DedeTagParse();
$dtp->SetNameSpace("field", "<", ">");
@@ -219,7 +219,7 @@ if ($dopost == "show") {
if ($islist != '') {
$allfields .= ($allfields == '' ? $fieldname : ','.$fieldname);
}
- $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql ");
+ $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql ");
}
}
if ($allfields != '') {
@@ -229,7 +229,7 @@ if ($dopost == "show") {
成功导入一个文档模型 |
- |
+ |
");
} else if ($dopost == "copysave") {
$cid = intval($cid);
@@ -289,7 +289,7 @@ if ($dopost == "show") {
$wintitle = "查看模型应用模板";
$wecome_info = "文档模型管理 - 模型应用模板";
$win = new OxWindow();
- $win->Init("", "js/blank.js", "");
+ $win->Init("", "/static/web/js/admin.blank.js", "");
$win->AddTitle("栏目".$row['typename']."默认模板文件说明");
$defaulttemplate = $cfg_templets_dir.'/'.$cfg_df_style;
$msg = "
@@ -321,14 +321,14 @@ if ($dopost == "show") {
ShowMsg("系统文档模型不允许删除", "mychannel_main.php");
exit();
}
- if (empty($job)) $job = "";
+ if (empty($job)) $job = '';
//确认提示
if ($job == "") {
require_once(DEDEINC."/libraries/oxwindow.class.php");
$wintitle = "删除指定文档模型";
$wecome_info = "文档模型管理 - 删除文档模型";
$win = new OxWindow();
- $win->Init("mychannel_edit.php", "js/blank.js", "POST");
+ $win->Init("mychannel_edit.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("job", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("id", $id);
@@ -429,7 +429,7 @@ if ($dopost == "show") {
$label = $ctag->GetAtt('itemname');
if (in_array($datatype, $searchtype)) {
$checked = in_array($value, $addonfieldsarr) ? 'checked' : '';
- $addonfields .= " ";
+ $addonfields .= " ";
}
}
}
@@ -441,7 +441,7 @@ if ($dopost == "show") {
$addonfields = '';
}
$template = trim($template);
- $forms = "
|