<?php 

/*

'**************************************************************************************************

' 软件名称: 黑色幻想舞曲管理系统CMS2.0

' 版本编号: hshxsdj 2.0

' 官方网站: http://www.hshxs.com

' 官方论坛：http://bbs.hshxs.com

' 版权所有: 黑色幻想开发团队    噬己翼(QQ:532917920)

' 郑重声明:

'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；

'    2、黑色幻想网络事业部保留此软件的法律追究权利

'**************************************************************************************************

*/


include_once("../../include/conn.php");

require_once('../../include/function.php');

include "../admin_version.php";

include "../admin_loginstate.php";

$action=SafeRequest("action","get");

if($action=="edit"){

	$menu=SafeRequest("menu","post");

	$menuarr=explode(chr(13),$menu);

	$menustr="<!--".$menu."-->\r\n";

	for($i=0;$i<count($menuarr);$i++){

		$menuinfo=explode("|",$menuarr[$i]);

		$menustr.="<a href=".$menuinfo[1]." target=frmright>".$menuinfo[0]."</a>\r\n";

		}

	$menustr.="<a href=tools/admin_menu.php target=frmright>快捷菜单设置</a>\r\n";	

	fwrite(fopen("admin_quickmenu.php","wb"),$menustr);	

	//header("Location:admin_menu.php");

	echo "<script>window.location='admin_menu.php'</script>";

	}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<link type="text/css" href="../images/style.css" rel="stylesheet" />

<link type="text/css" href="../images/alerts.css" rel="stylesheet" media="screen">

<script type="text/javascript" language="javascript">var tentpath='<?php echo S_SitePath?>';</script>

<script language="javascript" src="../js/jquery.js"></script>

<script language="javascript" src="../js/alerts.js"></script>

<title>自定义快捷菜单</title>

</head>



<body>

<?php SystemPer(10);?>

<div class="r_main">

      <div class="r_content">

        <div class="r_content_1" >

         <form action="?action=edit" method="post" name="form1" id="form1"> 

        <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" style="margin-top:10px;">

            <tr>

              <td align="left" class="td_title">&nbsp;快捷菜单设置</td>

            </tr>

			<tr>

            	<td class="td_border" height="30" style="color:red">&nbsp;&nbsp;&nbsp;&nbsp;＊<span  style="color:red">菜单格式</span>说明：“舞曲管理|admin_video.php”,标题与地址的分隔符为“|”,每条菜单写一行.设置成功后刷新首页即可！</td>

            </tr>

            <tr>

              <td align="center" class="td_border">&nbsp;<textarea rows="20" name="menu" id="menu" style="width:98%;font-family:Georgia, 'Times New Roman', Times, serif"><?php echo ReplaceStr(substr(file_get_contents("admin_quickmenu.php"),0,strpos(file_get_contents("admin_quickmenu.php"),"-->")),"<!--","");?></textarea></td>

            </tr>

            

            <tr>

              <td class="td_border">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;

                <input type="submit" class="rb1" value="确认设置快捷菜单" id="btn_menu"></td>

            </tr>

            

		</table>

		</form>

        </div>

  </div>

</div>

<?php include "../admin_bottom.php" ?>

</body>

</html>



