| @@ -21,7 +21,7 @@ if ($dopost != 'save') { | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| //获得栏目模型id | |||
| if ($cid > 0 && $channelid == 0) { | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid';"); | |||
| $channelid = $row['channeltype']; | |||
| } else { | |||
| if ($channelid == 0) $channelid = 2; | |||
| @@ -34,11 +34,7 @@ if ($dopost != 'save') { | |||
| $maxWright = empty($maxWright)? array('cc'=>1) : $maxWright; | |||
| include DedeInclude("templets/album_add.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -105,9 +101,6 @@ else if ($dopost == 'save') { | |||
| $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | |||
| $hasone = FALSE; | |||
| //处理并保存从网上复制的图片 | |||
| /*--------------------- | |||
| function _getformhtml() | |||
| ------------------*/ | |||
| if ($formhtml == 1) { | |||
| $imagebody = stripslashes($imagebody); | |||
| $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); | |||
| @@ -116,10 +109,7 @@ else if ($dopost == 'save') { | |||
| $hasone = TRUE; | |||
| } | |||
| } | |||
| /*--------------------- | |||
| function _getformzip() | |||
| 处理从ZIP中解压的图片 | |||
| ---------------------*/ | |||
| //处理从ZIP中解压的图片 | |||
| if ($formzip == 1) { | |||
| include_once(DEDEADMIN."/file_class.php"); | |||
| $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); | |||
| @@ -48,11 +48,7 @@ if ($dopost != 'save') { | |||
| $addRow = XSSClean($addRow); | |||
| include DedeInclude("templets/album_edit.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -177,7 +173,7 @@ else if ($dopost == 'save') { | |||
| $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
| } | |||
| } | |||
| //从HTML中获取新图片 | |||
| //从网页中获取新图片 | |||
| if ($formhtml == 1 && !empty($imagebody)) { | |||
| $imagebody = stripslashes($imagebody); | |||
| $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); | |||
| @@ -186,10 +182,7 @@ else if ($dopost == 'save') { | |||
| $hasone = true; | |||
| } | |||
| } | |||
| /*--------------------- | |||
| function _getformzip() | |||
| 从ZIP文件中获取新图片 | |||
| ---------------------*/ | |||
| //从ZIP文件中获取新图片 | |||
| if ($formzip == 1) { | |||
| include_once(DEDEADMIN."/file_class.php"); | |||
| $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); | |||
| @@ -21,7 +21,7 @@ if ($dopost != 'save') { | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| //获得栏目模型id | |||
| if ($cid > 0 && $channelid == 0) { | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid';"); | |||
| $channelid = $row['channeltype']; | |||
| } else { | |||
| if ($channelid == 0) { | |||
| @@ -37,11 +37,7 @@ if ($dopost != 'save') { | |||
| $maxWright = empty($maxWright)? array('cc'=>1) : $maxWright; | |||
| include DedeInclude('templets/archives_add.htm'); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -19,10 +19,7 @@ if (empty($dopost)) { | |||
| exit(); | |||
| } | |||
| $aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : ''; | |||
| /*-------------------------- | |||
| //修改文档 | |||
| function editArchives(){ } | |||
| ---------------------------*/ | |||
| if ($dopost == 'editArchives') { | |||
| $query = "SELECT arc.id,arc.typeid,ch.maintable,ch.editcon 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); | |||
| @@ -58,10 +55,7 @@ if ($dopost == 'editArchives') { | |||
| } | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //浏览文档 | |||
| function viewArchives(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == "viewArchives") { | |||
| $aid = preg_replace("#[^0-9]#", '', $aid); | |||
| //获取主表信息 | |||
| @@ -129,10 +123,7 @@ else if ($dopost == "viewArchives") { | |||
| echo "<script>location.href='$arcurl"."?".time()."';</script>"; | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //异步上传缩略图 | |||
| function uploadLitpic(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == "uploadLitpic") { | |||
| $upfile = AdminUpload('litpic', 'imagelit', 0, false); | |||
| if ($upfile == '-1') { | |||
| @@ -171,10 +162,7 @@ else if ($dopost == "uploadLitpic") { | |||
| echo $msg; | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //推荐文档 | |||
| function commendArchives(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == "commendArchives") { | |||
| CheckPurview('a_Commend,sys_ArcBatch'); | |||
| if (!empty($aid) && empty($qstr)) { | |||
| @@ -205,10 +193,7 @@ else if ($dopost == "commendArchives") { | |||
| ShowMsg("成功把所选文档设为推荐", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //生成网页 | |||
| function makeArchives(); | |||
| ---------------------------*/ | |||
| else if ($dopost == "makeArchives") { | |||
| CheckPurview('sys_MakeHtml,sys_ArcBatch'); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| @@ -226,10 +211,7 @@ else if ($dopost == "makeArchives") { | |||
| ShowMsg("成功更新指定<span class='text-primary'>$i</span>个文件", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //审核文档 | |||
| function checkArchives() { } | |||
| ---------------------------*/ | |||
| else if ($dopost == "checkArchives") { | |||
| CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); | |||
| require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
| @@ -256,11 +238,7 @@ else if ($dopost == "checkArchives") { | |||
| } | |||
| ShowMsg("成功审核指定文档", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*----------------------------- | |||
| function moveArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'moveArchives') { | |||
| } else if ($dopost == 'moveArchives') { | |||
| CheckPurview('sys_ArcBatch'); | |||
| if (empty($totype)) { | |||
| require_once(DEDEINC.'/typelink/typelink.class.php'); | |||
| @@ -273,7 +251,7 @@ else if ($dopost == 'moveArchives') { | |||
| <option value='0'>请选择移动位置</option> | |||
| $typeOptions | |||
| </select>"; | |||
| //输出AJAX可移动窗体 | |||
| //输出Ajax可移动窗体 | |||
| $divname = 'moveArchives'; | |||
| echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 260);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">移动文档</div>"; | |||
| echo "<form name='quickeditform' action='archives_do.php' method='post'>"; | |||
| @@ -346,10 +324,7 @@ else if ($dopost == 'moveArchives') { | |||
| exit(); | |||
| } | |||
| } | |||
| /*----------------------------- | |||
| //还原文档 | |||
| function RbReturnArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'return') { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| @@ -363,15 +338,12 @@ else if ($dopost == 'return') { | |||
| $qstrs = explode('`', $qstr); | |||
| foreach ($qstrs as $aid) { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid';"); | |||
| } | |||
| ShowMsg("成功还原指定文档", "recycling.php"); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //删除文档 | |||
| function delArchives(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == "delArchives") { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| @@ -409,10 +381,7 @@ else if ($dopost == "delArchives") { | |||
| $win->Display(); | |||
| } | |||
| } | |||
| /*----------------------------- | |||
| //清空文档 | |||
| function RbClearArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'clear') { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| @@ -463,10 +432,7 @@ else if ($dopost == 'clear') { | |||
| $win->Display(); | |||
| } | |||
| } | |||
| /*----------------------------- | |||
| //清除文档 | |||
| function RbDelArchives(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'del') { | |||
| CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| @@ -504,10 +470,7 @@ else if ($dopost == 'del') { | |||
| $win->Display(); | |||
| } | |||
| } | |||
| /*----------------------------- | |||
| //快速修改 | |||
| function quickEdit(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'quickEdit') { | |||
| require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
| AjaxHead(); | |||
| @@ -590,10 +553,7 @@ else if ($dopost == 'quickEdit') { | |||
| <?php | |||
| //Ajax窗体结束 | |||
| } | |||
| /*----------------------------- | |||
| //保存快速修改文档 | |||
| function quickEditSave(){ } | |||
| ------------------------------*/ | |||
| else if ($dopost == 'quickEditSave') { | |||
| require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
| //权限检测 | |||
| @@ -629,10 +589,7 @@ else if ($dopost == 'quickEditSave') { | |||
| ShowMsg('成功更新一篇文档基本信息', $backurl); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| 分析并自动获取文档关键词 | |||
| function makekw(){ } | |||
| --------------------------*/ | |||
| //分析并自动获取文档关键词 | |||
| else if ($dopost == "makekw") { | |||
| CheckPurview('a_Commend,sys_ArcBatch'); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| @@ -715,10 +672,7 @@ else if ($dopost == "makekw") { | |||
| ShowMsg("成功分析指定文档关键词", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //批量增加属性 | |||
| function attsAdd(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == 'attsAdd') { | |||
| CheckPurview('a_Commend,sys_ArcBatch'); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| @@ -751,10 +705,7 @@ else if ($dopost == 'attsAdd') { | |||
| ShowMsg("成功对选中文档增加指定属性", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //批量删除属性 | |||
| function attsDel(){ } | |||
| ---------------------------*/ | |||
| else if ($dopost == 'attsDel') { | |||
| CheckPurview('a_Commend,sys_ArcBatch'); | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| @@ -797,15 +748,12 @@ else if ($dopost == 'attsDel') { | |||
| ShowMsg("成功对选中文档删除指定属性", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //获得批量属性处理AJAX窗体 | |||
| function attsDlg(){ } | |||
| ---------------------------*/ | |||
| //获得批量属性处理Ajax窗体 | |||
| else if ($dopost == 'attsDlg') { | |||
| if (!empty($aid) && empty($qstr)) $qstr = $aid; | |||
| $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); | |||
| AjaxHead(); | |||
| //输出AJAX可移动窗体 | |||
| //输出Ajax可移动窗体 | |||
| $divname = 'attsDlg'; | |||
| echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 260);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">{$dojobname}</div>"; | |||
| echo "<form name='quickeditform' action='archives_do.php' method='post'>"; | |||
| @@ -841,14 +789,10 @@ else if ($dopost == 'attsDlg') { | |||
| </form> | |||
| <?php | |||
| //Ajax窗体结束 | |||
| } | |||
| /*------------------------ | |||
| function getCatMap() { } | |||
| -------------------------*/ | |||
| else if ($dopost == 'getCatMap') { | |||
| } else if ($dopost == 'getCatMap') { | |||
| require_once(DEDEINC.'/typelink/typeunit.class.selector.php'); | |||
| AjaxHead(); | |||
| //输出AJAX可移动窗体 | |||
| //输出Ajax可移动窗体 | |||
| $divname = 'getCatMap'; | |||
| echo "<div class='title'>选择副栏目</div>"; | |||
| $tus = new TypeUnitSelector(); | |||
| @@ -37,11 +37,7 @@ if ($dopost != 'save') { | |||
| $tags = GetTags($aid); | |||
| include DedeInclude("templets/archives_edit.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -21,7 +21,7 @@ if ($dopost != 'save') { | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| //获得栏目模型id | |||
| if ($cid > 0 && $channelid == 0) { | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid';"); | |||
| $channelid = $row['channeltype']; | |||
| } else { | |||
| if ($channelid == 0) { | |||
| @@ -34,11 +34,7 @@ if ($dopost != 'save') { | |||
| $channelid = $cInfos['id']; | |||
| include DedeInclude("templets/archives_sg_add.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| if ($typeid == 0) { | |||
| @@ -31,11 +31,7 @@ if ($dopost != 'save') { | |||
| $tags = GetTags($aid); | |||
| include DedeInclude('templets/archives_sg_edit.htm'); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| if ($typeid == 0) { | |||
| @@ -26,7 +26,7 @@ if ($dopost != 'save') { | |||
| $keywords = $writer = $source = $body = $description = $title = ''; | |||
| //获得栏目模型id | |||
| if ($cid > 0 && $channelid == 0) { | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid';"); | |||
| $channelid = $row['channeltype']; | |||
| } else { | |||
| if ($channelid == 0) { | |||
| @@ -40,11 +40,7 @@ if ($dopost != 'save') { | |||
| $maxWright = empty($maxWright)? array('cc'=>1) : $maxWright; | |||
| include DedeInclude("templets/article_add.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -181,7 +177,7 @@ else if ($dopost == 'save') { | |||
| $picTitle = TRUE; | |||
| $titleSet = ",title='{$pictitle}'"; | |||
| } | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}';"); | |||
| } | |||
| } | |||
| } | |||
| @@ -128,7 +128,7 @@ if ($dojob == '') { | |||
| if (!preg_match("/#p#/iU", $body)) { | |||
| $body = SpLongBody($body, $cfg_arcautosp_size * 1024, "#p#分页标题#e#"); | |||
| $body = addslashes($body); | |||
| $dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ;"); | |||
| } | |||
| } | |||
| }//end if limit | |||
| @@ -44,11 +44,7 @@ if ($dopost != 'save') { | |||
| $tags = GetTags($aid); | |||
| include DedeInclude("templets/article_edit.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -65,7 +65,7 @@ else if ($dopost == 'delsel') { | |||
| DelArc($naid, 'OFF'); | |||
| } | |||
| } | |||
| $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); | |||
| $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`;"); | |||
| ShowMsg("一共删除了<span class='text-primary'>{$totalarc}</span>篇重复的文档", "javascript:;"); | |||
| exit(); | |||
| } | |||
| @@ -40,11 +40,7 @@ if ($dopost == 'quick') { | |||
| $typeOptions = $tl->GetOptionArray(0, 0, $channelid); | |||
| include DedeInclude('templets/catalog_add_quick.htm'); | |||
| exit(); | |||
| } | |||
| /*--------------------- | |||
| function action_savequick(){ } | |||
| ---------------------*/ | |||
| else if ($dopost == 'savequick') { | |||
| } else if ($dopost == 'savequick') { | |||
| if (!isset($savetype)) $savetype = ''; | |||
| $isdefault = isset($isdefault) ? $isdefault : 0; | |||
| $tempindex = "{style}/index_{$nid}.htm"; | |||
| @@ -126,11 +122,7 @@ else if ($dopost == 'savequick') { | |||
| UpDateCatCache(); | |||
| ShowMsg('成功增加指定栏目', 'catalog_main.php'); | |||
| exit(); | |||
| } | |||
| /*--------------------- | |||
| function action_save(){ } | |||
| ---------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| $smalltypes = ''; | |||
| if (empty($smalltype)) $smalltype = ''; | |||
| if (is_array($smalltype)) $smalltypes = join(',', $smalltype); | |||
| @@ -16,10 +16,7 @@ if (empty($dopost)) { | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| $unittype = empty($unittype) ? 0 : intval($unittype); | |||
| $channelid = empty($channelid) ? 0 : intval($channelid); | |||
| /*-------------------------- | |||
| //增加文档 | |||
| function addArchives(); | |||
| ---------------------------*/ | |||
| if ($dopost == "addArchives") { | |||
| //默认文档调用发布表单 | |||
| if (empty($cid) && empty($channelid)) { | |||
| @@ -43,10 +40,7 @@ if ($dopost == "addArchives") { | |||
| header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //管理文档 | |||
| function listArchives(); | |||
| ---------------------------*/ | |||
| else if ($dopost == "listArchives") { | |||
| if (!empty($gurl)) { | |||
| if (empty($arcrank)) { | |||
| @@ -78,18 +72,12 @@ else if ($dopost == "listArchives") { | |||
| header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //浏览通用模板目录 | |||
| function viewTempletDir(); | |||
| ---------------------------*/ | |||
| else if ($dopost == "viewTemplet") { | |||
| header("location:tpl.php?path=/".$cfg_df_style); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| 浏览单个页面的栏目 | |||
| function ViewSgPage() | |||
| ------------------------*/ | |||
| //浏览单个页面的栏目 | |||
| else if ($dopost == "viewSgPage") { | |||
| require_once(DEDEINC."/archive/listview.class.php"); | |||
| $lv = new ListView($cid); | |||
| @@ -97,10 +85,7 @@ else if ($dopost == "viewSgPage") { | |||
| ShowMsg("更新缓冲,请稍后", $pageurl); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| 修改栏目排列顺序 | |||
| function upRank() | |||
| ------------------------*/ | |||
| //修改栏目排列顺序 | |||
| else if ($dopost == "upRank") { | |||
| //检查权限许可 | |||
| CheckPurview('t_Edit,t_AccEdit'); | |||
| @@ -133,10 +118,7 @@ else if ($dopost == "upRank") { | |||
| ShowMsg("操作成功,正在返回", "catalog_main.php"); | |||
| exit(); | |||
| } | |||
| /*-------------------------- | |||
| //更新栏目缓存 | |||
| function UpCatlogCache(); | |||
| ---------------------------*/ | |||
| else if ($dopost == "upcatcache") { | |||
| UpDateCatCache(); | |||
| $sql = " TRUNCATE TABLE `#@__arctiny`"; | |||
| @@ -161,18 +143,12 @@ else if ($dopost == "upcatcache") { | |||
| ShowMsg("操作成功,正在返回", "catalog_main.php"); | |||
| exit(); | |||
| } | |||
| /*--------------------- | |||
| 获取js文件 | |||
| function GetJs | |||
| ----------------------*/ | |||
| //获取js文件 | |||
| else if ($dopost == "GetJs") { | |||
| header("location:makehtml_js.php"); | |||
| exit(); | |||
| } | |||
| /*----------- | |||
| 获得子类的文档 | |||
| function GetSunListsMenu(); | |||
| -----------*/ | |||
| //获得子类的文档 | |||
| else if ($dopost == "GetSunListsMenu") { | |||
| $userChannel = $cuserLogin->getUserChannel(); | |||
| require_once(DEDEINC."/typelink/typeunit.class.menu.php"); | |||
| @@ -180,12 +156,7 @@ else if ($dopost == "GetSunListsMenu") { | |||
| PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); | |||
| $tu = new TypeUnit($userChannel); | |||
| $tu->LogicListAllSunType($cid, " "); | |||
| } | |||
| /*----------- | |||
| 获得子类的文档 | |||
| function GetSunLists(); | |||
| -----------*/ | |||
| else if ($dopost == "GetSunLists") { | |||
| } else if ($dopost == "GetSunLists") { | |||
| require_once(DEDEINC."/typelink/typeunit.class.admin.php"); | |||
| AjaxHead(); | |||
| PutCookie('lastCid', $cid, 3600 * 24, "/"); | |||
| @@ -196,10 +167,7 @@ else if ($dopost == "GetSunLists") { | |||
| echo "</table>\r\n"; | |||
| $tu->Close(); | |||
| } | |||
| /*---------------- | |||
| 合并栏目 | |||
| function unitCatalog() { } | |||
| -----------------*/ | |||
| //合并栏目 | |||
| else if ($dopost == 'unitCatalog') { | |||
| CheckPurview('t_Move'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| @@ -255,10 +223,7 @@ else if ($dopost == 'unitCatalog') { | |||
| exit(); | |||
| } | |||
| } | |||
| /*---------------- | |||
| 移动栏目 | |||
| function moveCatalog() { } | |||
| -----------------*/ | |||
| //移动栏目 | |||
| else if ($dopost == 'moveCatalog') { | |||
| CheckPurview('t_Move'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| @@ -16,9 +16,6 @@ $id = isset($id) ? intval($id) : 0; | |||
| CheckPurview('t_Edit,t_AccEdit'); | |||
| //检查栏目操作许可 | |||
| CheckCatalog($id, '您无权修改本栏目'); | |||
| /*----------------------- | |||
| function action_save() | |||
| ----------------------*/ | |||
| if ($dopost == "save") { | |||
| $description = Html2Text($description, 1); | |||
| $keywords = Html2Text($keywords, 1); | |||
| @@ -36,7 +33,7 @@ if ($dopost == "save") { | |||
| } | |||
| //如果选择子栏目可投稿,更新顶级栏目为可投稿 | |||
| if ($topid > 0 && $issend == 1) { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid';"); | |||
| } | |||
| $slinks = " id IN (".GetSonIds($id).")"; | |||
| //修改顶级栏目时强制修改下级的多站点支持属性 | |||
| @@ -70,7 +67,7 @@ else if ($dopost == "savetime") { | |||
| } | |||
| //如果选择子栏目可投稿,更新顶级栏目为可投稿 | |||
| if ($topid > 0 && $issend == 1) { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid';"); | |||
| } | |||
| $upquery = "UPDATE `#@__arctype` SET issend='$issend',sortrank='$sortrank',typedir='$typedir',typename='$typename',isdefault='$isdefault',defaultname='$defaultname',ispart='$ispart',corank='$corank' $uptopsql WHERE id='$id' "; | |||
| if (!$dsql->ExecuteNoneQuery($upquery)) { | |||
| @@ -41,7 +41,7 @@ $isUrlOpen = @ini_get('allow_url_fopen'); | |||
| $dedeNowurl = GetCurUrl(); | |||
| $dedeNowurls = explode('?', $dedeNowurl); | |||
| $s_scriptName = $dedeNowurls[0]; | |||
| //检验用户登录状态 | |||
| //检验会员登录状态 | |||
| $cuserLogin = new userLogin(); | |||
| if ($cuserLogin->getUserID() == -1) { | |||
| if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | |||
| @@ -139,10 +139,10 @@ function DedeInclude($filename, $isabs = FALSE) | |||
| return $isabs ? $filename : DEDEADMIN.'/'.$filename; | |||
| } | |||
| /** | |||
| * 根据用户mid获取用户名称 | |||
| * 根据会员mid获取会员名称 | |||
| * | |||
| * @access public | |||
| * @param int $mid 用户id | |||
| * @param int $mid 会员id | |||
| * @return string | |||
| */ | |||
| if (!function_exists('GetMemberName')) { | |||
| @@ -118,8 +118,8 @@ else if ($action == 'move') { | |||
| ShowMsg('该操作必须指定栏目', 'javascript:;'); | |||
| exit(); | |||
| } | |||
| $typeold = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid'; "); | |||
| $typenew = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$newtypeid'; "); | |||
| $typeold = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid';"); | |||
| $typenew = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$newtypeid';"); | |||
| if (!is_array($typenew)) { | |||
| ShowMsg("无法检测移动到的新栏目的信息,不能完成操作", "javascript:;"); | |||
| exit(); | |||
| @@ -1,6 +1,6 @@ | |||
| <?php | |||
| /** | |||
| * 该页仅用于检测用户登录的情况,如要手工修改系统配置,请修改common.inc.php | |||
| * 该页仅用于检测会员登录的情况,如要手工修改系统配置,请修改common.inc.php | |||
| * | |||
| * @version $id:config.php 9:43 2010年7月8日 tianya $ | |||
| * @package DedeBIZ.Dialog | |||
| @@ -17,7 +17,7 @@ $isUrlOpen = @ini_get('allow_url_fopen'); | |||
| $dedeNowurl = GetCurUrl(); | |||
| $dedeNowurls = explode("?", $dedeNowurl); | |||
| $s_scriptName = $dedeNowurls[0]; | |||
| //检验用户登录状态 | |||
| //检验会员登录状态 | |||
| $cuserLogin = new userLogin(); | |||
| if ($cuserLogin->getUserID() <= 0) { | |||
| if (empty($adminDirHand)) { | |||
| @@ -14,9 +14,6 @@ require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| if (empty($dopost)) $dopost = ""; | |||
| $diyid = (empty($diyid) ? 0 : intval($diyid)); | |||
| /*---------------- | |||
| function __SaveEdit() | |||
| -----------------*/ | |||
| if ($dopost == "save") { | |||
| $public = isset($public) && is_numeric($public) ? $public : 0; | |||
| $name = dede_htmlspecialchars($name); | |||
| @@ -24,11 +21,7 @@ if ($dopost == "save") { | |||
| $dsql->ExecuteNoneQuery($query); | |||
| ShowMsg("成功修改一个自定义表单", "diy_main.php"); | |||
| exit(); | |||
| } | |||
| /*---------------- | |||
| function __Delete() | |||
| -----------------*/ | |||
| else if ($dopost == "delete") { | |||
| } else if ($dopost == "delete") { | |||
| @set_time_limit(0); | |||
| CheckPurview('c_Del'); | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid='$diyid'"); | |||
| @@ -62,9 +55,6 @@ else if ($dopost == "delete") { | |||
| exit(); | |||
| } | |||
| } | |||
| /*---------------- | |||
| function edit() | |||
| -----------------*/ | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid='$diyid'"); | |||
| include DEDEADMIN."/templets/diy_edit.htm"; | |||
| ?> | |||
| @@ -15,9 +15,6 @@ if (empty($action)) $action = ''; | |||
| $mysql_version = $dsql->GetVersion(); | |||
| $mysql_versions = explode(".", trim($mysql_version)); | |||
| $mysql_version = $mysql_versions[0].".".$mysql_versions[1]; | |||
| /*---------------------- | |||
| function Save() | |||
| ---------------------*/ | |||
| if ($action == 'save') { | |||
| //模型信息 | |||
| $fieldname = strtolower($fieldname); | |||
| @@ -70,9 +67,6 @@ if ($action == 'save') { | |||
| exit(); | |||
| } | |||
| //检测模型相关信息,并初始化相关数据 | |||
| /*---------------------- | |||
| function ShowPage() | |||
| ---------------------*/ | |||
| $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'"); | |||
| $trueTable = $row['table']; | |||
| $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( | |||
| @@ -33,9 +33,6 @@ foreach ($ds as $d) { | |||
| $fieldtypes[$dds[0]] = $dds[1]; | |||
| } | |||
| //保存修改 | |||
| /*-------------------- | |||
| function _SAVE() | |||
| ----------------------*/ | |||
| if ($action == 'save') { | |||
| if (!isset($fieldtypes[$dtype])) { | |||
| ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | |||
| @@ -91,10 +88,7 @@ if ($action == 'save') { | |||
| ShowMsg("成功修改一个字段的配置", "diy_edit.php?diyid={$diyid}"); | |||
| exit(); | |||
| } | |||
| /*------------------ | |||
| 删除字段 | |||
| function _DELETE() | |||
| -------------------*/ | |||
| //删除字段 | |||
| else if ($action == "delete") { | |||
| //检测旧数据类型,并替换为新配置 | |||
| foreach ($dtp->CTags as $tagid => $ctag) { | |||
| @@ -20,38 +20,23 @@ else $inpath = $cfg_basedir.$activepath; | |||
| //文件管理器交互与逻辑控制文件 | |||
| $fmm = new FileManagement(); | |||
| $fmm->Init(); | |||
| /*--------------- | |||
| function __rename(); | |||
| ----------------*/ | |||
| if ($fmdo == "rename") { | |||
| $fmm->RenameFile($oldfilename, $newfilename); | |||
| } | |||
| //新建目录 | |||
| /*--------------- | |||
| function __newdir(); | |||
| ----------------*/ | |||
| else if ($fmdo == "newdir") { | |||
| CheckCSRF(); | |||
| $fmm->NewDir($newpath); | |||
| } | |||
| //移动文件 | |||
| /*--------------- | |||
| function __move(); | |||
| ----------------*/ | |||
| else if ($fmdo == "move") { | |||
| $fmm->MoveFile($filename, $newpath); | |||
| } | |||
| //删除文件 | |||
| /*--------------- | |||
| function __delfile(); | |||
| ----------------*/ | |||
| else if ($fmdo == "del") { | |||
| $fmm->DeleteFile($filename); | |||
| } | |||
| //文件修改 | |||
| /*--------------- | |||
| function __saveEdit(); | |||
| ----------------*/ | |||
| else if ($fmdo == "edit") { | |||
| CheckCSRF(); | |||
| $filename = str_replace("..", "", $filename); | |||
| @@ -92,9 +77,6 @@ else if ($fmdo=="editview") | |||
| } | |||
| */ | |||
| //文件上传 | |||
| /*--------------- | |||
| function __upload(); | |||
| ----------------*/ | |||
| else if ($fmdo == "upload") { | |||
| $j = 0; | |||
| for ($i = 1; $i <= 50; $i++) { | |||
| @@ -34,7 +34,7 @@ if ($dopost=='getlist') { | |||
| //删除字段 | |||
| else if ($dopost=='del') { | |||
| $aid = preg_replace("#[^0-9]#", "", $aid); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__freelist` WHERE aid='$aid'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__freelist` WHERE aid='$aid';"); | |||
| AjaxHead(); | |||
| GetTagList($dsql,$pageno,$pagesize,$orderby); | |||
| exit(); | |||
| @@ -40,10 +40,10 @@ if ($dopost == "add") { | |||
| } else { | |||
| $imgurl = $logo; | |||
| } | |||
| //强制检测用户友情链接分类是否数据结构不符 | |||
| //强制检测会员友情链接分类是否数据结构不符 | |||
| if (empty($typeid) || preg_match("#[^0-9]#", $typeid)) { | |||
| $typeid = 0; | |||
| $dsql->ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT; "); | |||
| $dsql->ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT;"); | |||
| } | |||
| $sortrank = isset($sortrank)? intval($sortrank) : 1; | |||
| $url = isset($url)? HtmlReplace($url, -1) : ''; | |||
| @@ -60,7 +60,7 @@ | |||
| >>系统管理权限 | |||
| >sys_User>系统用户管理 | |||
| >sys_User>系统会员管理 | |||
| >sys_Group>系统组管理 | |||
| >sys_MdPwd>修改个人密码 | |||
| >sys_DelUpload>删除附件 | |||
| @@ -328,13 +328,13 @@ $actionSearch[9] = array( | |||
| 'linkurl' => 'sys_info.php' | |||
| ), | |||
| 1 => array( | |||
| 'title' => '系统用户管理', | |||
| 'title' => '系统会员管理', | |||
| 'description' => '网站管理员管理', | |||
| 'purview' => 'sys_User', | |||
| 'linkurl' => 'sys_admin_user.php' | |||
| ), | |||
| 2 => array( | |||
| 'title' => '用户组设置', | |||
| 'title' => '会员组设置', | |||
| 'description' => '网站管理员组别的划分', | |||
| 'purview' => 'sys_Group', | |||
| 'linkurl' => 'sys_group.php' | |||
| @@ -174,7 +174,7 @@ function GetCurContent($body) | |||
| * | |||
| * @access public | |||
| * @param string $url 地址 | |||
| * @param int $uid 用户id | |||
| * @param int $uid 会员id | |||
| * @return array | |||
| */ | |||
| function GetRemoteImage($url, $uid = 0) | |||
| @@ -351,7 +351,7 @@ function GetDDImage($litpic, $picname, $isremote) | |||
| $ntime = time(); | |||
| if (($litpic != 'none' || $litpic != 'ddfirst') && !empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name']) | |||
| ) { | |||
| //如果用户自行上传缩略图 | |||
| //如果会员自行上传缩略图 | |||
| $istype = 0; | |||
| $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); | |||
| $_FILES[$litpic]['type'] = strtolower(trim($_FILES[$litpic]['type'])); | |||
| @@ -665,7 +665,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||
| $filename = ''; | |||
| $isrm_up = FALSE; | |||
| $handurl = trim($handurl); | |||
| //如果用户自行上传了图片 | |||
| //如果会员自行上传了图片 | |||
| if (!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) { | |||
| $istype = 0; | |||
| $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); | |||
| @@ -60,7 +60,7 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||
| /** 删除到回收站 **/ | |||
| if ($cfg_delete == 'Y' && $type == 'ON') { | |||
| $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='-2' WHERE id='$aid' "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-2' WHERE id = '$aid'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-2' WHERE id = '$aid';"); | |||
| } else { | |||
| //删除数据库记录 | |||
| if (!$onlyfile) { | |||
| @@ -13,7 +13,7 @@ | |||
| * | |||
| * @access public | |||
| * @param string $selid 选择id | |||
| * @param string $userCatalog 用户栏目 | |||
| * @param string $userCatalog 会员栏目 | |||
| * @param string $channeltype 栏目类型 | |||
| * @return string | |||
| */ | |||
| @@ -31,7 +31,7 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||
| if ($row['ispart'] == 1) $OptionArrayList .= "<option value='".$row['id']."' class='option1' selected='selected'>".$row['typename']."(封面栏目)</option>"; | |||
| else $OptionArrayList .= "<option value='".$row['id']."' selected='selected'>".$row['typename']."</option>"; | |||
| } | |||
| //是否限定用户管理的栏目 | |||
| //是否限定会员管理的栏目 | |||
| if ($cfg_admin_channel == 'array') { | |||
| if (count($admin_catalogs) == 0) { | |||
| $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE 1=2 "; | |||
| @@ -60,8 +60,8 @@ if ($cuserLogin->getUserType() >= 10) { | |||
| <m:top item='12_' name='系统设置' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data' icon='fa-cog'> | |||
| <m:item name='系统配置变量' link='sys_info.php' rank='sys_Edit' target='main' /> | |||
| <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> | |||
| <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> | |||
| <m:item name='用户组设置' link='sys_group.php' rank='sys_Group' target='main' /> | |||
| <m:item name='系统会员管理' link='sys_admin_user.php' rank='sys_User' target='main' /> | |||
| <m:item name='会员组设置' link='sys_group.php' rank='sys_Group' target='main' /> | |||
| <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> | |||
| <m:item name='软件下载设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> | |||
| <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> | |||
| @@ -78,7 +78,7 @@ if (!function_exists('PostHost')) { | |||
| } | |||
| } | |||
| if (!function_exists('TestAdminPWD')) { | |||
| //返回结果,1没有修改默认管理员名称,2没有修改默认管理员用户名和密码,3没有发现默认账号 | |||
| //返回结果,1没有修改默认管理员名称,2没有修改默认管理员会员名和密码,3没有发现默认账号 | |||
| function TestAdminPWD() | |||
| { | |||
| global $dsql; | |||
| @@ -131,6 +131,6 @@ function OptimizeData($dsql) | |||
| } | |||
| $tptable = ''; | |||
| foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); | |||
| $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); | |||
| $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable;"); | |||
| } | |||
| ?> | |||
| @@ -13,9 +13,7 @@ require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_Upload,sys_MyUpload'); | |||
| if (empty($dopost)) $dopost = ""; | |||
| $backurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "javascript:history.go(-1);"; | |||
| /*--------------------------- | |||
| function __del_file() //删除附件 | |||
| -----------------------------*/ | |||
| //删除附件 | |||
| if ($dopost == 'del') { | |||
| CheckPurview('sys_DelUpload'); | |||
| if (empty($ids)) { | |||
| @@ -64,9 +62,7 @@ if ($dopost == 'del') { | |||
| exit(); | |||
| } | |||
| } | |||
| /*-------------------------------- | |||
| function __save_edit() //保存修改 | |||
| -----------------------------------*/ | |||
| //保存修改 | |||
| else if ($dopost == 'save') { | |||
| if ($aid == "") exit(); | |||
| CheckCSRF(); | |||
| @@ -24,7 +24,7 @@ if ($dopost == "delmember") { | |||
| exit(); | |||
| } | |||
| if (!empty($id)) { | |||
| //删除用户信息 | |||
| //删除会员信息 | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='$id' LIMIT 1 "); | |||
| $rs = 0; | |||
| if ($row['matt'] == 10) { | |||
| @@ -39,7 +39,7 @@ if ($dopost == "delmember") { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid='$id' LIMIT 1"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid='$id' LIMIT 1"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid='$id' LIMIT 1"); | |||
| //删除用户相关数据 | |||
| //删除会员相关数据 | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='$id' "); | |||
| @@ -79,14 +79,14 @@ if ($dopost == "delmember") { | |||
| exit(); | |||
| } | |||
| if (!empty($id)) { | |||
| //删除用户信息 | |||
| //删除会员信息 | |||
| $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (".str_replace("`", ",", $id).") And matt<>10 "); | |||
| if ($rs > 0) { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| //删除用户相关数据 | |||
| //删除会员相关数据 | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (".str_replace("`", ",", $id).") "); | |||
| @@ -21,7 +21,7 @@ else $keyword = trim(FilterSearch($keyword)); | |||
| $mtypeform = empty($mtype) ? "<option value=''>类型</option>\r\n" : "<option value='$mtype'>$mtype</option>\r\n"; | |||
| $sexform = empty($sex) ? "<option value=''>性别</option>\r\n" : "<option value='$sex'>$sex</option>\r\n"; | |||
| $sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); | |||
| $staArr = array(-2 => '限制禁言用户', -1 => '未通过审核', 0 => '审核通过需要填写信息', 1 => '待补充完善信息', 2 => '正常使用'); | |||
| $staArr = array(-2 => '限制禁言会员', -1 => '未通过审核', 0 => '审核通过需要填写信息', 1 => '待补充完善信息', 2 => '正常使用'); | |||
| $staArrmatt = array(1 => '被推荐', 0 => '非普通 '); | |||
| $MemberTypes = array(); | |||
| $dsql->SetQuery("SELECT `rank`,membername From `#@__arcrank` where `rank`>0 "); | |||
| @@ -10,8 +10,8 @@ | |||
| */ | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('member_Pm'); | |||
| //检查用户名的合法性 | |||
| function CheckUserID($uid, $msgtitle = '用户名', $ckhas = true) | |||
| //检查会员名的合法性 | |||
| function CheckUserID($uid, $msgtitle = '会员名', $ckhas = true) | |||
| { | |||
| global $cfg_mb_notallow, $cfg_mb_idmin, $cfg_md_idurl, $cfg_soft_lang, $dsql; | |||
| if ($cfg_mb_notallow != '') { | |||
| @@ -52,14 +52,14 @@ if ($action == "post") { | |||
| ShowMsg("请填写信息标题", "-1"); | |||
| exit(); | |||
| } | |||
| $msg = CheckUserID($msgtoid, "用户名", false); | |||
| $msg = CheckUserID($msgtoid, "会员名", false); | |||
| if ($msg != 'ok') { | |||
| ShowMsg($msg, "-1"); | |||
| exit(); | |||
| } | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__member` where userid like '$msgtoid' "); | |||
| if (!is_array($row)) { | |||
| ShowMsg("您指定的用户不存在,不能发送信息", "-1"); | |||
| ShowMsg("您指定的会员不存在,不能发送信息", "-1"); | |||
| exit(); | |||
| } | |||
| $subject = cn_substrR(HtmlReplace($subject, 1), 60); | |||
| @@ -14,10 +14,7 @@ if (empty($dopost)) $dopost = ''; | |||
| if (empty($fmdo)) $fmdo = ''; | |||
| $ENV_GOBACK_URL = isset($_COOKIE['ENV_GOBACK_URL']) ? 'member_main.php' : ''; | |||
| $row = array(); | |||
| /*---------------- | |||
| function __Toadmin() | |||
| 升级为管理员 | |||
| ----------------*/ | |||
| //升级为管理员 | |||
| if ($dopost == "toadmin") { | |||
| $pwd = trim($pwd); | |||
| if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | |||
| @@ -82,8 +79,7 @@ if ($dopost == "toadmin") { | |||
| exit(); | |||
| } | |||
| $id = preg_replace("#[^0-9]#", "", $id); | |||
| //显示用户信息 | |||
| //显示会员信息 | |||
| $randcode = mt_rand(10000, 99999); | |||
| $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | |||
| $typeOptions = ''; | |||
| @@ -15,13 +15,13 @@ $id = preg_replace("#[^0-9]#", "", $id); | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='$id'"); | |||
| $staArr = array( | |||
| -10 => '等待验证邮件', | |||
| -2 => '限制禁言用户', | |||
| -2 => '限制禁言会员', | |||
| -1 => '未通过审核', | |||
| 0 => '审核通过需要填写信息', | |||
| 1 => '待补充完善信息', | |||
| 2 => '正常使用' | |||
| ); | |||
| //如果这个用户是管理员帐号,必须有足够权限的用户才能操作 | |||
| //如果这个会员是管理员帐号,必须有足够权限的会员才能操作 | |||
| if ($row['matt'] == 10) CheckPurview('sys_User'); | |||
| if ($row['uptime'] > 0 && $row['exptime'] > 0) { | |||
| $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; | |||
| @@ -52,9 +52,6 @@ function ReWriteConfigAuto() | |||
| fwrite($fp, "?".">"); | |||
| fclose($fp); | |||
| } | |||
| /*-------------- | |||
| function ShowAll(); | |||
| --------------*/ | |||
| if ($action == '') { | |||
| $types = array('soft' => '模块', 'templets' => '模板', 'plus' => '小插件', 'patch' => '补丁'); | |||
| $dm = new DedeModule($mdir); | |||
| @@ -69,11 +66,7 @@ if ($action == '') { | |||
| require_once(dirname(__FILE__)."/templets/module_main.htm"); | |||
| $dm->Clear(); | |||
| exit(); | |||
| } | |||
| /*-------------- | |||
| function ViewDevelopoer(); | |||
| --------------*/ | |||
| else if ($action == 'view_developoer') { | |||
| } else if ($action == 'view_developoer') { | |||
| //检验开发者信息 | |||
| $dm = new DedeModule($mdir); | |||
| $info = $dm->GetModuleInfo($hash); | |||
| @@ -98,11 +91,7 @@ else if ($action == 'view_developoer') { | |||
| } | |||
| ShowMsg("<p>开发者名称:{$devInfo['dev_name']}</p><p>开发者id:{$devInfo['dev_id']}</p><span>认证于:{$authAt}</span>", "-1"); | |||
| exit; | |||
| } | |||
| /*-------------- | |||
| function Setup(); | |||
| --------------*/ | |||
| else if ($action == 'setup') { | |||
| } else if ($action == 'setup') { | |||
| $dm = new DedeModule($mdir); | |||
| $infos = $dm->GetModuleInfo($hash); | |||
| if ($infos == null) { | |||
| @@ -219,11 +208,7 @@ else if ($action == 'setup') { | |||
| $win->Display(); | |||
| $dm->Clear(); | |||
| exit(); | |||
| } | |||
| /*--------------- | |||
| function SetupRun() | |||
| --------------*/ | |||
| else if ($action == 'setupstart') { | |||
| } else if ($action == 'setupstart') { | |||
| if (!is_writeable($mdir)) { | |||
| ShowMsg("目录<span class='text-primary'>{$mdir}</span>不支持写入,这导致程序安装没法正常创建", "-1"); | |||
| exit(); | |||
| @@ -280,11 +265,7 @@ else if ($action == 'setupstart') { | |||
| ShowMsg('模块安装完成', 'module_main.php'); | |||
| exit(); | |||
| } | |||
| } | |||
| /*-------------- | |||
| function DelModule(); | |||
| --------------*/ | |||
| else if ($action == 'del') { | |||
| } else if ($action == 'del') { | |||
| $dm = new DedeModule($mdir); | |||
| $infos = $dm->GetModuleInfo($hash); | |||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性'); | |||
| @@ -335,11 +316,7 @@ else if ($action == 'del') { | |||
| unlink($modfile) or die("删除文件<span class='text-primary'>{$modfile}</span>失败"); | |||
| ShowMsg("成功删除一个模块文件", "module_main.php"); | |||
| exit(); | |||
| } | |||
| /*-------------- | |||
| function UnInstall(); | |||
| --------------*/ | |||
| else if ($action == 'uninstall') { | |||
| } else if ($action == 'uninstall') { | |||
| $dm = new DedeModule($mdir); | |||
| $infos = $dm->GetModuleInfo($hash); | |||
| if ($infos['url'] == '') $infos['url'] = ' '; | |||
| @@ -404,11 +381,7 @@ else if ($action == 'uninstall') { | |||
| $win->Display(); | |||
| $dm->Clear(); | |||
| exit(); | |||
| } | |||
| /*-------------- | |||
| function UnInstallRun(); | |||
| --------------*/ | |||
| else if ($action == 'uninstallok') { | |||
| } else if ($action == 'uninstallok') { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); | |||
| $dm = new DedeModule($mdir); | |||
| $minfos = (array)$dm->GetModuleInfo($hash); | |||
| @@ -441,11 +414,7 @@ else if ($action == 'uninstallok') { | |||
| ShowMsg('模块卸载完成', 'module_main.php'); | |||
| exit(); | |||
| } | |||
| } | |||
| /*-------------- | |||
| function ShowReadme(); | |||
| --------------*/ | |||
| else if ($action == 'showreadme') { | |||
| } else if ($action == 'showreadme') { | |||
| $dm = new DedeModule($mdir); | |||
| $msg = $dm->GetSystemFile($hash, 'readme'); | |||
| $msg = preg_replace("/(.*)<body/isU", "", $msg); | |||
| @@ -459,11 +428,7 @@ else if ($action == 'showreadme') { | |||
| $winform = $win->GetWindow("hand"); | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*-------------- | |||
| function ViewOne(); | |||
| --------------*/ | |||
| else if ($action == 'view') { | |||
| } else if ($action == 'view') { | |||
| $dm = new DedeModule($mdir); | |||
| $infos = $dm->GetModuleInfo($hash); | |||
| if ($infos['url'] == '') $infos['url'] = ' '; | |||
| @@ -535,11 +500,7 @@ else if ($action == 'view') { | |||
| $win->Display(); | |||
| $dm->Clear(); | |||
| exit(); | |||
| } | |||
| /*-------------- | |||
| function Edit(); | |||
| --------------*/ | |||
| else if ($action == 'edit') { | |||
| } else if ($action == 'edit') { | |||
| $dm = new DedeModule($mdir); | |||
| $minfos = (array)$dm->GetModuleInfo($hash); | |||
| extract($minfos, EXTR_SKIP); | |||
| @@ -554,11 +515,7 @@ else if ($action == 'edit') { | |||
| $dm->Clear(); | |||
| require_once(dirname(__FILE__).'/templets/module_edit.htm'); | |||
| exit(); | |||
| } | |||
| /*-------------- | |||
| function Download(); | |||
| --------------*/ | |||
| else if ($action == 'download') { | |||
| } else if ($action == 'download') { | |||
| ShowMsg("暂不支持模块下载功能", "javascript:;"); | |||
| } | |||
| ?> | |||
| @@ -21,10 +21,7 @@ if ($action == '') { | |||
| require_once(dirname(__FILE__)."/templets/module_make.htm"); | |||
| exit(); | |||
| } | |||
| /*------------- | |||
| //生成项目 | |||
| function Makemodule() | |||
| --------------*/ | |||
| else if ($action == 'make') { | |||
| require_once(DEDEINC.'/libraries/dedehttpdown.class.php'); | |||
| //校验私钥,确定开发者身份 | |||
| @@ -168,10 +165,7 @@ $filelist | |||
| ShowMsg("成功对一个新模块进行编译", "module_main.php"); | |||
| exit(); | |||
| } | |||
| /*------------- | |||
| //修改项目 | |||
| function editModule() | |||
| --------------*/ | |||
| else if ($action == 'edit') { | |||
| $filelist = str_replace("\r", "\n", trim($filelist)); | |||
| $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); | |||
| @@ -14,9 +14,6 @@ require_once(DEDEINC."/dedetag.class.php"); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| if (empty($dopost)) $dopost = ""; | |||
| $id = isset($id) && is_numeric($id) ? $id : 0; | |||
| /*---------------- | |||
| function __ShowHide() | |||
| -----------------*/ | |||
| if ($dopost == "show") { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=1 WHERE id='$id' "); | |||
| ShowMsg("操作成功", "mychannel_main.php"); | |||
| @@ -25,11 +22,7 @@ if ($dopost == "show") { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id'"); | |||
| ShowMsg("操作成功", "mychannel_main.php"); | |||
| exit(); | |||
| } | |||
| /*---------------- | |||
| function __CopyStart() | |||
| -----------------*/ | |||
| else if ($dopost == "copystart") { | |||
| } else if ($dopost == "copystart") { | |||
| if ($id == -1) { | |||
| ShowMsg("专题文档模型不支持复制", "-1"); | |||
| exit(); | |||
| @@ -88,11 +81,7 @@ else if ($dopost == "copystart") { | |||
| $winform = $win->GetWindow("ok", ""); | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*---------------- | |||
| function __Export() | |||
| -----------------*/ | |||
| else if ($dopost == "export") { | |||
| } else if ($dopost == "export") { | |||
| if ($id == -1) { | |||
| ShowMsg("专题文档模型不支持导出", "-1"); | |||
| exit(); | |||
| @@ -113,11 +102,7 @@ else if ($dopost == "export") { | |||
| $winform = $win->GetWindow("hand", "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/codemirror.css\"><script type=\"text/javascript\" src=\"js/codemirror.js\"></script><script type=\"text/javascript\" src=\"js/mode/xml/xml.js\"></script><script type=\"text/javascript\" src=\"js/mode/javascript/javascript.js\"></script><script type=\"text/javascript\" src=\"js/mode/css/css.js\"></script><script type=\"text/javascript\" src=\"js/mode/htmlmixed/htmlmixed.js\"></script><textarea name='config' id='content' style='width:98%;height:300px;word-wrap: break-word;word-break:break-all;'>".$channelconfig."</textarea><script type=\"text/javascript\">var editor = CodeMirror.fromTextArea(document.getElementById('content'), {lineNumbers: true,lineWrapping: true,mode: 'text/html'});</script>"); | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*---------------- | |||
| function __ExportIn() | |||
| -----------------*/ | |||
| else if ($dopost == "exportin") { | |||
| } else if ($dopost == "exportin") { | |||
| $wintitle = "导入文档模型规则"; | |||
| $wecome_info = "<a href='mychannel_main.php'>文档模型管理</a>::导入文档模型规则"; | |||
| $win = new OxWindow(); | |||
| @@ -128,11 +113,7 @@ else if ($dopost == "exportin") { | |||
| $winform = $win->GetWindow("ok"); | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*---------------- | |||
| function __ExportInOk() | |||
| -----------------*/ | |||
| else if ($dopost == "exportinok") { | |||
| } else if ($dopost == "exportinok") { | |||
| require_once(DEDEADMIN."/inc/inc_admin_channel.php"); | |||
| function GotoStaMsg($msg) | |||
| { | |||
| @@ -222,11 +203,7 @@ else if ($dopost == "exportinok") { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET listfields='$allfields' WHERE id='{$fields['newid']}' "); | |||
| } | |||
| GotoStaMsg("成功导入一个文档模型"); | |||
| } | |||
| /*---------------- | |||
| function __SaveCopy() | |||
| -----------------*/ | |||
| else if ($dopost == "copysave") { | |||
| } else if ($dopost == "copysave") { | |||
| $cid = intval($cid); | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$cid' ", MYSQL_ASSOC); | |||
| foreach ($row as $k => $v) { | |||
| @@ -257,11 +234,7 @@ else if ($dopost == "copysave") { | |||
| ShowMsg("系统出错,请检查原因<br>错误提示:mychannel_edit.php?dopost=savecopy $errv", "javascript:;"); | |||
| exit(); | |||
| } | |||
| } | |||
| /*------------ | |||
| function __SaveEdit() | |||
| ------------*/ | |||
| else if ($dopost == "save") { | |||
| } else if ($dopost == "save") { | |||
| $fieldset = preg_replace("#[\r\n]{1,}#", "\r\n", $fieldset); | |||
| $usertype = empty($usertype) ? '' : $usertype; | |||
| $query = "UPDATE `#@__channeltype` SET typename='$typename',addtable='$addtable',addcon='$addcon',mancon='$mancon',editcon='$editcon',useraddcon='$useraddcon',usermancon='$usermancon',usereditcon='$usereditcon',fieldset='$fieldset',listfields='$listfields',issend='$issend',arcsta='$arcsta',usertype='$usertype',sendrank='$sendrank',needdes='$needdes',needpic='$needpic',titlename='$titlename',onlyone='$onlyone',dfcid='$dfcid' WHERE id='$id' "; | |||
| @@ -282,11 +255,7 @@ else if ($dopost == "save") { | |||
| $dsql->ExecuteNoneQuery($query); | |||
| ShowMsg("成功修改一个文档模型", "mychannel_main.php"); | |||
| exit(); | |||
| } | |||
| /*-------------------- | |||
| function __GetTemplate() | |||
| --------------------*/ | |||
| else if ($dopost == "gettemplets") { | |||
| } else if ($dopost == "gettemplets") { | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); | |||
| $wintitle = "文档模型管理-查看模板"; | |||
| @@ -311,11 +280,7 @@ else if ($dopost == "gettemplets") { | |||
| $winform = $win->GetWindow("hand", ""); | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*-------------------- | |||
| function __Delete() | |||
| --------------------*/ | |||
| else if ($dopost == "delete") { | |||
| } else if ($dopost == "delete") { | |||
| CheckPurview('c_Del'); | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); | |||
| if ($row['issystem'] == 1) { | |||
| @@ -346,7 +311,7 @@ else if ($dopost == "delete") { | |||
| } | |||
| //检查栏目的表是否独占数据表 | |||
| $addtable = str_replace($cfg_dbprefix, '', str_replace('#@__', $cfg_dbprefix, $myrow['addtable'])); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd FROM `#@__channeltype` WHERE addtable like '{$cfg_dbprefix}{$addtable}' OR addtable LIKE CONCAT('#','@','__','$addtable') ; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd FROM `#@__channeltype` WHERE addtable like '{$cfg_dbprefix}{$addtable}' OR addtable LIKE CONCAT('#','@','__','$addtable') ;"); | |||
| $isExclusive2 = ($row['dd'] > 1 ? 0 : 1); | |||
| //获取与栏目关连的所有栏目id | |||
| $tids = ''; | |||
| @@ -356,18 +321,18 @@ else if ($dopost == "delete") { | |||
| } | |||
| //删除相关信息 | |||
| if ($tids != '') { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid IN($tids); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['maintable']}` WHERE typeid IN($tids); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid IN ($tids); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid IN ($tids); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id IN ($tids); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid IN($tids);"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['maintable']}` WHERE typeid IN($tids);"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid IN ($tids);"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid IN ($tids);"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id IN ($tids);"); | |||
| } | |||
| //删除附加表或附加表内的信息 | |||
| if ($isExclusive2 == 1) { | |||
| $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$cfg_dbprefix}{$addtable}`;"); | |||
| } else { | |||
| if ($tids != '' && $myrow['addtable'] != '') { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['addtable']}` WHERE typeid IN ($tids); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['addtable']}` WHERE typeid IN ($tids);"); | |||
| } | |||
| } | |||
| //删除栏目配置信息 | |||
| @@ -377,11 +342,7 @@ else if ($dopost == "delete") { | |||
| ShowMsg("成功删除一个文档模型", "mychannel_main.php"); | |||
| exit(); | |||
| } | |||
| } //del | |||
| /*---------------- | |||
| function __modifysearch() | |||
| -----------------*/ | |||
| else if ($dopost == 'modifysearch') { | |||
| } else if ($dopost == 'modifysearch') { | |||
| if (!isset($step)) $step = 0; | |||
| if (empty($step)) { | |||
| $step = 1; | |||
| @@ -573,7 +534,7 @@ else if ($dopost == 'modifysearch') { | |||
| //删除自定义搜索; | |||
| else if ($dopost == 'del') { | |||
| $mid = intval($mid); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__advancedsearch` WHERE mid = '$mid'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__advancedsearch` WHERE mid = '$mid';"); | |||
| ShowMsg("成功删除一个自定义搜索", "mychannel_main.php"); | |||
| exit(); | |||
| } | |||
| @@ -14,9 +14,6 @@ require_once(DEDEADMIN."/inc/inc_admin_channel.php"); | |||
| require_once(DEDEINC."/dedetag.class.php"); | |||
| if (empty($action)) $action = ''; | |||
| $mysql_version = $dsql->GetVersion(); | |||
| /*---------------------- | |||
| function Save() | |||
| ---------------------*/ | |||
| if ($action == 'save') { | |||
| //修改字段配置信息 | |||
| $dfvalue = trim($vdefault); | |||
| @@ -78,9 +75,6 @@ if ($action == 'save') { | |||
| ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | |||
| exit(); | |||
| } | |||
| /*---------------------- | |||
| function ShowPage() | |||
| ---------------------*/ | |||
| //检测模型相关信息,并初始化相关数据 | |||
| $row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); | |||
| $trueTable = $row['addtable']; | |||
| @@ -39,9 +39,6 @@ while ($crow = $dsql->GetObject()) { | |||
| $channelArray[$crow->id]['nid'] = $crow->nid; | |||
| } | |||
| //保存修改 | |||
| /*-------------------- | |||
| function _SAVE() | |||
| ----------------------*/ | |||
| if ($action == 'save') { | |||
| if (!isset($fieldtypes[$dtype])) { | |||
| ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | |||
| @@ -108,10 +105,7 @@ if ($action == 'save') { | |||
| ShowMsg("成功修改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); | |||
| exit(); | |||
| } | |||
| /*------------------ | |||
| 删除字段 | |||
| function _DELETE() | |||
| -------------------*/ | |||
| //删除字段 | |||
| else if ($action == "delete") { | |||
| if ($row['issystem'] == 1) { | |||
| ShowMsg("系统模型的字段不允许删除", "-1"); | |||
| @@ -21,7 +21,7 @@ if ($dopost != 'save') { | |||
| $cid = empty($cid) ? 0 : intval($cid); | |||
| //获得栏目模型id | |||
| if ($cid > 0 && $channelid == 0) { | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
| $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid';"); | |||
| $channelid = $row['channeltype']; | |||
| } else { | |||
| if ($channelid == 0) $channelid = 1; | |||
| @@ -35,11 +35,7 @@ if ($dopost != 'save') { | |||
| $maxWright = empty($maxWright)? array('cc'=>1) : $maxWright; | |||
| include DedeInclude("templets/soft_add.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -22,7 +22,7 @@ if ($dopost == "save") { | |||
| //读取参数 | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__softconfig`"); | |||
| if (!is_array($row)) { | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__softconfig` (`downtype`,`ismoresite`,`islocal`,`gotojump`,`sites`,`downmsg`,`moresitedo`,`dfrank`,`dfywboy`,`argrange`) VALUES ('1','0','1','0','','$downmsg','1','0','0','0'); "); | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__softconfig` (`downtype`,`ismoresite`,`islocal`,`gotojump`,`sites`,`downmsg`,`moresitedo`,`dfrank`,`dfywboy`,`argrange`) VALUES ('1','0','1','0','','$downmsg','1','0','0','0');"); | |||
| $row['downtype'] = 1; | |||
| $row['ismoresite'] = 0; | |||
| $row['islocal'] = 1; | |||
| @@ -65,11 +65,7 @@ if ($dopost != 'save') { | |||
| $addRow = XSSClean($addRow); | |||
| include DedeInclude("templets/soft_edit.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -23,11 +23,7 @@ if ($dopost != 'save') { | |||
| $cInfos = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
| include DedeInclude("templets/spec_add.htm"); | |||
| exit(); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -35,11 +35,7 @@ if ($dopost != 'save') { | |||
| $addRow = $dsql->GetOne("SELECT * FROM `#@__addonspec` WHERE aid='$aid'"); | |||
| $tags = GetTags($aid); | |||
| include DedeInclude("templets/spec_edit.htm"); | |||
| } | |||
| /*-------------------------------- | |||
| function __save(){ } | |||
| -------------------------------*/ | |||
| else if ($dopost == 'save') { | |||
| } else if ($dopost == 'save') { | |||
| require_once(DEDEINC.'/image.func.php'); | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $flag = isset($flags) ? join(',', $flags) : ''; | |||
| @@ -12,10 +12,7 @@ require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('c_Stepselect'); | |||
| require_once(DEDEINC."/datalistcp.class.php"); | |||
| require_once(DEDEINC.'/enums.func.php'); | |||
| /*----------------- | |||
| 前台视图 | |||
| function __show() { } | |||
| ------------------*/ | |||
| //前台视图 | |||
| $ENV_GOBACK_URL = (isset($ENV_GOBACK_URL) ? $ENV_GOBACK_URL : 'stepselect_main.php'); | |||
| if (empty($action)) { | |||
| setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
| @@ -58,10 +55,7 @@ if (empty($action)) { | |||
| include('./templets/stepselect_showajax.htm'); | |||
| exit(); | |||
| } | |||
| /*----------------- | |||
| 删除类型或枚举值 | |||
| function __del() { } | |||
| ------------------*/ | |||
| //删除类型或枚举值 | |||
| else if ($action == 'del') { | |||
| $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); | |||
| if (!is_array($arr)) { | |||
| @@ -72,8 +66,8 @@ else if ($action == 'del') { | |||
| ShowMsg("系统内置的枚举分类不能删除", "stepselect_main.php?".ExecTime()); | |||
| exit(); | |||
| } | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id';"); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}';"); | |||
| ShowMsg("成功删除一个分类", "stepselect_main.php?".ExecTime()); | |||
| exit(); | |||
| } else if ($action == 'delenumAllSel') { | |||
| @@ -84,7 +78,7 @@ else if ($action == 'del') { | |||
| while ($row = $dsql->GetArray('me')) { | |||
| $groups[] = $row['egroup']; | |||
| } | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id);"); | |||
| //更新缓存 | |||
| foreach ($groups as $egropu) { | |||
| WriteEnumsCache($egroup); | |||
| @@ -96,28 +90,22 @@ else if ($action == 'del') { | |||
| exit(); | |||
| } else if ($action == 'delenum') { | |||
| $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$id' "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id='{$id}'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id='{$id}';"); | |||
| WriteEnumsCache($row['egroup']); | |||
| ShowMsg("成功删除一个枚举", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*----------------- | |||
| 保存类型修改 | |||
| function __edit_save() { } | |||
| ------------------*/ | |||
| //保存类型修改 | |||
| else if ($action == 'edit_save') { | |||
| if (preg_match("#[^0-9a-z_-]#i", $egroup)) { | |||
| ShowMsg("组名称不能有全角字符或特殊符号", "-1"); | |||
| exit(); | |||
| } | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id';"); | |||
| ShowMsg("成功修改一个分类", "stepselect_main.php?".ExecTime()); | |||
| exit(); | |||
| } | |||
| /*----------------- | |||
| 保存新类型 | |||
| function __addnew_save() { } | |||
| ------------------*/ | |||
| //保存新类型 | |||
| else if ($action == 'addnew_save') { | |||
| if (preg_match("#[^0-9a-z_-]#i", $egroup)) { | |||
| ShowMsg("组名称不能有全角字符或特殊符号", "-1"); | |||
| @@ -128,25 +116,22 @@ else if ($action == 'addnew_save') { | |||
| ShowMsg("您指定的类别名称或组名称已经存在,不能使用", "stepselect_main.php"); | |||
| exit(); | |||
| } | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect` (`itemname`,`egroup`,`issign`,`issystem`) VALUES ('$itemname','$egroup','0','0'); "); | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect` (`itemname`,`egroup`,`issign`,`issystem`) VALUES ('$itemname','$egroup','0','0');"); | |||
| WriteEnumsCache($egroup); | |||
| ShowMsg("成功添加一个分类", "stepselect_main.php?egroup=$egroup"); | |||
| exit(); | |||
| } | |||
| /*--------- | |||
| 把旧版全国省市表替换当前地区数据 | |||
| function __exarea() { } | |||
| ----------*/ | |||
| //旧版全国省市表替换当前地区数据 | |||
| else if ($action == 'exarea') { | |||
| $bigtypes = array(); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace';"); | |||
| $query = "SELECT * FROM `#@__area` WHERE reid =0 ORDER BY id ASC"; | |||
| $dsql->Execute('me', $query); | |||
| $n = 1; | |||
| while ($row = $dsql->GetArray()) { | |||
| $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum` (`ename`,`evalue`,`egroup`,`disorder`,`issign`) | |||
| VALUES ('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); | |||
| VALUES ('{$row['name']}','$evalue','nativeplace','$disorder','0');"); | |||
| $n++; | |||
| } | |||
| $stypes = array(); | |||
| @@ -157,7 +142,7 @@ else if ($action == 'exarea') { | |||
| while ($row = $dsql->GetArray()) { | |||
| $stypes[$row['id']] = $evalue = $disorder = $v + $n; | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum` (`ename`,`evalue`,`egroup`,`disorder`,`issign`) | |||
| VALUES ('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); | |||
| VALUES ('{$row['name']}','$evalue','nativeplace','$disorder','0');"); | |||
| $n++; | |||
| } | |||
| } | |||
| @@ -165,11 +150,7 @@ else if ($action == 'exarea') { | |||
| ShowMsg("成功导入所有旧的地区数据", "stepselect_main.php?egroup=nativeplace"); | |||
| exit(); | |||
| } | |||
| /*-------------------- | |||
| function __addenum_save() { } | |||
| 关于二级枚举:为了节省查询速度,二级枚举是通过特殊算法生成的,原理为凡是能被500整除的都是一级枚举(500 * n) + 1 < em < 500 * (n+1)为下级枚举,如:1000的下级枚举对应的值为 1001,1002,10031499对于issign=1的,表示这个类别只有一级枚举,则不受上面的算法限制 | |||
| 更新算法:新增二级枚举下添加"-N"自己类别选择,例如:1001二级枚举下面的3级栏目,则为1001-1,1001-2这时候需要issign=2 | |||
| ---------------------*/ | |||
| //关于二级枚举:为了节省查询速度,二级枚举是通过特殊算法生成的,原理为凡是能被500整除的都是一级枚举(500 * n) + 1 < em < 500 * (n+1)为下级枚举,如:1000的下级枚举对应的值为 1001,1002,10031499对于issign=1的,表示这个类别只有一级枚举,则不受上面的算法限制。更新算法:新增二级枚举下添加"-N"自己类别选择,例如:1001二级枚举下面的3级栏目,则为1001-1,1001-2这时候需要issign=2 | |||
| else if ($action == 'addenum_save') { | |||
| if (empty($ename) || empty($egroup)) { | |||
| Showmsg("类别名称或组名称不能为空", "-1"); | |||
| @@ -182,7 +163,7 @@ else if ($action == 'addenum_save') { | |||
| if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); | |||
| else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum` (`ename`,`evalue`,`egroup`,`disorder`,`issign`) | |||
| VALUES ('$ename','$evalue','$egroup','$disorder','$issign'); "); | |||
| VALUES ('$ename','$evalue','$egroup','$disorder','$issign');"); | |||
| } | |||
| WriteEnumsCache($egroup); | |||
| ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); | |||
| @@ -225,17 +206,14 @@ else if ($action == 'addenum_save') { | |||
| $evalue = $arr['evalue'] + 1; | |||
| } | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum` (`ename`,`evalue`,`egroup`,`disorder`,`issign`) | |||
| VALUES ('$ename','$evalue','$egroup','$disorder','$issign'); "); | |||
| VALUES ('$ename','$evalue','$egroup','$disorder','$issign');"); | |||
| } | |||
| WriteEnumsCache($egroup); | |||
| ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| } | |||
| /*----------------- | |||
| 修改枚举名称和排序 | |||
| function __upenum() { } | |||
| ------------------*/ | |||
| //修改枚举名称和排序 | |||
| else if ($action == 'upenum') { | |||
| $ename = trim(preg_replace("# └─(─){1,}#", '', $ename)); | |||
| $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$aid' "); | |||
| @@ -244,10 +222,7 @@ else if ($action == 'upenum') { | |||
| ShowMsg("成功修改一个枚举", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| /*----------------- | |||
| 更新枚举缓存 | |||
| function __upallcache() { } | |||
| ------------------*/ | |||
| //更新枚举缓存 | |||
| else if ($action == 'upallcache') { | |||
| if (!isset($egroup)) $egroup = ''; | |||
| WriteEnumsCache($egroup); | |||
| @@ -141,7 +141,7 @@ else if ($dopost == 'del') { | |||
| echo ''; | |||
| exit(); | |||
| } | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}';"); | |||
| @unlink($cfg_basedir.$_SESSION['bigfile_info'][$id]); | |||
| $_SESSION['file_info'][$id] = ''; | |||
| $_SESSION['bigfile_info'][$id] = ''; | |||
| @@ -176,7 +176,7 @@ else if ($dopost == 'delold') { | |||
| if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { | |||
| @unlink($imgfile); | |||
| } | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}';"); | |||
| echo "已删除"; | |||
| exit(); | |||
| } | |||
| @@ -15,7 +15,7 @@ if (empty($dopost)) $dopost = ''; | |||
| if ($dopost == 'add') { | |||
| CheckCSRF(); | |||
| if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | |||
| ShowMsg('密码或或用户名不合法,<br>请使用[0-9a-zA-Z_@!.-]内的字符', '-1', 0, 3000); | |||
| ShowMsg('密码或或会员名不合法,<br>请使用[0-9a-zA-Z_@!.-]内的字符', '-1', 0, 3000); | |||
| exit(); | |||
| } | |||
| $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | |||
| @@ -25,7 +25,7 @@ if ($dopost == 'add') { | |||
| } | |||
| $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` WHERE userid LIKE '$userid' "); | |||
| if ($row['dd'] > 0) { | |||
| ShowMsg('用户名已存在', '-1'); | |||
| ShowMsg('会员名已存在', '-1'); | |||
| exit(); | |||
| } | |||
| $pfd = "pwd"; | |||
| @@ -60,7 +60,7 @@ if ($dopost == 'add') { | |||
| $adminquery = "Insert Into `#@__member_space` (`mid`,`pagesize`,`matt`,`spacename`,`spacelogo`,`spacestyle`,`sign`,`spacenews`) | |||
| VALUES ('$mid','10','0','{$uname}的空间','','person','',''); "; | |||
| $dsql->ExecuteNoneQuery($adminquery); | |||
| ShowMsg('成功增加一个用户', 'sys_admin_user.php'); | |||
| ShowMsg('成功增加一个会员', 'sys_admin_user.php'); | |||
| exit(); | |||
| } | |||
| $randcode = mt_rand(10000, 99999); | |||
| @@ -57,8 +57,8 @@ if ($dopost == 'saveedit') { | |||
| $randcode = mt_rand(10000, 99999); | |||
| $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | |||
| require_once(DEDEINC."/libraries/oxwindow.class.php"); | |||
| $wintitle = "删除用户"; | |||
| $wecome_info = "<a href='sys_admin_user.php'>系统帐号管理</a>::删除用户"; | |||
| $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->AddHidden("dopost", $dopost); | |||
| @@ -67,7 +67,7 @@ if ($dopost == 'saveedit') { | |||
| $win->AddHidden("safecode", $safecode); | |||
| $win->AddHidden("id", $id); | |||
| $win->AddTitle("系统提示"); | |||
| $win->AddMsgItem("您确定要删除id<span class='text-primary'>$userid</span>用户吗", "50"); | |||
| $win->AddMsgItem("您确定要删除id<span class='text-primary'>$userid</span>会员吗", "50"); | |||
| $win->AddMsgItem("验证安全码:<input name='safecode' type='text' id='safecode' class='admin-input-md'>(安全码:<span class='text-primary'>$safecode</span>)", "30"); | |||
| $winform = $win->GetWindow("ok"); | |||
| $win->Display(); | |||
| @@ -81,7 +81,7 @@ if ($dopost == 'saveedit') { | |||
| //不能删除id为1的创建人帐号,不能删除自己 | |||
| $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__admin` WHERE id='$id' AND id<>1 AND id<>'".$cuserLogin->getUserID()."' "); | |||
| if ($rs > 0) { | |||
| //更新前台用户信息 | |||
| //更新前台会员信息 | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt='0' WHERE mid='$id' LIMIT 1"); | |||
| ShowMsg("成功删除一个帐户", "sys_admin_user.php"); | |||
| } else { | |||
| @@ -89,7 +89,7 @@ if ($dopost == 'saveedit') { | |||
| } | |||
| exit(); | |||
| } | |||
| //显示用户信息 | |||
| //显示会员信息 | |||
| $randcode = mt_rand(10000, 99999); | |||
| $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | |||
| $typeOptions = ''; | |||
| @@ -11,7 +11,7 @@ | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| CheckPurview('sys_User'); | |||
| if (isset($dopost) && $dopost == 'getone') { | |||
| $row = $dsql->GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid';"); | |||
| $userid = $row['userid']; | |||
| $y = intval(MyDate('Y', time())); | |||
| $m = intval(MyDate('m', time())); | |||
| @@ -22,11 +22,11 @@ if (isset($dopost) && $dopost == 'getone') { | |||
| while ($frow = $dsql->GetArray('me')) { | |||
| $dd = empty($dd) ? "0" : $dd; | |||
| $cc = empty($cc) ? "0" : $cc; | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='$uid';"); | |||
| $dd += $row['dd']; | |||
| $cc += $row['cc']; | |||
| } | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='$uid';"); | |||
| $dd = $row['dd'] + $dd; | |||
| $cc = $row['cc'] + $cc; | |||
| //季度 | |||
| @@ -41,11 +41,11 @@ if (isset($dopost) && $dopost == 'getone') { | |||
| while ($frow = $dsql->GetArray('me')) { | |||
| $dds = empty($dds) ? "0" : $dds; | |||
| $ccs = empty($ccs) ? "0" : $ccs; | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $dds += $row['dd']; | |||
| $ccs += $row['cc']; | |||
| } | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $dds = $row['dd'] + $dds; | |||
| $ccs = $row['cc'] + $ccs; | |||
| //当月 | |||
| @@ -56,11 +56,11 @@ if (isset($dopost) && $dopost == 'getone') { | |||
| while ($frow = $dsql->GetArray('me')) { | |||
| $ddm = empty($ddm) ? "0" : $ddm; | |||
| $ccm = empty($ccm) ? "0" : $ccm; | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $ddm += $row['dd']; | |||
| $ccm += $row['cc']; | |||
| } | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $ddm = $row['dd'] + $ddm; | |||
| $ccm = $row['cc'] + $ccm; | |||
| //本周 | |||
| @@ -71,11 +71,11 @@ if (isset($dopost) && $dopost == 'getone') { | |||
| while ($frow = $dsql->GetArray('me')) { | |||
| $ddw = empty($ddw) ? "0" : $ddw; | |||
| $ccw = empty($ccw) ? "0" : $ccw; | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $ddw += $row['dd']; | |||
| $ccw += $row['cc']; | |||
| } | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $ddw = $row['dd'] + $ddw; | |||
| $ccw = $row['cc'] + $ccw; | |||
| //当天 | |||
| @@ -86,11 +86,11 @@ if (isset($dopost) && $dopost == 'getone') { | |||
| while ($frow = $dsql->GetArray('me')) { | |||
| $ddd = empty($ddd) ? "0" : $ddd; | |||
| $ccd = empty($ccd) ? "0" : $ccd; | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $ddd += $row['dd']; | |||
| $ccd += $row['cc']; | |||
| } | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid';"); | |||
| $ddd = $row['dd'] + $ddd; | |||
| $ccd = $row['cc'] + $ccd; | |||
| $msg = "<table width='100%' align='center' cellpadding='3' cellspacing='1'> | |||
| @@ -21,10 +21,7 @@ $bkdir = DEDEDATA.'/'.$cfg_backup_dir; | |||
| //跳转一下页的js | |||
| $gotojs = "function GotoNextPage(){document.gonext."."submit();}"."\r\nset"."Timeout('GotoNextPage()',500);"; | |||
| $dojs = "<script>$gotojs</script>"; | |||
| /*-------------------- | |||
| 备份数据 | |||
| function __bak_data(); | |||
| --------------------*/ | |||
| //备份数据 | |||
| if ($dopost == 'bak') { | |||
| if (empty($tablearr)) { | |||
| ShowMsg('您没选中数据表', 'javascript:;'); | |||
| @@ -180,10 +177,7 @@ if ($dopost == 'bak') { | |||
| } | |||
| //分页备份代码结束 | |||
| } | |||
| /*------------------------- | |||
| 还原数据 | |||
| function __re_data(); | |||
| -------------------------*/ | |||
| //还原数据 | |||
| else if ($dopost == 'redat') { | |||
| if ($bakfiles == '') { | |||
| ShowMsg('没指定任何要还原数据', 'javascript:;'); | |||
| @@ -18,10 +18,7 @@ if (empty($action)) { | |||
| require_once(DEDEADMIN."/templets/sys_data_replace.htm"); | |||
| exit(); | |||
| } | |||
| /*------------------------------- | |||
| //列出数据库表里的字段 | |||
| function __getfields() | |||
| --------------------------------*/ | |||
| else if ($action == 'getfields') { | |||
| AjaxHead(); | |||
| $dsql->GetTableFields($exptable); | |||
| @@ -33,10 +30,7 @@ else if ($action == 'getfields') { | |||
| echo "</div>"; | |||
| exit(); | |||
| } | |||
| /*------------------------------- | |||
| //保存用户设置,清空会员数据 | |||
| function __Apply() | |||
| --------------------------------*/ | |||
| //保存会员设置,清空会员数据 | |||
| else if ($action == 'apply') { | |||
| $validate = empty($validate) ? '' : strtolower($validate); | |||
| $svali = GetCkVdValue(); | |||
| @@ -28,7 +28,7 @@ if (!empty($dopost)) { | |||
| $AllPurviews = trim($AllPurviews); | |||
| } | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__admintype` (`rank`,typename,`system`,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');"); | |||
| ShowMsg("成功创建一个新的用户组", "sys_group.php"); | |||
| ShowMsg("成功创建一个新的会员组", "sys_group.php"); | |||
| exit(); | |||
| } | |||
| include DedeInclude('templets/sys_group_add.htm'); | |||
| @@ -24,11 +24,11 @@ if ($dopost == 'save') { | |||
| $purview = trim($purview); | |||
| } | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='$typename',purviews='$purview' WHERE CONCAT(`rank`)='$rank'"); | |||
| ShowMsg('成功修改用户组的权限', 'sys_group.php'); | |||
| ShowMsg('成功修改会员组的权限', 'sys_group.php'); | |||
| exit(); | |||
| } else if ($dopost == 'del') { | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__admintype` WHERE CONCAT(`rank`)='$rank' AND `system`='0';"); | |||
| ShowMsg("成功删除一个用户组", "sys_group.php"); | |||
| ShowMsg("成功删除一个会员组", "sys_group.php"); | |||
| exit(); | |||
| } | |||
| $groupRanks = array(); | |||
| @@ -20,7 +20,7 @@ if (empty($dopost)) { | |||
| $msg = "<table> | |||
| <tr> | |||
| <td> | |||
| 由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理,本工具目前主要执行下面动作:<br> | |||
| 由于手动升级时会员没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理,本工具目前主要执行下面动作:<br> | |||
| 1、修复/优化数据表;<br> | |||
| 2、更新缓存;<br> | |||
| 3、检测系统变量一致性<br> | |||
| @@ -34,10 +34,7 @@ if (empty($dopost)) { | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*------------------- | |||
| 数据结构常规检测 | |||
| function 1_test_db() { } | |||
| --------------------*/ | |||
| //数据结构常规检测 | |||
| else if ($dopost == 1) { | |||
| $win = new OxWindow(); | |||
| $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' "); | |||
| @@ -61,10 +58,7 @@ else if ($dopost == 1) { | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*------------------- | |||
| 检测微表正确性并尝试修复 | |||
| function 2_test_arctiny() { } | |||
| --------------------*/ | |||
| //检测微表正确性并尝试修复 | |||
| else if ($dopost == 2) { | |||
| $msg = ''; | |||
| $allarcnum = 0; | |||
| @@ -132,10 +126,7 @@ else if ($dopost == 2) { | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*------------------- | |||
| 高级方式修复微表,会删除不合法主键的文档 | |||
| function 3_re_arctiny() { } | |||
| --------------------*/ | |||
| //高级方式修复微表,会删除不合法主键的文档 | |||
| else if ($dopost == 3) { | |||
| $errnum = 0; | |||
| $sql = " TRUNCATE TABLE `#@__arctiny`"; | |||
| @@ -10,7 +10,7 @@ | |||
| */ | |||
| require(dirname(__FILE__).'/config.php'); | |||
| $dopost = (!isset($dopost) ? '' : $dopost); | |||
| //返回到下一任务链接,特殊变量,除非知道作用,否则不能在任务传递中占用:f临时,仅为了方便网址结构,dopost当前任务指向下一个任务,由用户自行处理或在nextdo中自动获得,del上一次任务删除的变量,morejob设定后,表示当前任务需请求多次,会把 dopost和nextdo处理后转为doposttmp和nextdotmp,然后由用户自行处理 | |||
| //返回到下一任务链接,特殊变量,除非知道作用,否则不能在任务传递中占用:f临时,仅为了方便网址结构,dopost当前任务指向下一个任务,由会员自行处理或在nextdo中自动获得,del上一次任务删除的变量,morejob设定后,表示当前任务需请求多次,会把 dopost和nextdo处理后转为doposttmp和nextdotmp,然后由会员自行处理 | |||
| function GetNextUrl($notallowArr = array('dopost', 'f', 'del')) | |||
| { | |||
| $reurl = "task_do.php?f=0"; | |||
| @@ -17,7 +17,7 @@ | |||
| </tr> | |||
| <tr> | |||
| <td colspan="3"> | |||
| <div class="alert alert-info mb-0">自定义属性使用说明:以往的版本中,网站首页、封面栏目的设计,都只能单调的用arclist标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist标记加上att='自定义属性的id'的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件att='c,p'表示推荐图片</div> | |||
| <div class="alert alert-info mb-0">自定义属性使用说明:以往的版本中,网站首页、封面栏目的设计,都只能单调的用arclist标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist标记加上att='自定义属性的id'的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许会员增加其它类型,但调用时允许使用组合条件att='c,p'表示推荐图片</div> | |||
| </td> | |||
| </tr> | |||
| <tr bgcolor="#e9ecef"> | |||
| @@ -99,7 +99,7 @@ | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| <td>用户的登录id:</td> | |||
| <td>会员的登录id:</td> | |||
| <td><input name="userid" type="text" id="userid" class="admin-input-xs">(网址uid=后面跟的id)</td> | |||
| </tr> | |||
| <tr> | |||
| @@ -150,7 +150,7 @@ | |||
| <span id="step1Msg">对比版本更改的文件</span> | |||
| </div> | |||
| <div id="stepArea2" class="stepArea"> | |||
| <p>本更新提供了重要的安全性更新,建议所有用户升级,软件更新覆盖以下文件,请做好备份。</p> | |||
| <p>本更新提供了重要的安全性更新,建议所有会员升级,软件更新覆盖以下文件,请做好备份。</p> | |||
| <div id="_fileList">正在加载</div> | |||
| </div> | |||
| <div id="stepArea3" class="stepArea"> | |||
| @@ -59,7 +59,7 @@ | |||
| </td> | |||
| <td width="170"> | |||
| <select name="membertype" class="admin-input-sm"> | |||
| <option value="0">用户组</option> | |||
| <option value="0">会员组</option> | |||
| <option value="1" <?php if ($membertype==1) echo "selected"?>>管理员</option> | |||
| <option value="2" <?php if ($membertype==2) echo "selected"?>>外部会员</option> | |||
| </select> | |||
| @@ -47,10 +47,10 @@ | |||
| </td> | |||
| <td> | |||
| <button type="submit" class="btn btn-success btn-sm">搜索</button> | |||
| <a href="member_main.php" class="btn btn-success btn-sm">所有用户</a> | |||
| <a href="member_main.php?spacesta=-2" class="btn btn-success btn-sm">禁言用户</a> | |||
| <a href="member_main.php?matt=1" class="btn btn-success btn-sm">推荐用户</a> | |||
| <a href="member_main.php?matt=0" class="btn btn-success btn-sm">普通用户</a> | |||
| <a href="member_main.php" class="btn btn-success btn-sm">所有会员</a> | |||
| <a href="member_main.php?spacesta=-2" class="btn btn-success btn-sm">禁言会员</a> | |||
| <a href="member_main.php?matt=1" class="btn btn-success btn-sm">推荐会员</a> | |||
| <a href="member_main.php?matt=0" class="btn btn-success btn-sm">普通会员</a> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| @@ -63,7 +63,7 @@ | |||
| <tr bgcolor="#e9ecef" align="center"> | |||
| <td width="6%">选择</td> | |||
| <td width="6%">mid</td> | |||
| <td width="16%">头像/用户名</td> | |||
| <td width="16%">头像/会员名</td> | |||
| <td width="8%">昵称</td> | |||
| <td width="8%">等级</td> | |||
| <td width="16%">钱包积分</td> | |||
| @@ -71,7 +71,7 @@ | |||
| <td width="14%">地址/时间</td> | |||
| <td>操作</td> | |||
| </tr> | |||
| {dede:datalist empty='<tr><td colspan="9" align="center">暂无用户</td></tr>'} | |||
| {dede:datalist empty='<tr><td colspan="9" align="center">暂无会员</td></tr>'} | |||
| <tr align="center"> | |||
| <td><input type="checkbox" name="mid" id="mid" value="{dede:field.mid/}"></td> | |||
| <td>{dede:field.mid/}</td> | |||
| @@ -4,7 +4,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>用户短信管理</title> | |||
| <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"> | |||
| @@ -14,7 +14,7 @@ | |||
| <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3"> | |||
| <tr bgcolor="#f5f5f5"> | |||
| <td width="380" align="center"><input type="text" name="keyword" id="keyword" value="{dede:global name='keyword'/}" placeholder="请输入关键词" class="admin-input-md"></td> | |||
| <td width="370"><input type="text" name="username" id="username" value="{dede:global name='username'/}" placeholder="请输入用户名" class="admin-input-md"></td> | |||
| <td width="370"><input type="text" name="username" id="username" value="{dede:global name='username'/}" placeholder="请输入会员名" class="admin-input-md"></td> | |||
| <td width="170"> | |||
| <select name="folder" id="folder" class="admin-input-sm"> | |||
| <option value="inbox">收件箱</option> | |||
| @@ -3,7 +3,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>用户短信管理</title> | |||
| <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"> | |||
| @@ -13,7 +13,7 @@ | |||
| <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3"> | |||
| <tr bgcolor="#f5f5f5"> | |||
| <td width="380" align="center"><input type="text" name="keyword" id="keyword" placeholder="请输入关键词" class="admin-input-md"></td> | |||
| <td width="370"><input type="text" name="username" id="username" placeholder="请输入用户名" class="admin-input-md"></td> | |||
| <td width="370"><input type="text" name="username" id="username" placeholder="请输入会员名" class="admin-input-md"></td> | |||
| <td width="170"> | |||
| <select name="folder" id="folder" class="admin-input-sm"> | |||
| <option value="inbox">收件箱</option> | |||
| @@ -3,7 +3,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>用户短信管理</title> | |||
| <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"> | |||
| @@ -13,7 +13,7 @@ | |||
| <table cellpadding="1" cellspacing="1" align="center" class="table maintable my-3"> | |||
| <tr bgcolor="#f5f5f5"> | |||
| <td width="380" align="center"><input type="text" name="keyword" id="keyword" placeholder="请输入关键词" class="admin-input-md"></td> | |||
| <td width="370"><input type="text" name="username" id="username" placeholder="请输入用户名" class="admin-input-md"></td> | |||
| <td width="370"><input type="text" name="username" id="username" placeholder="请输入会员名" class="admin-input-md"></td> | |||
| <td width="170"> | |||
| <select name="folder" id="folder" class="admin-input-sm"> | |||
| <option value="inbox">收件箱</option> | |||
| @@ -39,7 +39,7 @@ | |||
| <table width="100%" cellpadding="1" cellspacing="1"> | |||
| <tr> | |||
| <td width="260">发送到:</td> | |||
| <td><input type="text" name="msgtoid" value="<?php echo empty($touid)? '' : $touid?>" class="admin-input-md"> 填写用户登录的id(网址uid=后面跟着的id)</td> | |||
| <td><input type="text" name="msgtoid" value="<?php echo empty($touid)? '' : $touid?>" class="admin-input-md"> 填写会员登录的id(网址uid=后面跟着的id)</td> | |||
| </tr> | |||
| <tr> | |||
| <td>标题:</td> | |||
| @@ -42,7 +42,7 @@ | |||
| <td><input type="text" name="rank_<?php echo $k?>" value="<?php echo $row->rank;?>" id="rank_<?php echo $k?>"></td> | |||
| <td><input type="text" name="money_<?php echo $k?>" value="<?php echo $row->money;?>" id="money_<?php echo $k?>"></td> | |||
| <td><input type="text" name="scores_<?php echo $k?>" value="<?php echo $row->scores;?>" id="scores_<?php echo $k?>"></td> | |||
| <td><?php if ($row->id<=5) { echo "系统"; } else {echo "用户";}?></td> | |||
| <td><?php if ($row->id<=5) { echo "系统"; } else {echo "会员";}?></td> | |||
| <td><input type="checkbox" name="check_<?php echo $k?>" id="check_<?php echo $k?>" <?php if ($row->id == 3) echo 'disabled="disabled"';?> value="1" checked="checked"> 正在使用</td> | |||
| </tr> | |||
| <?php }?> | |||
| @@ -19,7 +19,7 @@ | |||
| } | |||
| if (document.form2.uname.value == "") { | |||
| document.form2.uname.focus(); | |||
| ShowMsg("用户昵称不能为空"); | |||
| ShowMsg("会员昵称不能为空"); | |||
| return false; | |||
| } | |||
| } | |||
| @@ -36,7 +36,7 @@ | |||
| <input type="hidden" name="userid" value="<?php echo $row['userid']?>"> | |||
| <input type="hidden" name="id" value="<?php echo $id?>"> | |||
| <tr> | |||
| <td width="260" class="admin-td">头像/用户名/类型:</td> | |||
| <td width="260" class="admin-td">头像/会员名/类型:</td> | |||
| <td> | |||
| <span class="mr-1"> | |||
| <?php | |||
| @@ -22,7 +22,7 @@ | |||
| if (document.form2.uname.value=="") | |||
| { | |||
| document.form2.uname.focus(); | |||
| ShowMsg("用户昵称不能为空"); | |||
| ShowMsg("会员昵称不能为空"); | |||
| return false; | |||
| } | |||
| } | |||
| @@ -33,12 +33,12 @@ | |||
| <tr> | |||
| <td bgcolor="#f5f5f5" colspan="2"><a href="<?php echo $ENV_GOBACK_URL;?>">会员管理</a> > 查看会员</td> | |||
| </tr> | |||
| <?php if ($row['matt']==10) echo '<tr><td colspan="2"><div class="alert alert-info mb-0">当前用户是关连网站管理员,谨慎操作</div></td></tr>';?> | |||
| <?php if ($row['matt']==10) echo '<tr><td colspan="2"><div class="alert alert-info mb-0">当前会员是关连网站管理员,谨慎操作</div></td></tr>';?> | |||
| <form name="form2" action="member_do.php" method="post" onSubmit="return checkSubmit();"> | |||
| <input type="hidden" name="dopost" value="edituser"> | |||
| <input type="hidden" name="id" value="<?php echo $id?>"> | |||
| <tr> | |||
| <td width="260" class="admin-td">头像/用户名:</td> | |||
| <td width="260" class="admin-td">头像/会员名:</td> | |||
| <td> | |||
| <span class="mr-1"><?php if ($row['face']!='') {echo "<img src='{$row['face']}' class='user-img'>";};echo "".$row['userid']."";?></span> | |||
| <span class="btn btn-outline-success btn-sm"><?php echo GetMemberTypeName($row['rank']);?></span> | |||
| @@ -163,7 +163,7 @@ | |||
| <td class="admin-td">管理操作:</td> | |||
| <td class="admin-td"> | |||
| <a href="member_do.php?dopost=memberlogin&id=<?php echo $row['mid'];?>&jumpurl=../user/edit_baseinfo.php" target="_blank" class="btn btn-success btn-sm">修改资料</a> | |||
| <a href="member_do.php?dopost=memberlogin&id=<?php echo $row['mid'];?>" target="_blank" class="btn btn-success btn-sm">用户面板</a> | |||
| <a href="member_do.php?dopost=memberlogin&id=<?php echo $row['mid'];?>" target="_blank" class="btn btn-success btn-sm">会员面板</a> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| @@ -4,7 +4,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>系统用户管理</title> | |||
| <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"> | |||
| @@ -15,10 +15,10 @@ | |||
| <td bgcolor="#f5f5f5" colspan="6"> | |||
| <table cellspacing="1" cellpadding="1" class="table table-borderless w-100"> | |||
| <tr> | |||
| <td width="30%">系统用户管理</td> | |||
| <td width="30%">系统会员管理</td> | |||
| <td width="70%" align="right"> | |||
| <a href="sys_admin_user_add.php" class="btn btn-success btn-sm">增加管理员</a> | |||
| <a href="sys_group.php" class="btn btn-success btn-sm">用户组管理</a> | |||
| <a href="sys_group.php" class="btn btn-success btn-sm">会员组管理</a> | |||
| <a href="sys_admin_user_tj.php" class="btn btn-success btn-sm">绩效统计</a> | |||
| </td> | |||
| </tr> | |||
| @@ -13,17 +13,17 @@ | |||
| <script> | |||
| function checkSubmit() { | |||
| if (document.form1.userid.value == "") { | |||
| ShowMsg("用户id不能为空"); | |||
| ShowMsg("会员id不能为空"); | |||
| document.form1.userid.focus(); | |||
| return false; | |||
| } | |||
| if (document.form1.uname.value == "") { | |||
| ShowMsg("用户名不能为空"); | |||
| ShowMsg("会员名不能为空"); | |||
| document.form1.uname.focus(); | |||
| return false; | |||
| } | |||
| if (document.form1.pwd.value == "") { | |||
| ShowMsg("用户密码不能为空"); | |||
| ShowMsg("会员密码不能为空"); | |||
| document.form1.pwd.focus(); | |||
| return false; | |||
| } | |||
| @@ -47,7 +47,7 @@ | |||
| <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>"> | |||
| <input type="hidden" name="dopost" value="add"> | |||
| <tr> | |||
| <td width="260" class="admin-td">用户名:</td> | |||
| <td width="260" class="admin-td">会员名:</td> | |||
| <td><input type="text" name="userid" id="userid" class="admin-input-sm">(只能用[0-9a-zA-Z_@!.-]以内范围的字符)</td> | |||
| </tr> | |||
| <tr> | |||
| @@ -59,7 +59,7 @@ | |||
| <td><input type="text" name="pwd" id="pwd" class="admin-input-sm">(只能用[0-9a-zA-Z_@!.-]以内范围的字符)</td> | |||
| </tr> | |||
| <tr> | |||
| <td class="admin-td">用户组:</td> | |||
| <td class="admin-td">会员组:</td> | |||
| <td class="admin-td"> | |||
| <select name="usertype" class="admin-input-sm"> | |||
| <?php | |||
| @@ -71,7 +71,7 @@ | |||
| } | |||
| ?> | |||
| </select> | |||
| <a href="sys_group.php" class="btn btn-success btn-sm">用户组设置</a> | |||
| <a href="sys_group.php" class="btn btn-success btn-sm">会员组设置</a> | |||
| </td> | |||
| </tr> | |||
| <tr> | |||
| @@ -25,7 +25,7 @@ | |||
| <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>"> | |||
| <input type="hidden" name="id" value="<?php echo $row['id']?>"> | |||
| <tr> | |||
| <td width="260" class="admin-td">用户名:</td> | |||
| <td width="260" class="admin-td">会员名:</td> | |||
| <td><?php echo $row['userid']?></td> | |||
| </tr> | |||
| <tr> | |||
| @@ -3,7 +3,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>用户组设置</title> | |||
| <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"> | |||
| @@ -16,10 +16,10 @@ | |||
| <td bgcolor="#f5f5f5" colspan="3"> | |||
| <table cellspacing="1" cellpadding="1" class="table table-borderless w-100"> | |||
| <tr> | |||
| <td width="30%">用户组设置</td> | |||
| <td width="30%">会员组设置</td> | |||
| <td width="70%" align="right"> | |||
| <a href="sys_group_add.php" class="btn btn-success btn-sm">增加用户组</a> | |||
| <a href="sys_admin_user.php" class="btn btn-success btn-sm">管理系统用户</a> | |||
| <a href="sys_group_add.php" class="btn btn-success btn-sm">增加会员组</a> | |||
| <a href="sys_admin_user.php" class="btn btn-success btn-sm">管理系统会员</a> | |||
| </td> | |||
| </tr> | |||
| </table> | |||
| @@ -41,7 +41,7 @@ | |||
| <td><?php echo $row->typename?></td> | |||
| <td> | |||
| <a href="sys_group_edit.php?rank=<?php echo $row->rank?>" class="btn btn-success btn-sm">权限设定</a> | |||
| <a href="sys_admin_user.php?rank=<?php echo $row->rank?>" class="btn btn-success btn-sm">组用户</a> | |||
| <a href="sys_admin_user.php?rank=<?php echo $row->rank?>" class="btn btn-success btn-sm">组会员</a> | |||
| <?php if ($row->system==0) {?><a href='sys_group_edit.php?dopost=del&rank=<?php echo $row->rank;?>'>删除组</a><?php }?> | |||
| </td> | |||
| </tr> | |||
| @@ -3,7 +3,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>增加用户组</title> | |||
| <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"> | |||
| @@ -13,7 +13,7 @@ | |||
| <form name="form1" action="sys_group_add.php" method="post"> | |||
| <input type="hidden" name="dopost" value="save"> | |||
| <tr> | |||
| <td bgcolor="#f5f5f5" colspan="2"><a href="sys_group.php">用户组设置</a> > 增加用户组</td> | |||
| <td bgcolor="#f5f5f5" colspan="2"><a href="sys_group.php">会员组设置</a> > 增加会员组</td> | |||
| </tr> | |||
| <tr> | |||
| <td width="90">组名称:</td> | |||
| @@ -3,7 +3,7 @@ | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |||
| <title>修改用户组</title> | |||
| <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"> | |||
| @@ -13,7 +13,7 @@ | |||
| <form name="form1" action="sys_group_edit.php" method="post"> | |||
| <input type="hidden" name="dopost" value="save"> | |||
| <tr> | |||
| <td bgcolor="#f5f5f5" colspan="2"><a href="sys_group.php">用户组设置</a> > 修改用户组</td> | |||
| <td bgcolor="#f5f5f5" colspan="2"><a href="sys_group.php">会员组设置</a> > 修改会员组</td> | |||
| </tr> | |||
| <tr> | |||
| <td width="90">组名称:</td> | |||
| @@ -16,7 +16,7 @@ | |||
| <td bgcolor="#f5f5f5" colspan="4"> | |||
| <table cellspacing="0" cellpadding="0" class="table table-borderless w-100"> | |||
| <tr> | |||
| <td>用户登录设置</td> | |||
| <td>会员登录设置</td> | |||
| <td align="right"><span><a href="https://www.dedebiz.com/help" target="_blank" class="btn btn-success btn-sm">更多接口</a></span></td> | |||
| </tr> | |||
| </table> | |||
| @@ -29,7 +29,7 @@ | |||
| <label for="iptAppID">登录方式</label> | |||
| <div class="form-check form-check-inline"> | |||
| <input name="loginType" class="form-check-input" type="checkbox" id="loginType1" value="option1" checked disabled> | |||
| <label class="form-check-label" for="loginType1">用户名密码</label> | |||
| <label class="form-check-label" for="loginType1">会员名密码</label> | |||
| </div> | |||
| <div class="form-check form-check-inline"> | |||
| <input name="loginType" class="form-check-input" type="checkbox" id="loginType2" value="option2"> | |||
| @@ -63,7 +63,7 @@ | |||
| <div class="tab-pane fade" id="alipay" role="tabpanel" aria-labelledby="alipay-tab"> | |||
| <form> | |||
| <div class="form-group"> | |||
| <span>支付宝,全球领先的独立第三方支付平台,致力于为广大用户提供安全快速的电子支付/网上支付/安全支付/手机支付体验,及转账收款/水电煤缴费/信用卡还款/AA收款等生活服务应用。</span> | |||
| <span>支付宝,全球领先的独立第三方支付平台,致力于为广大会员提供安全快速的电子支付/网上支付/安全支付/手机支付体验,及转账收款/水电煤缴费/信用卡还款/AA收款等生活服务应用。</span> | |||
| </div> | |||
| <div class="form-group"> | |||
| <label for="iptAlipayAPPID">APPID</label> | |||
| @@ -94,7 +94,7 @@ | |||
| <div class="tab-pane fade" id="bank" role="tabpanel" aria-labelledby="bank-tab"> | |||
| <form> | |||
| <div class="form-group"> | |||
| <span>用户支付到商户指定银行卡账号,手动确认订单收款。</span> | |||
| <span>会员支付到商户指定银行卡账号,手动确认订单收款。</span> | |||
| </div> | |||
| <div class="form-group"> | |||
| <label for="iptBankAccountName">账户名</label> | |||
| @@ -55,7 +55,7 @@ | |||
| <ul> | |||
| <?php echo $alter;?> | |||
| <li>检测结果:结果仅供参考,请务必查看源码后才删除非法文件</li> | |||
| <li>安全建议:1、有条件的用户把data、system、theme修改为不可对外浏览,static、a目录设置为不允许执行脚本,其它目录禁止写入,系统更安全;2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存</li> | |||
| <li>安全建议:1、有条件的会员把data、system、theme修改为不可对外浏览,static、a目录设置为不允许执行脚本,其它目录禁止写入,系统更安全;2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存</li> | |||
| </ul> | |||
| </div> | |||
| </td> | |||
| @@ -24,10 +24,7 @@ if (preg_match("#\.#", $acdir)) { | |||
| ShowMsg('Not Allow dir '.$acdir.'!', '-1'); | |||
| exit(); | |||
| } | |||
| /* | |||
| function edit_new_tpl() { } | |||
| 修改模板 | |||
| */ | |||
| //修改模板 | |||
| if ($action == 'edit' || $action == 'newfile') { | |||
| if ($filename == '' && $action == 'edit') { | |||
| ShowMsg('未指定要修改的文件', '-1'); | |||
| @@ -72,10 +69,7 @@ if ($action == 'edit' || $action == 'newfile') { | |||
| include DEDEADMIN.'/templets/tpl_edit.htm'; | |||
| exit(); | |||
| } | |||
| /*--------------------------- | |||
| function save_tpl() { } | |||
| 保存修改模板 | |||
| --------------------------*/ | |||
| //保存修改模板 | |||
| else if ($action == 'saveedit') { | |||
| CheckCSRF(); | |||
| if ($filename == '') { | |||
| @@ -98,10 +92,7 @@ else if ($action == 'saveedit') { | |||
| ShowMsg('成功修改或新建文件', 'templets_main.php?acdir='.$acdir); | |||
| exit(); | |||
| } | |||
| /*--------------------------- | |||
| function del_tpl() { } | |||
| 删除模板 | |||
| --------------------------*/ | |||
| //删除模板 | |||
| else if ($action == 'del') { | |||
| $truefile = $templetdird.'/'.$filename; | |||
| if (unlink($truefile)) { | |||
| @@ -112,10 +103,7 @@ else if ($action == 'del') { | |||
| exit(); | |||
| } | |||
| } | |||
| /*---------------------- | |||
| function _upload() {} | |||
| 上传新模板 | |||
| -----------------------*/ | |||
| //上传新模板 | |||
| else if ($action == 'upload') { | |||
| require_once(DEDEINC.'/libraries/oxwindow.class.php'); | |||
| $acdir = str_replace('.', '', $acdir); | |||
| @@ -143,10 +131,7 @@ else if ($action == 'upload') { | |||
| $win->Display(); | |||
| exit(); | |||
| } | |||
| /*---------------------- | |||
| function _upload() {} | |||
| 上传新模板 | |||
| -----------------------*/ | |||
| //上传新模板 | |||
| else if ($action == 'uploadok') { | |||
| CheckCSRF(); | |||
| if (!is_uploaded_file($upfile)) { | |||
| @@ -168,10 +153,7 @@ else if ($action == 'uploadok') { | |||
| } | |||
| exit(); | |||
| } | |||
| /*--------------------------- | |||
| function edittag() { } | |||
| 修改标签碎片 | |||
| --------------------------*/ | |||
| //修改标签碎片 | |||
| else if ($action == 'edittag' || $action == 'addnewtag') { | |||
| if ($action == 'addnewtag') { | |||
| $democode = '<'."?php | |||
| @@ -207,10 +189,7 @@ function lib_demotag(&\$ctag,&\$refObj) | |||
| include DEDEADMIN.'/templets/tpl_edit_tag.htm'; | |||
| exit(); | |||
| } | |||
| /*--------------------------- | |||
| function savetagfile() { } | |||
| 保存标签碎片修改 | |||
| --------------------------*/ | |||
| //保存标签碎片修改 | |||
| else if ($action == 'savetagfile') { | |||
| CheckCSRF(); | |||
| if (!preg_match("#^[a-z0-9_-]{1,}\.lib\.php$#i", $filename)) { | |||
| @@ -226,9 +205,8 @@ else if ($action == 'savetagfile') { | |||
| fclose($fp); | |||
| $msg = " | |||
| <form name='form1' action='tag_test_action.php' target='blank' method='post'> | |||
| <input type='hidden' name='dopost' value='make' /> | |||
| 标签测试(环境变量标签不支持测试)<br> | |||
| <textarea name='partcode' cols='150' rows='6' style='width:90%;'>{dede:{$tagname}}{/dede:{$tagname}}</textarea><br> | |||
| <label><input type='hidden' name='dopost' value='make'> 标签测试(环境变量标签不支持测试)</label><br> | |||
| <textarea name='partcode' cols='150' rows='6' style='width:90%'>{dede:{$tagname}}{/dede:{$tagname}}</textarea><br> | |||
| <button type='submit' name='B1' class='btn btn-success btn-sm'>确定</button> | |||
| </form> | |||
| "; | |||
| @@ -18,9 +18,6 @@ if (empty($diyid)) { | |||
| } | |||
| require_once DEDEINC.'/diyform.class.php'; | |||
| $diy = new diyform($diyid); | |||
| /*---------------------------- | |||
| function Post(){ } | |||
| ---------------------------*/ | |||
| if ($action == 'post') { | |||
| if (empty($do)) { | |||
| $postform = $diy->getForm(true); | |||
| @@ -84,11 +81,7 @@ if ($action == 'post') { | |||
| showmsg($bkmsg, $goto); | |||
| } | |||
| } | |||
| } | |||
| /*---------------------------- | |||
| function list(){ } | |||
| ---------------------------*/ | |||
| else if ($action == 'list') { | |||
| } else if ($action == 'list') { | |||
| if (empty($diy->public)) { | |||
| ShowMsg('后台关闭前台浏览', 'javascript:;'); | |||
| exit(); | |||
| @@ -40,10 +40,7 @@ if ($open == 0) { | |||
| require_once(DEDETEMPLATE.'/plus/download_links_templet.htm'); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| //提供软件给用户下载(旧模式) | |||
| function getSoft_old() | |||
| ------------------------*/ | |||
| //提供软件给会员下载旧模式 | |||
| else if ($open == 1) { | |||
| //更新下载次数 | |||
| $id = isset($id) && is_numeric($id) ? $id : 0; | |||
| @@ -76,10 +73,7 @@ else if ($open == 1) { | |||
| header("location:$link"); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| //提供软件给用户下载(新模式) | |||
| function getSoft_new() | |||
| ------------------------*/ | |||
| //提供软件给会员下载新模式 | |||
| else if ($open == 2) { | |||
| $id = intval($id); | |||
| //获得附加表信息 | |||
| @@ -177,7 +171,7 @@ else if ($open == 2) { | |||
| exit(); | |||
| } | |||
| //以下为正常情况,自动扣点数 | |||
| //如果文档需要金币,检查用户是否浏览过本文档 | |||
| //如果文档需要金币,检查会员是否浏览过本文档 | |||
| if ($needMoney > 0 && $mid != $cfg_ml->M_ID) { | |||
| $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$id."' AND mid='".$cfg_ml->M_ID."'"; | |||
| $row = $dsql->GetOne($sql); | |||
| @@ -190,7 +184,7 @@ else if ($open == 2) { | |||
| include_once(DEDETEMPLATE.'/plus/view_msg.htm'); | |||
| exit(0); | |||
| } | |||
| //有足够金币,记录用户信息 | |||
| //有足够金币,记录会员信息 | |||
| $inquery = "INSERT INTO `#@__member_operation` (mid,oldinfo,money,mtime,buyid,product,pname,sta) VALUES ('".$cfg_ml->M_ID."','$arctitle','$needMoney','".time()."', 'ARCHIVE".$id."', 'archive','下载软件', 2); "; | |||
| //记录定单 | |||
| if (!$dsql->ExecuteNoneQuery($inquery)) { | |||
| @@ -112,7 +112,7 @@ else if ($action == 'send') { | |||
| exit(); | |||
| } | |||
| } | |||
| //检查用户登录 | |||
| //检查会员登录 | |||
| if (empty($notuser)) { | |||
| $notuser = 0; | |||
| } | |||
| @@ -128,16 +128,16 @@ else if ($action == 'send') { | |||
| if ($notuser == 1) { | |||
| $username = $cfg_ml->M_ID > 0 ? '匿名' : '游客'; | |||
| } | |||
| //已登录的用户 | |||
| //已登录的会员 | |||
| else if ($cfg_ml->M_ID > 0) { | |||
| $username = $cfg_ml->M_UserName; | |||
| } | |||
| //用户身份验证 | |||
| //会员身份验证 | |||
| else { | |||
| if ($username != '' && $pwd != '') { | |||
| $rs = $cfg_ml->CheckUser($username, $pwd); | |||
| if ($rs == 1) { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET logintime='".time()."',loginip='".GetIP()."' WHERE mid='{$cfg_ml->M_ID}'; "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET logintime='".time()."',loginip='".GetIP()."' WHERE mid='{$cfg_ml->M_ID}';"); | |||
| } else { | |||
| $username = '游客'; | |||
| } | |||
| @@ -222,7 +222,7 @@ else if ($action == 'send') { | |||
| if ($cfg_ml->M_ID > 0) { | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendfb_scores} WHERE mid='{$cfg_ml->M_ID}' "); | |||
| } | |||
| //统计用户发出的评论 | |||
| //统计会员发出的评论 | |||
| if ($cfg_ml->M_ID > 0) { | |||
| $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__feedback` WHERE `mid`='".$cfg_ml->M_ID."'"); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `feedback`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'"); | |||
| @@ -12,7 +12,7 @@ require_once(dirname(__FILE__).'/../system/common.inc.php'); | |||
| require_once(DEDEINC.'/archive/partview.class.php'); | |||
| if (isset($arcID)) $aid = $arcID; | |||
| $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | |||
| if ($aid == 0) die(" document.write('Request Error!'); "); | |||
| if ($aid == 0) die(" document.write('Request Error!');"); | |||
| $cacheFile = DEDEDATA.'/cache/mytag-'.$aid.'.htm'; | |||
| if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { | |||
| $pv = new PartView(); | |||
| @@ -35,15 +35,15 @@ $addtime = time(); | |||
| if ($type == '') { | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__member_stow` WHERE aid='$aid' And mid='{$ml->M_ID}' AND type IS NULL "); | |||
| if (!is_array($row)) { | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow` (mid,aid,title,addtime) VALUES ('".$ml->M_ID."','$aid','".addslashes($arctitle)."','$addtime'); "); | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow` (mid,aid,title,addtime) VALUES ('".$ml->M_ID."','$aid','".addslashes($arctitle)."','$addtime');"); | |||
| } | |||
| } else { | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__member_stow` WHERE type='$type' AND (aid='$aid' AND mid='{$ml->M_ID}')"); | |||
| if (!is_array($row)) { | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow` (mid,aid,title,addtime,type) VALUES ('".$ml->M_ID."','$aid','$title','$addtime','$type'); "); | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow` (mid,aid,title,addtime,type) VALUES ('".$ml->M_ID."','$aid','$title','$addtime','$type');"); | |||
| } | |||
| } | |||
| //更新用户统计 | |||
| //更新会员统计 | |||
| $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='{$ml->M_ID}' "); | |||
| $dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `stow`='{$row['nums']}' WHERE `mid`='".$ml->M_ID."'"); | |||
| ShowMsg('成功收藏一篇文档', 'javascript:window.close();'); | |||
| @@ -35,10 +35,7 @@ if (empty($step)) | |||
| $step = 1; | |||
| } | |||
| $proto = IsSSL()? "https://" : "http://"; | |||
| /*------------------------ | |||
| 使用协议书 | |||
| function _1_Agreement() | |||
| ------------------------*/ | |||
| //使用协议书 | |||
| if ($step==1) | |||
| { | |||
| $arrMsg = array(); | |||
| @@ -83,10 +80,7 @@ if ($step==1) | |||
| include('./install.html'); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| 普通安装 | |||
| function _2_Setup() | |||
| ------------------------*/ | |||
| //普通安装 | |||
| else if ($step==2) | |||
| { | |||
| $dbtype = empty($dbtype)? "mysql" : $dbtype; | |||
| @@ -275,10 +269,7 @@ else if ($step==2) | |||
| header('Location:../admin/index.php'); | |||
| exit(); | |||
| } | |||
| /*------------------------ | |||
| 检测数据库是否有效 | |||
| function _10_TestDbPwd() | |||
| ------------------------*/ | |||
| //检测数据库是否有效 | |||
| else if ($step==10) | |||
| { | |||
| header("Pragma:no-cache\r\n"); | |||
| @@ -3973,7 +3973,7 @@ INSERT INTO `#@__sysconfig` VALUES ('1','cfg_basehost','站点网址','1','strin | |||
| ('39','cfg_ftp_root','网站根在FTP中的目录','2','string','/'), | |||
| ('40','cfg_ftp_mkdir','是否强制用FTP创建目录','2','bool','N'), | |||
| ('41','cfg_list_son','是否包含上级列表子类文档','6','bool','Y'), | |||
| ('42','cfg_mb_open','是否开启用户功能','4','bool','N'), | |||
| ('42','cfg_mb_open','是否开启会员功能','4','bool','N'), | |||
| ('43','cfg_mb_album','是否开启会员图集功能','4','bool','Y'), | |||
| ('44','cfg_mb_upload','是否允许会员上传非图片附件','4','bool','Y'), | |||
| ('45','cfg_mb_upload_size','会员上传文件大小(KB)','4','number','1024'), | |||
| @@ -4000,8 +4000,8 @@ INSERT INTO `#@__sysconfig` VALUES ('1','cfg_basehost','站点网址','1','strin | |||
| ('66','cfg_album_style','图集默认样式(1为多页多图、2为多页单图、3为缩略图列表)','3','number','2'), | |||
| ('67','cfg_album_ddwidth','图集默认缩略图大小','3','number','200'), | |||
| ('68','cfg_mb_notallow','不允许注册的会员ID','4','bstring','www,bbs,ftp,mail,user,users,admin,administrator'), | |||
| ('69','cfg_mb_idmin','用户ID最小长度','4','number','6'), | |||
| ('70','cfg_mb_pwdmin','用户密码最小长度','4','number','6'), | |||
| ('69','cfg_mb_idmin','会员ID最小长度','4','number','6'), | |||
| ('70','cfg_mb_pwdmin','会员密码最小长度','4','number','6'), | |||
| ('71','cfg_md_idurl','是否严格限定会员登录ID,允许会员使用二级域名必须设置此项','4','bool','N'), | |||
| ('72','cfg_mb_rank','注册会员默认级别,会员权限管理中查看级别代表的数字','4','number','10'), | |||
| ('73','cfg_feedback_time','两次评论至少间隔时间(秒)','5','number','30'), | |||
| @@ -4024,9 +4024,9 @@ INSERT INTO `#@__sysconfig` VALUES ('1','cfg_basehost','站点网址','1','strin | |||
| ('90','cfg_smtp_port','SMTP服务器端口','2','string','25'), | |||
| ('91','cfg_sendmail_bysmtp','是否启用SMTP方式发送邮件','2','bool','Y'), | |||
| ('92','cfg_smtp_server','SMTP服务器','2','string','smtp.qq.com'), | |||
| ('93','cfg_smtp_usermail','SMTP服务器的用户邮箱','2','string','tianya@dedebiz.com'), | |||
| ('94','cfg_smtp_user','SMTP服务器的用户帐号','2','string','tianya'), | |||
| ('95','cfg_smtp_password','SMTP服务器的用户密码','2','string','tianya'), | |||
| ('93','cfg_smtp_usermail','SMTP服务器邮箱','2','string','tianya@dedebiz.com'), | |||
| ('94','cfg_smtp_user','SMTP服务器帐号','2','string','tianya'), | |||
| ('95','cfg_smtp_password','SMTP服务器密码','2','string','tianya'), | |||
| ('96','cfg_online_type','在线支付网关类型','2','string','nps'), | |||
| ('97','cfg_upload_switch','删除文档文件同时删除相关附件文件','2','bool','Y'), | |||
| ('98','cfg_fck_xhtml','是否使用富文本','2','bool','N'), | |||
| @@ -4046,17 +4046,17 @@ INSERT INTO `#@__sysconfig` VALUES ('1','cfg_basehost','站点网址','1','strin | |||
| ('112','cfg_addon_domainbind','是否绑定附件目录为指定的二级域名','7','bool','N'), | |||
| ('113','cfg_addon_domain','附件目录的二级域名','7','string',''), | |||
| ('114','cfg_df_dutyadmin','默认作者名称','7','string','网站管理员'), | |||
| ('115','cfg_mb_allowncarc','是否允许用户空间显示未审核文档','4','bool','Y'), | |||
| ('115','cfg_mb_allowncarc','是否允许会员空间显示未审核文档','4','bool','Y'), | |||
| ('116','cfg_mb_spaceallarc','会员空间中所有文档的栏目ID(不限为0)','4','number','0'), | |||
| ('117','cfg_face_adds','上传头像增加积分','5','number','10'), | |||
| ('118','cfg_moreinfo_adds','填写详细资料增加积分','5','number','20'), | |||
| ('119','cfg_money_scores','多少积分可以兑换一个金币','5','number','50'), | |||
| ('120','cfg_mb_wnameone','是否允许用户昵称重复','4','bool','N'), | |||
| ('120','cfg_mb_wnameone','是否允许会员昵称重复','4','bool','N'), | |||
| ('121','cfg_arc_dirname','是否允许用目录作为文档文件名,文档命名规则:{typedir}/{aid}/index.html','7','bool','Y'), | |||
| ('122','cfg_puccache_time','需缓存文档全局缓存时间(秒)','6','number','36000'), | |||
| ('123','cfg_arc_click','文档默认浏览数(-1表示随机1000到6000之间)','7','number','-1'), | |||
| ('124','cfg_addon_savetype','附件保存形式,按data函数日期参数(y年m月d日)','3','string','ymd'), | |||
| ('125','cfg_qk_uploadlit','异步上传缩略图,空间太不稳定用户关闭此项','3','bool','Y'), | |||
| ('125','cfg_qk_uploadlit','异步上传缩略图,空间太不稳定会员关闭此项','3','bool','Y'), | |||
| ('126','cfg_login_adds','登录会员中心获积分','5','number','2'), | |||
| ('127','cfg_userad_adds','会员推广获积分','5','number','10'), | |||
| ('128','cfg_replace_num','文档关键词替换次数(0为全部替换)','7','number','1'), | |||
| @@ -119,7 +119,7 @@ class SearchView | |||
| } | |||
| $this->TotalPage = ceil($this->TotalResult / $this->pagesize); | |||
| if ($this->PageNo == 1) { | |||
| $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET result='".$this->TotalResult."' WHERE keyword='".addslashes($keyword)."'; "); | |||
| $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET result='".$this->TotalResult."' WHERE keyword='".addslashes($keyword)."';"); | |||
| } | |||
| $envs['url_type'] = 3; | |||
| $envs['value'] = $keyword; | |||
| @@ -153,7 +153,7 @@ class SearchView | |||
| { | |||
| global $cfg_soft_lang, $cfg_bizcore_appid, $cfg_bizcore_key; | |||
| $keyword = cn_substr($keyword, 50); | |||
| $row = $this->dsql->GetOne("SELECT spwords FROM `#@__search_keywords` WHERE keyword='".addslashes($keyword)."'; "); | |||
| $row = $this->dsql->GetOne("SELECT spwords FROM `#@__search_keywords` WHERE keyword='".addslashes($keyword)."';"); | |||
| if (!is_array($row)) { | |||
| if (strlen($keyword) > 7) { | |||
| if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||
| @@ -190,7 +190,7 @@ class SearchView | |||
| $inquery = "INSERT INTO `#@__search_keywords` (`keyword`,`spwords`,`count`,`result`,`lasttime`) VALUES ('".addslashes($keyword)."', '".addslashes($keywords)."', '1', '0', '".time()."'); "; | |||
| $this->dsql->ExecuteNoneQuery($inquery); | |||
| } else { | |||
| $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET count=count+1,lasttime='".time()."' WHERE keyword='".addslashes($keyword)."'; "); | |||
| $this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET count=count+1,lasttime='".time()."' WHERE keyword='".addslashes($keyword)."';"); | |||
| $keywords = $row['spwords']; | |||
| } | |||
| return $keywords; | |||
| @@ -267,7 +267,7 @@ class SearchView | |||
| } else { | |||
| $likeword = ''; | |||
| $lsql = "(".$lsql.") AND NOT(keyword like '".addslashes($this->Keyword)."') "; | |||
| $this->dsql->SetQuery("SELECT keyword,count FROM `#@__search_keywords` WHERE $lsql ORDER BY lasttime DESC LIMIT 0,$num; "); | |||
| $this->dsql->SetQuery("SELECT keyword,count FROM `#@__search_keywords` WHERE $lsql ORDER BY lasttime DESC LIMIT 0,$num;"); | |||
| $this->dsql->Execute('l'); | |||
| while ($row = $this->dsql->GetArray('l')) { | |||
| if ($row['count'] > 1000) { | |||
| @@ -273,7 +273,7 @@ function dede_htmlspecialchars($str) | |||
| else return htmlspecialchars($str); | |||
| } | |||
| /** | |||
| * 载入小助手,这里用户可能载入用helps载入多个小助手 | |||
| * 载入小助手,这里会员可能载入用helps载入多个小助手 | |||
| * | |||
| * @access public | |||
| * @param string | |||
| @@ -139,7 +139,7 @@ if (PHP_VERSION > '5.1') { | |||
| @date_default_timezone_set('Etc/GMT'.$time51); | |||
| } | |||
| $cfg_isUrlOpen = @ini_get("allow_url_fopen"); | |||
| //用户浏览的网站host | |||
| //会员浏览的网站host | |||
| if (PHP_SAPI === 'cli') { | |||
| $cfg_clihost = 'https://www.dedebiz.com'; | |||
| } else { | |||
| @@ -167,7 +167,7 @@ $cfg_mobile_dir = $cfg_cmspath.'/m'; | |||
| $cfg_mobileurl = $cfg_mainsite.$cfg_mobile_dir; | |||
| $cfg_data_dir = $cfg_cmspath.'/data'; | |||
| $cfg_dataurl = $cfg_mainsite.$cfg_data_dir; | |||
| //会员用户目录 | |||
| //会员会员目录 | |||
| $cfg_member_dir = $cfg_cmspath.'/user'; | |||
| $cfg_memberurl = $cfg_mainsite.$cfg_member_dir; | |||
| //专题存放目录 | |||
| @@ -178,7 +178,7 @@ $cfg_medias_dir = $cfg_cmspath.$cfg_medias_dir; | |||
| $cfg_mediasurl = $cfg_mainsite.$cfg_medias_dir; | |||
| //上传图片存放目录,建议按默认 | |||
| $cfg_image_dir = $cfg_medias_dir.'/allimg'; | |||
| //用户投稿图片存放目录 | |||
| //会员投稿图片存放目录 | |||
| $cfg_user_dir = $cfg_medias_dir.'/userup'; | |||
| //上传软件存放目录 | |||
| $cfg_soft_dir = $cfg_medias_dir.'/soft'; | |||
| @@ -162,7 +162,7 @@ class DedeVote | |||
| } else { | |||
| setcookie('VOTE_MEMBER_IP', $_SERVER['REMOTE_ADDR'], time() * $row['spec'] * 3600, '/'); | |||
| } | |||
| //检查用户是否已投过票 | |||
| //检查会员是否已投过票 | |||
| $nowtime = time(); | |||
| $VoteMem = $this->dsql->GetOne("SELECT * FROM `#@__vote_member` WHERE voteid = '$this->VoteID' and userid='$memberID'"); | |||
| if (!empty($memberID)) { | |||
| @@ -44,7 +44,7 @@ function WriteEnumsCache($egroup = '') | |||
| if ($nrow['issign'] == 2) $tenum = true; | |||
| } | |||
| file_put_contents($cachefile,json_encode($data)); | |||
| if ($tenum) $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `issign`=2 WHERE egroup='$egroup'; "); | |||
| if ($tenum) $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `issign`=2 WHERE egroup='$egroup';"); | |||
| } | |||
| return '成功更新所有枚举缓存'; | |||
| } | |||
| @@ -230,14 +230,14 @@ if (!function_exists('InsertOneTag')) { | |||
| $addtime = time(); | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE tag LIKE '$tag' "); | |||
| if (!is_array($row)) { | |||
| $rs = $dsql->ExecuteNoneQuery("INSERT INTO `#@__tagindex` (`tag`,`typeid`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`) VALUES ('$tag','$typeid','0','1','0','0','$addtime','$addtime','$addtime'); "); | |||
| $rs = $dsql->ExecuteNoneQuery("INSERT INTO `#@__tagindex` (`tag`,`typeid`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`) VALUES ('$tag','$typeid','0','1','0','0','$addtime','$addtime','$addtime');"); | |||
| $tid = $dsql->GetLastID(); | |||
| } else { | |||
| $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET total=total+1,addtime=$addtime WHERE tag LIKE '$tag' "); | |||
| $tid = $row['id']; | |||
| } | |||
| if ($rs) { | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__taglist` (`tid`,`aid`,`arcrank`,`typeid`,`tag`) VALUES ('$tid','$aid','$arcrank','$typeid','$tag'); "); | |||
| $dsql->ExecuteNoneQuery("INSERT INTO `#@__taglist` (`tid`,`aid`,`arcrank`,`typeid`,`tag`) VALUES ('$tid','$aid','$arcrank','$typeid','$tag');"); | |||
| } | |||
| } | |||
| } | |||
| @@ -92,7 +92,7 @@ if (!function_exists('AdminUpload')) { | |||
| } | |||
| //前台会员通用上传函数 | |||
| //$upname 是文件上传框的表单名,而不是表单的变量 | |||
| //$handname 允许用户手工指定网址情况下的网址 | |||
| //$handname 允许会员手工指定网址情况下的网址 | |||
| if (!function_exists('MemberUploads')) { | |||
| function MemberUploads($upname, $handname, $userid = 0, $utype = 'image', $exname = '', $maxwidth = 0, $maxheight = 0, $water = false, $isadmin = false) | |||
| { | |||
| @@ -74,9 +74,9 @@ if (!function_exists('GetCurUrl')) { | |||
| } | |||
| } | |||
| /** | |||
| * 获取用户真实地址 | |||
| * 获取会员真实地址 | |||
| * | |||
| * @return string 返回用户ip | |||
| * @return string 返回会员ip | |||
| */ | |||
| if (!function_exists('GetIP')) { | |||
| function GetIP() | |||
| @@ -10,7 +10,7 @@ if (!defined('DEDEINC')) exit('dedebiz'); | |||
| * @link https://www.dedebiz.com | |||
| */ | |||
| include(DEDEDATA.'/mark/inc_photowatermark_config.php'); | |||
| //检测用户系统支持的图片格式 | |||
| //检测会员系统支持的图片格式 | |||
| global $cfg_photo_type, $cfg_photo_typenames, $cfg_photo_support; | |||
| $cfg_photo_type['gif'] = FALSE; | |||
| $cfg_photo_type['jpeg'] = FALSE; | |||
| @@ -248,7 +248,7 @@ class DedeCli | |||
| return fgets(STDIN); | |||
| } | |||
| /** | |||
| * 询问用户输入.这个可以1个或2个参数. | |||
| * 询问会员输入.这个可以1个或2个参数. | |||
| * | |||
| * 使用: | |||
| * | |||
| @@ -59,7 +59,7 @@ class DedeBizClient | |||
| } | |||
| return $this->CheckSign($msg); | |||
| } | |||
| //用户获取当前服务器状态信息 | |||
| //会员获取当前服务器状态信息 | |||
| function SystemInfo() | |||
| { | |||
| $req = array( | |||
| @@ -341,7 +341,7 @@ class DedeHttpDown | |||
| } | |||
| $this->m_puthead = array(); | |||
| $this->m_puthead["Host"] = $this->m_host; | |||
| //发送用户自定义的请求头 | |||
| //发送会员自定义的请求头 | |||
| if (!isset($this->m_puthead["Accept"])) { | |||
| $this->m_puthead["Accept"] = "*/*"; | |||
| } | |||
| @@ -398,7 +398,7 @@ class DedeHttpDown | |||
| $headString .= "POST ".$ps[0]." $httpv\r\n"; | |||
| } | |||
| $this->m_puthead["Host"] = $this->m_host; | |||
| //发送用户自定义的请求头 | |||
| //发送会员自定义的请求头 | |||
| if (!isset($this->m_puthead["Accept"])) { | |||
| $this->m_puthead["Accept"] = "*/*"; | |||
| } | |||
| @@ -12,15 +12,15 @@ if (!defined('DEDEINC')) exit('dedebiz'); | |||
| //使用缓存助手 | |||
| helper('cache'); | |||
| /** | |||
| * 检查用户名的合法性 | |||
| * 检查会员名的合法性 | |||
| * | |||
| * @access public | |||
| * @param string $uid 用户UID | |||
| * @param string $uid 会员UID | |||
| * @param string $msgtitle 提示标题 | |||
| * @param string $ckhas 检查是否存在 | |||
| * @return string | |||
| */ | |||
| function CheckUserID($uid, $msgtitle = '用户名', $ckhas = TRUE) | |||
| function CheckUserID($uid, $msgtitle = '会员名', $ckhas = TRUE) | |||
| { | |||
| global $cfg_mb_notallow, $cfg_mb_idmin, $cfg_md_idurl, $cfg_soft_lang, $dsql; | |||
| if ($cfg_mb_notallow != '') { | |||
| @@ -57,7 +57,7 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = TRUE) | |||
| return 'ok'; | |||
| } | |||
| /** | |||
| * 检查用户是否被禁言 | |||
| * 检查会员是否被禁言 | |||
| * | |||
| * @return void | |||
| */ | |||
| @@ -146,7 +146,7 @@ class MemberLogin | |||
| $this->fields = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$this->M_ID}' "); | |||
| } | |||
| if (is_array($this->fields)) { | |||
| //间隔一小时更新一次用户登录时间 | |||
| //间隔一小时更新一次会员登录时间 | |||
| if (time() - $this->M_LoginTime > 3600) { | |||
| $dsql->ExecuteNoneQuery("update `#@__member` set logintime='".time()."',loginip='".GetIP()."' WHERE mid='".$this->fields['mid']."';"); | |||
| PutCookie("DedeLoginTime", time(), $this->M_KeepTime); | |||
| @@ -185,7 +185,7 @@ class MemberLogin | |||
| $this->__construct($kptime); | |||
| } | |||
| /** | |||
| * 删除缓存,每次登录时和在修改用户资料的地方会清除 | |||
| * 删除缓存,每次登录时和在修改会员资料的地方会清除 | |||
| * | |||
| * @access public | |||
| * @param string | |||
| @@ -220,7 +220,7 @@ class MemberLogin | |||
| $this->ResetUser(); | |||
| } | |||
| /** | |||
| * 验证用户是否已经登录 | |||
| * 验证会员是否已经登录 | |||
| * | |||
| * @return bool | |||
| */ | |||
| @@ -230,7 +230,7 @@ class MemberLogin | |||
| else return FALSE; | |||
| } | |||
| /** | |||
| * 检测用户上传空间 | |||
| * 检测会员上传空间 | |||
| * | |||
| * @return int | |||
| */ | |||
| @@ -238,11 +238,11 @@ class MemberLogin | |||
| { | |||
| global $dsql; | |||
| $uid = $this->M_ID; | |||
| $row = $dsql->GetOne("SELECT sum(filesize) AS fs FROM `#@__uploads` WHERE mid='$uid'; "); | |||
| $row = $dsql->GetOne("SELECT sum(filesize) AS fs FROM `#@__uploads` WHERE mid='$uid';"); | |||
| return $row['fs']; | |||
| } | |||
| /** | |||
| * 检查用户空间信息 | |||
| * 检查会员空间信息 | |||
| * | |||
| * @return void | |||
| */ | |||
| @@ -258,7 +258,7 @@ class MemberLogin | |||
| } | |||
| } | |||
| /** | |||
| * 更新用户信息统计表 | |||
| * 更新会员信息统计表 | |||
| * | |||
| * @access public | |||
| * @param string $field 字段信息 | |||
| @@ -286,7 +286,7 @@ class MemberLogin | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| } | |||
| /** | |||
| * 重置用户信息 | |||
| * 重置会员信息 | |||
| * | |||
| * @return void | |||
| */ | |||
| @@ -324,7 +324,7 @@ class MemberLogin | |||
| return $fnum; | |||
| } | |||
| /** | |||
| * 用户登录 | |||
| * 会员登录 | |||
| * 把登录密码转为指定长度md5数据 | |||
| * | |||
| * @access public | |||
| @@ -398,19 +398,19 @@ class MemberLogin | |||
| } | |||
| } | |||
| /** | |||
| * 检查用户是否合法 | |||
| * 检查会员是否合法 | |||
| * | |||
| * @access public | |||
| * @param string $loginuser 登录用户名 | |||
| * @param string $loginpwd 用户密码 | |||
| * @param string $loginuser 登录会员名 | |||
| * @param string $loginpwd 会员密码 | |||
| * @return string | |||
| */ | |||
| function CheckUser(&$loginuser, $loginpwd) | |||
| { | |||
| global $dsql; | |||
| //检测用户名的合法性 | |||
| $rs = CheckUserID($loginuser, '用户名', FALSE); | |||
| //用户名不正确时返回验证错误,原登录名通过引用返回错误提示信息 | |||
| //检测会员名的合法性 | |||
| $rs = CheckUserID($loginuser, '会员名', FALSE); | |||
| //会员名不正确时返回验证错误,原登录名通过引用返回错误提示信息 | |||
| if ($rs != 'ok') { | |||
| $loginuser = $rs; | |||
| return '0'; | |||
| @@ -463,8 +463,8 @@ class MemberLogin | |||
| function getLoginError($loginuser) | |||
| { | |||
| global $dsql; | |||
| $rs = CheckUserID($loginuser, '用户名', FALSE); | |||
| //用户名不正确时返回验证错误,原登录名通过引用返回错误提示信息 | |||
| $rs = CheckUserID($loginuser, '会员名', FALSE); | |||
| //会员名不正确时返回验证错误,原登录名通过引用返回错误提示信息 | |||
| if ($rs != 'ok') { | |||
| return -1; | |||
| } | |||
| @@ -487,8 +487,8 @@ class MemberLogin | |||
| function loginError($loginuser) | |||
| { | |||
| global $dsql; | |||
| $rs = CheckUserID($loginuser, '用户名', FALSE); | |||
| //用户名不正确时返回验证错误,原登录名通过引用返回错误提示信息 | |||
| $rs = CheckUserID($loginuser, '会员名', FALSE); | |||
| //会员名不正确时返回验证错误,原登录名通过引用返回错误提示信息 | |||
| if ($rs != 'ok') { | |||
| return; | |||
| } | |||
| @@ -497,10 +497,10 @@ class MemberLogin | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| } | |||
| /** | |||
| * 保存用户cookie | |||
| * 保存会员cookie | |||
| * | |||
| * @access public | |||
| * @param string $uid 用户id | |||
| * @param string $uid 会员id | |||
| * @param string $logintime 登录限制时间 | |||
| * @return void | |||
| */ | |||
| @@ -34,7 +34,7 @@ use WeChat\Exceptions\InvalidInstanceException; | |||
| * @method \WeChat\Scan WeChatScan($options = []) static 微信扫一扫接入管理 | |||
| * @method \WeChat\Script WeChatScript($options = []) static 微信前端支持 | |||
| * @method \WeChat\Shake WeChatShake($options = []) static 微信揺一揺周边 | |||
| * @method \WeChat\Tags WeChatTags($options = []) static 微信用户标签管理 | |||
| * @method \WeChat\Tags WeChatTags($options = []) static 微信会员标签管理 | |||
| * @method \WeChat\Template WeChatTemplate($options = []) static 微信模板消息 | |||
| * @method \WeChat\User WeChatUser($options = []) static 微信粉丝管理 | |||
| * @method \WeChat\Wifi WeChatWifi($options = []) static 微信门店WIFI管理 | |||