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