📄 settype.php
字号:
<?
session_start();
$manager=$_SESSION[manager];
if($manager!="oktop"){
header("Location:error.htm");
}
?>
<? include("../conn.php");?>
<? include("../include/function.php");
$select="select * from type where ismain='1' order by id asc ,parentid asc ";
$query=mysql_query($select);
while($ar=mysql_fetch_array($query))
{
$n[$ar[parentid]][]=$ar[typename];
$i[$ar[parentid]][]=$ar[id];
$shunxu[$ar[parentid]][]=$ar[shunxu];
}
function printtype($parent,$space){
global $n,$i;
$space.=" ";
if(count($parent)){
for($oo=0;$oo<count($n[$parent]);$oo++){
$info.="<option value=\"".$i[$parent][$oo]."\">";
$info.=$space."|-";
$info.=" ".$n[$parent][$oo]."</option>\"";
echo $info;
printtype($i[$parent][$oo],$space);
$info="";
}
}
}
function inputtype($parent,$space){
global $n,$i;
global $shunxu;
$space.=" ";
if(count($parent)){
for($oo=0;$oo<count($n[$parent]);$oo++){
$info.=$space." ■-".$n[$parent][$oo]." FID:[".$i[$parent][$oo]."] - 顺序";
$info.=" <input type=\"text\" name=\"order[".$i[$parent][$oo]."]\" value=\"".$shunxu[$parent][$oo]."\"";
$info.=" size=\"1\"> - <a href=\"deltype.php?action=delete&fid=".$i[$parent][$oo]."\"><b>删除</b></a>";
$info.="<br><br>";
echo $info;
inputtype($i[$parent][$oo],$space);
$info="";
}
}
}
?>
<html>
<head>
<title>网摘类别管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<style type="text/css">
table { BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 2px}
select {
FONT-SIZE: 12px;
COLOR: #000000; background-color: #E0E2F1;
}
a { TEXT-DECORATION: none; color:#000000}
a:hover{ text-decoration: underline;}
body {font-family:Verdana;FONT-SIZE: 12px;MARGIN: 0;color: #000000;background: #ffffff;}
textarea,input,object{font-size: 12px;}
td { BORDER-RIGHT: 1px; BORDER-TOP: 0px; FONT-SIZE: 12px; COLOR: #000000;}
.b{background:#F7F7F7;}
.left_over{background:#F0F0F0;}
.head { color: #ffffff;background: #739ACE;font-weight:bold;}
.head td{color: #ffffff;}
.head a{color: #ffffff;}
.head_2 {background: #CED4E8;}
.head_2 td{color: #000000;}
.hr {border-top: 1px solid #739ACE; border-bottom: 0; border-left: 0; border-right: 0; }
.bold {font-weight:bold;}
.smalltxt {font-family: Tahoma, Verdana; font-size: 12px;color: #000000;}
.i_table{border: 1px solid #739ACE;background:#DEE3EF;}
</style>
<!---->
</head>
<body topmargin=0 leftmargin=0>
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head>
<b>添加分类</b></td></tr>
<tr><td class=b><br>
<ul><li>说明:可以添加新一级分类</li></ul>
<form action="dotype.php" method=POST>
<input type=hidden name="action" value="addbigtype">
<b>添加新大类</b> 新大类名称
<input type=text name="typename" size=10>
<input type=submit value="提 交"><br></form>
<form action="dotype.php" method="POST">
<input type=hidden name="action" value="addtype">
<b>添加新小类</b> 新小类名称
<input type=text name="typename" size=10> 所属分类
<select name="parentid">
<?
for($ii=0;$ii<count($n[0]);$ii++){
?>
<option value="<? echo $i[0][$ii];?>">>> <? echo $n[0][$ii];?></option>
<?
printtype($i[0][$ii]);
?>
<?
}
?>
</select>
<input type=submit value="提 交"></form>
</td></tr></table><br>
<form action="dotype.php" method=POST>
<input type=hidden name="action" value="editforum">
<input type=hidden name="from" value="settype.php">
<table width="98%" align=center cellspacing=1 cellpadding=3 class=i_table>
<tr><td class=head>编辑论坛</td></tr>
<tr><td class=b><br>
<ul><li>编辑网摘类别</li></ul>
<?
for($ii=0;$ii<count($n[0]);$ii++){
?>
◆-
<? echo $n[0][$ii];?> FID:[<? echo $i[0][$ii];?>] - 顺序
<input type="text" name="order[<? echo $i[0][$ii];?>]" value="<? echo $shunxu[0][$ii];?>" size="1">
- <a href="deltype.php?action=delete&fid=<? echo $i[0][$ii];?>"><b>删除</b></a>
<br><br>
<?
inputtype($i[0][$ii]);
?>
<?
}
?>
<br><br>
<!-- -->
<br>
<br>
<!-- -->
<center><input type=submit value="提 交"></center><br>
</td></tr></table>
<br><br></form>
<!-- <!---->
</body></html>
<!---->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -