Kaynağa Gözat

Merge branch 'xs' into develop

tags/6.3.0
tianya 1 yıl önce
ebeveyn
işleme
de6d2c8df4
100 değiştirilmiş dosya ile 495 ekleme ve 631 silme
  1. +19
    -0
      docs/changelog.md
  2. BIN
      docs/dedebiz.png
  3. BIN
      docs/dedebiz_wechat_qr.jpg
  4. +1
    -1
      src/admin/action_search.php
  5. +6
    -6
      src/admin/ad_add.php
  6. +4
    -9
      src/admin/ad_edit.php
  7. +5
    -5
      src/admin/album_add.php
  8. +3
    -3
      src/admin/album_edit.php
  9. +3
    -3
      src/admin/archives_add.php
  10. +16
    -16
      src/admin/archives_do.php
  11. +1
    -1
      src/admin/archives_edit.php
  12. +1
    -1
      src/admin/archives_sg_add.php
  13. +1
    -1
      src/admin/archives_sg_edit.php
  14. +2
    -2
      src/admin/article_add.php
  15. +1
    -1
      src/admin/article_allowurl_edit.php
  16. +6
    -6
      src/admin/article_description_main.php
  17. +1
    -1
      src/admin/article_edit.php
  18. +1
    -1
      src/admin/article_keywords_main.php
  19. +1
    -1
      src/admin/article_keywords_select.php
  20. +6
    -6
      src/admin/article_select_sw.php
  21. +1
    -1
      src/admin/article_source_edit.php
  22. +2
    -2
      src/admin/article_writer_edit.php
  23. +1
    -1
      src/admin/cards_manage.php
  24. +1
    -1
      src/admin/cards_type.php
  25. +4
    -4
      src/admin/catalog_add.php
  26. +1
    -1
      src/admin/catalog_del.php
  27. +7
    -7
      src/admin/catalog_do.php
  28. +1
    -1
      src/admin/config.php
  29. +1
    -1
      src/admin/content_list.php
  30. +1
    -1
      src/admin/content_sg_list.php
  31. +0
    -1
      src/admin/css/albumupload.min.css
  32. +0
    -1
      src/admin/css/login.min.css
  33. +2
    -2
      src/admin/dialog/config.php
  34. +20
    -37
      src/admin/dialog/select_images.php
  35. +2
    -2
      src/admin/dialog/select_images_post.php
  36. +18
    -30
      src/admin/dialog/select_media.php
  37. +1
    -1
      src/admin/dialog/select_media_post.php
  38. +16
    -17
      src/admin/dialog/select_mimages.php
  39. +13
    -19
      src/admin/dialog/select_soft.php
  40. +22
    -40
      src/admin/dialog/select_templets.php
  41. +2
    -2
      src/admin/dialog/select_templets_post.php
  42. +3
    -3
      src/admin/diy_edit.php
  43. +17
    -9
      src/admin/diy_list.php
  44. +2
    -2
      src/admin/erraddsave.php
  45. +1
    -1
      src/admin/feedback_edit.php
  46. +5
    -5
      src/admin/feedback_main.php
  47. +5
    -5
      src/admin/file_class.php
  48. +3
    -3
      src/admin/file_manage_control.php
  49. +3
    -3
      src/admin/file_manage_main.php
  50. +9
    -9
      src/admin/file_manage_view.php
  51. +0
    -4
      src/admin/freelist_add.php
  52. +0
    -4
      src/admin/freelist_edit.php
  53. +8
    -8
      src/admin/freelist_main.php
  54. +4
    -4
      src/admin/friendlink_add.php
  55. +4
    -4
      src/admin/friendlink_edit.php
  56. +2
    -2
      src/admin/friendlink_main.php
  57. +20
    -20
      src/admin/inc/inc_action_info.php
  58. +1
    -1
      src/admin/inc/inc_admin_channel.php
  59. +18
    -20
      src/admin/inc/inc_archives_all.php
  60. +11
    -13
      src/admin/inc/inc_archives_functions.php
  61. +4
    -4
      src/admin/inc/inc_batchup.php
  62. +1
    -1
      src/admin/inc/inc_list_functions.php
  63. +9
    -9
      src/admin/inc/inc_menu.php
  64. +3
    -4
      src/admin/inc/inc_menu_func.php
  65. +3
    -3
      src/admin/inc/inc_menu_module.php
  66. +3
    -0
      src/admin/index.php
  67. +4
    -3
      src/admin/index_body.php
  68. +0
    -16
      src/admin/index_menu.php
  69. +2
    -2
      src/admin/index_testenv.php
  70. +0
    -23
      src/admin/js/search.js
  71. +0
    -53
      src/admin/js/user.js
  72. +4
    -4
      src/admin/log_edit.php
  73. +3
    -3
      src/admin/log_list.php
  74. +5
    -5
      src/admin/login.php
  75. +10
    -10
      src/admin/makehtml_homepage.php
  76. +1
    -1
      src/admin/makehtml_list_action.php
  77. +1
    -1
      src/admin/makehtml_spec.php
  78. +1
    -1
      src/admin/makehtml_taglist.php
  79. +3
    -3
      src/admin/makehtml_taglist_action.php
  80. +1
    -1
      src/admin/media_add.php
  81. +5
    -5
      src/admin/media_edit.php
  82. +1
    -1
      src/admin/media_main.php
  83. +6
    -6
      src/admin/member_do.php
  84. +1
    -1
      src/admin/member_toadmin.php
  85. +1
    -1
      src/admin/member_type.php
  86. +23
    -24
      src/admin/module_main.php
  87. +10
    -10
      src/admin/module_make.php
  88. +6
    -6
      src/admin/module_upload.php
  89. +5
    -5
      src/admin/mychannel_add.php
  90. +32
    -32
      src/admin/mychannel_edit.php
  91. +1
    -1
      src/admin/mytag_add.php
  92. +1
    -1
      src/admin/mytag_tag_guide_ok.php
  93. +2
    -2
      src/admin/plus_edit.php
  94. +12
    -12
      src/admin/search_keywords_main.php
  95. +3
    -3
      src/admin/soft_add.php
  96. +4
    -4
      src/admin/soft_edit.php
  97. +3
    -3
      src/admin/spec_add.php
  98. +3
    -3
      src/admin/spec_edit.php
  99. +2
    -2
      src/admin/sys_admin_user_add.php
  100. +6
    -6
      src/admin/sys_admin_user_edit.php

+ 19
- 0
docs/changelog.md Dosyayı Görüntüle

@@ -1,6 +1,25 @@
# 更新记录
通过访问 https://www.dedebiz.com/git 获取完整更新记录

# V6.3.0
- 再次优化后台部分代码面向对象,提高性能正确引导,致力于轻型后台系统;
- 添加后台刷新功能;
- 增强更新系统缓存功能,清理缓存文件;
- 优化后台布局细节处理并支持手机端后台部分显示;
- 优化后台和前台引用资源方便维护;
- 优化提示类说明注释文字及页面元素;
- 优化默认模板标签,新加的元素;
- 优化会员中心资料修改繁琐问题;
- 优化默认模板和插件模板;
- 优化自定义表单搜索功能,新加获取提交链接和地址及时间;
- 优化标签管理搜索功能;
- 优化动态栏目生成目录文件夹问题;
- 修正浏览器错误提示;
- 修正伪静态栏目开启绝对链接问题;
- 修正富文本的错误问题;
- 移除安装目录功能,建议用绑定目录功能;
- 其他常规问题修复;

# V6.2.12
- 增加管理员密码修改工具;
- 优化后台部分代码面向对象,提高性能正确引导,致力于打造高效、简约CMS系统;


BIN
docs/dedebiz.png Dosyayı Görüntüle

Önce Sonra
Genişlik: 1024  |  Yükseklik: 503  |  Boyut: 192KB Genişlik: 1024  |  Yükseklik: 500  |  Boyut: 104KB

BIN
docs/dedebiz_wechat_qr.jpg Dosyayı Görüntüle

Önce Sonra
Genişlik: 344  |  Yükseklik: 344  |  Boyut: 5.6KB Genişlik: 260  |  Yükseklik: 260  |  Boyut: 29KB

+ 1
- 1
src/admin/action_search.php Dosyayı Görüntüle

@@ -11,7 +11,7 @@
require_once(dirname(__FILE__)."/config.php");
require_once(dirname(__FILE__)."/actionsearch_class.php");
//添加权限检查
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
$keyword = empty($keyword) ? "" : RemoveXss($keyword);
$actsearch = new ActionSearch($keyword);
$asresult = $actsearch->Search();


+ 6
- 6
src/admin/ad_add.php Dosyayı Görüntüle

@@ -11,7 +11,7 @@
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_广告管理');
require_once DEDEINC."/typelink/typelink.class.php";
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
if ($dopost == "save") {
CheckCSRF();
//timeset tagname typeid normbody expbody
@@ -30,24 +30,24 @@ if ($dopost == "save") {
$normbody = "<a href=\"{$link}\" font-size=\"{$normbody['size']}\" color=\"{$normbody['color']}\">{$normbody['title']}</a>";
} else if ($normbody['style'] == 'img') {
if (empty($normbody['width'])) {
$width = "";
$width = '';
} else {
$width = " width=\"{$normbody['width']}\"";
}
if (empty($normbody['height'])) {
$height = "";
$height = '';
} else {
$height = "height=\"{$normbody['height']}\"";
}
$normbody = "<a href=\"{$link}\"><img src=\"{$normbody['url']}\"$width $height border=\"0\" /></a>";
$normbody = "<a href=\"{$link}\"><img src=\"{$normbody['url']}\"$width $height></a>";
} else {
if (empty($normbody['width'])) {
$width = "";
$width = '';
} else {
$width = " width=\"{$normbody['width']}\"";
}
if (empty($normbody['height'])) {
$height = "";
$height = '';
} else {
$height = "height=\"{$normbody['height']}\"";
}


+ 4
- 9
src/admin/ad_edit.php Dosyayı Görüntüle

@@ -20,18 +20,13 @@ if ($dopost == 'delete') {
exit();
} else if ($dopost == "gettag") {
require_once(DEDEINC.'/libraries/oxwindow.class.php');
$jscode = "<script src='{$cfg_phpurl}/ad_js.php?aid=$aid'></script>";
$showhtml = "<xmp>\r\n\r\n$jscode\r\n\r\n</xmp>";
$showhtml .= "<iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='360'></iframe>";
$row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' ");
$showtag = '{'."dede:myad name='{$row['tagname']}'/".'}';
$wecome_info = "<a href='ad_main.php'>广告管理</a> - 获取标签";
$tagcode = "{dede:myad name='{$row['tagname']}'/} <script src='{$cfg_phpurl}/ad_js.php?aid=$aid'></script>";
$showhtml = "<p>2种方法调用</p><xmp>$tagcode</xmp>";
$showhtml .= "<p>前台调用效果</p><iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='350'></iframe>";
$wecome_info = "<a href='ad_main.php'>广告管理</a> - 调用示例";
$win = new OxWindow();
$win->Init();
$win->AddTitle("标签调用代码");
$winform = $win->GetWindow("hand", $showtag);
$win->myWinItem = '';
$win->AddTitle("js调用代码");
$winform = $win->GetWindow("hand", $showhtml);
$win->Display();
exit();


+ 5
- 5
src/admin/album_add.php Dosyayı Görüntüle

@@ -39,16 +39,16 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (!isset($typeid2)) $typeid2 = 0;
if (!isset($autokey)) $autokey = 0;
if (!isset($remote)) $remote = 0;
if (!isset($dellink)) $dellink = 0;
if (!isset($autolitpic)) $autolitpic = 0;
if (!isset($ddisfirst)) $ddisfirst = 0;
if (!isset($albums)) $albums = "";
if (!isset($albums)) $albums = '';
if (!isset($delzip)) $delzip = 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (trim($title) == '') {
ShowMsg("文档标题不能为空", "-1");
exit();
@@ -121,7 +121,7 @@ if ($dopost != 'save') {
$ntime = time();
$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));
$fullUrl = $fullUrl.$ext;
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1]));
$info = '';
@@ -226,7 +226,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览图片文档</a><a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布图片文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改图片文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理图片文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$msg = "{$msg}".GetUpdateTest();
$wintitle = "成功发布图片文档";


+ 3
- 3
src/admin/album_edit.php Dosyayı Görüntüle

@@ -58,7 +58,7 @@ if ($dopost != 'save') {
if (!isset($remote)) $remote = 0;
if (!isset($dellink)) $dellink = 0;
if (!isset($autolitpic)) $autolitpic = 0;
if (!isset($albums)) $albums = "";
if (!isset($albums)) $albums = '';
if (!isset($formzip)) $formzip = 0;
if (!isset($ddisfirst)) $ddisfirst = 0;
if (!isset($delzip)) $delzip = 0;
@@ -195,7 +195,7 @@ if ($dopost != 'save') {
$ntime = time();
$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));
$fullUrl = $fullUrl.$ext;
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1]));
$info = '';
@@ -268,7 +268,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>浏览图片文档</a><a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布图片文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改图片文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理图片文档</a>$backurl</td>
<td align='center'><a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$wintitle = "成功修改图片文档";
$wecome_info = "文档管理 - 修改图片文档";


+ 3
- 3
src/admin/archives_add.php Dosyayı Görüntüle

@@ -42,13 +42,13 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (empty($typeid2)) $typeid2 = 0;
if (!isset($autokey)) $autokey = 0;
if (!isset($remote)) $remote = 0;
if (!isset($dellink)) $dellink = 0;
if (!isset($autolitpic)) $autolitpic = 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (trim($title) == '') {
ShowMsg("文档标题不能为空", "-1");
exit();
@@ -172,7 +172,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览自定义文档</a><a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布自定义文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改自定义文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理自定义文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$msg = "{$msg}".GetUpdateTest();
$wintitle = "成功发布自定义文档";


+ 16
- 16
src/admin/archives_do.php Dosyayı Görüntüle

@@ -33,7 +33,7 @@ if ($dopost == 'editArchives') {
$ntime = time();
$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));
$fullUrl = $fullUrl.".png";
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1]));
//加水印
@@ -149,7 +149,7 @@ else if ($dopost == "uploadLitpic") {
if (parent.document.getElementById('divpicview'))
{
parent.document.getElementById('divpicview').style.width = '150px';
parent.document.getElementById('divpicview').innerHTML = \"<img src='{$upfile}?n' width='150'>\";
parent.document.getElementById('divpicview').innerHTML = \"<img src='{$upfile}'>\";
}
</script>";
} else {
@@ -268,7 +268,7 @@ else if ($dopost == "checkArchives") {
<td class="admin-td"><input type="text" name="tmpids" class="admin-input-lg" value="<?php echo $qstr;?>"></td>
</tr>
<tr>
<td bgcolor="f5f5f5" colspan="2" align="center" class="py-2">
<td colspan="2" align="center" class="admin-td">
<button type="submit" class="btn btn-success btn-sm">保存</button>
<button type="button" onclick="HideObj('<?php echo $divname;?>');ChangeFullDiv('hide');" class="btn btn-outline-success btn-sm">关闭</button>
</td>
@@ -368,7 +368,7 @@ else if ($dopost == "delArchives") {
$wintitle = "删除指定文档";
$wecome_info = "<a href='".$ENV_GOBACK_URL."'>文档管理</a> - 删除文档";
$win = new OxWindow();
$win->Init("archives_do.php", "js/blank.js", "POST");
$win->Init("archives_do.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("qstr", $qstr);
@@ -418,13 +418,13 @@ else if ($dopost == 'clear') {
$wintitle = "清空回收站所有文档";
$wecome_info = "<a href='recycling.php'>文档回收站</a> - 清空所有文档";
$win = new OxWindow();
$win->Init("archives_do.php", "js/blank.js", "POST");
$win->Init("archives_do.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("qstr", $qstr);
$win->AddHidden("aid", $aid);
$win->AddHidden("recycle", $recycle);
$win->AddTitle("清空回收站".$num."篇文档<br>您确定删除,序号".$qstr."文档吗");
$win->AddTitle("您确定删除".$num."篇文档,序号".$qstr."文档吗");
$winform = $win->GetWindow("ok");
$win->Display();
}
@@ -456,7 +456,7 @@ else if ($dopost == 'del') {
$wintitle = "删除指定文档";
$wecome_info = "<a href='recycling.php'>文档管理</a> - 删除文档";
$win = new OxWindow();
$win->Init("archives_do.php", "js/blank.js", "POST");
$win->Init("archives_do.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("qstr", $qstr);
@@ -500,11 +500,11 @@ else if ($dopost == 'quickEdit') {
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
$dsql->Execute();
while ($trow = $dsql->GetObject()) {
if ($trow->att == 'j' || $trow->att == 'p') continue;
if ($trow->att == 'j') continue;
if (preg_match("#".$trow->att."#", $arcRow['flag']))
echo "<label class='mr-2'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked='checked'> {$trow->attname}{$trow->att}[{$trow->att}]</label>";
echo "<label><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked> {$trow->attname}{$trow->att}[{$trow->att}]</label> ";
else
echo "<label class='mr-2'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label>";
echo "<label><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> ";
}
?>
</td>
@@ -541,7 +541,7 @@ else if ($dopost == 'quickEdit') {
<td class="admin-td"><input type="text" name="keywords" id="keywords" value="<?php echo $arcRow['keywords'];?>" class="admin-input-lg"></td>
</tr>
<tr>
<td bgcolor="f5f5f5" colspan="2" align="center" class="py-2">
<td colspan="2" align="center" class="admin-td">
<button type="submit" class="btn btn-success btn-sm">保存</button>
<button type="button" onclick="HideObj('<?php echo $divname;?>');ChangeFullDiv('hide');" class="btn btn-outline-success btn-sm">关闭</button>
</td>
@@ -608,7 +608,7 @@ else if ($dopost == "makekw") {
$keywords = '';
$title = $row['title'];
$description = $row['description'];
$body = cn_substr($row['body'], 5000);
$body = cn_substr($row['body'], 3000);
$data = $client->Spliteword($title.Html2Text($body));
$keywords = $data->data;
$description = str_replace(' ', ' ', trim($description));
@@ -631,7 +631,7 @@ else if ($dopost == "makekw") {
$keywords = '';
$title = $row['title'];
$description = $row['description'];
$body = cn_substr($row['body'], 5000);
$body = cn_substr($row['body'], 3000);
$sp->SetSource($title, $cfg_soft_lang, $cfg_soft_lang);
$sp->StartAnalysis();
$titleindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex());
@@ -767,8 +767,8 @@ else if ($dopost == 'attsDlg') {
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
$dsql->Execute();
while ($trow = $dsql->GetObject()) {
if ($trow->att == 'j' || $trow->att == 'p') continue;
echo "<label class='mr-2'><input type='radio' name='flagname' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label>";
if ($trow->att == 'j') continue;
echo "<label><input type='radio' name='flagname' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> ";
}
?>
</td>
@@ -778,7 +778,7 @@ else if ($dopost == 'attsDlg') {
<td class="admin-td"><input type="text" name="tmpids" value="<?php echo $qstr;?>"></td>
</tr>
<tr>
<td bgcolor="f5f5f5" colspan="2" align="center" class="py-2">
<td colspan="2" align="center" class="admin-td">
<button type="submit" class="btn btn-success btn-sm">保存</button>
<button type="button" onclick="HideObj('<?php echo $divname;?>');ChangeFullDiv('hide');" class="btn btn-outline-success btn-sm">关闭</button>
</td>


+ 1
- 1
src/admin/archives_edit.php Dosyayı Görüntüle

@@ -157,7 +157,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览自定义文档</a><a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布自定义文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改自定义文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理自定义文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$wintitle = "成功修改自定义文档";
$wecome_info = "文档管理 - 修改自定义文档";


+ 1
- 1
src/admin/archives_sg_add.php Dosyayı Görüntüle

@@ -127,7 +127,7 @@ if ($dopost != 'save') {
ClearMyAddon($arcID, $title);
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览分类文档</a><a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布分类文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改分类文档</a><a href='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>管理分类文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$wintitle = "成功发布分类文档";
$wecome_info = "文档管理 - 发布分类文档";


+ 1
- 1
src/admin/archives_sg_edit.php Dosyayı Görüntüle

@@ -110,7 +110,7 @@ if ($dopost != 'save') {
ClearMyAddon($id, $title);
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览分类文档</a><a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布分类文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改分类文档</a><a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>管理分类文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$wintitle = "成功修改分类文档";
$wecome_info = "文档管理 - 修改分类文档";


+ 2
- 2
src/admin/article_add.php Dosyayı Görüntüle

@@ -50,7 +50,7 @@ if ($dopost != 'save') {
if (!isset($remote)) $remote = 0;
if (!isset($dellink)) $dellink = 0;
if (!isset($autolitpic)) $autolitpic = 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (trim($title) == '') {
ShowMsg("文档标题不能为空", "-1");
exit();
@@ -199,7 +199,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$msg = "{$msg}".GetUpdateTest();
$wintitle = "成功发布文档";


+ 1
- 1
src/admin/article_allowurl_edit.php Dosyayı Görüntüle

@@ -31,7 +31,7 @@ if (empty($allurls) && filesize($m_file) > 0) {
}
$wecome_info = "允许站内链接";
$win = new OxWindow();
$win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST');
$win->Init('article_allowurl_edit.php', '/static/web/js/admin.blank.js', 'POST');
$win->AddHidden('dopost', 'save');
$win->AddTitle("每行保存一个超链接");
$win->AddMsgItem("<tr><td><textarea name='allurls' id='allurls' class='admin-textarea-xl'>$allurls</textarea></td></tr>");


+ 6
- 6
src/admin/article_description_main.php Dosyayı Görüntüle

@@ -31,7 +31,7 @@ if ($dojob == '') {
//获取自动摘要
if ($dojob == 'des') {
if (empty($totalnum)) {
$addquery = "";
$addquery = '';
if ($sid != 0) {
$addquery .= " AND id>='$sid' ";
}
@@ -43,7 +43,7 @@ if ($dojob == '') {
$totalnum = $row['dd'];
}
if ($totalnum > 0) {
$addquery = "";
$addquery = '';
if ($sid != 0) {
$addquery .= " AND `#@__archives`.id>='$sid' ";
}
@@ -82,7 +82,7 @@ if ($dojob == '') {
$tjsta = "<div class='progress mb-3'><div class='progress-bar progress-bar-striped bg-success' role='progressbar' aria-valuenow='$dvlen%' aria-valuemin='0' aria-valuemax='100' style='width:$dvlen%'>$dvlen%</div></div>";
$tjsta .= "完成更新文档总数$tjlen%";
$nurl = "article_description_main.php?totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}";
ShowMsg($tjsta, $nurl, 0, 500);
ShowMsg($tjsta, $nurl);
exit();
} else {
ShowMsg('完成所有任务', 'javascript:;');
@@ -92,7 +92,7 @@ if ($dojob == '') {
//更新自动分页
if ($dojob == 'page') {
require_once(DEDEADMIN."/inc/inc_archives_functions.php");
$addquery = "";
$addquery = '';
if ($sid != 0) {
$addquery .= " and aid>='$sid' ";
}
@@ -111,7 +111,7 @@ if ($dojob == '') {
} else if (($totalnum - $startdd) > 0) {
$limitSql = " LIMIT $startdd,".($totalnum - $startdd);
} else {
$limitSql = "";
$limitSql = '';
}
$tjnum = $startdd;
if ($limitSql != "") {
@@ -143,7 +143,7 @@ if ($dojob == '') {
$tjsta .= "完成更新文档总数$tjlen%";
if ($tjnum < $totalnum) {
$nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}";
ShowMsg($tjsta, $nurl, 0, 500);
ShowMsg($tjsta, $nurl);
exit();
} else {
ShowMsg('完成所有任务', 'javascript:;');


+ 1
- 1
src/admin/article_edit.php Dosyayı Görüntüle

@@ -171,7 +171,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a>$backurl</td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$wintitle = "成功修改文档";
$wecome_info = "文档管理 - 修改文档";


+ 1
- 1
src/admin/article_keywords_main.php Dosyayı Görüntüle

@@ -81,6 +81,6 @@ $dlist->Display();
function GetSta($sta)
{
if ($sta == 1) return '';
else return 'checked="checked"';
else return 'checked';
}
?>

+ 1
- 1
src/admin/article_keywords_select.php Dosyayı Görüntüle

@@ -12,7 +12,7 @@ require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC."/datalistcp.class.php");
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
$f = RemoveXSS($f);
if (empty($keywords)) $keywords = "";
if (empty($keywords)) $keywords = '';
$sql = "SELECT * FROM `#@__keywords` ORDER BY `rank` DESC";
$dlist = new DataListCP();
$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm");


+ 6
- 6
src/admin/article_select_sw.php Dosyayı Görüntüle

@@ -14,20 +14,20 @@ header("Expires:0");
if ($t == 'source') {
$m_file = DEDEDATA."/admin/source.txt";
$allsources = file($m_file);
echo "<div class='coolbg2'><a href=\"javascript:OpenMyWin('article_source_edit.php');ClearDivCt('mysource');\" class='btn btn-success btn-sm'>设置</a><a href='javascript:;' onclick='javascript:HideObj(\"mysource\");ChangeFullDiv(\"hide\");' class='btn btn-success btn-sm'>关闭</a></div>\r\n";
echo "<div class='wsselect'>\r\n";
echo "<div class='coolbg'><a href=\"javascript:OpenMyWin('article_source_edit.php');ClearDivCt('mysource');\" class='btn btn-success btn-sm'>设置</a><a href=\"javascript:HideObj('mysource');ChangeFullDiv('hide');\" class='btn btn-success btn-sm'>关闭</a></div>\r\n";
echo "<div class='coolbg-box'>\r\n";
foreach ($allsources as $v) {
$v = trim($v);
if ($v != "") {
echo "<a href='javascript:;' onclick='javascript:PutSource(\"$v\")'>$v</a> | \r\n";
echo "<a href=\"javascript:PutSource('$v');\">$v</a> | \r\n";
}
}
echo "</div>";
} else {
//作者列表
$m_file = DEDEDATA."/admin/writer.txt";
echo "<div class='coolbg2'><a href=\"javascript:OpenMyWin('article_writer_edit.php');ClearDivCt('mywriter');\" class='btn btn-success btn-sm'>设置</a><a href='javascript:;' onclick='javascript:HideObj(\"mywriter\");ChangeFullDiv(\"hide\");' class='btn btn-success btn-sm'>关闭</a></div>\r\n";
echo "<div class='wsselect'>\r\n";
echo "<div class='coolbg'><a href=\"javascript:OpenMyWin('article_writer_edit.php');ClearDivCt('mywriter');\" class='btn btn-success btn-sm'>设置</a><a href=\"javascript:HideObj('mywriter');ChangeFullDiv('hide');\" class='btn btn-success btn-sm'>关闭</a></div>\r\n";
echo "<div class='coolbg-box'>\r\n";
if (filesize($m_file) > 0) {
$fp = fopen($m_file, 'r');
$str = fread($fp, filesize($m_file));
@@ -36,7 +36,7 @@ if ($t == 'source') {
foreach ($strs as $str) {
$str = trim($str);
if ($str != "") {
echo "<a href='javascript:;' onclick='javascript:PutWriter(\"$str\")'>$str</a> | ";
echo "<a href='javascript:PutWriter(\"$str\");'>$str</a> | ";
}
}
}


+ 1
- 1
src/admin/article_source_edit.php Dosyayı Görüntüle

@@ -31,7 +31,7 @@ if (empty($allsource) && filesize($m_file) > 0) {
}
$wecome_info = "文档来源管理";
$win = new OxWindow();
$win->Init('article_source_edit.php', 'js/blank.js', 'POST');
$win->Init('article_source_edit.php', '/static/web/js/admin.blank.js', 'POST');
$win->AddHidden('dopost', 'save');
$win->AddTitle("一行填写一个地址");
$win->AddMsgItem("<tr><td><textarea name='allsource' id='allsource' class='admin-textarea-xl'>$allsource</textarea></td></tr>");


+ 2
- 2
src/admin/article_writer_edit.php Dosyayı Görüntüle

@@ -31,9 +31,9 @@ if (empty($allwriter) && filesize($m_file) > 0) {
}
$wecome_info = "文档作者管理";
$win = new OxWindow();
$win->Init('article_writer_edit.php', 'js/blank.js', 'POST');
$win->Init('article_writer_edit.php', '/static/web/js/admin.blank.js', 'POST');
$win->AddHidden('dopost', 'save');
$win->AddTitle("作者姓名用英文逗号开");
$win->AddTitle("作者姓名用英文逗号开");
$win->AddMsgItem("<tr><td><textarea name='allwriter' id='allwriter' class='admin-textarea-xl'>$allwriter</textarea></td></tr>");
$winform = $win->GetWindow('ok');
$win->Display();

+ 1
- 1
src/admin/cards_manage.php Dosyayı Görüntüle

@@ -13,7 +13,7 @@ require_once(DEDEINC.'/datalistcp.class.php');
$dopost = empty($dopost) ? "" : $dopost;
if ($dopost == "delete") {
$ids = explode('`', $aids);
$dquery = "";
$dquery = '';
foreach ($ids as $id) {
if ($dquery == "") $dquery .= "aid='$id' ";
else $dquery .= " OR aid='$id' ";


+ 1
- 1
src/admin/cards_type.php Dosyayı Görüntüle

@@ -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;


+ 4
- 4
src/admin/catalog_add.php Dosyayı Görüntüle

@@ -137,7 +137,7 @@ if ($dopost == 'quick') {
ShowMsg("跨站调用秘钥不能为空", "-1");
exit();
}
if ($ispart != 2) {
if ($ispart != 2 && $isdefault != -1) {
//栏目的参照目录
if ($referpath == 'cmspath') $nextdir = '{cmspath}';
if ($referpath == 'basepath') $nextdir = '';
@@ -166,16 +166,16 @@ if ($dopost == 'quick') {
}
//创建目录
if ($ispart != 2) {
$true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir);
$true_typedir = str_replace("{cmspath}", "", $typedir);
$true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir);
if (!CreateDir($true_typedir)) {
ShowMsg("创建目录{$true_typedir}失败,请检查您的路径是否存在问题", "-1");
ShowMsg("创建目录{$true_typedir}失败,请检查路径是否存在问题", "-1");
exit();
}
}
$in_query = "INSERT INTO `#@__arctype` (reid,topid,sortrank,typename,cnoverview,enname,enoverview,bigpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`,`apienabled`,`apikey`) VALUES ('$reid','$topid','$sortrank','$typename','$cnoverview','$enname','$enoverview','$bigpic','$litimg','$typedir','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes','$apienabled','$apikey')";
if (!$dsql->ExecuteNoneQuery($in_query)) {
ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1");
ShowMsg("保存目录数据时失败,请检查输入资料是否存在问题", "-1");
exit();
}
UpDateCatCache();


+ 1
- 1
src/admin/catalog_del.php Dosyayı Görüntüle

@@ -29,7 +29,7 @@ $row = $dsql->GetOne();
$wintitle = "删除栏目";
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> - 删除栏目";
$win = new OxWindow();
$win->Init('catalog_del.php', 'js/blank.js', 'POST');
$win->Init('catalog_del.php', '/static/web/js/admin.blank.js', 'POST');
$win->AddHidden('id', $id);
$win->AddHidden('dopost', 'ok');
$win->AddTitle("您要确定要删除{$row['typename']}栏目吗");


+ 7
- 7
src/admin/catalog_do.php Dosyayı Görüntüle

@@ -63,7 +63,7 @@ else if ($dopost == "listArchives") {
$row = $dsql->GetOne("SELECT typename,id,mancon FROM `#@__channeltype` WHERE id='$channelid'");
$gurl = $row["mancon"];
$channelid = $row["id"];
$typename = "";
$typename = '';
$channelname = $row["typename"];
}
if (empty($gurl)) $gurl = 'content_list.php';
@@ -98,7 +98,7 @@ else if ($dopost == "upRank") {
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET sortrank='$sortrank' WHERE id='$cid'");
}
UpDateCatCache();
ShowMsg("完成操作,正在返回栏目管理", "catalog_main.php");
ShowMsg("成功更新栏目排序", "catalog_main.php");
exit();
}
//检查权限许可
@@ -114,7 +114,7 @@ else if ($dopost == "upRankAll") {
}
}
UpDateCatCache();
ShowMsg("完成操作,正在返回栏目管理", "catalog_main.php");
ShowMsg("成功更新栏目排序", "catalog_main.php");
exit();
}
//更新栏目缓存
@@ -139,7 +139,7 @@ else if ($dopost == "upcatcache") {
$doarray[$tb] = 1;
}
}
ShowMsg("完成更新,正在返回栏目管理", "catalog_main.php");
ShowMsg("成功更新栏目缓存", "catalog_main.php");
exit();
}
//获得子类的文档
@@ -156,7 +156,7 @@ else if ($dopost == "GetSunListsMenu") {
PutCookie('lastCid', $cid, 3600 * 24, "/");
$tu = new TypeUnit();
$tu->dsql = $dsql;
echo "<table width='100%'>\r\n";
echo "<table>\r\n";
$tu->LogicListAllSunType($cid, " ");
echo "</table>\r\n";
$tu->Close();
@@ -182,7 +182,7 @@ else if ($dopost == 'unitCatalog') {
$wintitle = "合并指定栏目";
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> - 合并栏目";
$win = new OxWindow();
$win->Init('catalog_do.php', 'js/blank.js', 'POST');
$win->Init('catalog_do.php', '/static/web/js/admin.blank.js', 'POST');
$win->AddHidden('dopost', 'unitCatalog');
$win->AddHidden('typeid', $typeid);
$win->AddHidden('channelid', $channelid);
@@ -231,7 +231,7 @@ else if ($dopost == 'moveCatalog') {
$wintitle = "移动指定栏目";
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> - 移动栏目";
$win = new OxWindow();
$win->Init('catalog_do.php', 'js/blank.js', 'POST');
$win->Init('catalog_do.php', '/static/web/js/admin.blank.js', 'POST');
$win->AddHidden('dopost', 'moveCatalog');
$win->AddHidden('typeid', $typeid);
$win->AddHidden('channelid', $channelid);


+ 1
- 1
src/admin/config.php Dosyayı Görüntüle

@@ -34,7 +34,7 @@ if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) {
if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') {
PutCookie('dede_csrf_token', $GLOBALS['csrf_token'], 7200, '/');
}
//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行修改这个选项
//获得当前脚本名称,如果系统被禁用了$_SERVER变量,请自行修改这个选项
$dedeNowurl = $s_scriptName = '';
$isUrlOpen = @ini_get('allow_url_fopen');
$dedeNowurl = GetCurUrl();


+ 1
- 1
src/admin/content_list.php Dosyayı Görüntüle

@@ -168,7 +168,7 @@ $dlist->SetParameter('orderby', $orderby);
$dlist->SetParameter('arcrank', $arcrank);
$dlist->SetParameter('channelid', $channelid);
$dlist->SetParameter('f', $f);
$strTimerange = "";
$strTimerange = '';
if ($stime > 0 && $etime > 0) {
$strTimerange = implode(" - ",array(MyDate("Y-m-d H:i:s",$stime),MyDate("Y-m-d H:i:s",$etime)));
$dlist->SetParameter('timerange', $strTimerange);


+ 1
- 1
src/admin/content_sg_list.php Dosyayı Görüntüle

@@ -80,7 +80,7 @@ $dlist->SetParameter("dopost", "listArchives");
$dlist->SetParameter("keyword", $keyword);
$dlist->SetParameter("cid", $cid);
$dlist->SetParameter("channelid", $channelid);
$strTimerange = "";
$strTimerange = '';
if ($stime > 0 && $etime > 0) {
$strTimerange = implode(" - ",array(MyDate("Y-m-d H:i:s",$stime),MyDate("Y-m-d H:i:s",$etime)));
$dlist->SetParameter('timerange', $strTimerange);


+ 0
- 1
src/admin/css/albumupload.min.css Dosyayı Görüntüle

@@ -1 +0,0 @@
#btnsubmit{margin:0px 0px 0px 150px}.swfupload{vertical-align:top}.message{margin:10px 0;padding:10px 20px;background:rgb(255,255,204);border:1px solid rgb(255,221,153);overflow:hidden}.picinfo{margin:10px 0;height:30px;line-height:30px}.atlas{float:left;margin-right:10px;margin-bottom:10px;width:220px;height:auto;background:#f5f5f5;text-align:center;border-radius:.5rem}.atlas-head{height:120px}.atlas-head img{margin:0;max-width:220px;max-height:120px;border-radius:.5rem .5rem 0 0!important}.atlas-input{width:220px}.atlas-box{margin:.5rem 0}.atlas-foot input[type=text]{border-radius:0 0 .5rem .5rem!important}

+ 0
- 1
src/admin/css/login.min.css Dosyayı Görüntüle

@@ -1 +0,0 @@
body{line-height:1.6;letter-spacing:0.6px;font-size:14px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#f5f5f5}a{color:#545b62}a:hover{color:#ff8400;text-decoration:none}h2{line-height:1.2;font-size:24px;color:#393d49;font-weight:600}.btn,input,select{font-size:14px!important}.admin-head{padding:1rem 0;background:#fff}.admin-nav{height:36px;line-height:36px}.admin-nav-a{padding-right:30px}.dropdown-menu{min-width:8rem;font-size:14px}.dropdown-item{padding:0 1rem;height:30px;line-height:30px;font-size:14px;color:#545b62!important}.logo,.form-control{height:36px}.login-from{margin:5rem auto;width:500px}.login-box{padding:1.25rem;background:#fff}.login-box,.form-control,.btn-md,.alert,.rounded{border-radius:.5rem!important}.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label,.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after,.input-group:not(.has-validation)>.custom-select:not(:last-child),.input-group:not(.has-validation)>.form-control:not(:last-child){border-top-right-radius:0!important;border-bottom-right-radius:0!important}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0!important;border-bottom-left-radius:0!important}#validateimg{border-radius:0 .5rem .5rem 0;cursor:pointer}#browsehappy{padding:1rem 30px;font-size:14px;color:#856404;background:#fff3cd}.browsehappy-close{float:right;font-size:14px;cursor:pointer}@media (max-width:760px){.admin-head{padding:1rem 15px}.admin-nav-a{display:none!important}.login-from{width:100%}}

+ 2
- 2
src/admin/dialog/config.php Dosyayı Görüntüle

@@ -10,7 +10,7 @@
*/
require_once(dirname(__FILE__)."/../../system/common.inc.php");
require_once(DEDEINC."/userlogin.class.php");
//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行修改这个选项
//获得当前脚本名称,如果系统被禁用了$_SERVER变量,请自行修改这个选项
$dedeNowurl = '';
$s_scriptName = '';
$isUrlOpen = @ini_get('allow_url_fopen');
@@ -25,7 +25,7 @@ if ($cuserLogin->getUserID() <= 0) {
exit();
}
$adminDirHand = HtmlReplace($adminDirHand, 1);
$gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl);
$gurl = "/../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl);
echo "<script>location='$gurl';</script>";
exit();
}

+ 20
- 37
src/admin/dialog/select_images.php Dosyayı Görüntüle

@@ -56,14 +56,14 @@ if (!empty($iseditor)) {
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>选择图片</title>
<link rel="stylesheet" href="../../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../../static/web/css/admin.css">
<script src="../../static/web/js/jquery.min.js"></script>
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
<script src="/static/web/js/jquery.min.js"></script>
</head>
<body class="body-bg">
<div class="upload-bg shadow-sm">
<table align="center" class="table icon">
<body>
<div class="upload-box">
<table class="table shadow-sm icon">
<tr>
<td colspan="3">
<form name="myform" action="select_images_post.php" method="POST" enctype="multipart/form-data">
@@ -76,7 +76,7 @@ if (!empty($iseditor)) {
<input type="hidden" name="CKEditorFuncNum" value="<?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1;?>">
<input type="hidden" name="job" value="upload">
<input type="file" name="imgfile" class="w-50">
<label><input type="checkbox" name="needwatermark" value="1" <?php if ($photo_markup == '1') echo "checked";?>> 水印</label>
<label><input type="checkbox" name="needwatermark" value="1" <?php if ($photo_markup == '1') echo 'checked';?>> 水印</label>
<label><input type="checkbox" name="resize" value="1"> 缩小</label>
<label>宽:<input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" class="admin-input-xs"></label>
<label>高:<input type="text" name="iheight" value="<?php echo $cfg_ddimg_height ?>" class="admin-input-xs"></label>
@@ -94,8 +94,8 @@ if (!empty($iseditor)) {
</tr>
<?php
$dh = scandir($inpath);
$ty1 = "";
$ty2 = "";
$ty1 = '';
$ty2 = '';
foreach ($dh as $file) {
//计算文件大小和创建时间
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) {
@@ -117,7 +117,7 @@ if (!empty($iseditor)) {
if ($activepath == "") continue;
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath);
$line = "<tr>
<td colspan='2'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='../../static/web/img/icon_dir2.png'>上级目录</a></td>
<td colspan='2'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td>
<td>当前目录:$activepath</td>
</tr>";
echo $line;
@@ -125,19 +125,18 @@ if (!empty($iseditor)) {
if (preg_match("#^_(.*)$#i", $file)) continue;
if (preg_match("#^\.(.*)$#i", $file)) continue;
$line = "<tr>
<td colspan='3'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'><img src='../../static/web/img/icon_dir.png'>$file</a></td>
<td colspan='3'><a href='select_images.php?imgstick=$imgstick&v=$v&f=$f&activepath=".urlencode("$activepath/$file").$addparm."'><img src='/static/web/img/icon_dir.png'> $file</a></td>
</tr>";
echo "$line";
} else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) {
$reurl = "$activeurl/$file";
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
if ($file == $comeback) $lstyle = "text-danger";
else $lstyle = '';
$line = "<tr>
<td>
<a href=\"$reurl\" class=\"toolimg\"><img src='$reurl' title='$file'></a>
<a href=\"javascript:;\" onclick=\"ReturnImg('$reurl');\" $lstyle>$file</a>
<a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a>
</td>
<td>$filesize KB</td>
<td>$filetime</td>
@@ -147,13 +146,10 @@ if (!empty($iseditor)) {
$reurl = "$activeurl/$file";
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
if ($file == $comeback) $lstyle = "text-danger";
else $lstyle = '';
$line = "<tr>
<td>
<a href=\"$reurl\" class=\"toolimg\"><img src='$reurl' title='$file'></a>
<a href=\"javascript:;\" onclick=\"ReturnImg('$reurl');\" $lstyle>$file</a>
</td>
<td><a href='$reurl' onclick=\"ReturnImg('$reurl');\" class=\"tipsimg $lstyle\"><img src='$reurl' title='$file'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
@@ -168,11 +164,6 @@ if (!empty($iseditor)) {
function nullLink() {
return;
}
function TNav() {
if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE';
else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF';
else return "OT";
}
//获取地址参数
function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i');
@@ -193,14 +184,6 @@ if (!empty($iseditor)) {
if (window.opener.document.<?php echo $f ?> != null) {
window.opener.document.<?php echo $f ?>.value = reimg;
if (window.opener.document.getElementById('div<?php echo $v ?>')) {
if (TNav() == 'IE') {
//window.opener.document.getElementById('div<?php echo $v ?>').filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = reimg;
window.opener.document.getElementById('div<?php echo $v ?>').src = reimg;
window.opener.document.getElementById('div<?php echo $v ?>').style.width = '150px';
window.opener.document.getElementById('div<?php echo $v ?>').style.height = '100px';
} else
window.opener.document.getElementById('div<?php echo $v ?>').style.backgroundImage = "url(" + reimg + ")";
} else if (window.opener.document.getElementById('<?php echo $v ?>')) {
window.opener.document.getElementById('<?php echo $v ?>').src = reimg;
}
//适配新的缩略图
@@ -217,8 +200,8 @@ if (!empty($iseditor)) {
}
$(function() {
var x = 10;
var y = 20;
$("a.toolimg").mouseover(function(e) {
var y = 10;
$(".tipsimg").mouseover(function(e) {
var toolimg = "<div id='toolimg'><img src='" + this.href + "'></div>";
$("body").append(toolimg);
$("#toolimg").css({


+ 2
- 2
src/admin/dialog/select_images_post.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 选择图片发送
* 选择图片操作
*
* @version $id:select_images_post.php 9:43 2010年7月8日 tianya $
* @package DedeBIZ.Dialog
@@ -44,7 +44,7 @@ if (!is_dir($cfg_basedir.$activepath."/$mdir")) {
MkdirAll($cfg_basedir.$activepath."/$mdir", $cfg_dir_purview);
}
$iseditor = isset($iseditor)? intval($iseditor) : 0;
$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(100, 999));
$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(1000, 6000));
$filename = $mdir.'/'.$filename_name;
$fs = explode('.', $imgfile_name);
$filename = $filename.'.'.$fs[count($fs) - 1];


+ 18
- 30
src/admin/dialog/select_media.php Dosyayı Görüntüle

@@ -46,13 +46,13 @@ if (!empty($noeditor)) {
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>选择多媒体</title>
<link rel="stylesheet" href="../../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../../static/web/css/admin.css">
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
</head>
<body class="body-bg">
<div class="upload-bg shadow-sm">
<table align="center" class="table icon">
<body>
<div class="upload-box">
<table class="table shadow-sm icon">
<tr>
<td colspan="3">
<form name="myform" action="select_media_post.php" method="POST" enctype="multipart/form-data">
@@ -73,8 +73,8 @@ if (!empty($noeditor)) {
</tr>
<?php
$dh = scandir($inpath);
$ty1 = "";
$ty2 = "";
$ty1 = '';
$ty2 = '';
foreach ($dh as $file) {
//计算文件大小和创建时间
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) {
@@ -97,7 +97,7 @@ if (!empty($noeditor)) {
if ($activepath == "") continue;
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath);
$line = "<tr>
<td><a href='select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='../../static/web/img/icon_dir2.png'>上级目录</a></td>
<td><a href='select_media.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td>
<td colspan='2'>当前目录:$activepath</td>
</tr>";
echo $line;
@@ -105,7 +105,7 @@ if (!empty($noeditor)) {
if (preg_match("#^_(.*)$#i", $file)) continue;
if (preg_match("#^\.(.*)$#i", $file)) continue;
$line = "<tr>
<td colspan='3'><a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='../../static/web/img/icon_dir.png'>$file</a></td>
<td colspan='3'><a href=select_media.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td>
</tr>";
echo "$line";
} else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) {
@@ -113,12 +113,9 @@ if (!empty($noeditor)) {
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$line = "<tr>
<td>
<img src='../../static/web/img/icon_flash.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_flash.png'> $file</a></td>
<td>$filesize KB</td>
<td align='center'>$filetime</td>
</tr>";
@@ -128,12 +125,9 @@ if (!empty($noeditor)) {
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$line = "<tr>
<td>
<img src='../../static/web/img/icon_video.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_video.png'> $file</a></td>
<td>$filesize KB</td>
<td align='center'>$filetime</td>
</tr>";
@@ -143,12 +137,9 @@ if (!empty($noeditor)) {
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$line = "<tr>
<td>
<img src='../../static/web/img/icon_rm.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_rm.png'> $file</a></td>
<td>$filesize KB</td>
<td align='center'>$filetime</td>
</tr>";
@@ -158,12 +149,9 @@ if (!empty($noeditor)) {
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$line = "<tr>
<td>
<img src='../../static/web/img/icon_music.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_music.png'> $file</a></td>
<td>$filesize KB</td>
<td align='center'>$filetime</td>
</tr>";


+ 1
- 1
src/admin/dialog/select_media_post.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 选择多媒体发送
* 选择多媒体操作
*
* @version $id:select_media_post.php 9:43 2010年7月8日 tianya $
* @package DedeBIZ.Dialog


+ 16
- 17
src/admin/dialog/select_mimages.php Dosyayı Görüntüle

@@ -12,15 +12,14 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>插入多图</title>
<link rel="stylesheet" href="../../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../../static/web/css/admin.css">
<style>#wrap{padding:10px}#topbar{padding:10px 0;border-bottom:1px solid #ccc;text-align:right}#file_list{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));padding-top:10px}#file_list:empty:after{content:'拖拽图片到此处上传'}#file_list li{display:block;position:relative;padding:10px;vertical-align:top;border-radius:.5rem}#file_list li:hover{background:#f5f5f5}#file_list li .picbox{display:flex;flex:0 0 auto;position:relative;padding-top:90%;width:100%;align-items:center;justify-content:center;overflow:hidden}#file_list li .picbox img{display:block;max-width:100%;max-height:100%;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);border-radius:.5rem}#file_list li .namebox{display:flex;padding:10px;justify-content:center;align-items:flex-start}#file_list li.up-over .picbox:after{position:absolute;bottom:10px;right:0;font-family:'FontAwesome';font-size:18px;color:#1eb867;content:'\f058';z-index:9}#file_list li .tools{display:none;position:absolute;bottom:12px;right:10px;z-index:99}#file_list li:hover .tools{display:block}#file_list li .tools .remove{cursor:pointer}#file_list li .tools .remove:after{font-family:'FontAwesome';font-size:18px;color:#dc3545;content:'\f1f8'}</style>
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
</head>
<body>
<div id="wrap">
<div id="topbar">
<label class="mr-2"><input type="checkbox" name="isWater" id="isWater" <?php if ($photo_markup == '1') echo "checked";?>> 是否水印</label>
<label><input type="checkbox" name="isWater" id="isWater" <?php if ($photo_markup == '1') echo 'checked';?>> 是否水印</label>
<button class="btn btn-success btn-sm addfile">添加图片</button>
<button class="btn btn-success btn-sm removeall">清空图片</button>
<button class="btn btn-success btn-sm upall">全部上传</button>
@@ -58,8 +57,8 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
var upload_base_path = axupimgs.images_upload_base_path;
//为列表添加排序
function reSort() {
document.querySelectorAll('#file_list li').forEach((el,i) => {
el.setAttribute('data-num',i);
document.querySelectorAll('#file_list li').forEach((el, i) => {
el.setAttribute('data-num', i);
});
}
function isFileImage(file) {
@@ -86,9 +85,9 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
//reSort();
}
//清空列表
document.querySelector('#topbar .removeall').addEventListener('click',() => {
document.querySelector('#topbar .removeall').addEventListener('click', () => {
axupimgs.res=[]
document.querySelectorAll('#file_list li').forEach((el,i) => {
document.querySelectorAll('#file_list li').forEach((el, i) => {
el.parentNode.removeChild(el)
});
});
@@ -125,7 +124,7 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
}
});
//添加文件
document.querySelector('#topbar .addfile').addEventListener('click',() => {
document.querySelector('#topbar .addfile').addEventListener('click', () => {
var input = document.createElement('input');
input.setAttribute('type', 'file');
input.setAttribute('multiple', 'multiple');
@@ -144,7 +143,7 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
file_i=0;
document.querySelector('#topbar .upall').innerText='全部上传';
//返回
axupimgs.res.forEach((v,k) => {
axupimgs.res.forEach((v, k) => {
let addonHTML = `<img src='${v.url}'>`;
window.opener.CKEDITOR.instances["<?php echo $f ?>"].insertHtml(addonHTML);
})
@@ -157,7 +156,7 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
} else {
blobInfo.file=axupimgs.res[n].file;
blobInfo.isWater = document.querySelector('#isWater').checked;
upload_handler(blobInfo,function(url) {
upload_handler(blobInfo, function(url) {
if (upload_base_path) {
if (upload_base_path.slice(-1)=='/' && url.substr(0,1)=='/') {
url = upload_base_path + url.slice(1);
@@ -183,27 +182,27 @@ include(DEDEDATA.'/mark/inc_photowatermark_config.php');
});
}
}
document.querySelector('#topbar .upall').addEventListener('click',(e) => {
document.querySelector('#topbar .upall').addEventListener('click', (e) => {
if (e.target.innerText!='全部上传') {
return false;
}
if (axupimgs.res.length > 0) {
document.querySelectorAll('#file_list li.up-no').forEach((el,i) => {
document.querySelectorAll('#file_list li.up-no').forEach((el, i) => {
el.classList ? el.classList.add('up-now') : el.className+=' up-now';
});
e.target.innerText='上传中';
upAllFiles(0);
}
});
var observ_flist = new MutationObserver( (muList,observe) => {
var observ_flist = new MutationObserver( (muList, observe) => {
if (muList[0].addedNodes.length > 0) {
muList[0].addedNodes.forEach((el) => {
el.querySelector('.remove').addEventListener('click',(e) => {
el.querySelector('.remove').addEventListener('click', (e) => {
var li = e.target.parentNode.parentNode;
var n = li.getAttribute('data-num');
var el = document.querySelectorAll('#file_list li')[n];
el.parentNode.removeChild(el);
axupimgs.res.splice(n,1);
axupimgs.res.splice(n, 1);
});
});
}


+ 13
- 19
src/admin/dialog/select_soft.php Dosyayı Görüntüle

@@ -46,13 +46,13 @@ if (!empty($noeditor)) {
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>选择软件</title>
<link rel="stylesheet" href="../../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../../static/web/css/admin.css">
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
</head>
<body class="body-bg">
<div class="upload-bg shadow-sm">
<table align="center" class="table icon">
<body>
<div class="upload-box">
<table class="table shadow-sm icon">
<tr>
<td colspan="3">
<form name="myform" action="select_soft_post.php" method="POST" enctype="multipart/form-data">
@@ -76,7 +76,7 @@ if (!empty($noeditor)) {
</tr>
<?php
$dh = scandir($inpath);
$ty1 = $ty2 = "";
$ty1 = $ty2 = '';
foreach ($dh as $file) {
//计算文件大小和创建时间
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) {
@@ -99,7 +99,7 @@ if (!empty($noeditor)) {
if ($activepath == "") continue;
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath);
$line = "<tr>
<td><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='../../static/web/img/icon_dir2.png'>上级目录</a></td>
<td><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td>
<td colspan='2'>当前目录:$activepath</td>
</tr>\r\n";
echo $line;
@@ -107,20 +107,17 @@ if (!empty($noeditor)) {
if (preg_match("#^_(.*)$#i", $file)) continue;
if (preg_match("#^\.(.*)$#i", $file)) continue;
$line = "<tr>
<td colspan='3'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='../../static/web/img/icon_dir.png'>$file</a></td>
<td colspan='3'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='/static/web/img/icon_dir.png'> $file</a></td>
</tr>";
echo "$line";
} else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
$line = "<tr>
<td>
<img src='../../static/web/img/icon_zip.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_zip.png'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
@@ -132,10 +129,7 @@ if (!empty($noeditor)) {
$reurl = preg_replace("#^\.\.#", "", $reurl);
$reurl = $reurl;
$line = "<tr>
<td>
<img src='../../static/web/img/icon_exe.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_exe.png'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
@@ -155,7 +149,7 @@ if (!empty($noeditor)) {
window.opener.CKEDITOR.tools.callFunction(funcNum, reimg);
}
if (typeof window.opener.CKEDITOR.instances["<?php echo $f ?>"] !== "undefined") {
let addonHTML = `<a href='${reimg}' target='_blank'><img src='<?php echo $cfg_cmspath ?>/static/web/img/icon_addon.png'>附件:${reimg}</a>`;
let addonHTML = `<a href='${reimg}' target='_blank'><img src='/static/web/img/icon_addon.png'> 附件:${reimg}</a>`;
window.opener.CKEDITOR.instances["<?php echo $f ?>"].insertHtml(addonHTML);
}
if (window.opener.document.<?php echo $f ?> != null) {


+ 22
- 40
src/admin/dialog/select_templets.php Dosyayı Görüntüle

@@ -37,13 +37,13 @@ if (empty($comeback)) {
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>选择模板</title>
<link rel="stylesheet" href="../../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../../static/web/css/admin.css">
<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
</head>
<body class="body-bg">
<div class="upload-bg shadow-sm">
<table align="center" class="table icon">
<body >
<div class="upload-box">
<table class="table shadow-sm icon">
<tr>
<td colspan="3">
<form name="myform" action="select_templets_post.php" method="POST" enctype="multipart/form-data">
@@ -63,8 +63,8 @@ if (empty($comeback)) {
</tr>
<?php
$dh = scandir($inpath);
$ty1 = "";
$ty2 = "";
$ty1 = '';
$ty2 = '';
foreach ($dh as $file) {
//计算文件大小和创建时间
if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) {
@@ -87,7 +87,7 @@ if (empty($comeback)) {
if ($activepath == "") continue;
$tmp = preg_replace("#[\/][^\/]*$#", "", $activepath);
$line = "<tr>
<td><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='../../static/web/img/icon_dir2.png'>上级目录</a></td>
<td><a href='select_templets.php?f=$f&activepath=".urlencode($tmp)."'><img src='/static/web/img/icon_dir2.png'> 上级目录</a></td>
<td colspan='2'>当前目录:$activepath</td>
</tr>\r\n";
echo $line;
@@ -95,95 +95,77 @@ if (empty($comeback)) {
if (preg_match("#^_(.*)$#i", $file)) continue;
if (preg_match("#^\.(.*)$#i", $file)) continue;
$line = "<tr>
<td colspan='3'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='../../static/web/img/icon_dir.png'>$file</a></td>
<td colspan='3'><a href=select_templets.php?f=$f&activepath=".urlencode("$activepath/$file")."><img src='/static/web/img/icon_dir.png'> $file</a></td>
</tr>";
echo "$line";
} else if (preg_match("#\.(htm|html)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#\.\.#", "", $reurl);
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl);
$line = "<tr>
<td>
<img src='../../static/web/img/icon_htm.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_htm.png'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
echo "$line";
} else if (preg_match("#\.(css)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#\.\.#", "", $reurl);
$reurl = preg_replace("#".$templetdir."/#", "", $reurl);
$line = "<tr>
<td>
<img src='../../static/web/img/icon_css.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_css.png'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
echo "$line";
} else if (preg_match("#\.(js)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#\.\.#", "", $reurl);
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl);
$line = "<tr>
<td>
<img src='../../static/web/img/icon_js.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_js.png'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
echo "$line";
} else if (preg_match("#\.(jpg)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#\.\.#", "", $reurl);
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl);
$line = "<tr>
<td>
<img src='$reurl'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
echo "$line";
} else if (preg_match("#\.(gif|png)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#\.\.#", "", $reurl);
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl);
$line = "<tr>
<td>
<img src='$reurl'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='$reurl'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td>
</tr>";
echo "$line";
} else if (preg_match("#\.(txt)#i", $file)) {
if ($file == $comeback) $lstyle = "class='text-danger'";
else $lstyle = "";
else $lstyle = '';
$reurl = "$activeurl/$file";
$reurl = preg_replace("#\.\.#", "", $reurl);
$reurl = preg_replace("#".$templetdir."\/#", "", $reurl);
$line = "<tr>
<td>
<img src='../../static/web/img/icon_text.png'>
<a href=\"javascript:ReturnValue('$reurl');\" $lstyle>$file</a>
</td>
<td><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='/static/web/img/icon_text.png'> $file</a></td>
<td>$filesize KB</td>
<td>$filetime</td></tr>";
echo "$line";


+ 2
- 2
src/admin/dialog/select_templets_post.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 选择模板发送
* 选择模板操作
*
* @version $id:select_templets_post.php 9:43 2010年7月8日 tianya $
* @package DedeBIZ.Dialog
@@ -11,7 +11,7 @@
require_once(dirname(__FILE__)."/config.php");
$cfg_txttype = "htm|html|tpl|txt";
if (empty($uploadfile)) {
$uploadfile = "";
$uploadfile = '';
}
if (!is_uploaded_file($uploadfile)) {
ShowMsg("您没有选择上传文件", "-1");


+ 3
- 3
src/admin/diy_edit.php Dosyayı Görüntüle

@@ -12,7 +12,7 @@ require_once(dirname(__FILE__)."/config.php");
CheckPurview('c_Edit');
require_once(DEDEINC."/dedetag.class.php");
require_once(DEDEINC."/libraries/oxwindow.class.php");
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
$diyid = (empty($diyid) ? 0 : intval($diyid));
if ($dopost == "save") {
$public = isset($public) && is_numeric($public) ? $public : 0;
@@ -25,13 +25,13 @@ if ($dopost == "save") {
@set_time_limit(0);
CheckPurview('c_Del');
$row = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid='$diyid'");
if (empty($job)) $job = "";
if (empty($job)) $job = '';
//确认提示
if ($job == "") {
$wintitle = "删除所有自定义表";
$wecome_info = "<a href='diy_main.php'>自定义表单管理</a> - 删除自定义表单";
$win = new OxWindow();
$win->Init("diy_edit.php", "js/blank.js", "POST");
$win->Init("diy_edit.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("job", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("diyid", $diyid);


+ 17
- 9
src/admin/diy_list.php Dosyayı Görüntüle

@@ -13,7 +13,7 @@ CheckPurview('c_New');
$diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0;
$action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete', 'excel')) ? $action : '';
if (empty($diyid)) {
showMsg("操作失败", 'javascript:;');
showMsg('操作失败', '-1');
exit();
}
require_once DEDEINC.'/diyform.class.php';
@@ -27,13 +27,13 @@ if ($action == 'post') {
$dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash);
if (!empty($dede_fields)) {
if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) {
showMsg("数据校验不对,程序返回", '-1');
showMsg('数据校验不对', '-1');
exit();
}
}
$diyform = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid=$diyid");
if (!is_array($diyform)) {
showmsg("表单不存在,程序返回", '-1');
showmsg('表单不存在', '-1');
exit();
}
$addvar = $addvalue = '';
@@ -67,11 +67,19 @@ if ($action == 'post') {
}
} else if ($action == 'list') {
include_once DEDEINC.'/datalistcp.class.php';
$query = "SELECT * FROM {$diy->table} ORDER BY id DESC";
if (empty($keyword)) {
$keyword = '';
$addquery = '';
} else {
$addquery = " WHERE {$field} LIKE '%".trim($keyword)."%' ";
}
$query = "SELECT * FROM {$diy->table} $addquery ORDER BY id DESC";
$datalist = new DataListCP();
$datalist->pagesize = 30;
$datalist->SetParameter('action', 'list');
$datalist->SetParameter('diyid', $diyid);
$datalist->SetParameter('keyword', $keyword);
$datalist->SetParameter('field', $field);
$datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm');
$datalist->SetSource($query);
$fieldlist = $diy->getFieldList();
@@ -80,13 +88,13 @@ if ($action == 'post') {
if (empty($do)) {
$id = isset($id) && is_numeric($id) ? $id : 0;
if (empty($id)) {
showMsg('操作失败,未指定id', 'javascript:;');
showMsg('操作失败,未指定id', '-1');
exit();
}
$query = "SELECT * FROM {$diy->table} WHERE id=$id";
$row = $dsql->GetOne($query);
if (!is_array($row)) {
showmsg("您浏览的记录不存在或未审核", '-1');
showmsg('您浏览的记录不存在或待审核', '-1');
exit();
}
$postform = $diy->getForm('edit', $row, 'admin');
@@ -99,7 +107,7 @@ if ($action == 'post') {
$diyform = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid=$diyid");
$diyco = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'");
if (!is_array($diyform)) {
showmsg("表单不存在,程序返回", '-1');
showmsg("表单不存在", '-1');
exit();
}
$addsql = '';
@@ -193,12 +201,12 @@ if ($action == 'post') {
{
echo "<td>".$arr[$key]."</td>";
}
$status = $arr['ifcheck'] == 1 ? '已审核' : '审核';
$status = $arr['ifcheck'] == 1 ? '已审核' : '审核';
echo "<td>".$status."</td>";
echo "</tr>";
}
echo "</table>";
} else {
showmsg('未定义操作', "-1");
showmsg('未定义操作', '-1');
}
?>

+ 2
- 2
src/admin/erraddsave.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 文档错误管理
* 挑错管理
*
* @version $id:erraddsave.php 19:09 2010年7月12日 tianya $
* @package DedeBIZ.Administrator
@@ -74,7 +74,7 @@ if ($dopost == "delete") {
$wintitle = "删除文档错误";
$wecome_info = "<a href='erraddsave.php'>错误管理</a> - 删除错误";
$win = new OxWindow();
$win->Init("erraddsave.php", "js/blank.js", "POST");
$win->Init("erraddsave.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("id", $id);


+ 1
- 1
src/admin/feedback_edit.php Dosyayı Görüntüle

@@ -12,7 +12,7 @@ require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_Feedback');
$id = isset($id) && is_numeric($id) ? $id : 0;
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "feedback_main.php" : $_COOKIE['ENV_GOBACK_URL'];
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
if ($dopost == 'edit') {
$msg = cn_substrR($msg, 3500);
$adminmsg = trim($adminmsg);


+ 5
- 5
src/admin/feedback_main.php Dosyayı Görüntüle

@@ -16,7 +16,7 @@ require_once(DEDEINC."/typelink/typelink.class.php");
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
function IsCheck($st)
{
return $st == 1 ? '<span class="btn btn-success btn-sm">已审核</span>' : '<span class="btn btn-warning btn-sm">未审核</span>';
return $st==1 ? '已审核' : '待审核';
}
function jsTrimjajx($str, $len)
{
@@ -31,7 +31,7 @@ function jsTrimjajx($str, $len)
if (!empty($job)) {
$ids = preg_replace("#[^0-9,]#", '', $fid);
if (empty($ids)) {
ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL'], 0, 500);
ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL']);
exit;
}
} else {
@@ -48,7 +48,7 @@ function UpdateReplycount($id)
if ($job == 'del') {
$query = "DELETE FROM `#@__feedback` WHERE id IN($ids) ";
$dsql->ExecuteNoneQuery($query);
ShowMsg("成功删除指定的评论", $_COOKIE['ENV_GOBACK_URL'], 0, 500);
ShowMsg("成功删除指定的评论", $_COOKIE['ENV_GOBACK_URL']);
exit();
}
//删除相同IP的所有评论
@@ -63,7 +63,7 @@ else if ($job == 'delall') {
$query = "DELETE FROM `#@__feedback` WHERE $ips ";
$dsql->ExecuteNoneQuery($query);
}
ShowMsg("删除所有相同地址评论", $_COOKIE['ENV_GOBACK_URL'], 0, 500);
ShowMsg("删除所有相同地址评论", $_COOKIE['ENV_GOBACK_URL']);
exit();
}
//审核评论
@@ -76,7 +76,7 @@ else if ($job == 'check') {
while ($row = $dsql->GetArray()) {
UpdateReplycount($row['fid']);
}
ShowMsg("成功审核指定评论", $_COOKIE['ENV_GOBACK_URL'], 0, 500);
ShowMsg("成功审核指定评论", $_COOKIE['ENV_GOBACK_URL']);
exit();
}
//浏览评论


+ 5
- 5
src/admin/file_class.php Dosyayı Görüntüle

@@ -11,8 +11,8 @@ if (!defined('DEDEINC')) exit ('dedebiz');
*/
class FileManagement
{
var $baseDir = "";
var $activeDir = "";
var $baseDir = '';
var $activeDir = '';
//是否允许文件管理器删除目录,默认为不允许0,如果希望管理整个目录,请把值设为1
var $allowDeleteDir = 0;
//初始化系统
@@ -81,14 +81,14 @@ class FileManagement
copy($oldfile, $truepath."/$mfile");
}
unlink($oldfile);
ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath", 0, 1000);
ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath");
return 1;
} else {
ShowMsg("移动文件".$oldfile." - ".$truepath."/".$mfile."失败", "file_manage_main.php?activepath=$mpath", 0, 1000);
ShowMsg("移动文件".$oldfile." - ".$truepath."/".$mfile."失败", "file_manage_main.php?activepath=$mpath");
return 0;
}
} else {
ShowMsg("您移动的路径不合法", "-1", 0, 5000);
ShowMsg("您移动的路径不合法", "-1");
return 0;
}
}


+ 3
- 3
src/admin/file_manage_control.php Dosyayı Görüntüle

@@ -14,7 +14,7 @@ require(DEDEINC."/libraries/oxwindow.class.php");
require_once(DEDEADMIN.'/file_class.php');
$activepath = str_replace("..", "", $activepath);
$activepath = preg_replace("#^\/{1,}#", "/", $activepath);
if ($activepath == "/") $activepath = "";
if ($activepath == "/") $activepath = '';
if ($activepath == "") $inpath = $cfg_basedir;
else $inpath = $cfg_basedir.$activepath;
$files = json_decode(file_get_contents(DEDEDATA.'/admin/files.txt'));
@@ -154,7 +154,7 @@ else if ($fmdo == "space") {
$totalkb = $space->setkb($total);
$totalmb = $space->setmb($total);
$win = new OxWindow();
$win->Init("", "js/blank.js", "POST");
$win->Init("", "/static/web/js/admin.blank.js", "POST");
$win->AddMsgItem("<tr>
<td>
<span>$totalkb</span>KB<br>
@@ -163,7 +163,7 @@ else if ($fmdo == "space") {
</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='file_manage_main.php';\">文件管理器</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='file_manage_main.php';\">文件管理器</button></td>
</tr>");
$winform = $win->GetWindow("");
$win->Display();


+ 3
- 3
src/admin/file_manage_main.php Dosyayı Görüntüle

@@ -10,15 +10,15 @@
*/
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_文件管理器');
if (!isset($activepath)) $activepath = DEDEBIZ_SAFE_MODE? $cfg_medias_dir : $cfg_cmspath;
$inpath = "";
if (!isset($activepath)) $activepath = DEDEBIZ_SAFE_MODE? $cfg_medias_dir : '/';
$inpath = '';
$activepath = str_replace("..", "", $activepath);
$activepath = preg_replace("#^\/{1,}#", "/", $activepath);
if (DEDEBIZ_SAFE_MODE && !preg_match("#^/static#",$activepath)) {
ShowMsg("安全模式下仅允许查看修改static目录文档", -1);
exit;
}
if ($activepath == "/") $activepath = "";
if ($activepath == "/") $activepath = '';
if ($activepath == "") $inpath = $cfg_basedir;
else $inpath = $cfg_basedir.$activepath;
$activeurl = $activepath;


+ 9
- 9
src/admin/file_manage_view.php Dosyayı Görüntüle

@@ -13,7 +13,7 @@ CheckPurview('plus_文件管理器');
require_once(DEDEINC."/libraries/oxwindow.class.php");
$activepath = str_replace("..", "", $activepath);
$activepath = preg_replace("#^\/{1,}#", "/", $activepath);
if ($activepath == "/") $activepath = "";
if ($activepath == "/") $activepath = '';
if ($activepath == "") $inpath = $cfg_basedir;
else $inpath = $cfg_basedir.$activepath;
//修改文件名
@@ -23,7 +23,7 @@ if ($fmdo == "rename") {
$wintitle = "修改指定文件名称";
$wecome_info = "<a href='file_manage_main.php?activepath=$activepath'>文件管理</a> - 修改文件名称";
$win = new OxWindow();
$win->Init("file_manage_control.php", "js/blank.js", "POST");
$win->Init("file_manage_control.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", $fmdo);
$win->AddHidden("activepath", $activepath);
$win->AddHidden("filename", $filename);
@@ -40,7 +40,7 @@ else if ($fmdo == "newdir") {
$wintitle = "新建文件目录";
$wecome_info = "<a href='file_manage_main.php?activepath=$activepath'>文件管理</a> - 新建目录";
$win = new OxWindow();
$win->Init("file_manage_control.php", "js/blank.js", "POST");
$win->Init("file_manage_control.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", $fmdo);
$win->AddHidden("activepath", $activepath);
$win->AddHidden("token", make_hash());
@@ -54,11 +54,11 @@ else if ($fmdo == "move") {
$wintitle = "移动指定文件";
$wecome_info = "<a href='file_manage_main.php?activepath=$activepath'>文件管理</a> - 移动文件</a>";
$win = new OxWindow();
$win->Init("file_manage_control.php", "js/blank.js", "POST");
$win->Init("file_manage_control.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", $fmdo);
$win->AddHidden("activepath", $activepath);
$win->AddHidden("filename", $filename);
$win->AddTitle("新位置前面不加'/'表示相对于当前位置,加'/'表示相对于根目录");
$win->AddTitle("新位置前面不加斜杆/表示相对于当前位置,加斜杆/表示相对于根目录");
$win->AddItem("被移动文件:", $filename);
$win->AddItem("当前位置:", $activepath);
$win->AddItem("新位置:", "<input type='input' name='newpath' id='newpath' class='admin-input-md'>");
@@ -70,7 +70,7 @@ else if ($fmdo == "del") {
$wintitle = "删除指定文件";
$wecome_info = "<a href='file_manage_main.php?activepath=$activepath'>文件管理</a> - 删除文件";
$win = new OxWindow();
$win->Init("file_manage_control.php", "js/blank.js", "POST");
$win->Init("file_manage_control.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("fmdo", $fmdo);
$win->AddHidden("activepath", $activepath);
$win->AddHidden("filename", $filename);
@@ -87,12 +87,12 @@ else if ($fmdo == "del") {
//修改文件
else if ($fmdo == "edit") {
if (!isset($backurl)) {
$backurl = "";
$backurl = '';
}
$activepath = str_replace("..", "", $activepath);
$filename = str_replace("..", "", $filename);
$file = "$cfg_basedir$activepath/$filename";
$content = "";
$content = '';
if (is_file($file)) {
$fp = fopen($file, "r");
$content = fread($fp, filesize($file));
@@ -117,7 +117,7 @@ else if ($fmdo == "edit") {
}
//新建文件
else if ($fmdo == "newfile") {
$content = "";
$content = '';
$GLOBALS['filename'] = "newfile.txt";
$GLOBALS['extension'] = 'text/html';
$contentView = "<textarea id='str' name='str' class='admin-textarea-xl'></textarea>\r\n";


+ 0
- 4
src/admin/freelist_add.php Dosyayı Görüntüle

@@ -24,10 +24,6 @@ if (empty($dopost)) {
ShowMsg("请输入自由列表标题", "-1");
exit();
}
if (empty($channel)) {
showmsg("请选择一个限定模型", "-1");
exit();
}
if (is_array($types)) {
foreach ($types as $v) $ntype .= $v.' ';
}


+ 0
- 4
src/admin/freelist_edit.php Dosyayı Görüntüle

@@ -30,10 +30,6 @@ if (empty($dopost)) {
ShowMsg("请输入自由列表标题", "-1");
exit();
}
if (empty($channel)) {
showmsg("请选择一个限定模型", "-1");
exit();
}
if (is_array($types)) {
foreach ($types as $v) $ntype .= $v.' ';
}


+ 8
- 8
src/admin/freelist_main.php Dosyayı Görüntüle

@@ -56,15 +56,15 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid')
{
global $cfg_phpurl, $addsql;
$start = ($pageno-1) * $pagesize;
$printhead ="<table align='center' class='table maintable my-3'>
$printhead ="<table class='table shadow-sm my-3'>
<tr>
<td colspan='6' bgcolor='#f5f5f5'>自由列表管理</td>
<td colspan='6'>自由列表管理</td>
</tr>
<tr align='center' bgcolor='#e9ecef'>
<td width='6%'><a href='javascript:;' onclick=\"ReloadPage('aid')\">id</a></td>
<tr align='center'>
<td width='6%'><a href=\"javascript:ReloadPage('aid');\">id</a></td>
<td width='20%'>列表名称</td>
<td width='20%'>模板文件</td>
<td width='6%'><a href='javascript:;' onclick=\"ReloadPage('click')\">点击</a></td>
<td width='6%'><a href=\"javascript:ReloadPage('click');\">点击</a></td>
<td width='12%'>创建时间</td>
<td>操作</td>
</tr>";
@@ -81,9 +81,9 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid')
<td>{$row['click']}</td>
<td>".MyDate("y-m-d",$row['edtime'])."</td>
<td>
<a href='javascript:;' onclick='CreateNote({$row['aid']})' class='btn btn-light btn-sm'><i class='fa fa-repeat'></i> 更新</a>
<a href='javascript:;' onclick='EditNote({$row['aid']})' class='btn btn-light btn-sm'><i class='fa fa-pencil-square'></i> 修改</a>
<a href='javascript:;' onclick='DelNote({$row['aid']})' class='btn btn-danger btn-sm'><i class='fa fa-trash'></i> 删除</a>
<a href=\"javascript:CreateNote({$row['aid']});\" class='btn btn-light btn-sm'><i class='fa fa-repeat'></i> 更新</a>
<a href=\"javascript:EditNote({$row['aid']});\" class='btn btn-light btn-sm'><i class='fa fa-pencil-square'></i> 修改</a>
<a href=\"javascript:DelNote({$row['aid']});\" class='btn btn-danger btn-sm'><i class='fa fa-trash'></i> 删除</a>
</td>
</tr>";
echo $line;


+ 4
- 4
src/admin/friendlink_add.php Dosyayı Görüntüle

@@ -9,8 +9,8 @@
* @link https://www.dedebiz.com
*/
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_友情链接模块');
if (empty($dopost)) $dopost = "";
CheckPurview('plus_友情链接');
if (empty($dopost)) $dopost = '';
if ($dopost == "add") {
$dtime = time();
if (is_uploaded_file($logoimg)) {
@@ -19,7 +19,7 @@ if ($dopost == "add") {
if (!preg_match("#(jpg|gif|png)$#", $shortname)) {
$shortname = '.gif';
}
$filename = MyDate("ymdHis", time()).mt_rand(1000,9999).$shortname;
$filename = MyDate("ymdHis", time()).mt_rand(1000, 9999).$shortname;
$imgurl = $cfg_medias_dir."/flink";
if (!is_dir($cfg_basedir.$imgurl)) {
MkdirAll($cfg_basedir.$imgurl, $cfg_dir_purview);
@@ -56,7 +56,7 @@ if ($dopost == "add") {
$rs = $dsql->ExecuteNoneQuery($query);
$burl = empty($_COOKIE['ENV_GOBACK_URL']) ? "friendlink_main.php" : $_COOKIE['ENV_GOBACK_URL'];
if ($rs) {
ShowMsg("成功添加一个链接", $burl, 0, 500);
ShowMsg("成功添加一个链接", $burl);
exit();
} else {
ShowMsg("添加链接时出错,原因:".$dsql->GetError(), "javascript:;");


+ 4
- 4
src/admin/friendlink_edit.php Dosyayı Görüntüle

@@ -9,9 +9,9 @@
* @link https://www.dedebiz.com
*/
require_once(dirname(__FILE__)."/config.php");
CheckPurview('plus_友情链接模块');
CheckPurview('plus_友情链接');
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? 'friendlink_main.php' : $_COOKIE['ENV_GOBACK_URL'];
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
$id = isset($id)? intval($id) : 0;
if (isset($allid)) {
$aids = explode(',', $allid);
@@ -57,10 +57,10 @@ if ($dopost == "delete") {
exit;
}
$logoimg_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $logoimg_name));
$fullfilename = DEDEROOT.'static/flink/'.$logoimg_name;
$fullfilename = DEDEROOT.'/static/flink/'.$logoimg_name;
move_uploaded_file($logoimg, $fullfilename) or die("上传文件到".$fullfilename."失败");
@unlink($logoimg);
$logo = $cfg_cmspath.'/static/flink/'.$logoimg_name;
$logo = '/static/flink/'.$logoimg_name;
}
$sortrank = isset($sortrank)? intval($sortrank) : 1;
$url = isset($url)? HtmlReplace($url, -1) : '';


+ 2
- 2
src/admin/friendlink_main.php Dosyayı Görüntüle

@@ -21,7 +21,7 @@ if (empty($ischeck)) {
else $ischeckSql = " And ischeck='$ischeck' ";
}
$keyword = HtmlReplace($keyword, -1);
$selCheckArr = array(0 => '不限类型', -1 => '审核', 1 => '内页', 2 => '首页');
$selCheckArr = array(0 => '不限类型', -1 => '审核', 1 => '内页', 2 => '首页');
$sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime DESC";
$dlist = new DataListCP();
$dlist->SetParameter('keyword', $keyword);
@@ -38,6 +38,6 @@ function GetSta($sta)
{
if ($sta == 1) return '内页';
if ($sta == 2) return '首页';
else return '审核';
else return '审核';
}
?>

+ 20
- 20
src/admin/inc/inc_action_info.php Dosyayı Görüntüle

@@ -52,7 +52,7 @@ $actionSearch[0] = array(
)
)
);
$actionSearch[2] = array(
$actionSearch[1] = array(
'title' => '附件管理',
'soniterm' => array(
0 => array(
@@ -67,7 +67,7 @@ $actionSearch[2] = array(
),
)
);
$actionSearch[3] = array(
$actionSearch[2] = array(
'title' => '文档模型',
'soniterm' => array(
0 => DEDEBIZ_SAFE_MODE? null : array(
@@ -90,19 +90,19 @@ $actionSearch[3] = array(
'purview' => 'c_List',
'linkurl' => 'freelist_main.php'
),
3 => array(
4 => array(
'title' => '自定义文档属性',
'purview' => 'sys_Att',
'linkurl' => 'content_att.php'
),
4 => array(
5 => array(
'title' => '自定义表单管理',
'purview' => 'c_List',
'linkurl' => 'diy_main.php'
),
)
);
$actionSearch[4] = array(
$actionSearch[3] = array(
'title' => '批量维护',
'soniterm' => array(
0 => array(
@@ -115,29 +115,29 @@ $actionSearch[4] = array(
'purview' => 'sys_ArcBatch',
'linkurl' => 'article_test_same.php'
),
3 => array(
2 => array(
'title' => '文档关键词维护',
'purview' => 'sys_Keyword',
'linkurl' => 'article_keywords_main.php'
),
4 => array(
3 => array(
'title' => '搜索关键词维护',
'purview' => 'sys_Keyword',
'linkurl' => 'search_keywords_main.php?dopost=filemanager'
),
5 => array(
4 => array(
'title' => '自动摘要分页',
'purview' => 'sys_Keyword',
'linkurl' => 'article_description_main.php'
),
6 => DEDEBIZ_SAFE_MODE? null : array(
5 => DEDEBIZ_SAFE_MODE? null : array(
'title' => '数据库字段替换',
'purview' => 'sys_ArcBatch',
'linkurl' => 'sys_data_replace.php'
),
)
);
$actionSearch[5] = array(
$actionSearch[4] = array(
'title' => '会员管理',
'soniterm' => array(
0 => array(
@@ -162,7 +162,7 @@ $actionSearch[5] = array(
),
)
);
$actionSearch[6] = array(
$actionSearch[5] = array(
'title' => '支付工具',
'soniterm' => array(
0 => array(
@@ -192,7 +192,7 @@ $actionSearch[6] = array(
),
)
);
$actionSearch[7] = array(
$actionSearch[6] = array(
'title' => '更新任务',
'soniterm' => array(
0 => array(
@@ -227,7 +227,7 @@ $actionSearch[7] = array(
),
)
);
$actionSearch[8] = DEDEBIZ_SAFE_MODE? null : array(
$actionSearch[7] = DEDEBIZ_SAFE_MODE? null : array(
'title' => '模板管理',
'soniterm' => array(
0 => array(
@@ -257,7 +257,7 @@ $actionSearch[8] = DEDEBIZ_SAFE_MODE? null : array(
),
)
);
$actionSearch[9] = array(
$actionSearch[8] = array(
'title' => '系统设置',
'soniterm' => array(
0 => array(
@@ -280,32 +280,32 @@ $actionSearch[9] = array(
'purview' => 'sys_Log',
'linkurl' => 'log_list.php'
),
5 => array(
4 => array(
'title' => '图片水印设置',
'purview' => 'sys_Edit',
'linkurl' => 'sys_info_mark.php'
),
6 => array(
5 => array(
'title' => '软件下载设置',
'purview' => 'sys_SoftConfig',
'linkurl' => 'soft_config.php'
),
7 => DEDEBIZ_SAFE_MODE? null : array(
6 => DEDEBIZ_SAFE_MODE? null : array(
'title' => '数据库备份还原',
'purview' => 'sys_data',
'linkurl' => 'sys_data.php'
),
8 => DEDEBIZ_SAFE_MODE? null : array(
7 => DEDEBIZ_SAFE_MODE? null : array(
'title' => 'SQL命令工具',
'purview' => 'sys_data',
'linkurl' => 'sys_sql_query.php'
),
9 => array(
8 => array(
'title' => '文件扫描工具',
'purview' => 'sys_verifies',
'linkurl' => 'sys_safetest.php'
),
10 => array(
9 => array(
'title' => '系统修复工具',
'purview' => 'sys_verifies',
'linkurl' => 'sys_repair.php'


+ 1
- 1
src/admin/inc/inc_admin_channel.php Dosyayı Görüntüle

@@ -87,7 +87,7 @@ function GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen)
function GetAddFieldList(&$dtp,&$oksetting)
{
$oklist = '';
$dtp->SetNameSpace("field","<",">");
$dtp->SetNameSpace("field", "<", ">");
$dtp->LoadSource($oksetting);
if (is_array($dtp->CTags)) {
foreach($dtp->CTags as $tagid=>$ctag)


+ 18
- 20
src/admin/inc/inc_archives_all.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 模型解析相关函数
* 模型解析函数
*
* @version $id:inc_archives_all.php 9:56 2010年7月21日 tianya $
* @package DedeBIZ.Administrator
@@ -18,10 +18,10 @@
function GetFormItem($ctag)
{
$fieldname = $ctag->GetName();
$formitem = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
$formitem = "<table>
<tr>
<td width=\"80\">~name~</td>
<td width=\"720\">~form~</td>
<td width=\"120\">~name~</td>
<td>~form~</td>
</tr>
</table>\r\n";
$innertext = trim($ctag->GetInnerText());
@@ -48,7 +48,7 @@ function GetFormItem($ctag)
$i = 0;
if ($v != '') {
if ($i == 0) {
$myformItem .= "<label><input type='radio' name='$fieldname' value='$v' checked='checked'> $v</label>\r\n";
$myformItem .= "<label><input type='radio' name='$fieldname' value='$v' checked> $v</label>\r\n";
} else {
$myformItem .= "<label><input type='radio' name='$fieldname' value='$v'> $v</label>\r\n";
}
@@ -65,8 +65,8 @@ function GetFormItem($ctag)
}
}
if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") {
$formitem = "";
$formitem .= "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">".$ctag->GetAtt('itemname')."</td><td>";
$formitem = '';
$formitem .= "<table><tr><td width=\"120\">".$ctag->GetAtt('itemname')."</td><td>";
$formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string');
$formitem .= "</td></tr></table>\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 = "<input type='text' name='$fieldname' id='$fieldname' class='admin-input-lg' value='$dfvalue'>\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 = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
$formitem = "<table>
<tr>
<td width=\"80\">~name~</td>
<td width=\"720\">~form~</td>
<td width=\"120\">~name~</td>
<td>~form~</td>
</tr>
</table>\r\n";
$innertext = trim($ctag->GetInnerText());
@@ -245,7 +243,7 @@ function GetFormItemValue($ctag, $fvalue)
$v = trim($v);
if ($v != '') {
if ($fvalue == $v) {
$myformItem .= "<label><input type='radio' name='$fieldname' value='$v' checked='checked'> $v</label>\r\n";
$myformItem .= "<label><input type='radio' name='$fieldname' value='$v' checked> $v</label>\r\n";
} else {
$myformItem .= "<label><input type='radio' name='$fieldname' value='$v'> $v</label>\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 = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">".$ctag->GetAtt('itemname')."</td>\r\n";
$formitem = "<table><tr><td width=\"120\">".$ctag->GetAtt('itemname')."</td>\r\n";
$formitem .= "<td>\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."</td>\r\n";
$formitem .= "</tr></table>\r\n";
$formitem .= "<input type='hidden' name='{$fieldname}_file' value='{$fvalue}'>\r\n";
return $formitem;
} else if ($ctag->GetAtt("type") == "htmltext") {
$formitem = "<table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"80\">".$ctag->GetAtt('itemname')."</td>\r\n";
$formitem = "<table><tr><td width=\"120\">".$ctag->GetAtt('itemname')."</td>\r\n";
$formitem .= "<td>\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."</td>\r\n";
$formitem .= "</tr></table>\r\n";
return $formitem;


+ 11
- 13
src/admin/inc/inc_archives_functions.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 文档操作相关函数
* 文档操作函数
*
* @version $id:inc_archives_functions.php 9:56 2010年7月21日 tianya $
* @package DedeBIZ.Administrator
@@ -11,8 +11,6 @@
require_once(DEDEINC.'/libraries/dedehttpdown.class.php');
require_once(DEDEINC.'/image.func.php');
require_once(DEDEINC.'/archive/partview.class.php');
$backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '';
$backurl = preg_match("#content_#", $backurl) ? "<a href='$backurl' class='btn btn-success btn-sm'>记忆的列表页</a>" : '';
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 = "<table id='tgtable' class='maintable my-3'><tr><td bgcolor='#f8f8f8'>正在进行相关文档更新,未完成前不要执行其它操作:\r\n</td></tr>\r\n";
$revalue .= "<tr><td>\r\n<iframe name='stafrm' id='stafrm' frameborder='0' width='100%' height='360px' src='$jumpUrl'></iframe>\r\n</td></tr>\r\n";
$revalue .= "</table>";
$revalue = "<tr id='tgtable'><td>";
$revalue .= "<div class='admin-win-iframe'><iframe src='$jumpUrl' name='stafrm' frameborder='0' id='stafrm' width='100%' height='100%'></iframe></div>";
$revalue .= "</td></tr>";
} else {
$revalue = '';
}


+ 4
- 4
src/admin/inc/inc_batchup.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 文档函数相关操作
* 文档操作
*
* @version $id:inc_batchup.php 10:32 2010年7月21日 tianya $
* @package DedeBIZ.Administrator
@@ -25,7 +25,7 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0)
$aid = preg_replace("#[^0-9]#i", '', $aid);
$arctitle = $arcurl = '';
if ($recycle == 1) $whererecycle = "AND arcrank = '-2'";
else $whererecycle = "";
else $whererecycle = '';
//查询表信息
$query = "SELECT ch.maintable,ch.addtable,ch.nid,ch.issystem FROM `#@__arctiny` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$aid' ";
$row = $dsql->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'],


+ 1
- 1
src/admin/inc/inc_list_functions.php Dosyayı Görüntüle

@@ -70,7 +70,7 @@ function CheckPic($picname)
if ($picname != "") {
return $picname;
} else {
return '../static/web/img/thumbnail.jpg';
return '/static/web/img/thumbnail.jpg';
}
}
//判断文档是否生成网页


+ 9
- 9
src/admin/inc/inc_menu.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 后台管理菜单项
* 后台侧边菜单
*
* @version $id:inc_menu.php 10:32 2010年7月21日 tianya $
* @package DedeBIZ.Administrator
@@ -35,7 +35,7 @@ $gitUrl = DEDEBIZURL."/git";
$dedebizUrl = DEDEBIZURL;
$adminMenu1 = $adminMenu2 = '';
if ($cuserLogin->getUserType() >= 10) {
$adminMenu1 = (DEDEBIZ_SAFE_MODE? "" : "<m:top item='11_' name='模板管理' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All' icon='fa fa-cube'>
$adminMenu1 = (DEDEBIZ_SAFE_MODE ? "" : "<m:top item='11_' name='模板管理' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All' icon='fa fa-cube'>
<m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main' />
<m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main' />
<m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main' />
@@ -43,7 +43,7 @@ if ($cuserLogin->getUserType() >= 10) {
<m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main' />
</m:top>")."
<m:top item='4_' name='模型管理' rank='t_List,t_AccList,c_List,temp_One' icon='fa fa-area-chart'>
".(DEDEBIZ_SAFE_MODE? "" : "<m:item name='文档模型管理' link='mychannel_main.php' rank='c_List' target='main' />")."
".(DEDEBIZ_SAFE_MODE ? "" : "<m:item name='文档模型管理' link='mychannel_main.php' rank='c_List' target='main' />")."
<m:item name='文档单页管理' link='templets_one.php' rank='temp_One' target='main' />
<m:item name='联动类型管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' />
<m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' />
@@ -64,21 +64,21 @@ if ($cuserLogin->getUserType() >= 10) {
<m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' />
<m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' />
<m:item name='软件下载设置' link='soft_config.php' rank='sys_SoftConfig' target='main' />
".(DEDEBIZ_SAFE_MODE? "" : "<m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' />")."
".(DEDEBIZ_SAFE_MODE? "" : "<m:item name='SQL命令工具' link='sys_sql_query.php' rank='sys_Data' target='main' />")."
".(DEDEBIZ_SAFE_MODE ? "" : "<m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' />")."
".(DEDEBIZ_SAFE_MODE ? "" : "<m:item name='SQL命令工具' link='sys_sql_query.php' rank='sys_Data' target='main' />")."
<m:item name='文件扫描工具' link='sys_safetest.php' rank='sys_verify' target='main' />
<m:item name='系统修复工具' link='sys_repair.php' rank='sys_verify' target='main' />
</m:top>";
}
$menusMain = "<m:top item='1_' name='常用功能' icon='fa fa-desktop'>
<m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' />
<m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' />
<m:item name='所有文档列表' link='content_list.php' rank='a_List,a_AccList' target='main' />
<m:item name='待审核的文档' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' />
<m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' />
<m:item name='标签管理' link='tags_main.php' rank='sys_Keyword' target='main' />
<m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' />
<m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' />
<m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空文档' addico='fa fa-minus-circle' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' />
<m:item name='专题管理' link='content_s_list.php' ischannel='1' channelid='-1' linkadd='spec_add.php' rank='spec_New' target='main' />
<m:item name='文档回收站' link='recycling.php' ischannel='1' addico='fa fa-minus-circle' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' />
</m:top>
<m:top item='2_' name='文档管理' icon='fa fa-file-text'>
$addset
@@ -94,7 +94,7 @@ $adminMenu1
<m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' />
<m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' />
<m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' />
".(DEDEBIZ_SAFE_MODE? "" : "<m:item name='数据库字段替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' />")."
".(DEDEBIZ_SAFE_MODE ? "" : "<m:item name='数据库字段替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' />")."
</m:top>
{$GLOBALS['menusMoudle']}
<m:top item='8_' name='更新网站' rank='sys_MakeHtml' icon='fa fa-repeat'>


+ 3
- 4
src/admin/inc/inc_menu_func.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 管理菜单函数
* 后台侧边菜单函数
*
* @version $id:inc_menu_func.php 10:32 2010年7月21日 tianya $
* @package DedeBIZ.Administrator
@@ -49,10 +49,9 @@ function GetMenus($userrank, $topos = 'main')
} else {
$addico = 'fa fa-plus-circle';
}
$addalt = $ctag2->GetAtt('addalt');
$link = "$link<a href='".$ctag2->GetAtt('linkadd')."' class='submenu-right' target='".$ctag2->GetAtt('target')."'><span class='$addico' title='$addalt'></span></a>";
$link = "$link<a href='".$ctag2->GetAtt('linkadd')."' class='submenu-right' target='".$ctag2->GetAtt('target')."'><span class='$addico'></span></a>";
} else {
$link .= "";
$link .= '';
}
$itemtmp = str_replace('~link~', $link, $itemTemplet);
echo $itemtmp;


+ 3
- 3
src/admin/inc/inc_menu_module.php Dosyayı Görüntüle

@@ -1,6 +1,6 @@
<?php
/**
* 模块菜单
* 模块插件
*
* @version $id:inc_menu_module.php 10:32 2010年7月21日 tianya $
* @package DedeBIZ.Administrator
@@ -21,12 +21,12 @@ $plusset = '';
$dsql->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? "" : "<m:top item='6_' name='模块管理' icon='fa fa-database'>
$adminMenu = DEDEBIZ_SAFE_MODE ? "" : "<m:top item='6_' name='模块管理' icon='fa fa-database'>
<m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' />
<m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' />
</m:top>";


+ 3
- 0
src/admin/index.php Dosyayı Görüntüle

@@ -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();
?>

+ 4
- 3
src/admin/index_body.php Dosyayı Görüntüle

@@ -53,9 +53,10 @@ if (empty($dopost)) {
if (trim($row['editcon']) == '') {
$row['editcon'] = 'archives_edit.php';
}
$rowarcrank = $row['arcrank'] == -1? " <span class='btn btn-danger btn-xs'>未审核</span>" : "";
$rowarcrank = $row['arcrank']==-1 ? '待审核' : '已审核';
$pubdate = GetDateMk($row['pubdate']);
echo "<tr><td><a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a>{$rowarcrank}</td><td width='100'>{$pubdate}</td></tr>";
$row['title'] = cn_substr($row['title'], 70);
echo "<tr class='no-wrap'><td><a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a></td><td width='70'>{$rowarcrank}</td><td width='110'>{$pubdate}</td></tr>";
}
} 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 {


+ 0
- 16
src/admin/index_menu.php Dosyayı Görüntüle

@@ -1,16 +0,0 @@
<?php
/**
* 侧边菜单
*
* @version $id:index_menu.php 11:06 2010年7月13日 tianya $
* @package DedeBIZ.Administrator
* @copyright Copyright (c) 2022 DedeBIZ.COM
* @license GNU GPL v2 (https://www.dedebiz.com/license)
* @link https://www.dedebiz.com
*/
require(dirname(__FILE__).'/config.php');
require(DEDEADMIN.'/inc/inc_menu.php');
require(DEDEADMIN.'/inc/inc_menu_func.php');
$openitem = (empty($openitem) ? 1 : $openitem);
include DedeInclude('templets/index_menu.htm');
?>

+ 2
- 2
src/admin/index_testenv.php Dosyayı Görüntüle

@@ -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) {


+ 0
- 23
src/admin/js/search.js Dosyayı Görüntüle

@@ -1,23 +0,0 @@
function selAll() {
var celements = document.getElementsByName('aids[]');
for (i=0;i<celements.length;i++) {
if (!celements[i].checked) celements[i].checked = true;
else celements[i].checked = false;
}
}
function noselAll() {
var celements = document.getElementsByName('aids[]');
for (i=0;i<celements.length;i++) {
if (celements[i].checked = true) {
celements[i].checked = false;
}
}
}
function delall() {
DedeConfirm("您确定要删除关键词吗").then((v) => {
document.form3.dopost.value = 'delall';
document.form3.submit();
}).catch((e) => {
console.log(e);
});
}

+ 0
- 53
src/admin/js/user.js Dosyayı Görüntüle

@@ -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;i<document.form2.mid.length;i++) {
if (document.form2.mid[i].checked) {
if (allSel=="")
allSel=document.form2.mid[i].value;
else
allSel=allSel+"`"+document.form2.mid[i].value;
}
}
return allSel;
}
function getOneItem() {
var allSel="";
if (document.form2.mid.value) return document.form2.mid.value;
for (i=0;i<document.form2.mid.length;i++) {
if (document.form2.mid[i].checked) {
allSel = document.form2.mid[i].value;
break;
}
}
return allSel;
}
function selAll() {
if (typeof document.form2.mid.length === "undefined") {
document.form2.mid.checked = true;
}
for (i=0;i<document.form2.mid.length;i++) {
if (!document.form2.mid[i].checked) {
document.form2.mid[i].checked = true;
}
}
}
function noSelAll() {
if (typeof document.form2.mid.length === "undefined") {
document.form2.mid.checked = false;
}
for (i=0;i<document.form2.mid.length;i++) {
if (document.form2.mid[i].checked) {
document.form2.mid[i].checked = false;
}
}
}

+ 4
- 4
src/admin/log_edit.php Dosyayı Görüntüle

@@ -11,7 +11,7 @@
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_Log');
if (empty($dopost)) {
ShowMsg("您没指定任何参数", "javascript:;");
ShowMsg("请选择一项记录", "log_list.php");
exit();
}
//清空所有日志
@@ -22,7 +22,7 @@ if ($dopost == "clear") {
} else if ($dopost == "del") {
$bkurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "log_list.php";
$ids = explode('`', $ids);
$dquery = "";
$dquery = '';
foreach ($ids as $id) {
if ($dquery == "") {
$dquery .= " lid='$id' ";
@@ -32,10 +32,10 @@ if ($dopost == "clear") {
}
if ($dquery != "") $dquery = " where ".$dquery;
$dsql->ExecuteNoneQuery("DELETE FROM `#@__log` $dquery");
ShowMsg("成功删除指定日志", $bkurl);
ShowMsg("成功删除指定日志", $bkurl);
exit();
} else {
ShowMsg("无法识别您的请求", "javascript:;");
ShowMsg("系统无法识别请求", "log_list.php");
exit();
}
?>

+ 3
- 3
src/admin/log_list.php Dosyayı Görüntüle

@@ -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')) {


+ 5
- 5
src/admin/login.php Dosyayı Görüntüle

@@ -30,7 +30,7 @@ if (is_dir(dirname(__FILE__).'/../install')) {
//检测后台目录是否更名
$cururl = GetCurUrl();
if (preg_match('/admin/', $cururl)) {
$redmsg = '<div class="alert alert-warning">后台管理目录名称中包含admin,强烈建议后台管理目录修改为其它名称</div>';
$redmsg = '<div class="alert alert-warning">检测到后台管理目录名称中包含admin,强烈建议后台管理目录修改为其它名称</div>';
} 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;
}
}


+ 10
- 10
src/admin/makehtml_homepage.php Dosyayı Görüntüle

@@ -28,29 +28,29 @@ if ($dopost == "view") {
if ($rs["admin_pwd_exists"] == "false") {
//设定dedebiz admin密码
if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">DedeBIZ操作密码为空或两次指定的密码不符</div><br>";
echo "<link rel=\"stylesheet\" href=\"/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">密码不能为空或密码输入错误</div><br>";
$client->Close();
exit;
}
$data = $client->AdminPWDCreate($dedebiz_admin);
if ($data->data != "ok") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">DedeBIZ设定操作密码失败:${$data}</div><br>";
echo "<link rel=\"stylesheet\" href=\"/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">密码失败:${$data}</div><br>";
$client->Close();
exit;
}
} else {
if ($dedebiz_admin == "") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">DedeBIZ操作密码为空</div><br>";
echo "<link rel=\"stylesheet\" href=\"/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">密码不能为空</div><br>";
$client->Close();
exit;
}
$data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex);
if ($data->data != "ok") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">DedeBIZ操作密码失败,填写正确的操作密码</div><br>";
echo "<link rel=\"stylesheet\" href=\"/static/web/css/bootstrap.min.css\"><style>.modal {position:static}</style>";
echo "<div class=\"alert alert-warning\">密码输入错误,请填写正确密码</div><br>";
$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("更新动态首页,<a href='../index.php' target='_blank'>点击浏览</a>", "javascript:;");
ShowMsg("更新动态首页,<a href='/index.php' target='_blank'>点击浏览</a>", "javascript:;");
}
$iquery = "UPDATE `#@__homepageset` SET showmod='$showmod'";
$dsql->ExecuteNoneQuery($iquery);


+ 1
- 1
src/admin/makehtml_list_action.php Dosyayı Görüntüle

@@ -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("完成所有栏目更新,<a href='$reurl' target='_blank'>点击浏览</a>", "javascript:;");
exit();


+ 1
- 1
src/admin/makehtml_spec.php Dosyayı Görüntüle

@@ -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();


+ 1
- 1
src/admin/makehtml_taglist.php Dosyayı Görüntüle

@@ -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');
?>

+ 3
- 3
src/admin/makehtml_taglist_action.php Dosyayı Görüntüle

@@ -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;


+ 1
- 1
src/admin/media_add.php Dosyayı Görüntüle

@@ -10,7 +10,7 @@
*/
require_once(dirname(__FILE__)."/config.php");
//添加权限检查
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
//上传
if ($dopost == "upload") {
CheckCSRF();


+ 5
- 5
src/admin/media_edit.php Dosyayı Görüntüle

@@ -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);


+ 1
- 1
src/admin/media_main.php Dosyayı Görüntüle

@@ -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;


+ 6
- 6
src/admin/member_do.php Dosyayı Görüntüle

@@ -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 = "<a href='".$ENV_GOBACK_URL."'>会员管理</a> - 删除会员";
$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 = "<a href='".$ENV_GOBACK_URL."'>会员管理</a> - 删除会员";
$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("<tr><td>验证安全码:<input name='safecode' type='text' id='safecode' size='16' class='admin-input-lg' /> (安全码:$safecode)</td></tr>");
$win->AddMsgItem("<tr><td>验证安全码:<input name='safecode' type='text' id='safecode' class='admin-input-lg'> (安全码:$safecode)</td></tr>");
$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));


+ 1
- 1
src/admin/member_toadmin.php Dosyayı Görüntüle

@@ -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);


+ 1
- 1
src/admin/member_type.php Dosyayı Görüntüle

@@ -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;


+ 23
- 24
src/admin/module_main.php Dosyayı Görüntüle

@@ -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 = "官方网址:<code>{$devInfo['offurl']}</code><br>";
}
@@ -89,7 +89,7 @@ if ($action == '') {
$devInfo['dev_name'] = $info['team']."<span class='btn btn-warning btn-sm'>未认证</span>";
$authAt = "<span class='btn btn-warning btn-sm'>未知</span>";
}
ShowMsg("开发者名称:{$devInfo['dev_name']}<br>开发者id:{$devInfo['dev_id']}<br>认证于:{$authAt}", "-1");
ShowMsg("贡献者名称:{$devInfo['dev_name']}<br>贡献者id:{$devInfo['dev_id']}<br>认证于:{$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 ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$filelists = (array)$dm->GetFileLists($hash);
$filelist = '';
$prvdirs = array();
@@ -138,7 +138,7 @@ if ($action == '') {
}
$prvdir .= "</table>";
$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 = "<a href='module_main.php'>模块管理</a> - 安装{$infos['name']}";
$devURL = DEDECDNURL."/developers/{$infos['dev_id']}.json";
$dhd = new DedeHttpDown();
@@ -169,7 +169,7 @@ if ($action == '') {
<td>{$infos['filesize']}</td>
</tr>
<tr>
<td>开发者id:</td>
<td>贡献者id:</td>
<td>{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>{$s}</a></td>
</tr>
<tr>
@@ -181,7 +181,7 @@ if ($action == '') {
<td><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td>
</tr>
<tr>
<td>目录权限说明:<br>../为根目录<br>./表示当前目录</td>
<td>目录权限说明:<br>/为根目录<br>./表示当前目录</td>
<td>$prvdir</td>
</tr>
<tr>
@@ -191,7 +191,7 @@ if ($action == '') {
<tr>
<td>对于已存在文件处理方法:</td>
<td>
<label><input type='radio' name='isreplace' value='1' checked='checked'> 覆盖</label>
<label><input type='radio' name='isreplace' value='1' checked> 覆盖</label>
<label><input type='radio' name='isreplace' value='3'> 覆盖,保留副本</label>
<label><input type='radio' name='isreplace' value='0'> 保留旧文件</label>
</td>
@@ -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 ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$dev_id = empty($infos['dev_id'])? "<a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-warning btn-sm'>未认证</a>" : "{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>已认证</a>";
$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 = "<a href='module_main.php'>模块管理</a> - 删除{$infos['name']}";
$win->AddHidden("hash", $hash);
$win->AddHidden("action", "delok");
@@ -281,7 +280,7 @@ if ($action == '') {
<td>{$infos['filesize']}</td>
</tr>
<tr>
<td>开发者id:</td>
<td>贡献者id:</td>
<td>{$dev_id}</td>
</tr>
<tr>
@@ -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 ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$filelists = (array)$dm->GetFileLists($hash);
$filelist = '';
foreach ($filelists as $v) {
@@ -321,7 +320,7 @@ if ($action == '') {
}
$dev_id = empty($infos['dev_id'])? "<a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-warning btn-sm'>未认证</a>" : "{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>已认证</a>";
$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 = "<a href='module_main.php'>模块管理</a> - 卸载{$infos['name']}";
$win->AddHidden("hash", $hash);
$win->AddHidden("action", 'uninstallok');
@@ -338,7 +337,7 @@ if ($action == '') {
<td>{$infos['filesize']}</td>
</tr>
<tr>
<td>开发者id:</td>
<td>贡献者id:</td>
<td>{$dev_id}</td>
</tr>
<tr>
@@ -356,7 +355,7 @@ if ($action == '') {
<tr>
<td>对于模块的文件处理方法:</td>
<td>
<label><input type='radio' name='isreplace' value='0' checked='checked'> 手工删除文件,仅运行卸载程序</label>
<label><input type='radio' name='isreplace' value='0' checked> 手工删除文件,仅运行卸载程序</label>
<label><input type='radio' name='isreplace' value='2'> 删除模块的所有文件</label>
</td>
</tr>";
@@ -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 = "<a href='module_main.php'>模块管理</a> - 使用说明";
$win->AddMsgItem("<tr><td>$msg</td></tr>");
$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 ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性');
$alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向贡献者确认它的兼容性');
$filelists = (array)$dm->GetFileLists($hash);
$filelist = '';
$setupinfo = '';
@@ -439,9 +438,9 @@ if ($action == '') {
} else {
$setupinfo = "未安装 <a href='module_main.php?action=setup&hash={$hash}'>安装</a>";
}
$dev_id = empty($infos['dev_id'])? "<a href='module_main.php?action=setup&hash={$hash}' class='btn btn-warning btn-sm'>安装</a><a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-success btn-sm'>{$s}</a>" : "{$infos['dev_id']} <a href='module_main.php?action=setup&hash={$hash}' class='btn btn-warning btn-sm'>安装</a><a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>{$s}</a>";
$dev_id = empty($infos['dev_id'])? "<a href='module_main.php?action=setup&hash={$hash}' class='btn btn-outline-success btn-sm'>安装</a><a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-success btn-sm'>{$s}</a>" : "{$infos['dev_id']} <a href='module_main.php?action=setup&hash={$hash}' class='btn btn-outline-success btn-sm'>安装</a><a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>{$s}</a>";
$win = new OxWindow();
$win->Init("", "js/blank.js", "");
$win->Init("", "/static/web/js/admin.blank.js", "");
$wecome_info = "<a href='module_main.php'>模块管理</a> - {$infos['name']}";
$msg = "<tr>
<td width='260'>模块名称:</td>
@@ -456,7 +455,7 @@ if ($action == '') {
<td>{$infos['filesize']}</td>
</tr>
<tr>
<td>开发者id:</td>
<td>贡献者id:</td>
<td>{$dev_id}</td>
</tr>
<tr>


+ 10
- 10
src/admin/module_make.php Dosyayı Görüntüle

@@ -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();
}
//已经去除转义


+ 6
- 6
src/admin/module_upload.php Dosyayı Görüntüle

@@ -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 = "<a href='module_main.php'>模块管理</a> - 上传模块插件";
$win->AddTitle('请选择上传的模块插件文件');
$win->AddHidden("action", 'upload');
$msg = "<tr>
<td width='260'>文件格式:</td>
<td><label><input type='radio' name='filetype' value='0' checked='checked'> 正常模块插件格式</label></td>
<td><label><input type='radio' name='filetype' value='0' checked> 正常模块插件格式</label></td>
</tr>
<tr>
<td>已有模块:</td>


+ 5
- 5
src/admin/mychannel_add.php Dosyayı Görüntüle

@@ -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') {
<field:senddate itemname=\"发布时间\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"10\" page=\"\"></field:senddate>
<field:flag itemname=\"推荐属性\" autofield=\"0\" notsend=\"0\" type=\"checkbox\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"10\" page=\"\"></field:flag>
<field:litpic itemname=\"缩略图\" autofield=\"0\" notsend=\"0\" type=\"text\" isnull=\"true\" islist=\"0\" default=\"\" maxlength=\"60\" page=\"\"></field:litpic>
<field:userip itemname=\"会员IP\" autofield=\"0\" notsend=\"0\" type=\"text\" isnull=\"true\" islist=\"0\" default=\"0\" maxlength=\"15\" page=\"\"></field:userip>
<field:userip itemname=\"会员ip\" autofield=\"0\" notsend=\"0\" type=\"text\" isnull=\"true\" islist=\"0\" default=\"0\" maxlength=\"15\" page=\"\"></field:userip>
<field:lastpost itemname=\"最后评论时间\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"10\" page=\"\"></field:lastpost>
<field:scores itemname=\"评论积分\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"8\" page=\"\"></field:scores>
<field:goodpost itemname=\"好评数\" autofield=\"0\" notsend=\"0\" type=\"int\" isnull=\"true\" islist=\"1\" default=\"0\" maxlength=\"8\" page=\"\"></field:goodpost>


+ 32
- 32
src/admin/mychannel_edit.php Dosyayı Görüntüle

@@ -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 = "<a href='mychannel_main.php'>文档模型管理</a> - 复制文档模型";
$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") {
<tr>
<td>复制模板:</td>
<td>
<label><input type='radio' name='copytemplet' id='copytemplet' value='1' checked='checked'> 复制</label>
<label><input type='radio' name='copytemplet' id='copytemplet' value='1' checked> 复制</label>
<label><input type='radio' name='copytemplet' id='copytemplet' value='0'> 不复制</label>
</td>
</tr>";
@@ -100,14 +100,14 @@ if ($dopost == "show") {
$win = new OxWindow();
$win->Init();
$win->AddTitle("导出{$row['typename']}文档模型规则");
$winform = $win->GetWindow("hand", "<link rel='stylesheet' href='css/codemirror.css'><script src='js/codemirror.js'></script><script src='js/mode/xml/xml.js'></script><script src='js/mode/javascript/javascript.js'></script><script src='js/mode/css/css.js'></script><script src='js/mode/htmlmixed/htmlmixed.js'></script><textarea name='config' id='content' class='form-control'>$channelconfig</textarea><script>var editor = CodeMirror.fromTextArea(document.getElementById('content'), {lineNumbers: true,lineWrapping: true,mode: 'text/html'});</script>");
$winform = $win->GetWindow("hand", "<link rel='stylesheet' href='/static/web/css/codemirror.css'><script src='/static/web/js/codemirror.js'></script><script src='/static/web/js/mode/xml/xml.js'></script><script src='/static/web/js/mode/javascript/javascript.js'></script><script src='/static/web/js/mode/css/css.js'></script><script src='/static/web/js/mode/htmlmixed/htmlmixed.js'></script><textarea name='config' id='content' class='form-control'>$channelconfig</textarea><script>var editor = CodeMirror.fromTextArea(document.getElementById('content'), {lineNumbers: true,lineWrapping: true,mode: 'text/html'});</script>");
$win->Display();
exit();
} else if ($dopost == "exportin") {
$wintitle = "导入指定文档模型规则";
$wecome_info = "<a href='mychannel_main.php'>文档模型管理</a> - 导入文档模型规则";
$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("<tr><td><textarea name='exconfig' class='admin-textarea-xl'></textarea></td></tr>");
$winform = $win->GetWindow("ok");
@@ -136,7 +136,7 @@ if ($dopost == "show") {
<td>文档模型规则出错</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
</tr>");
$fields = array();
foreach ($dtp->CTags as $ctag) {
@@ -148,7 +148,7 @@ if ($dopost == "show") {
<td>文档模型规则出错</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
</tr>");
}
//正常的导入过程
@@ -159,19 +159,19 @@ if ($dopost == "show") {
<td>已经存在相同的{$fields['nid']}模型</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
</tr>");
}
//创建表
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") {
<td>创建数据表失败:{$dsql->GetError()}</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
</tr>");
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("<tr>
<td>导入文档模型时发生错误:{$dsql->GetError()}</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
</tr>");
$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") {
<td>成功导入一个文档模型</td>
</tr>
<tr>
<td bgcolor='#f5f5f5' align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
<td align='center'><button type='button' class='btn btn-success btn-sm' onclick=\"location='mychannel_main.php';\">文档模型管理</button></td>
</tr>");
} else if ($dopost == "copysave") {
$cid = intval($cid);
@@ -289,7 +289,7 @@ if ($dopost == "show") {
$wintitle = "查看模型应用模板";
$wecome_info = "<a href='mychannel_main.php'>文档模型管理</a> - 模型应用模板";
$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 = "<tr>
@@ -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 = "<a href='mychannel_main.php'>文档模型管理</a> - 删除文档模型";
$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 .= "<label><input type='checkbox' name='addonfields[]' value='$value' $checked='checked'> $label</label> ";
$addonfields .= "<label><input type='checkbox' name='addonfields[]' value='$value' $checked> $label</label> ";
}
}
}
@@ -441,7 +441,7 @@ if ($dopost == "show") {
$addonfields = '';
}
$template = trim($template);
$forms = "<form action=\"$cfg_cmspath/apps/advancedsearch.php\" method=\"post\">";
$forms = "<form action=\"/apps/advancedsearch.php\" method=\"post\">";
$forms .= "<input type=\"hidden\" name=\"mid\" value=\"$mid\">";
$forms .= "<input type=\"hidden\" name=\"dopost\" value=\"search\">";
$forms .= "<label>关键词:<input type=\"text\" name=\"q\"></label><br>";
@@ -531,7 +531,7 @@ if ($dopost == "show") {
} else if ($type == 'radio') {
$values = explode(',', $valuearr[$k]);
if (is_array($values) && !empty($values)) {
$forms .= "$itemname:<label><input type=\"radio\" name=\"".$name."\" value=\"\" checked=\"checked\"> 不限</label><br>";
$forms .= "$itemname:<label><input type=\"radio\" name=\"".$name."\" value=\"\" checked> 不限</label><br>";
foreach ($values as $value) {
$forms .= "<label><input type=\"radio\" name=\"".$name."\" value=\"$value\"> $value</label>";
}
@@ -558,14 +558,14 @@ if ($dopost == "show") {
$query = "REPLACE INTO `#@__advancedsearch` (mid, maintable, mainfields, addontable, addonfields, forms, template) VALUES ('$mid','$maintable','$mainstring','$addontable','$addonstring','$formssql', '$template')";
$dsql->ExecuteNoneQuery($query);
$formshtml = dede_htmlspecialchars($forms);
echo '<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/web/css/admin.css">
<link rel="stylesheet" href="css/codemirror.css">
<script src="js/codemirror.js"></script>
<script src="js/mode/xml/xml.js"></script>
<script src="js/mode/javascript/javascript.js"></script>
<script src="js/mode/css/css.js"></script>
<script src="js/mode/htmlmixed/htmlmixed.js"></script>';
echo '<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/web/css/admin.css">
<link rel="stylesheet" href="/static/web/css/codemirror.css">
<script src="/static/web/js/codemirror.js"></script>
<script src="/static/web/js/mode/xml/xml.js"></script>
<script src="/static/web/js/mode/javascript/javascript.js"></script>
<script src="/static/web/js/mode/css/css.js"></script>
<script src="/static/web/js/mode/htmlmixed/htmlmixed.js"></script>';
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$cfg_soft_lang\">";
echo "<p>下面生成的网页表单,根据自己需求修改样式后粘贴到对应的模板中</p><textarea id='content' class='form-control'>$forms</textarea>";
echo "<hr>";


+ 1
- 1
src/admin/mytag_add.php Dosyayı Görüntüle

@@ -14,7 +14,7 @@ if (DEDEBIZ_SAFE_MODE) {
}
CheckPurview('temp_Other');
require_once(DEDEINC."/typelink/typelink.class.php");
if (empty($dopost)) $dopost = "";
if (empty($dopost)) $dopost = '';
if ($dopost == "save") {
CheckCSRF();
$tagname = trim($tagname);


+ 1
- 1
src/admin/mytag_tag_guide_ok.php Dosyayı Görüntüle

@@ -14,7 +14,7 @@ if (DEDEBIZ_SAFE_MODE) {
}
CheckPurview('temp_Other');
//根据生成条件标记
$attlist = "";
$attlist = '';
$attlist .= " row='".$row."'";
$attlist .= " titlelen='".$titlelen."'";
if ($orderby != 'senddate') $attlist .= " orderby='".$orderby."'";


+ 2
- 2
src/admin/plus_edit.php Dosyayı Görüntüle

@@ -20,14 +20,14 @@ if ($dopost == "show") {
ShowMsg("隐藏一个插件", "plus_main.php");
exit();
} else if ($dopost == "delete") {
if (empty($job)) $job = "";
if (empty($job)) $job = '';
if ($job == "") {
//确认
require_once(DEDEINC."/libraries/oxwindow.class.php");
$wintitle = "删除指定插件";
$wecome_info = "<a href='plus_main.php'>插件管理</a> - 删除插件";
$win = new OxWindow();
$win->Init("plus_edit.php", "js/blank.js", "POST");
$win->Init("plus_edit.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("job", "yes");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("aid", $aid);


+ 12
- 12
src/admin/search_keywords_main.php Dosyayı Görüntüle

@@ -63,18 +63,18 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
$start = ($pageno - 1) * $pagesize;
$printhead = "<form name='form3' action=\"search_keywords_main.php\" method=\"post\">
<input name=\"dopost\" type=\"hidden\" value=\"\">
<table align='center' class='table maintable my-3'>
<table class='table shadow-sm my-3'>
<tr>
<td colspan='8' bgcolor='#f5f5f5'>搜索关键词维护</td>
<td colspan='8'>搜索关键词维护</td>
</tr>
<tr align='center' bgcolor='#e9ecef'>
<tr align='center'>
<td width='6%'>选择</td>
<td width='6%'><a href='javascript:;' onclick=\"ReloadPage('aid')\">id</a></td>
<td width='6%'><a href=\"javascript:ReloadPage('aid');\">id</a></td>
<td width='20%'>关键词</td>
<td width='20%'>分词结果</td>
<td width='6%'><a href='javascript:;' onclick=\"ReloadPage('count')\">频率</a></td>
<td width='6%'><a href='javascript:;' onclick=\"ReloadPage('result')\">结果</a></td>
<td width='12%'><a href='javascript:;' onclick=\"ReloadPage('lasttime')\">搜索时间</a></td>
<td width='6%'><a href=\"javascript:ReloadPage('count');\">频率</a></td>
<td width='6%'><a href=\"javascript:ReloadPage('result');\">结果</a></td>
<td width='12%'><a href=\"javascript:ReloadPage('lasttime');\">搜索时间</a></td>
<td>操作</td>
</tr>";
echo $printhead;
@@ -92,17 +92,17 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
<td><a href='{$cfg_phpurl}/search.php?kwtype=0&keyword=".urlencode($row['keyword'])."&searchtype=titlekeyword' target='_blank'>{$row['result']}</a></td>
<td><span>".MyDate("Y-m-d H:i:s", $row['lasttime'])."</span></td>
<td>
<a href='javascript:;' onclick='UpdateNote({$row['aid']})' class='btn btn-light btn-sm'><i class='fa fa-repeat'></i> 更新</a>
<a href='javascript:;' onclick='DelNote({$row['aid']})' class='btn btn-danger btn-sm'><i class='fa fa-trash'></i> 删除</a>
<a href='javascript:UpdateNote({$row['aid']});' class='btn btn-light btn-sm'><i class='fa fa-repeat'></i> 更新</a>
<a href='javascript:DelNote({$row['aid']});' class='btn btn-danger btn-sm'><i class='fa fa-trash'></i> 删除</a>
</td>
</tr>";
echo $line;
}
echo "<tr>
<td colspan='8'>
<a href='javascript:selAll()' class='btn btn-success btn-sm'>反选</a>
<a href='javascript:noselAll()' class='btn btn-success btn-sm'>取消</a>
<a href='javascript:delall()' class='btn btn-danger btn-sm'>删除</a>
<a href=\"javascript:selAll();\" class='btn btn-success btn-sm'>反选</a>
<a href=\"javascript:noselAll();\" class='btn btn-success btn-sm'>取消</a>
<a href=\"javascript:delall();\" class='btn btn-danger btn-sm'>删除</a>
</td>
</tr>";
echo "</table></form>";

+ 3
- 3
src/admin/soft_add.php Dosyayı Görüntüle

@@ -40,7 +40,7 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (!isset($typeid2)) $typeid2 = 0;
if (!isset($autokey)) $autokey = 0;
if (!isset($remote)) $remote = 0;
@@ -73,7 +73,7 @@ if ($dopost != 'save') {
$sortrank = AddDay($pubdate, $sortup);
if ($ishtml == 0) $ismake = -1;
else $ismake = 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
$title = preg_replace('#"#', '"', $title);
$title = cn_substrR($title, $cfg_title_maxlen);
$shorttitle = cn_substrR($shorttitle, 36);
@@ -231,7 +231,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>浏览软件文档</a><a href='soft_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布软件文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改软件文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理软件文档</a></td>
<td align='center'><a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='soft_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$msg = "{$msg}".GetUpdateTest();
$wintitle = "成功发布软件文档";


+ 4
- 4
src/admin/soft_edit.php Dosyayı Görüntüle

@@ -47,9 +47,9 @@ if ($dopost != 'save') {
foreach ($dtp->CTags as $ctag) {
if ($ctag->GetName() == 'link') {
$islocal = $ctag->GetAtt('islocal');
if ($islocal != 1) $needmsg = "<label class='ml-2'><input type='checkbox' name='del{$newRowStart}' value='1'> 删除</label>";
else $needmsg = '<button type="button" name="sel1" id="sel1" class="btn btn-success btn-sm ml-2" onclick="SelectSoft(\'form1.softurl'.$newRowStart.'\')">选择</button>';
$nForm .= "<div class='py-2'><label>软件网址{$newRowStart}:<input type='text' name='softurl{$newRowStart}' value='".trim($ctag->GetInnerText())."' class='admin-input-lg'></label><label class='ml-2'>下载名称:<input type='text' name='servermsg{$newRowStart}' value='".$ctag->GetAtt("text")."' class='admin-input-sm'></label><input type='hidden' name='islocal{$newRowStart}' value='{$islocal}'>$needmsg</div>\r\n";
if ($islocal != 1) $needmsg = "<label><input type='checkbox' name='del{$newRowStart}' value='1'> 删除</label>";
else $needmsg = '<button type="button" name="sel1" id="sel1" class="btn btn-success btn-sm" onclick="SelectSoft(\'form1.softurl'.$newRowStart.'\')">选择</button>';
$nForm .= "<div class='py-2'><label>软件网址{$newRowStart}:<input type='text' name='softurl{$newRowStart}' value='".trim($ctag->GetInnerText())."' class='admin-input-lg'></label> <label>下载名称:<input type='text' name='servermsg{$newRowStart}' value='".$ctag->GetAtt("text")."' class='admin-input-sm'></label><input type='hidden' name='islocal{$newRowStart}' value='{$islocal}'> $needmsg</div>\r\n";
$newRowStart++;
}
}
@@ -210,7 +210,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>浏览软件文档</a><a href='soft_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布软件文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改软件文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理软件文档</a></td>
<td align='center'><a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>浏览文档</a><a href='soft_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布文档</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改文档</a><a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>返回文档列表</a></td>
</tr>";
$wintitle = "成功修改软件文档";
$wecome_info = "文档管理 - 修改软件文档";


+ 3
- 3
src/admin/spec_add.php Dosyayı Görüntüle

@@ -28,7 +28,7 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click);
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
$channelid = -1;
$money = 0;
if (!isset($tags)) $tags = '';
@@ -99,7 +99,7 @@ if ($dopost != 'save') {
else $rownum = 0;
$arcid = preg_replace("#[^0-9,]#", "", $arcid);
$ids = explode(",", $arcid);
$okids = "";
$okids = '';
if (is_array($ids)) {
foreach ($ids as $mid) {
$mid = trim($mid);
@@ -177,7 +177,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览专题</a><a href='spec_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布专题</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改专题</a><a href='content_s_list.php' class='btn btn-success btn-sm'>管理专题</a></td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览专题</a><a href='spec_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布专题</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改专题</a><a href='content_s_list.php' class='btn btn-success btn-sm'>返回专题列表</a></td>
</tr>";
$wintitle = "成功发布专题";
$wecome_info = "专题管理 - 发布专题";


+ 3
- 3
src/admin/spec_edit.php Dosyayı Görüntüle

@@ -132,7 +132,7 @@ if ($dopost != 'save') {
if (isset(${'keywords'.$i})) {
$keywords = str_replace("'", "", trim(${'keywords'.$i}));
} else {
$keywords = "";
$keywords = '';
}
if (!empty(${'typeid'.$i})) {
$ttypeid = trim(${'typeid'.$i});
@@ -146,7 +146,7 @@ if ($dopost != 'save') {
}
$arcid = preg_replace("#[^0-9,]#", "", $arcid);
$ids = explode(",", $arcid);
$okids = "";
$okids = '';
if (is_array($ids)) {
foreach ($ids as $mid) {
$mid = trim($mid);
@@ -190,7 +190,7 @@ if ($dopost != 'save') {
}
//返回成功信息
$msg = "<tr>
<td bgcolor='#f5f5f5' align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览专题</a><a href='spec_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布专题</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改专题</a><a href='content_s_list.php' class='btn btn-success btn-sm'>管理专题</a></td>
<td align='center'><a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>浏览专题</a><a href='spec_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布专题</a><a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>修改专题</a><a href='content_s_list.php' class='btn btn-success btn-sm'>返回专题列表</a></td>
</tr>";
$wintitle = "成功修改专题";
$wecome_info = "专题管理 - 修改专题";


+ 2
- 2
src/admin/sys_admin_user_add.php Dosyayı Görüntüle

@@ -15,12 +15,12 @@ if (empty($dopost)) $dopost = '';
if ($dopost == 'add') {
CheckCSRF();
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) {
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);
if ($safecode != $safecodeok) {
ShowMsg('请填写验证安全码', '-1', 0, 3000);
ShowMsg('请填写验证安全码', '-1');
exit();
}
$row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` WHERE userid LIKE '$userid' ");


+ 6
- 6
src/admin/sys_admin_user_edit.php Dosyayı Görüntüle

@@ -17,11 +17,11 @@ if ($dopost == 'saveedit') {
CheckCSRF();
$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();
}
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) {
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);
@@ -47,7 +47,7 @@ if ($dopost == 'saveedit') {
}
$olduserid = preg_replace("/[^0-9a-zA-Z_@!\.-]/", '', $olduserid);
$userid = preg_replace("/[^0-9a-zA-Z_@!\.-]/", '', $userid);
$usql = "";
$usql = '';
if ($olduserid !== $userid) {
$row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE userid LIKE '$userid' ");
if (is_array($row)) {
@@ -72,7 +72,7 @@ if ($dopost == 'saveedit') {
ShowMsg("成功修改一个账户", "sys_admin_user.php");
exit();
} else if ($dopost == 'delete') {
if (empty($userok)) $userok = "";
if (empty($userok)) $userok = '';
if ($userok != "yes") {
$randcode = mt_rand(10000, 99999);
$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24);
@@ -80,7 +80,7 @@ if ($dopost == 'saveedit') {
$wintitle = "删除指定管理员";
$wecome_info = "<a href='sys_admin_user.php'>系统帐号管理</a> - 删除管理员";
$win = new OxWindow();
$win->Init("sys_admin_user_edit.php", "js/blank.js", "POST");
$win->Init("sys_admin_user_edit.php", "/static/web/js/admin.blank.js", "POST");
$win->AddHidden("dopost", $dopost);
$win->AddHidden("userok", "yes");
$win->AddHidden("randcode", $randcode);
@@ -104,7 +104,7 @@ if ($dopost == 'saveedit') {
$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt='0' WHERE mid='$id' LIMIT 1");
ShowMsg("成功删除一个帐户", "sys_admin_user.php");
} else {
ShowMsg("不能删除id为1的创建人帐号,不能删除自己", "sys_admin_user.php", 0, 3000);
ShowMsg("不能删除id为1的创建人帐号,不能删除自己", "sys_admin_user.php");
}
exit();
}


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor

Yükleniyor…
İptal
Kaydet