<?php
/*
	power by JASON.ZHANG  DM建站  www.demososo.com
*/
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}

 
?>
<style>
.content,.content span { font-size:16px;line-height:36px }
.content a{ font-size:16px;}
.sqinfo {font-size:16px;line-height:36px ;width:700px;margin:0 auto;}
.sqapicnt {padding:10px;font-size:14px;line-height: 26px}
.sqapicnt *{font-size:14px}

@media (max-width: 750px) { 
  .sqinfo { width:90% }
 
 }/*end media*/



</style>
 
<?php 
 $fileroot = STAROOT.'app/sqapi/'.DMSQDATA;
 $filepath = STAPATH.'app/sqapi/'.DMSQDATA;




if($act=='update') {

  if(@$_POST['inputmust']=='') {echo '修改内容时，不能为空。';exit;}

  
      if(!is_file($fileroot)) {
        alert('DM-static/app/sqapi/'.DMSQDATA.'文件不存在');
        
      }
      
        else {

         
        $myfile = fopen($fileroot, "w") or die("Unable to open file - sqapi "); 
         $text = '<?php return "'.$abc1.'";'; 

        fwrite($myfile, $text);
      $ss = "update ".TABLE_LANG." set  sqarr='$abc1'  where lang='".LANG."' limit 1";
      // echo $ss;exit;
      iquery($ss);
    }
    jump($jumpvfile);
}
else {

  $sql = "SELECT *  from ".TABLE_LANG." where lang='".LANG."' limit 1";
  $row = getrow($sql);
 
  $sqarr = $row['sqarr'];
 
  
  $jump_update=$jumpvfile.'&act=update';

?>

 
 <div class="  fl col-xs-12 col-sm-12  col-md-2">
<?php 
require  HERE_ROOT.'mod_module/tplsq/tpl_sq_sidebar.php';
?>
 </div>
<div class="fl col-xs-12 col-sm-12  col-md-10">


<form  onsubmit="javascript:return checkhere(this)" action="<?php echo $jump_update;?>" method="post">
  <table class="formtab">
 
 

  <tr>
     
      <td style="padding:10px">
      添加授权域名：<br />
      <textarea cols="120" rows="11" name="sqdomain2"><?php echo $sqarr;?></textarea> 
       <br /> <span class="cgray">不用加www，格式： yoursite.com ，多个域名以 | 隔开。
       <br />比如 test1.com|test2.com|test3.com </span>
 
</td></tr>
<tr>
     <td style="padding:10px">   

     <input    type="hidden" name="inputmust" value="inputmust" /> 
    
    
      <p>
      <input  class="mysubmit" type="submit" name="Submit" value="提交">
      </p>
 
 <?php 
 if($sqarr<>''){
    echo '<p>添加的域名显示如下：';
     $sqarr =  explode("|",$sqarr);
     foreach($sqarr as $v) {
        echo '<br />'.$v;

     }
     echo '</p>';

 }
 
 ?>
     

        </td>
    </tr>

   

 
  </table>
 

</form>

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

  }
  
  
  ?>
 