<?php
/*
  欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
  
*/

  require_once '../config_a/common.inc2010.php';
  $menu_content = 'y';
ifhave_lang(LANG);//TEST if have lang,if no ,then jump





if($act <> "pos") zb_insert($_POST);


ifhaspidname(TABLE_CATE,$pidname);



/************************/

$jumpv_desp='mod_pop_catedesp.php?lang='.LANG.'&pidname='.$pidname.'&ppid='.$ppid;



$title = '分类描述';

 //-----------------

$pidarr = get_fieldarr(TABLE_CATE,$pidname,'pidname');


$namefront=$pidarr['namefront'];
$kv=$pidarr['kv'];
$despjj=zbdesp_imgpath($pidarr['despjj']);
$desp=zbdesp_imgpath($pidarr['desp']);
$desptext=zbdesp_imgpath($pidarr['desptext']);

//-------------------
if($act=='update'){
  $despjj = zbdesp_onlyinsert($_POST['despjj']); 
    $desp = zbdesp_onlyinsert($_POST['despcontent']); //note: desp and addr not use variable abc1.
    $desptext = zbdesp_onlyinsert($_POST['editor1text']);


    $ss = "update ".TABLE_CATE." set namefront='$abc1',despjj='$despjj',desptext='$desptext',desp='$desp'  where pidname='$pidname' $andlangbh limit 1"; 
    iquery($ss); 	
    jump($jumpv_desp);



  }



  require_once HERE_ROOT.'mod_common/tpl_header_iframe.php';
  ?>
  <!-- Content Header (Page header) -->
  <section class="content-header">


  </section>

  <section class="content">
   <h3>分类描述：</h3>

  <div class="layoutsidebar fl col-xs-12 col-sm-12  col-md-2"> 
 <?php
     require  HERE_ROOT.'mod_category/tpl_catedesp_sidebar.php';
 ?>
 </div>
 <div class="fl col-xs-12 col-sm-12  col-md-10">          


   <form action="<?php  echo $jumpv_desp;?>&act=update" method="post" enctype="multipart/form-data">   

    <table class="formtab" >


     <tr>
       <td width="12%" class="tr">描述标题：</td>
       <td width="88%">
        <input name="namefront" type="text"   value="<?php echo $namefront; ?>" class="form-control" />
      </td>
    </tr>  


    <tr>
      <td  class="tr">描述图片：</td>
      <td> 
        <?php

        $imgupload1 = '../mod_module/mod_uploadkv.php?lang='.LANG.'&pidname='.$pidname.'&type=cate';       


        if($kv<>'') {   
          $img = get_img($kv,'','');
          echo '<a style="color:#FF9935"   class="needpopup" href="'.$imgupload1.'"><img style="width:200px" src="'.$img.'" alt="" /><br />编辑图片</a>';
        }
        else echo '<a class="needpopup" href="'.$imgupload1.'">添加图片</a>';
        ?>



      </td>
    </tr>




    <tr>     
        <td  class="tr">描述简介：</td>
      <td>  
        <textarea class="form-control" rows="3" id="despjj" name="despjj"><?php
          echo  $despjj;
          ?></textarea>
      </td>
    </tr>

    <tr>     
        <td  class="tr">描述内容：</td>
      <td> 
        <?php 
      require_once('../plugin/editor_textarea.php');//textarea is in this file
      ?>

    </td>
  </tr>

  <tr>

     <tr>     
        <td  class="tr"> &nbsp; </td>
      <td> 

      <input class="mysubmit" type="submit" name="Submit" value="提交"> 
    </td>
  </tr>


</table>  
</form>  

</div>
<div class="c"> </div>


</section>


<?php 

require_once HERE_ROOT.'mod_common/tpl_footer_iframe.php';

?>
