<?php
/*
	欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
*/
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}
?>
<?php
if($act=="update"){   
$jump_back = $jumpv_file.'&act=edit&tid='.$tid;



$arrcanexcerpt =  array("");

    $bscnt22 = '';
  if(count($_POST)>1){
          foreach ($_POST as  $k=>$v) {
             if(strtolower($k)=='submit') break;if(strtolower($k)=='inputmust') break;
             if(substr($k,0,6)=='trline') break;

            if(in_array($k,$arrcanexcerpt))   continue;

            $bscnt22 .= $k.':##'.htmlentitdm(trim($v)).'==#==';

          }
      }
       $bscnt22 = substr($bscnt22,0,-5);

 
 
  $ss = "update ".TABLE_LANG." set  arr_textcfg='$bscnt22' where id='$tid' limit 1";
  //echo $ss;exit;
  iquery($ss);
 //alert("修改成功");

 

 jump($jump_back);   

}

else{

 $sql = "SELECT * from ".TABLE_LANG."  where  id='$tid' and pbh='".USERBH."'    order by id limit 1"; 
 
$row = getrow($sql);

    
$sitenamehere=$row['sitename'];
$langhere=$row['lang'];

    $arr_can=$row['arr_textcfg']; 


    $bscntarr = explode('==#==',$arr_can); // pre($bscntarr );
    if(count($bscntarr)>1){
      foreach ($bscntarr as   $bsvalue) {  
       if(strpos($bsvalue, ':##')){
         $bsvaluearr = explode(':##',$bsvalue);
         $bsccc = $bsvaluearr[0];
         $$bsccc=$bsvaluearr[1];
       }
     }
   }

   
  
 
		$jump_insert=$jumpv_file.'&act=update&tid='.$tid;	
 
 
?> 


<div class="blocklist fl col-xs-12 col-sm-12  col-md-2">
<h3>请选择</h3>  
    <?php 
       require_once HERE_ROOT.'mod_basic/plugin_textcfg_sidebar.php';
       ?>
</div>

<div class="fl col-xs-12 col-sm-12  col-md-10">

<h2 style="font-size:14px">正在编辑：<?php echo $sitenamehere?> ( <span class="cred"><?php echo $langhere?></span> )</h2>
 
<form  onsubmit="javascript:return checkhere(this)" action="<?php echo $jump_insert;?>" method="post">
  <table class="formtab">
 
	
   <?php 
   //pre($arr_lang_textcfg);
   foreach($arr_lang_textcfg as $k=>$v){
      $k2 = strtolower($k);
      if(substr($k2,0,6)=='trline'){
        echo '<tr><td colspan="2" style="background:#2480C4;color:#fff;text-align:center">'.$v.'</td></tr>';
      }else{
        echo '<tr><td class="tr" width=20%><strong>'.$k.'</strong><br /><span class="cgray">'.$v.'</span></td>';
      echo '<td width=78%><input   type="text" name = "'.$k2.'" value="'.$$k2.'" class="form-control" /></td></tr>';
      }
      
      

   }
   ?>  


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

<?php } ?>
 
<script>
function  checkhere(thisForm){
	 
	//	if (thisForm.path.value==""){
		//alert("请输入路径");
	//	thisForm.path.focus();
	//	return (false);
    //    } 
		 
	
		
}

</script>


