<?php
/*  欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
*/
require_once '../config_a/common.inc2010.php';
$switchlanglink = 'mod_jt_region/mod_jttext_list.php?pidfile='.$pidfile;


echo 'no use...';
exit;



ifhave_lang(LANG);//TEST if have lang,if no ,then jump
$menuactive_block = 'nav-active';


//$jump = BASEURL.'dmpostform.php?type=editjtmbsqlite&pidname='.$pidname.'&pidname2='.$pidname2.'&lang='.LANG;

 //$jumpsidebar = BASEURL.'dmpostform.php?type=editjtmbsqlite&pidname2='.$pidname2.'&lang='.LANG;

 
$title = '编辑文件区块';

$tablename = TABLE_JTTEXT;
$tablename2 =  TABLE_JTTEXT;
//echo $ppid;

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


$filearr =  array("home");
if(!in_array($pid,$filearr))   {
 // echo 'pid is limited in home.';exit;
}

 //like pid=sys&pidname=aboutus
$jumpv  = '../mod_jt_region/mod_jttext_list.php?lang='.LANG;
$jumpvfile  = '../mod_jt_region/mod_jttext_list.php?lang='.LANG.'&pidfile='.$pidfile;
 
 $jumpv2  = '../mod_jt_region/mod_jttext.php?lang='.LANG;

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


//-----------------------
if($act == "del")
{
 
         // if(JTTEXTLANG==LANG){
         //   if(ENABLEMULTISITE=='y'){
         //         $sql = "SELECT lang,name from  ".TABLE_LANG."  order by pos desc,id";
         //         if(getnum($sql)>0){
         //             $rowall  = getall($sql);
         //              //pre($rowall);
         //             foreach ($rowall as $k => $v) {
         //                   deljttext(TABLE_JTTEXT,$pidfile,$v['lang']);
         //             }                  

                      
         //         }
         //   }else{
                   
         //     }     

         // }else{

         //    deljttext(TABLE_JTTEXT,$pidfile,LANG);
         // }     

       deljttext(TABLE_JTTEXT,$pidfile,'');
      
        jump($jumpvfile); 
        // exit;
}

 

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

 //if($file =='add' || $act =='insert') require_once HERE_ROOT.'mod_common/tpl_header_iframe.php';
//else require_once HERE_ROOT.'mod_common/tpl_header.php';

function deljttext($tablename,$pidfile,$lang){

   $sql = "SELECT * from $tablename  where pidfile='$pidfile' and lang = '$lang'  order by id";
    // echo $sql;exit;
   $row  = getrow($sql);
   if($row<>'no'){
      pre($row);
         
                  $blockimg = $row['jtimg'];
                  $blockimg2 = $row['jtimg2'];
                  $blockimg3 = $row['jtimg3'];
                  $blockimg4 = $row['jtimg4'];           
               
                  if($blockimg<>'')   p2030_delimg($blockimg,'y','n',$lang);
                  if($blockimg2<>'')  p2030_delimg($blockimg2,'y','n',$lang);
                  if($blockimg3<>'')  p2030_delimg($blockimg3,'y','n',$lang);
                  if($blockimg4<>'')  p2030_delimg($blockimg4,'y','n',$lang); 

                  $ss = "delete from $tablename  where pidfile='$pidfile'  and lang = '$lang'";
                 //  echo $ss.'<br />'; 
                   // exit;
                 iquery($ss);                
 

   }



}

if($file =='edit_filename') require_once HERE_ROOT.'mod_common/tpl_header_iframe.php';
else require_once HERE_ROOT.'mod_common/tpl_header.php';
  
?>

 <div class="page-title-box">

  <?php 
    if($file <> 'edit_filename'){
  ?>
                    <h4 class="page-title"> 
                    <?php 
                         echo $title;                     
                    ?>
                      
                      <a href="<?php echo $jumpv?>&file=searchres" style="font-size: 18px">管理列表</a>
                    </h4>
             <?php } 
             ?>      
                    <div class="clearfix"></div>
                 </div>
                  <!--End Page Title-->          
           
           
                  <!--Start row-->
                  <div class="row">
                    <div class="col-md-12">
                       <div class="white-box">

 

        <?php
         
         $file = 'searchres';

     
          require_once HERE_ROOT.'mod_jt_region/tpl_text_'.$file.'.php';

        ?>
 </div> </div> </div>
<?php
 //if($file =='add' || $act =='insert') require_once HERE_ROOT.'mod_common/tpl_footer_iframe.php';
//else require_once HERE_ROOT.'mod_common/tpl_footer.php';

 
if($file =='edit_filename') require_once HERE_ROOT.'mod_common/tpl_footer_iframe.php';
else require_once HERE_ROOT.'mod_common/tpl_footer.php';