Ejemplo n.º 1
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();
     $win->AddHidden("fmdo", $fmdo);
     $win->AddHidden("activepath", $activepath);
     $win->AddHidden("filename", $filename);
     $win->AddTitle("新位置前面不加'/'表示相对于当前位置,加'/'表示相对于根目录。");
     $win->AddItem("被移动文件:", $filename);
     $win->AddItem("当前位置:", $activepath);
     $win->AddItem("新位置:", "<input name='newpath' type='input' class='alltxt' id='newpath' size='40'>");
     $winform = $win->GetWindow("ok");
     $win->Display();
 } 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 = "";
Ejemplo n.º 3
0
<?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();
Ejemplo n.º 4
0
<?php 
require(dirname(__FILE__)."/config.php");
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)){
Ejemplo n.º 5
0
    UpDateCatCache();
    ShowMsg('成功移动目录!', 'catalog_main.php');
    exit;
}
function IsParent($myid, $topid, $dsql)
{
    $row = $dsql->GetOne("select id,reid,topid from #@__arctype where topid='{$myid}' or id='{$myid}'");
    if ($row['reid'] == $topid) {
        return true;
    } else {
        if ($row['reid'] == 0) {
            return false;
        } else {
            return IsParent($row['reid'], $topid, $dsql);
        }
    }
}
$tl = new TypeLink($typeid);
$typeOptions = $tl->GetOptionArray(0, 0, $channelid);
$wintitle = "移动栏目";
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> &gt;&gt; 移动栏目";
$win = new OxWindow();
$win->Init('catalog_move.php', 'js/blank.js', 'POST');
$win->AddHidden('typeid', $typeid);
$win->AddHidden('dopost', 'moveok');
$win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。");
$win->AddItem('你选择的栏目是:', "{$typename}({$typeid})");
$win->AddItem('你希望移动到那个栏目?', "<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n{$typeOptions}\r\n</select>");
$win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。');
$winform = $win->GetWindow('ok');
$win->Display();
Ejemplo n.º 6
0
        exit;
    }
    if ($fmdo == 'yes') {
        $id = explode("`", $id);
        foreach ($id as $var) {
            $query = "DELETE FROM `#@__erradd` WHERE `id` = '{$var}'";
            $dsql->ExecuteNoneQuery($query);
        }
        ShowMsg("成功删除指定的文档!", "erraddsave.php");
        exit;
    } else {
        require_once DEDEINC . "/oxwindow.class.php";
        $wintitle = "删除";
        $wecome_info = "<a href='erraddsave.php'>错误管理</a>::删除错误";
        $win = new OxWindow();
        $win->Init("erraddsave.php", "js/blank.js", "POST");
        $win->AddHidden("fmdo", "yes");
        $win->AddHidden("dopost", $dopost);
        $win->AddHidden("id", $id);
        $win->AddTitle("你确实要删除“ {$id} ”这些错误提示?");
        $winform = $win->GetWindow("ok");
        $win->Display();
        exit;
    }
    exit;
}
$sql = "SELECT * FROM `#@__erradd`";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/erradd.htm");
$dlist->SetSource($sql);
$dlist->display();
Ejemplo n.º 7
0
 if ($dopost == 'moveCatalog') {
     CheckPurview('t_Move');
     require_once DEDEINC . '/oxwindow.class.php';
     require_once DEDEINC . '/typelink.class.php';
     require_once DEDEINC . '/channelunit.func.php';
     if (empty($nextjob)) {
         $tl = new TypeLink($typeid);
         $typename = $tl->TypeInfos['typename'];
         $reid = $tl->TypeInfos['reid'];
         $channelid = $tl->TypeInfos['channeltype'];
         $typeOptions = $tl->GetOptionArray(0, 0, $channelid);
         $wintitle = "移动栏目";
         $wecome_info = "<a href='catalog_main.php'>栏目管理</a> &gt;&gt; 移动栏目";
         $win = new OxWindow();
         $win->Init('catalog_do.php', 'js/blank.js', 'POST');
         $win->AddHidden('dopost', 'moveCatalog');
         $win->AddHidden('typeid', $typeid);
         $win->AddHidden('channelid', $channelid);
         $win->AddHidden('nextjob', 'unitok');
         $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。");
         $win->AddItem('你选择的栏目是:', "{$typename}({$typeid})");
         $win->AddItem('你希望移动到那个栏目?', "<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n{$typeOptions}\r\n</select>");
         $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。');
         $winform = $win->GetWindow('ok');
         $win->Display();
         exit;
     } else {
         if ($typeid == $movetype) {
             ShowMsg('移对对象和目标位置相同!', 'catalog_main.php');
             exit;
         }
         $okaids = array();
         foreach ($qstrs as $aid) {
             if (!isset($okaids[$aid])) {
                 DelArc($aid, "OK", "", $recycle);
             } else {
                 $okaids[$aid] = 1;
             }
         }
         ShowMsg("成功删除指定的文档!", "recycling.php");
         exit;
     } else {
         $wintitle = "文档管理-删除文档";
         $wecome_info = "<a href='recycling.php'>文档管理</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->AddHidden("recycle", $recycle);
         $win->AddTitle("你确实要永久删除“ {$qstr} 和 {$aid} ”这些文档?");
         $winform = $win->GetWindow("ok");
         $win->Display();
     }
 } else {
     if ($dopost == 'quickEdit') {
         require_once DEDEADMIN . "/inc/inc_catalog_options.php";
         AjaxHead();
         $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.*\n    FROM `#@__archives` arc\n    LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel\n    LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='{$aid}' ";
         $arcRow = $dsql->GetOne($query);
         $divname = 'quickEdit';
Ejemplo n.º 9
0
require_once dirname(__FILE__) . '/config.php';
//检查权限许可
CheckPurview('t_Del,t_AccDel');
require_once DEDEINC . '/typeunit.class.admin.php';
require_once DEDEINC . '/oxwindow.class.php';
$id = trim(preg_replace("#[^0-9]#", '', $id));
//检查栏目操作许可
CheckCatalog($id, "你无权删除本栏目!");
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost == 'ok') {
    $ut = new TypeUnit();
    $ut->DelType($id, $delfile);
    UpDateCatCache();
    ShowMsg("成功删除一个栏目!", "catalog_main.php");
    exit;
}
$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=" . $id);
$row = $dsql->GetOne();
$wintitle = "删除栏目确认";
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> &gt;&gt; 删除栏目确认";
$win = new OxWindow();
$win->Init('catalog_del.php', 'js/blank.js', 'POST');
$win->AddHidden('id', $id);
$win->AddHidden('dopost', 'ok');
$win->AddTitle("你要确实要删除栏目: [{$row['typename']}] 吗?");
$win->AddItem('栏目的文件保存目录:', $row['typedir']);
$win->AddItem('是否删除文件:', "<input type='radio' name='delfile' class='np' value='no' checked='1' />否 &nbsp;<input type='radio' name='delfile' class='np' value='yes' />是");
$winform = $win->GetWindow('ok');
$win->Display();
	$dsql->ExecuteNoneQuery($query);
	$dsql->Close();
	ShowMsg("成功增加一个规则!","co_export_rule.php");
	exit();
}
else if($action=="hand")
{
	 if(empty($job)) $job="";
	 if($job=="")
	 {
     require_once(dirname(__FILE__)."/../include/pub_oxwindow.php");
     $wintitle = "数据导入规则";
	   $wecome_info = "<a href='co_export_rule.php'><u>数据导入规则</u></a>::导入文本配置";
	   $win = new OxWindow();
	   $win->Init("co_export_rule_add.php","js/blank.js","POST");
	   $win->AddHidden("job","yes");
	   $win->AddHidden("action",$action);
	   $win->AddTitle("请在下面输入你要导入的文本配置:");
	   $win->AddMsgItem("<textarea name='notes' style='width:100%;height:300'></textarea>");
	   $winform = $win->GetWindow("ok");
	   $win->Display();
     exit();
   }
   else
   {
   	  require_once(dirname(__FILE__)."/../include/pub_dedetag.php");
   	  $dtp = new DedeTagParse();
   	  $dbnotes = $notes;
   	  $notes = stripslashes($notes);
      $dtp->LoadString($notes);
   	  if(!is_array($dtp->CTags))
Ejemplo n.º 11
0
	{
		$ID = ereg_replace("[^0-9]","",$ID);
		$money = ereg_replace("[^0-9]","",$money);
		$dsql = new DedeSql(false);
		$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);
    <tr>
      <td width="16%" height="30">网站名称:</td>
      <td width="84%" style="text-align:left;"><input name="isv_name" type="text" id="isv_name" size="16" style="width:200px" value="{$cfg_webname}" /><span style="color:#999">&nbsp; 为方便您管理站点评论,建议更改站点名称</span></td>
    </tr>
    <tr>
      <td width="16%" height="30">网站地址:</td>
      <td width="84%" style="text-align:left;"><input name="url" type="text" id="url" size="16" style="width:200px" value="{$cfg_basehost}" /><span style="color:#999">&nbsp; 例如:http://www.dedecms.com</span></td>
    </tr>
  </tbody>
</table>
EOT;
    $wintitle = '注册畅言帐号:';
    $wecome_info = '<a href="?">畅言评论模块</a> 》注册帐号';
    $win = new OxWindow();
    $win->Init('?', 'js/blank.js', 'POST');
    $win->AddHidden('dopost', 'doreg');
    $win->AddHidden('nocheck', 'yes');
    $win->AddTitle($wintitle);
    $win->AddMsgItem($msg);
    $winform = $win->GetWindow('ok', '&nbsp;', false);
    $win->Display();
} elseif ($dopost == 'doreg') {
    $user = empty($user) ? '' : $user;
    $pwd = empty($pwd) ? '' : $pwd;
    $repwd = empty($repwd) ? '' : $repwd;
    $isv_name = empty($isv_name) ? '' : $isv_name;
    $url = empty($url) ? '' : $url;
    if (!preg_match("#^http:\\/\\/[A-Za-z0-9]+\\.[A-Za-z0-9]+[\\/=\\?%\\-&_~`@[\\]\\':+!]*([^<>\"])*\$#", $url)) {
        ShowMsg("请填写正确的网址格式", -1);
        exit;
    }
Ejemplo n.º 13
0
}
//复制节点
/*
function co_copy()
*/
else if($dopost=="copy")
{
	CheckPurview('co_AddNote');
	if(empty($notename))
	{
		require_once(dirname(__FILE__)."/../include/pub_oxwindow.php");
  	$wintitle = "采集管理-复制节点";
	  $wecome_info = "<a href='co_main.php'>采集管理</a>::复制节点";
	  $win = new OxWindow();
	  $win->Init("co_do.php","js/blank.js","POST");
	  $win->AddHidden("dopost",$dopost);
	  $win->AddHidden("nid",$nid);
	  $win->AddTitle("请输入新节点名称:");
	  $win->AddItem("新节点名称:","<input type='text' name='notename' value='' size='30'>");
	  $winform = $win->GetWindow("ok");
	  $win->Display();
		exit();
	}
	$dsql = new DedeSql(false);
	$row = $dsql->GetOne("Select * From #@__conote where nid='$nid'");
	$inQuery = "
   INSERT INTO #@__conote(typeid,gathername,arcsource,language,lasttime,savetime,noteinfo) 
   VALUES('".$row['typeid']."', '$notename','".addslashes($row['arcsource'])."', '".addslashes($row['language'])."',
    '0','".time()."', '".addslashes($row['noteinfo'])."');
  ";
  $rs = $dsql->ExecuteNoneQuery($inQuery);
Ejemplo n.º 14
0
    ShowMsg("成功更改一个帐户!", "sys_admin_user.php");
    exit;
} else {
    if ($dopost == 'delete') {
        if (empty($userok)) {
            $userok = "";
        }
        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;
Ejemplo n.º 15
0
                         $win->Display();
                         exit;
                     } 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;
                         }
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 16
0
     foreach ($filelists as $v) {
         if (empty($v['name'])) {
             continue;
         }
         if ($v['type'] == 'dir') {
             $v['type'] = '目录';
         } else {
             $v['type'] = '文件';
         }
         $filelist .= "{$v['type']}|{$v['name']}\r\n";
     }
     $win = new OxWindow();
     $win->Init("module_main.php", "js/blank.js", "post");
     $wecome_info = "模块管理";
     $win->AddTitle("<a href='module_main.php'>模块管理</a> &gt;&gt; 卸载模块: {$infos['name']}");
     $win->AddHidden("hash", $hash);
     $win->AddHidden("action", 'uninstallok');
     $msg = "<style>.dtb{border-bottom:1px dotted #cccccc}</style>\r\n    <table width='750' border='0' cellspacing='0' cellpadding='0'>\r\n  <tr>\r\n    <td width='200' height='28' class='dtb'>模块名称:</td>\r\n    <td width='550' 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 width='200' height='28' class='dtb'>文件大小:</td>\r\n    <td width='550' class='dtb'>{$infos['filesize']}</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  <tr>\r\n    <td height='28'>对于模块的文件处理方法:</td>\r\n    <td>\r\n    <input type='radio' name='isreplace' value='0' checked='checked' />\r\n    手工删除文件,仅运行卸载程序\r\n   <input name='isreplace' type='radio' value='2' />\r\n    删除模块的所有文件\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("ok", "");
     $win->Display();
     $dm->Clear();
     exit;
 } else {
     if ($action == 'uninstallok') {
         $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '{$hash}' ");
         $dm = new DedeModule($mdir);
         $minfos = $dm->GetModuleInfo($hash);
         extract($minfos, EXTR_SKIP);
         if (!isset($moduletype) || $moduletype != 'patch') {
             $dm->DeleteFiles($hash, $isreplace);
Ejemplo n.º 17
0
Archivo: tpl.php Proyecto: suibber/jb
         ShowMsg('删除文件成功', 'templets_main.php?acdir=' . $acdir);
         exit;
     } else {
         ShowMsg('删除文件失败', '-1');
         exit;
     }
 } else {
     if ($action == 'upload') {
         require_once dirname(__FILE__) . '/../include/oxwindow.class.php';
         $acdir = str_replace('.', '', $acdir);
         $win = new OxWindow();
         $win->Init("tpl.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
         $win->mainTitle = "模块管理";
         $wecome_info = "<a href='templets_main.php'>模板管理</a> &gt;&gt; 上传模板";
         $win->AddTitle('请选择要上传的文件:');
         $win->AddHidden("action", 'uploadok');
         $msg = "\r\n    <table width='600' border='0' cellspacing='0' cellpadding='0'>\r\n  <tr>\r\n    <td width='96' height='60'>请选择文件:</td>\r\n    <td width='504'>\r\n        <input name='acdir' type='hidden' value='{$acdir}'  />\r\n        <input name='upfile' type='file' id='upfile' style='width:380px' />\r\n      </td>\r\n  </tr>\r\n </table>\r\n    ";
         $win->AddMsgItem("<div style='padding-left:20px;line-height:150%'>{$msg}</div>");
         $winform = $win->GetWindow('ok', '');
         $win->Display();
         exit;
     } else {
         if ($action == 'uploadok') {
             if (!is_uploaded_file($upfile)) {
                 ShowMsg("貌似你什么都没有上传哦!", "javascript:;");
                 exit;
             } else {
                 if (!preg_match("#\\.(htm|html)\$#", $upfile_name)) {
                     ShowMsg("DedeCMS模板只能用 .htm 或 .html扩展名!", "-1");
                     exit;
                 }
Ejemplo n.º 18
0
 if ($dopost == "hide") {
     $dsql->ExecuteNoneQuery("UPDATE #@__plus SET isshow=0 WHERE aid='{$aid}';");
     ShowMsg("成功禁用一个插件,请刷新导航菜单!", "plus_main.php");
     exit;
 } 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 {
	$dsql->ExecuteNoneQuery($q);
	$dsql->Close();
	ShowMsg("成功更改一个帐户!","sys_admin_user.php");
	exit();
}
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();
}