Beispiel #1
0
    $dopost = '';
}
if (empty($allurls)) {
    $allsource = '';
} else {
    $allurls = stripslashes($allurls);
}
$m_file = DEDEDATA . "/admin/allowurl.txt";
//保存
if ($dopost == 'save') {
    $fp = fopen($m_file, 'w');
    flock($fp, 3);
    fwrite($fp, $allurls);
    fclose($fp);
    echo "<script>alert('Save OK!');</script>";
}
//读出
if (empty($allurls) && filesize($m_file) > 0) {
    $fp = fopen($m_file, 'r');
    $allurls = fread($fp, filesize($m_file));
    fclose($fp);
}
$wintitle = "";
$wecome_info = "允许的超链接";
$win = new OxWindow();
$win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST');
$win->AddHidden('dopost', 'save');
$win->AddTitle("每行保存一个超链接:");
$win->AddMsgItem("<textarea name='allurls' id='allurls' style='width:100%;height:300px'>{$allurls}</textarea>");
$winform = $win->GetWindow('ok');
$win->Display();
<?php 
require(dirname(__FILE__)."/config.php");
CheckPurview('co_AddNote');
if(empty($job)) $job="";
if($job=="")
{
     require_once(dirname(__FILE__)."/../include/pub_oxwindow.php");
     $wintitle = "导入采集规则";
	   $wecome_info = "<a href='co_main.php'><u>采集点管理</u></a>::导入采集规则";
	   $win = new OxWindow();
	   $win->Init("co_get_corule.php","js/blank.js","POST");
	   $win->AddHidden("job","yes");
	   $win->AddTitle("请在下面输入你要导入的文本配置:");
	   $win->AddMsgItem("<textarea name='notes' style='width:100%;height:300px'></textarea>");
	   $winform = $win->GetWindow("ok");
	   $win->Display();
     exit();
}
else
{
   	  CheckPurview('co_AddNote');
   	  require_once(dirname(__FILE__)."/../include/pub_dedetag.php");
   	  $dtp = new DedeTagParse();
   	  $dbnotes = $notes;
   	  $notes = stripslashes($notes);
      $dtp->LoadString($notes);
   	  if(!is_array($dtp->CTags))
      {
	      ShowMsg("该规则不合法,无法保存!","-1");
	      $dsql->Close();
	      exit();
Beispiel #3
0
 } else {
     if ($dopost == "delete") {
         if (empty($job)) {
             $job = "";
         }
         if ($job == "") {
             require_once DEDEINC . "/oxwindow.class.php";
             $wintitle = "删除插件";
             $wecome_info = "<a href='plus_main.php'>插件管理</a>::删除插件";
             $win = new OxWindow();
             $win->Init("plus_edit.php", "js/blank.js", "POST");
             $win->AddHidden("job", "yes");
             $win->AddHidden("dopost", $dopost);
             $win->AddHidden("aid", $aid);
             $win->AddTitle("你确实要删除'" . $title . "'这个插件?");
             $win->AddMsgItem("<font color='red'>警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除!<br /><br /> <a href='module_main.php?moduletype=plus'>模块管理&gt;&gt;</a> </font>");
             $winform = $win->GetWindow("ok");
             $win->Display();
             exit;
         } else {
             if ($job == "yes") {
                 $dsql->ExecuteNoneQuery("DELETE FROM #@__plus WHERE aid='{$aid}';");
                 ShowMsg("成功删除一个插件,请刷新导航菜单!", "plus_main.php");
                 exit;
             }
         }
     } else {
         if ($dopost == "saveedit") {
             $inquery = "UPDATE #@__plus SET plusname='{$plusname}',menustring='{$menustring}',filelist='{$filelist}' WHERE aid='{$aid}';";
             $dsql->ExecuteNoneQuery($inquery);
             ShowMsg("成功更改插件的配置!", "plus_main.php");
Beispiel #4
0
 /**
  * caijixia for dedecms
  * @version        $Id: cjx.class.php 112 2013-05-28 01:22:57Z qinjinpeng $
  * @copyright Copyright (c) 2011,caijixia for dedecms,caijixia.com.
  * @license   This is NOT a freeware, use is subject to license terms
  *
  * @param     NULL
  * @return    NULL
 */
 function ac_testregx()
 {
     global $cfg_soft_lang;
     $data = stripslashes($this->GV('data'));
     if ($cfg_soft_lang != 'utf-8') {
         $data = utf82gb($data);
     }
     require_once DEDEINC . '/dedetag.class.php';
     $this->dtp = new DedeTagParse();
     $this->dtp->LoadString($data);
     foreach ($this->dtp->CTags as $ctag) {
         $itemName = $ctag->TagName;
         ${$itemName} = trim($ctag->InnerText);
     }
     if (empty($list) || empty($page) || $list == 'http://' || $page == 'http://') {
         exit('规则错误');
     }
     $listarr = array();
     if (preg_match("/\\[([0-9]*-[0-9]*)\\]/", $list, $out)) {
         list($min, $max) = explode('-', $out[1]);
         if ($max - $min > 10) {
             $max = $min + 9;
         }
         for ($i = $min; $i <= $max; $i++) {
             $listarr[] = preg_replace("/\\[([0-9]*-[0-9]*)\\]/", $i, $list);
         }
         $list = preg_replace("/\\[([0-9]*-[0-9]*)\\]/", $min, $list);
     } else {
         $listarr[] = $list;
     }
     $str = $this->downfile($list);
     if ($cfg_soft_lang != $charset) {
         if ($charset == 'utf-8') {
             $str = utf82gb($str);
         } else {
             $str = gb2utf8($str);
         }
     }
     $page = str_replace('(*)', '###', $page);
     $page = preg_quote($page, '/');
     $page = str_replace('###', '([0-9a-zA-Z\\.\\-\\/_]*)', $page);
     $dhtml = new DedeHtml2();
     $dhtml->SetSource($str, $list, 'link');
     $lss = array();
     $i = 0;
     foreach ($dhtml->Links as $s) {
         if (preg_match('/' . $page . '/iU', $s['link'])) {
             if (!isset($lss[$s['link']])) {
                 if (!isset($first)) {
                     $first = $s['link'];
                 }
                 $lss[$s['link']] = $s['link'];
                 $i++;
                 if ($i == 10) {
                     break;
                 }
             }
         }
     }
     $msg = '';
     $GLOBALS['wintitle'] = "采集侠-测试定向采集规则";
     $GLOBALS['wecome_info'] = "采集侠定向采集::采集规则测试";
     $win = new OxWindow();
     $win->AddTitle('匹配到的列表地址(前10个)');
     foreach ($listarr as $v) {
         $msg .= $v . "<br>";
     }
     $win->AddMsgItem($msg);
     $win->AddTitle('第一个列表页匹配到的文章地址(前10个)');
     $msg = '';
     foreach ($lss as $v) {
         $msg .= $v . "<br>";
     }
     $win->AddMsgItem($msg);
     $str = $this->downfile($first);
     if ($cfg_soft_lang != $charset) {
         if ($charset == 'utf-8') {
             $str = utf82gb($str);
         } else {
             $str = gb2utf8($str);
         }
     }
     $win->AddTitle("<font color=black>测试采集第一篇文章:{$first} </font>");
     $win->AddTitle('文章标题');
     if (empty($titlerule)) {
         $win->AddMsgItem('自动规则不需要测试');
     } else {
         $win->AddMsgItem($this->UT($str, $titlerule));
     }
     $win->AddTitle('作者');
     if (empty($authorrule)) {
         $win->AddMsgItem('自动规则不需要测试');
     } else {
         $win->AddMsgItem($this->UT($str, $authorrule));
     }
     $win->AddTitle('来源');
     if (empty($sourcerule)) {
         $win->AddMsgItem('自动规则不需要测试');
     } else {
         $win->AddMsgItem($this->UT($str, $sourcerule));
     }
     $win->AddTitle('文章内容(测试无法采集分页内容)');
     if (empty($bodyrule)) {
         $win->AddMsgItem('自动规则不需要测试');
     } else {
         $win->AddMsgItem($this->UT($str, $bodyrule));
     }
     $win->AddTitle('分页链接');
     if (empty($fyrule)) {
         $win->AddMsgItem('自动采集分页不需要测试');
     } else {
         $fylink = $this->UT($str, $fyrule);
         $dhtml = new DedeHtml2();
         $dhtml->SetSource($fylink, $first, 'link');
         $relink = '';
         foreach ($dhtml->Links as $k => $v) {
             $relink .= $k . "<br>";
         }
         $win->AddMsgItem($relink);
     }
     $GLOBALS['winform'] = $win->GetWindow("hand");
     $win->Display();
 }
Beispiel #5
0
 }
 if ($userok != "yes") {
     $randcode = mt_rand(10000, 99999);
     $safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24);
     require_once DEDEINC . "/oxwindow.class.php";
     $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);
     $win->AddHidden("userok", "yes");
     $win->AddHidden("randcode", $randcode);
     $win->AddHidden("safecode", $safecode);
     $win->AddHidden("id", $id);
     $win->AddTitle("系统警告!");
     $win->AddMsgItem("你确信要删除用户:{$userid} 吗?", "50");
     $win->AddMsgItem("安全验证串:<input name='safecode' type='text' id='safecode' size='16' style='width:200px' />&nbsp;(复制本代码: <font color='red'>{$safecode}</font> )", "30");
     $winform = $win->GetWindow("ok");
     $win->Display();
     exit;
 }
 $safecodeok = substr(md5($cfg_cookie_encode . $randcode), 0, 24);
 if ($safecodeok != $safecode) {
     ShowMsg("请填写正确的安全验证串!", "sys_admin_user.php");
     exit;
 }
 //不能删除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");
Beispiel #6
0
         } else {
             $v['type'] = '文件';
         }
         $filelist .= "{$v['type']}|{$v['name']}\r\n";
     }
     if (file_exists(DEDEDATA . "/module/{$hash}-readme.php")) {
         $setupinfo = "已安装 <a href='module_main.php?action=uninstall&hash={$hash}'>卸载</a>";
     } else {
         $setupinfo = "未安装 <a href='module_main.php?action=setup&hash={$hash}'>安装</a>";
     }
     $win = new OxWindow();
     $win->Init("", "js/blank.js", "");
     $wecome_info = "模块管理";
     $win->AddTitle("<a href='module_main.php'>模块管理</a> &gt;&gt; 模块详情: {$infos['name']}");
     $msg = "<style>.dtb{border-bottom:1px dotted #cccccc}</style>\r\n    <table width='98%' border='0' cellspacing='0' cellpadding='0'>\r\n  <tr>\r\n    <td width='20%' height='28' class='dtb'>模块名称:</td>\r\n    <td width='80%' class='dtb'>{$infos['name']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>语言:</td>\r\n    <td class='dtb'>{$infos['lang']} {$alertMsg}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>文件大小:</td>\r\n    <td class='dtb'>{$infos['filesize']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>是否已安装:</td>\r\n    <td class='dtb'>{$setupinfo}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>团队名称:</td>\r\n    <td class='dtb'>{$infos['team']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>发布时间:</td>\r\n    <td class='dtb'>{$infos['time']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>电子邮箱:</td>\r\n    <td class='dtb'>{$infos['email']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>官方网址:</td>\r\n    <td class='dtb'>{$infos['url']}</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28' class='dtb'>使用协议:</td>\r\n    <td class='dtb'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank'>点击浏览...</a></td>\r\n  </tr>\r\n  <tr>\r\n    <td height='28'>模块包含的文件:<br />(文件路径相对于当前目录)</td><td>&nbsp;</td>\r\n  </tr>\r\n  <tr>\r\n    <td height='164' colspan='2'>\r\n     <textarea name='filelists' id='filelists' style='width:90%;height:200px'>{$filelist}</textarea>\r\n    </td>\r\n  </tr>\r\n</table>\r\n    ";
     $win->AddMsgItem("<div style='padding-left:10px;line-height:150%'>{$msg}</div>");
     $winform = $win->GetWindow('hand', '');
     $win->Display();
     $dm->Clear();
     exit;
 } else {
     if ($action == 'edit') {
         $dm = new DedeModule($mdir);
         $minfos = $dm->GetModuleInfo($hash);
         extract($minfos, EXTR_SKIP);
         if (!isset($lang)) {
             $lang = 'gb2312';
         }
         if (!isset($moduletype)) {
             $moduletype = 'soft';
         }
Beispiel #7
0
         ShowMsg("成功删除这些会员!", $ENV_GOBACK_URL);
         exit;
     }
     $randcode = mt_rand(10000, 99999);
     $safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24);
     $wintitle = "会员管理-删除会员";
     $wecome_info = "<a href='" . $ENV_GOBACK_URL . "'>会员管理</a>::删除会员";
     $win = new OxWindow();
     $win->Init("member_do.php", "js/blank.js", "POST");
     $win->AddHidden("fmdo", "yes");
     $win->AddHidden("dopost", $dopost);
     $win->AddHidden("id", $id);
     $win->AddHidden("randcode", $randcode);
     $win->AddHidden("safecode", $safecode);
     $win->AddTitle("你确实要删除(ID:" . $id . ")这个会员?");
     $win->AddMsgItem(" 安全验证串:<input name='safecode' type='text' id='safecode' size='16' style='width:200px' /> (复制本代码: <font color='red'>{$safecode}</font>)", "30");
     $winform = $win->GetWindow("ok");
     $win->Display();
 } else {
     if ($dopost == "recommend") {
         CheckPurview('member_Edit');
         $id = preg_replace("#[^0-9]#", "", $id);
         if ($matt == 0) {
             $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=1 WHERE mid='{$id}' AND matt<>10 LIMIT 1");
             ShowMsg("成功设置一个会员推荐!", $ENV_GOBACK_URL);
             exit;
         } else {
             $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='{$id}' AND matt<>10 LIMIT 1");
             ShowMsg("成功取消一个会员推荐!", $ENV_GOBACK_URL);
             exit;
         }
Beispiel #8
0
    $dopost = '';
}
if (empty($allsource)) {
    $allsource = '';
} else {
    $allsource = stripslashes($allsource);
}
$m_file = DEDEDATA . "/admin/source.txt";
//保存
if ($dopost == 'save') {
    $fp = fopen($m_file, 'w');
    flock($fp, 3);
    fwrite($fp, $allsource);
    fclose($fp);
    echo "<script>alert('Save OK!');</script>";
}
//读出
if (empty($allsource) && filesize($m_file) > 0) {
    $fp = fopen($m_file, 'r');
    $allsource = fread($fp, filesize($m_file));
    fclose($fp);
}
$wintitle = "文章来源管理";
$wecome_info = "文章来源管理";
$win = new OxWindow();
$win->Init('article_source_edit.php', 'js/blank.js', 'POST');
$win->AddHidden('dopost', 'save');
$win->AddTitle("每行保存一个来源:");
$win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>{$allsource}</textarea>");
$winform = $win->GetWindow('ok');
$win->Display();
Beispiel #9
0
     if ($reid != 0) {
         $row = $dsql->GetOne("SELECT msg FROM `#@__guestbook` WHERE id='{$reid}' ");
         $msg = "<div class=\\'rebox\\'>" . addslashes($row['msg']) . "</div>\n" . $msg;
     }
     $query = "INSERT INTO `#@__guestbook`(title,tid,mid,uname,email,homepage,qq,face,msg,ip,dtime,ischeck)\r\n                  VALUES ('{$title}','{$tid}','{$g_mid}','{$uname}','{$email}','{$homepage}','{$qq}','{$img}','{$msg}','{$ip}','{$dtime}','{$needCheck}'); ";
     $dsql->ExecuteNoneQuery($query);
     $gid = $dsql->GetLastID();
     if ($needCheck == 1) {
         require_once DEDEINC . "/oxwindow.class.php";
         $msg = "\r\n        <font color='red'><b>成功发送或回复留言!</b></font> &nbsp; <a href='guestbook.php' style='font-size:14px;font-weight:bold'><u>我已经知道了,点击此返回&gt;&gt;</u></a>";
         $wintitle = "留言发布成功提示";
         $wecome_info = "留言发布成功:";
         $win = new OxWindow();
         $win->Init("", "js/blank.js", "post");
         $win->AddTitle("提示:");
         $win->AddMsgItem("<div style='padding:20px;line-height:300%;font-size:14px'>{$msg}</div>");
         $winform = $win->GetWindow("hand");
         $win->Display();
     } else {
         ShowMsg('成功发送一则留言,但需审核后才能显示!', 'guestbook.php', 0, 3000);
     }
     exit;
 } else {
     setcookie('GUEST_BOOK_POS', GetCurUrl(), time() + 3600, '/');
     if ($g_isadmin) {
         $sql = 'SELECT * FROM `#@__guestbook` ORDER BY id DESC';
     } else {
         $sql = 'SELECT * FROM `#@__guestbook` WHERE ischeck=1 ORDER BY id DESC';
     }
     $dlist = new DataListCP();
     $dlist->pageSize = 10;
		$dsql->SetQuery("update #@__member set money=money+$money where ID='$ID'");
		$dsql->ExecuteNoneQuery();
		$dsql->Close();
		ShowMsg("成功给一个会员充值!",$ENV_GOBACK_URL);
		exit();
	}
	if(empty($upmoney)) $upmoney = 500;
	$wintitle = "会员管理-会员充值";
	$wecome_info = "<a href='".$ENV_GOBACK_URL."'>会员管理</a>::会员充值";
	$win = new OxWindow();
	$win->Init("member_do.php","js/blank.js","POST");
	$win->AddHidden("fmdo","yes");
	$win->AddHidden("dopost",$dopost);
	$win->AddHidden("ID",$ID);
	$win->AddTitle("会员充值:");
	$win->AddMsgItem("请输入充值点数:<input type='text' name='money' size='10' value='$upmoney'>",60);
	$winform = $win->GetWindow("ok");
	$win->Display();
}
/*----------------
function __EditUser()
更改会员
----------------*/
else if($dopost=="edituser")
{
	CheckPurview('member_Edit');
	$dsql = new DedeSql(false);
	$uptime =  GetMkTime($uptime);
	$edpwd = '';
	if($newpwd!=''){
		$newpwd = GetEncodePwd($newpwd);
Beispiel #11
0
/**
 *  显示一个不带表单的普通提示
 *
 * @access    public
 * @param     string   $msg  消息提示信息
 * @param     string   $title  提示标题
 * @return    string
 */
function ShowMsgWin($msg, $title)
{
    $win = new OxWindow();
    $win->Init();
    $win->mainTitle = "Oceanforex系统提示:";
    $win->AddTitle($title);
    $win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>{$msg}</div>");
    $winform = $win->GetWindow("hand");
    $win->Display();
}
Beispiel #12
0
         ShowMsg("成功删除这些会员!", $ENV_GOBACK_URL);
         exit;
     }
     $randcode = mt_rand(10000, 99999);
     $safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24);
     $wintitle = "会员管理-删除会员";
     $wecome_info = "<a href='" . $ENV_GOBACK_URL . "'>会员管理</a>::删除会员";
     $win = new OxWindow();
     $win->Init("member_do.php", "js/blank.js", "POST");
     $win->AddHidden("fmdo", "yes");
     $win->AddHidden("dopost", $dopost);
     $win->AddHidden("id", $id);
     $win->AddHidden("randcode", $randcode);
     $win->AddHidden("safecode", $safecode);
     $win->AddTitle("你确实要删除(ID:" . $id . ")这个会员?");
     $win->AddMsgItem("<div style='display: none;'> 安全验证串:<input name='safecode' type='text' id='safecode' size='16' style='width:200px' value='{$safecode}' /> (复制本代码: <font color='red'>{$safecode}</font>)</div>", "30");
     $winform = $win->GetWindow("ok");
     $win->Display();
 } else {
     if ($dopost == "recommend") {
         CheckPurview('member_Edit');
         $id = preg_replace("#[^0-9]#", "", $id);
         if ($matt == 0) {
             $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=1 WHERE mid='{$id}' AND matt<>10 LIMIT 1");
             ShowMsg("成功设置一个会员推荐!", $ENV_GOBACK_URL);
             exit;
         } else {
             $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='{$id}' AND matt<>10 LIMIT 1");
             ShowMsg("成功取消一个会员推荐!", $ENV_GOBACK_URL);
             exit;
         }
			@unlink($upfile);
			$j++;
		}
	}
	ShowMsg("成功上传 $j 个文件到: $activepath","file_manage_main.php?activepath=$activepath");
	exit();
}
//空间检查
else if($fmdo=="space")
{
	if($activepath=="") $ecpath = "所有目录";
	else $ecpath = $activepath;	
	$titleinfo = "目录 <a href='file_manage_main.php?activepath=$activepath'><b><u>$ecpath</u></b></a> 空间使用状况:<br/>";
	$wintitle = "文件管理";
	$wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath=$activepath'>文件浏览器</a>]</a>";
	$activepath=$cfg_basedir.$activepath;
	$space=new SpaceUse;
	$space->checksize($activepath);
	$total=$space->totalsize;
	$totalkb=$space->setkb($total);
	$totalmb=$space->setmb($total);
	$win = new OxWindow();
	$win->Init("","js/blank.js","POST");
	$win->AddTitle($titleinfo);
	$win->AddMsgItem("  $totalmb M<br/>  $totalkb KB<br/>  $total 字节");
	$winform = $win->GetWindow("");
	$win->Display();
}

ClearAllLink();
?>
CheckPurview('co_EditNote');
if(empty($job)) $job="";
if($job=="")
{
     require_once(dirname(__FILE__)."/../include/pub_oxwindow.php");
     $wintitle = "更改采集规则";
	   $wecome_info = "<a href='co_main.php'><u>采集点管理</u></a>::更改采集规则";
	   $win = new OxWindow();
	   $win->Init("co_edit_text.php","js/blank.js","POST");
	   $win->AddHidden("job","yes");
	   $win->AddHidden("nid",$nid);
	   $win->AddTitle("文本配置专家更改模式:[<a href='co_edit.php?nid={$nid}'>使用可视化修改模式</a>]");
	   $dsql = new DedeSql(false);
	   $row = $dsql->GetOne("Select * From #@__conote where nid='$nid' ");
	   $dsql->Close();
	   $win->AddMsgItem("<textarea name='notes' style='width:100%;height:500px' rows='20'>{$row['noteinfo']}</textarea>");
	   $winform = $win->GetWindow("ok");
	   $win->Display();
     exit();
}
else
{
   	  CheckPurview('co_EditNote');
   	  require_once(dirname(__FILE__)."/../include/pub_dedetag.php");
   	  $dtp = new DedeTagParse();
   	  $dbnotes = $notes;
   	  $notes = stripslashes($notes);
      $dtp->LoadString($notes);
   	  if(!is_array($dtp->CTags)){
	      ShowMsg("该规则不合法,无法保存!","-1");
	      $dsql->Close();
    $dopost = '';
}
if (empty($allwriter)) {
    $allwriter = '';
} else {
    $allwriter = stripslashes($allwriter);
}
$m_file = DEDEDATA . "/admin/writer.txt";
//保存
if ($dopost == "save") {
    $fp = fopen($m_file, 'w');
    flock($fp, 3);
    fwrite($fp, $allwriter);
    fclose($fp);
    echo "<script>alert('Save OK!');</script>";
}
//读出
if (empty($allwriter) && filesize($m_file) > 0) {
    $fp = fopen($m_file, 'r');
    $allwriter = fread($fp, filesize($m_file));
    fclose($fp);
}
$wintitle = "文章作者管理";
$wecome_info = "文章作者管理";
$win = new OxWindow();
$win->Init('article_writer_edit.php', 'js/blank.js', 'POST');
$win->AddHidden('dopost', 'save');
$win->AddTitle("把作者姓名用半角逗号“,”分开:");
$win->AddMsgItem("<textarea name='allwriter' id='allwriter' style='width:100%;height:300px'>{$allwriter}</textarea>");
$winform = $win->GetWindow('ok');
$win->Display();
Beispiel #16
0
     $msg .= "<tr>\r\n";
     $msg .= " <td height='24' align='center'>新模型描述:</td>\r\n";
     $msg .= " <td><label>\r\n";
     $msg .= " <textarea name=\"description\" id=\"description\" cols=\"45\" rows=\"5\" onClick=\"this.value=''\">新模型描述</textarea>\r\n";
     $msg .= " </label></td>\r\n";
     $msg .= "</tr>\r\n";
     $msg .= "<tr>\r\n";
     $msg .= " <td height='24' align='center'>模型状态:</td>\r\n";
     $msg .= " <td><input name='state' type='radio' id='copytemplet' value='1' class='np' checked='checked'/>\r\n";
     $msg .= " 启用\r\n";
     $msg .= " &nbsp;\r\n";
     $msg .= " <input name='state' type='radio' id='copytemplet' class='np' value='0'/>\r\n";
     $msg .= " 禁用</td>\r\n";
     $msg .= "</tr>\r\n";
     $msg .= "</table>";
     $win->AddMsgItem("<div style='padding:20px;line-height:300%'>{$msg}</div>");
     $winform = $win->GetWindow("ok");
     $win->Display();
     exit;
 } else {
     if ($job == "yes") {
         if (preg_match("#[^0-9-]#", $newid) || empty($newid)) {
             ShowMsg("<font color=red>'会员模型ID'</font>必须为数字!", "-1");
             exit;
         }
         if ($newtable == "") {
             ShowMsg("表名不能为空!", "-1");
             exit;
         }
         $state = isset($state) && is_numeric($state) ? $state : 0;
         $newname = htmlspecialchars($newname, ENT_COMPAT, "GB2312");
Beispiel #17
0
<?php

require dirname(__FILE__) . "/config.php";
CheckPurview('co_EditNote');
if (empty($job)) {
    $job = '';
}
if ($job == '') {
    require_once DEDEINC . "/oxwindow.class.php";
    $wintitle = "更改采集规则";
    $wecome_info = "<a href='co_main.php'><u>采集点管理</u></a>::更改采集规则 - 专家更改模式";
    $win = new OxWindow();
    $win->Init("co_edit_text.php", "js/blank.js", "POST");
    $win->AddHidden("job", "yes");
    $win->AddHidden("nid", $nid);
    $row = $dsql->GetOne("Select * From `#@__co_note` where nid='{$nid}' ");
    $win->AddTitle("索引与基本信息配置:");
    $win->AddMsgItem("<textarea name='listconfig' style='width:100%;height:200px'>{$row['listconfig']}</textarea>");
    $win->AddTitle("字段配置:");
    $win->AddMsgItem("<textarea name='itemconfig' style='width:100%;height:300px'>{$row['itemconfig']}</textarea>");
    $winform = $win->GetWindow("ok");
    $win->Display();
    exit;
} else {
    CheckPurview('co_EditNote');
    $query = "update `#@__co_note` set listconfig='{$listconfig}',itemconfig='{$itemconfig}' where nid='{$nid}' ";
    $rs = $dsql->ExecuteNoneQuery($query);
    ShowMsg("成功修改一个规则!", "co_main.php");
    exit;
}
 } else {
     if ($fmdo == "del") {
         $wintitle = "&nbsp;文件管理";
         $wecome_info = "&nbsp;文件管理::删除文件 [<a href='file_manage_main.php?activepath={$activepath}'>文件浏览器</a>]</a>";
         $win = new OxWindow();
         $win->Init("file_manage_control.php", "js/blank.js", "POST");
         $win->AddHidden("fmdo", $fmdo);
         $win->AddHidden("activepath", $activepath);
         $win->AddHidden("filename", $filename);
         if (@is_dir($cfg_basedir . $activepath . "/{$filename}")) {
             $wmsg = "你确信要删除目录:{$filename} 吗?";
         } else {
             $wmsg = "你确信要删除文件:{$filename} 吗?";
         }
         $win->AddTitle("删除文件确认");
         $win->AddMsgItem($wmsg, "50");
         $winform = $win->GetWindow("ok");
         $win->Display();
     } else {
         if ($fmdo == "edit") {
             if (!isset($backurl)) {
                 $backurl = "";
             }
             $activepath = str_replace("..", "", $activepath);
             $filename = str_replace("..", "", $filename);
             $file = "{$cfg_basedir}{$activepath}/{$filename}";
             $content = "";
             if (is_file($file)) {
                 $fp = fopen($file, "r");
                 $content = fread($fp, filesize($file));
                 fclose($fp);
Beispiel #19
0
function ShowMsgWin($msg, $title)
{
    $win = new OxWindow();
    $win->AddTitle($title);
    $win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>{$msg}</div>");
    $winform = $win->GetWindow("hand", "&nbsp;", false);
    $win->Display();
}
Beispiel #20
0
 function GotoStaMsg($msg)
 {
     global $wintitle, $wecome_info, $winform;
     $wintitle = "导入内容模型规则";
     $wecome_info = "<a href='mychannel_main.php'>内容模型管理</a>::导入内容模型规则";
     $win = new OxWindow();
     $win->Init();
     $win->AddTitle("操作状态提示:");
     $win->AddMsgItem($msg);
     $winform = $win->GetWindow("hand");
     $win->Display();
     exit;
 }
                        ShowMsg("成功上传 {$j} 个文件到: {$activepath}", "file_manage_main.php?activepath={$activepath}");
                        exit;
                    } else {
                        if ($fmdo == "space") {
                            if ($activepath == "") {
                                $ecpath = "所有目录";
                            } else {
                                $ecpath = $activepath;
                            }
                            $titleinfo = "目录 <a href='file_manage_main.php?activepath={$activepath}'><b><u>{$ecpath}</u></b></a> 空间使用状况:<br/>";
                            $wintitle = "文件管理";
                            $wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath={$activepath}'>文件浏览器</a>]</a>";
                            $activepath = $cfg_basedir . $activepath;
                            $space = new SpaceUse();
                            $space->checksize($activepath);
                            $total = $space->totalsize;
                            $totalkb = $space->setkb($total);
                            $totalmb = $space->setmb($total);
                            $win = new OxWindow();
                            $win->Init("", "js/blank.js", "POST");
                            $win->AddTitle($titleinfo);
                            $win->AddMsgItem("  {$totalmb} M<br/>  {$totalkb} KB<br/>  {$total} 字节");
                            $winform = $win->GetWindow("");
                            $win->Display();
                        }
                    }
                }
            }
        }
    }
}
		$typeOptions = "
		<select name='targetTypeid' style='width:350'>
		<option value='0'>请选择移动到的位置...</option>\r\n
     $typeOptions
    </select>
    ";
		$wintitle = "文档管理-移动文档";
	  $wecome_info = "<a href='".$ENV_GOBACK_URL."'>文档管理</a>::移动文档";
	  $win = new OxWindow();
	  $win->Init("archives_do.php","js/blank.js","POST");
	  $win->AddHidden("fmdo","yes");
	  $win->AddHidden("dopost",$dopost);
	  $win->AddHidden("qstr",$qstr);
	  $win->AddHidden("aid",$aid);
	  $win->AddTitle("你目前的操作是移动文档,请选择目标栏目:");
	  $win->AddMsgItem($typeOptions,"30","1");
	  $win->AddMsgItem("你选中的文档ID是: $qstr <br>移动的栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。","30","1");
	  $winform = $win->GetWindow("ok");
	  $win->Display();
	}else{
		$targetTypeid = ereg_replace('[^0-9]','',$targetTypeid);
		$dsql = new DedeSql(false);
		$typeInfos = $dsql->GetOne(" Select * From #@__arctype where ID='$targetTypeid' ");
		if(!is_array($typeInfos)){
			ShowMsg("参数错误!","-1");
			$dsql->Close();
			exit();
		}
		if($typeInfos['ispart']!=0){
			ShowMsg("文档保存的栏目必须为最终列表栏目!","-1");
			$dsql->Close();
Beispiel #23
0
                            } else {
                                if ($dopost == "coall") {
                                    CheckPurview('co_PlayNote');
                                    $mrow = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__co_htmls` ");
                                    $totalnum = $mrow['dd'];
                                    if ($totalnum == 0) {
                                        ShowMsg("没发现可下载的内容!", "-1");
                                        exit;
                                    }
                                    $wintitle = "采集管理-采集未下载内容";
                                    $wecome_info = "<a href='co_main.php'>采集管理</a>::采集未下载内容";
                                    $win = new OxWindow();
                                    $win->Init("co_gather_start_action.php", "js/blank.js", "GET");
                                    $win->AddHidden('startdd', '0');
                                    $win->AddHidden('pagesize', '5');
                                    $win->AddHidden('sptime', '0');
                                    $win->AddHidden('nid', '0');
                                    $win->AddHidden('totalnum', $totalnum);
                                    $win->AddMsgItem("本操作会检测并下载‘<a href='co_url.php'><u>临时内容</u></a>’中所有未下载的内容,是否继续?");
                                    $winform = $win->GetWindow("ok");
                                    $win->Display();
                                    exit;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
Beispiel #24
0
            }
        }
        //生成HTML
        UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags);
        if ($cfg_remote_site == 'Y' && $isremote == "1") {
            if ($serviterm != "") {
                list($servurl, $servuser, $servpwd) = explode(',', $serviterm);
                $config = array('hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd, 'debug' => 'TRUE');
            } else {
                $config = array();
            }
            if (!$ftp->connect($config)) {
                exit('Error:None FTP Connection!');
            }
        }
        $artUrl = MakeArt($id, true, true, $isremote);
        if ($artUrl == '') {
            $artUrl = $cfg_phpurl . "/view.php?aid={$id}";
        }
        ClearMyAddon($id, $title);
        //返回成功信息
        $msg = "\r\n      请选择你的后续操作:\r\n    <a href='article_add.php?cid={$typeid}'><u>发布新文章</u></a>\r\n    &nbsp;&nbsp;\r\n    <a href='archives_do.php?aid=" . $id . "&dopost=editArchives'><u>查看更改</u></a>\r\n    &nbsp;&nbsp;\r\n    <a href='{$artUrl}' target='_blank'><u>查看文章</u></a>\r\n    &nbsp;&nbsp;\r\n    <a href='catalog_do.php?cid={$typeid}&dopost=listArchives'><u>管理文章</u></a>\r\n    &nbsp;&nbsp;\r\n    {$backurl}\r\n    ";
        $wintitle = "成功更改文章!";
        $wecome_info = "文章管理::更改文章";
        $win = new OxWindow();
        $win->AddTitle("成功更改文章:");
        $win->AddMsgItem($msg);
        $winform = $win->GetWindow("hand", "&nbsp;", false);
        $win->Display();
    }
}
}
else if($dopost=="delete")
{
	if(empty($userok)) $userok="";
	if($userok!="yes")
	{
	   require_once(dirname(__FILE__)."/../include/pub_oxwindow.php");
	   $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);
	   $win->AddHidden("userok","yes");
	   $win->AddHidden("ID",$ID);
	   $win->AddTitle("系统警告!");
	   $win->AddMsgItem("你确信要删除用户:$userid 吗?","50");
	   $winform = $win->GetWindow("ok");
	   $win->Display();
	   exit();
  }
	$dsql = new DedeSql(false);
	$dsql->SetQuery("Delete From `#@__admin` where ID='$ID' And usertype<>'10' ");
	$dsql->Execute();
	$dsql->Close();
	ShowMsg("成功删除一个帐户!","sys_admin_user.php");
	exit();
}
//--------------------------
$dsql = new DedeSql(false);
$row = $dsql->GetOne("Select * From #@__admin where ID='$ID'");
require_once(dirname(__FILE__)."/templets/sys_admin_user_edit.htm");