
<?php 
$key = @htmlentitdm($_POST['searchword']);

echo '<p style="padding:10px 0">关键字：'.$key.'</p>';
if(substr($key,0,6)=='vblock') {
    $keyV="and   pidname like '%$key%'" ;
}else{
        $keyV="and   name like '%$key%'" ;
}

  $sql = "SELECT * from ".TABLE_BLOCK." where   $noandlangbh    $keyV  and typecolumn<>'column'  order by  pos desc,id desc"; //pos desc,id desc
   //echo $sql;
  $num_rows = getnum($sql);
  if($num_rows>0){
      $res = getall($sql);
      ?>

     <table class="formtab formtabhovertr">
     	<tr style="background:#B3C0E0"> 
			<td>标题</td>			 
			<td  align="center">操作</td> 
		</tr>
<?php


foreach($res as $k=>$v){

	 $tid = $v['id']; $name = $v['name'];    
          $pidname = $v['pidname'];

 
  $edit_text2= " <a class=but1  href='$jumpv&pidname=$pidname&act=edit'>修改</a>";


 ?>
<tr> 
<td  ><?php echo $name?></td> 
<td  align="center"><?php echo $edit_text2?></td> 
</tr>
      <?php
  }
  ?>
</table>

  <?php
  }
  else{

     echo $norr2;	
  }
?>


