<!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=UTF-8" />
<title>文章管理</title>
<link href="../css/admin_css.css" rel="stylesheet" type="text/css" />
</head>

<body>


<div id="one"  class="admin_channel">
 <?php 

 if ($action == 'channel') {
 	echo '<a href="?action=add">
		 <b>增加主频道</b>
		 </a> 
		 <br>
		 '.$channel_str;

 }
 elseif ($action == 'add'){
 	empty($schannel) && $schannel = 1;
 	empty($tschannel) && $tschannel = 0;
 	if(empty($bc_type)){
 		$type_input ='' ;
 		$$bc_type = '';

 	}else {

 		$type_input = 'hiddleDiv' ;
 		$$bc_type = 'selected' ;
 		$bc_pubs = 'bc_pub'.$bc_pub;
 		$$bc_pubs = ' checked';
 	}

 	print <<<EOT
 	<div id="show_channel">
 	<form action="?action=channel_ins" method="POST" enctype="multipart/form-data">
 	<div >
 	频道名:<input type="text"   name="channel" size="30" >
 	</div>
 	<input type="hidden" value="$schannel" name="schannel" >
 	<input type="hidden" value="$tschannel" name="tschannel" >
 	<div >
 	频道文件夹名:<input type="text" value="$path" name="path" >
 	</div> 	<div >

 	</div>
 	<input type="hidden" value="$path_pre" name="path_pre" >
 	
 	<div id="$type_input">
 	频道类型:
 	<select name="bc_type" >
	<option value="content" $content>发布模板</option>
	<option value="discuss" $discuss>讨论模板</option>
 	<option value="0" $typeSelected0>外部链接</option>
</select>
</div>
<div id="$type_input">
是否用户发布：
<input type="radio" name="bc_pub" value="1" $bc_pub1>允许</input>
<input type="radio" name="bc_pub" value="0" $bc_pub0>不允许</input> 外部链接此项不用选择
</div>
 	<input type="submit" value="添加" >
	</form>
 	</div>
 	
EOT;
}
elseif ($action == 'mod'){
	print <<<EOT
 	<div id="show_channel">
 	<form action="?action=channel_up" method="POST" enctype="multipart/form-data">
 	名称:<input type="text"  value="$channel"  name="channel" size="30" >
 	<input type="hidden" value="$bc_id" name="bc_id" >
 	<input type="submit" value="修改" >
	</form>
 	 </div>
EOT;
}

elseif ($action == 'mod_cg'){
	print <<<EOT
 	 <div id="show_channel"><a href="?action=add_cg&bc_id=$bc_id"><b>增加分类</b></a> </div>
EOT;
	if (is_array($cg)){
		foreach ($cg as $key=>$value){
			$keyid = $key+1;
			print <<<EOT
 	<div id="show_channel">
 	<form action="?action=mod_cg_up" method="POST" enctype="multipart/form-data">
 	$keyid:<input type="text"  value="$value"  name="cg" size="30" >
 	<input type="hidden" value="$key" name="key" >
 	<input type="hidden" value="$bc_id" name="bc_id" >
 	<input type="submit" value="修改" >
	</form>
 	</div>
EOT;
}
}
}

elseif ($action == 'add_cg'){
	print <<<EOT
 	<div id="show_channel">
 	<form action="?action=add_cg_up" method="POST" enctype="multipart/form-data">
 	<input type="text"  value=""  name="cg" size="30" >
 	<input type="hidden" value="$bc_id" name="bc_id" >
 	<input type="submit" value=" 提 交 " >
	</form>
 	</div>
EOT;
}

else {

}
 ?>
 </div>
 </body>
</html>

