<?php
/*
	欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
  
*/
require_once '../config_a/common.inc2010.php';
//$andlangbh = '';// important,use for ifhasid function
if($act<>'del_tagnode'){
if($tid<>'')    ifhasid_nolang(TABLE_TAG,$tid); //ifhasid(TABLE_TAG,$tid);
}

 if($pid<>'')    ifhaspidname(TABLE_TAG,$pid); //ifhasid(TABLE_TAG,$tid);

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

 $menuactive_module = 'nav-active';

$jumpvnolang ='mod_tag.php';
$jumpv ='mod_tag.php?lang='.LANG;//use ?lang="",is for &,not ?
$jumpv_file =$jumpv.'&file='.$file;
$jumpv_add =$jumpv.'&file=addedit&act=add';

 $titleback = '<a class="breadtitle" href="'.$jumpv.'">标签管理</a>';

if($act=='add') {
$title = '添加';
$title22 = $titleback .' - '.$title;
}  
else if($act=='edit') {
  $title = '添加';
  $title22 = $titleback .' - '.$title;
}
else  {
  $title = '标签管理';
  $title22 = $titleback;
}
  
 
$arr_tag = array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5');



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


if($act == "sta")
{
   $v = htmlentitdm($v);
     $ss = "update ".TABLE_TAG." set sta_visible='$v' where id=$tid   limit 1";//$andlangbh
    iquery($ss);
    jump($jumpv);
}
 


 

if($act == "pos")
{
   
    dmnodepos($_POST,TABLE_TAG);

      jump($jumpv);
}

 if($act == "del_tag")
{ 
   
     ifsuredel_fieldmore(TABLE_TAGNODE,'tag',$pidname,'eq','noback');
     ifsuredel_field(TABLE_TAG,'pidname',$pidname,'eq',$jumpv);
    
  
}

 if($act == "del_tagnode")
{ 
   
    
     ifsuredel_field(TABLE_TAGNODE,'id',$tid,'eq',$jumpv.'&file=viewnode');
    
  
}


/*************************************************/
require_once HERE_ROOT.'mod_common/tpl_header.php';

?>




<!--Start Page Title-->
<div class="page-title-box">
  <h4 class="page-title">
    <?php

       echo $title22;

    ?>

  </h4>

  <div class="clearfix"></div>
</div>
<!--End Page Title-->   


 

 <div class="row">
                    <div class="col-md-12">
                       <div class="white-box">

    <?php
      if($file=='list'){
    ?>
      <div class="contenttop">
      <a href="<?php echo $jumpv_add?>"><i class="fa fa-plus-circle"></i> 添加</a>
    </div>
    <?php
      }
    ?>

		   
        <?php
         
         require_once HERE_ROOT.'mod_tag/tpl_tag_'.$file.'.php';
         
        ?>

 </div> </div> </div>

<?php
require_once HERE_ROOT.'mod_common/tpl_footer.php'; 


?>

 