<script type="text/javascript">

<!--

function MM_jumpMenu(targ,selObj,restore){ //v3.0

  eval(targ+".location='/index.php/admin/cid/pid/"+selObj.options[selObj.selectedIndex].value+"'");

  if (restore) selObj.selectedIndex=0;

}

//-->

</script>



    {include file='admin/head'}

    <div class="admin">

     <?php

 if(input('id')){

 

 $rs

 ?>

 	<form action="/index.php/admin/cid/editup/1" method="post">

						<div class="panel padding">

							<div class="text-center">

								<br>

								<h2><strong>修改栏目</strong></h2></div>

							<div class="" style="padding:30px;">

								<div class="form-group">

									<div class="field field-icon-right">
                                     <input type="text" class="input" value="{$cid['seo1']}" name="seo1" id="seo1" placeholder="seo标题" data-validate="required:请填写seo标题" />
                                        <input type="text" class="input" value="{$cid['seo2']}" name="seo2" id="seo2" placeholder="seo关键词" data-validate="required:请填写seo关键词" />
                                        <input type="text" class="input" value="{$cid['seo3']}" name="seo3" id="seo3" placeholder="seo描述" data-validate="required:请填写seo描述" />
<input type="text" class="input" name="py" id="py" value="{$cid['py']}" placeholder="拼音" data-validate="required:请填写名称拼音" />
<input type="text" class="input" name="admin" id="admin" value="{$cid['ntitle']}" placeholder="新栏目名称" data-validate="required:请填写新栏目名称" />
<input value="{$cid['Id']}" name="id" id="id" type="hidden" />

										 

									</div>

								</div>

							 

								<div class="form-group">

									<div class="field">

										<button class="button button-block bg-main text-big">确定修改</button>

									</div>

								</div>

							 

						</div>

					</form>

 <?php

 }

 

 if(input('add')){

 ?>

 	<form action="/index.php/admin/cid/save/1" method="post">

						<div class="panel padding">

							<div class="text-center">

								<br>

								<h2><strong>添加栏目</strong></h2></div>

							<div class="" style="padding:30px;">

								<div class="form-group">

									<div class="field field-icon-right">


  <input type="text" class="input" name="seo1" id="seo1" placeholder="seo标题" data-validate="required:请填写seo标题" />
                                        <input type="text" class="input" name="seo2" id="seo2" placeholder="seo关键词" data-validate="required:请填写seo关键词" />
                                        <input type="text" class="input" name="seo3" id="seo3" placeholder="seo描述" data-validate="required:请填写seo描述" />

										<input type="text" class="input" name="py" id="py"   placeholder="新栏目拼音" data-validate="required:请填写名称拼音" /><input type="text" class="input" name="admin" id="admin" placeholder="新栏目名称" data-validate="required:请填写新栏目名称" />
                                      

										 

								  </div>

								</div>

							 

								<div class="form-group">

									<div class="field">

										<button class="button button-block bg-main text-big">确定添加</button>

									</div>

								</div>

							 

						</div>

					</form>

 <?php

 }

 ?>

			<div class="tab border-main">

				<div class="tab-head"></div>

 

	  <form method="post" action="/index.php/admin/cid/all/1">

				<div class="panel admin-panel">

					

					<div class="padding border-bottom">

						<input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="全选" />

						<input type="button"   onclick="window.location.href='/index.php/admin/cid/add/1';" class="button button-small border-green"    value="添加栏目" />

						<!--<input type="submit" class="button button-small border-yellow"  onclick="if(confirm('确认全部删除?')){return true;}return false;" value="批量删除" />-->

					</div>

					<table class="table table-hover">

						<tr>

							<th width="55">选择</th>

						  <th width="110">首页栏目</th>

						  <th width="102">栏目名称</th>

						  <th width="100">拼音</th>
						  <th width="100">排序</th>

							<th width="100"><div align="center">审核</div></th>

							<th width="100">操作</th>
						</tr>

					<?php

                    foreach($rs as $v){

                    ?>

                    	<tr>

							<td>

								<input type="checkbox" name="id" value="1" />{$v['Id']}							</td>

							<td><?php

                            if($v['nindex']==1){

                            

                            echo '<a href="/index.php/admin/cid/nindex/0/id/'.$v['Id'].'"><font color=#0000ff>显示</font></a>';

                            

                            }else{

                            

                            echo '<a href="/index.php/admin/cid/nindex/1/id/'.$v['Id'].'"><font>隐藏</font></a>';

                            }

                            ?></td>

							<td>{$v['ntitle']}</td>

							<td>{$v['py']}</td>
							<td><select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">

							

                            <?php

                            

                            for($a=0;$a<$sl;$a++){

                            

                            ?>

                              <option value="{$a}-{$v['Id']}" <?php if($a==$v['pid']) echo 'selected';?>>{$a}</option>

                                              <?php

                                              }

                                              ?>                                      </select>						     </td>

							<td><div align="center"><?php

                              if($v['zt']==1){

                            

                            echo '<a href="/index.php/admin/cid/zt/0/id/'.$v['Id'].'"><font >已审</font></a>';

                            

                            }else{

                            

                            echo '<a href="/index.php/admin/cid/zt/1/id/'.$v['Id'].'"><font color=#ff0000>未审</font></a>';

                            }

                            

                            

                            ?></div></td>

							<td><a class="button border-blue button-little" href="/index.php/admin/cid/id/{$v['Id']}">修改</a> <a class="button border-yellow button-little" href="/index.php/admin/cid/delete/{$v['Id']}" onClick="{if(confirm('确认删除?')){return true;}return false;}">删除</a></td>
						</tr>

					<?php

                    }

                    ?>
                    </table>

		          <div class="panel-foot text-center"></div>

		</div>

			</form>

			<br />

			<p class="text-right text-gray">随风PHP程序</p>

</div>

 

</div>

		 

	</body>



</html>