Sfoglia il codice sorgente

同步会员到文档重复文档检测功能,文档来源默认为昵称,删除多余的判断随机点击数

pull/68/head
叙述、别离 2 giorni fa
parent
commit
a08db52062
11 ha cambiato i file con 22 aggiunte e 16 eliminazioni
  1. +1
    -2
      src/admin/album_add.php
  2. +1
    -2
      src/admin/archives_add.php
  3. +1
    -1
      src/admin/archives_sg_add.php
  4. +9
    -1
      src/admin/article_add.php
  5. +2
    -2
      src/admin/soft_add.php
  6. +1
    -1
      src/admin/spec_add.php
  7. +1
    -1
      src/admin/templets/album_add.htm
  8. +1
    -1
      src/admin/templets/archives_add.htm
  9. +1
    -1
      src/admin/templets/article_add.htm
  10. +1
    -1
      src/admin/templets/article_edit.htm
  11. +3
    -3
      src/user/inc/archives_check.php

+ 1
- 2
src/admin/album_add.php Vedi File

@@ -39,7 +39,6 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : ''; $flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (!isset($typeid2)) $typeid2 = 0; if (!isset($typeid2)) $typeid2 = 0;
if (!isset($autokey)) $autokey = 0; if (!isset($autokey)) $autokey = 0;
if (!isset($remote)) $remote = 0; if (!isset($remote)) $remote = 0;
@@ -69,7 +68,7 @@ if ($dopost != 'save') {
} }
//对保存的文档进行处理 //对保存的文档进行处理
if (empty($writer)) $writer = $cuserLogin->getUserName(); if (empty($writer)) $writer = $cuserLogin->getUserName();
if (empty($source)) $source = '未知';
if (empty($source)) $source = $cuserLogin->getUserName();
$pubdate = GetMkTime($pubdate); $pubdate = GetMkTime($pubdate);
$senddate = time(); $senddate = time();
$sortrank = AddDay($pubdate, $sortup); $sortrank = AddDay($pubdate, $sortup);


+ 1
- 2
src/admin/archives_add.php Vedi File

@@ -42,7 +42,6 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : ''; $flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (empty($typeid2)) $typeid2 = 0; if (empty($typeid2)) $typeid2 = 0;
if (!isset($autokey)) $autokey = 0; if (!isset($autokey)) $autokey = 0;
if (!isset($remote)) $remote = 0; if (!isset($remote)) $remote = 0;
@@ -70,7 +69,7 @@ if ($dopost != 'save') {
} }
//对保存的文档进行处理 //对保存的文档进行处理
if (empty($writer)) $writer = $cuserLogin->getUserName(); if (empty($writer)) $writer = $cuserLogin->getUserName();
if (empty($source)) $source = '未知';
if (empty($source)) $source = $cuserLogin->getUserName();
$pubdate = GetMkTime($pubdate); $pubdate = GetMkTime($pubdate);
$senddate = time(); $senddate = time();
$sortrank = AddDay($pubdate, $sortup); $sortrank = AddDay($pubdate, $sortup);


+ 1
- 1
src/admin/archives_sg_add.php Vedi File

@@ -58,7 +58,7 @@ if ($dopost != 'save') {
} }
//对保存的文档进行处理 //对保存的文档进行处理
if (empty($writer)) $writer = $cuserLogin->getUserName(); if (empty($writer)) $writer = $cuserLogin->getUserName();
if (empty($source)) $source = '未知';
if (empty($source)) $source = $cuserLogin->getUserName();
if (empty($flags)) $flag = ''; if (empty($flags)) $flag = '';
else $flag = join(',', $flags); else $flag = join(',', $flags);
$senddate = time(); $senddate = time();


+ 9
- 1
src/admin/article_add.php Vedi File

@@ -48,6 +48,14 @@ if ($dopost != 'save') {
if (!isset($dellink)) $dellink = 0; if (!isset($dellink)) $dellink = 0;
if (!isset($autolitpic)) $autolitpic = 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 ($cfg_mb_cktitle == 'Y') {
$row = $dsql->GetOne("SELECT * FROM `#@__archives` WHERE title LIKE '$title' ");
if (is_array($row)) {
ShowMsg("请不要发布重复文档", "-1");
exit();
}
}
if (trim($title) == '') { if (trim($title) == '') {
ShowMsg("文档标题不能为空", "-1"); ShowMsg("文档标题不能为空", "-1");
exit(); exit();
@@ -69,7 +77,7 @@ if ($dopost != 'save') {
} }
//对保存的文档进行处理 //对保存的文档进行处理
if (empty($writer)) $writer = $cuserLogin->getUserName(); if (empty($writer)) $writer = $cuserLogin->getUserName();
if (empty($source)) $source = '未知';
if (empty($source)) $source = $cuserLogin->getUserName();
$pubdate = GetMkTime($pubdate); $pubdate = GetMkTime($pubdate);
$senddate = time(); $senddate = time();
$sortrank = AddDay($pubdate, $sortup); $sortrank = AddDay($pubdate, $sortup);


+ 2
- 2
src/admin/soft_add.php Vedi File

@@ -40,12 +40,12 @@ if ($dopost != 'save') {
require_once(DEDEINC.'/libraries/oxwindow.class.php'); require_once(DEDEINC.'/libraries/oxwindow.class.php');
$flag = isset($flags) ? join(',', $flags) : ''; $flag = isset($flags) ? join(',', $flags) : '';
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; $notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (!isset($typeid2)) $typeid2 = 0; if (!isset($typeid2)) $typeid2 = 0;
if (!isset($autokey)) $autokey = 0; if (!isset($autokey)) $autokey = 0;
if (!isset($remote)) $remote = 0; if (!isset($remote)) $remote = 0;
if (!isset($dellink)) $dellink = 0; if (!isset($dellink)) $dellink = 0;
if (!isset($autolitpic)) $autolitpic = 0; if (!isset($autolitpic)) $autolitpic = 0;
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000, 6000) : $cfg_arc_click);
if (trim($title) == '') { if (trim($title) == '') {
ShowMsg("文档标题不能为空", "-1"); ShowMsg("文档标题不能为空", "-1");
exit(); exit();
@@ -67,7 +67,7 @@ if ($dopost != 'save') {
} }
//对保存的文档进行处理 //对保存的文档进行处理
if (empty($writer)) $writer = $cuserLogin->getUserName(); if (empty($writer)) $writer = $cuserLogin->getUserName();
if (empty($source)) $source = '未知';
if (empty($source)) $source = $cuserLogin->getUserName();
$pubdate = GetMkTime($pubdate); $pubdate = GetMkTime($pubdate);
$senddate = time(); $senddate = time();
$sortrank = AddDay($pubdate, $sortup); $sortrank = AddDay($pubdate, $sortup);


+ 1
- 1
src/admin/spec_add.php Vedi File

@@ -39,7 +39,7 @@ if ($dopost != 'save') {
if (!isset($autolitpic)) $autolitpic = 0; if (!isset($autolitpic)) $autolitpic = 0;
//对保存的文档进行处理 //对保存的文档进行处理
if (empty($writer)) $writer = $cuserLogin->getUserName(); if (empty($writer)) $writer = $cuserLogin->getUserName();
if (empty($source)) $source = '未知';
if (empty($source)) $source = $cuserLogin->getUserName();
$pubdate = GetMkTime($pubdate); $pubdate = GetMkTime($pubdate);
$senddate = time(); $senddate = time();
$sortrank = AddDay($pubdate, $sortup); $sortrank = AddDay($pubdate, $sortup);


+ 1
- 1
src/admin/templets/album_add.htm Vedi File

@@ -209,7 +209,7 @@
<select name="arcrank" id="arcrank" class="admin-input-sm"> <select name="arcrank" id="arcrank" class="admin-input-sm">
<?php <?php
$urank = $cuserLogin->getUserRank(); $urank = $cuserLogin->getUserRank();
$dsql->SetQuery("SELECT * FROM `#@__arcrank` where adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->Execute(); $dsql->Execute();
while($row = $dsql->GetObject()) while($row = $dsql->GetObject())
{ {


+ 1
- 1
src/admin/templets/archives_add.htm Vedi File

@@ -181,7 +181,7 @@
<select name="arcrank" id="arcrank" class="admin-input-sm"> <select name="arcrank" id="arcrank" class="admin-input-sm">
<?php <?php
$urank = $cuserLogin->getUserRank(); $urank = $cuserLogin->getUserRank();
$dsql->SetQuery("SELECT * FROM `#@__arcrank` where adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->Execute(); $dsql->Execute();
while($row = $dsql->GetObject()) while($row = $dsql->GetObject())
{ {


+ 1
- 1
src/admin/templets/article_add.htm Vedi File

@@ -184,7 +184,7 @@
<select name="arcrank" id="arcrank" class="admin-input-sm"> <select name="arcrank" id="arcrank" class="admin-input-sm">
<?php <?php
$urank = $cuserLogin->getUserRank(); $urank = $cuserLogin->getUserRank();
$dsql->SetQuery("SELECT * FROM `#@__arcrank` where adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->Execute(); $dsql->Execute();
while($row = $dsql->GetObject()) while($row = $dsql->GetObject())
{ {


+ 1
- 1
src/admin/templets/article_edit.htm Vedi File

@@ -185,7 +185,7 @@
<option value='<?php echo $arcRow["arcrank"]?>'><?php echo $arcRow["rankname"]?> </option> <option value='<?php echo $arcRow["arcrank"]?>'><?php echo $arcRow["rankname"]?> </option>
<?php <?php
$urank = $cuserLogin->getUserRank(); $urank = $cuserLogin->getUserRank();
$dsql->SetQuery("SELECT * FROM `#@__arcrank` where adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank' ORDER BY `rank` ASC");
$dsql->Execute(); $dsql->Execute();
while($row = $dsql->GetObject()){ while($row = $dsql->GetObject()){
echo "<option value='".$row->rank."'>".$row->membername."</option>"; echo "<option value='".$row->rank."'>".$row->membername."</option>";


+ 3
- 3
src/user/inc/archives_check.php Vedi File

@@ -58,16 +58,16 @@ $flag = $shorttitle = $color = '';
$source = isset($source)? HtmlReplace($source, 1) : ''; $source = isset($source)? HtmlReplace($source, 1) : '';
$sortrank = $senddate = $pubdate = time(); $sortrank = $senddate = $pubdate = time();
$title = cn_substrR(HtmlReplace($title, 1), $cfg_title_maxlen); $title = cn_substrR(HtmlReplace($title, 1), $cfg_title_maxlen);
$writer = cn_substrR(HtmlReplace($writer, 1), 20);
$writer = cn_substrR(HtmlReplace($writer, 1), 255);
if (empty($description)) $description = ''; if (empty($description)) $description = '';
$description = cn_substrR(HtmlReplace($description, 1), 250); $description = cn_substrR(HtmlReplace($description, 1), 250);
$keywords = cn_substrR(HtmlReplace($tags, 1), 30);
$keywords = cn_substrR(HtmlReplace($tags, 1), 255);
$mid = $cfg_ml->M_ID; $mid = $cfg_ml->M_ID;
//检测文档是否重复 //检测文档是否重复
if ($cfg_mb_cktitle == 'Y') { if ($cfg_mb_cktitle == 'Y') {
$row = $dsql->GetOne("SELECT * FROM `#@__archives` WHERE title LIKE '$title' "); $row = $dsql->GetOne("SELECT * FROM `#@__archives` WHERE title LIKE '$title' ");
if (is_array($row)) { if (is_array($row)) {
ShowMsg("请不要发布重复文档", "-1", "0", 3000);
ShowMsg("请不要发布重复文档", "-1");
exit(); exit();
} }
} }

Loading…
Annulla
Salva