<?php
/*	欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
*/
require_once '../config_a/common.inc2010.php';
//
 if($act <> "pos") zb_insert($_POST);


//ifhaspidname(TABLE_NODE,$pid);
//ifhaspidname(TABLE_CATE,$catpid);
ifhave_lang(LANG);//TEST if have lang,if no ,then jump

$menuactive_module = 'nav-active';

$jumpv='mod_sitecfg.php?lang='.LANG;


//----
$submenu='module';
$title = '网站设置 ';


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

require_once HERE_ROOT.'mod_common/tpl_header.php';



if($act=='update'){

  if(@$_POST['inputmust']=='') {  echo $inputmusterror.$backlist;exit; }


$arrcanexcerpt =  array("water");

    $bscnt22 = '';
  if(count($_POST)>1){
          foreach ($_POST as  $k=>$v) {
             if(strtolower($k)=='submit') break;if(strtolower($k)=='inputmust') break;
            if(in_array($k,$arrcanexcerpt))   continue;

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

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


  $ss = "update ".TABLE_LANG." set water='$abc1',arr_basicset='$bscnt22' where lang='".LANG."' limit 1";
  // echo $ss;exit;
iquery($ss);
 //alert("修改成功");

 jump($jumpv);



}
else{


 $sql = "SELECT water,arr_basicset from ".TABLE_LANG."  where  lang='".LANG."' and pbh='".USERBH."'    order by id limit 1";
 //echo $sql;exit;
$row = getrow($sql);

$arr_can = $row['arr_basicset'];

$water = $row['water'];
$cdnurl=$searcherror = $sqsite = '';
$sta_searchpop ='n';
$waterposi='y';
$waterpercent = 30;
$tagmaxline = 20;


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



$jump_update=$jumpv.'&act=update';


?>
 
 <div class="page-title-box">
                    <h4 class="page-title"><?php echo $title?></h4>
                     
                    <div class="clearfix"></div>
                 </div>
                  <!--End Page Title-->          
           
           
                  <!--Start row-->
                  <div class="row">
                    <div class="col-md-12">
                       <div class="white-box">



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




  <tr>
      <td class="tr"> 水印图片：</td>
      <td>  <input  type="text" name="water"   size="30" value="<?php echo $water;?>"  /><?php echo $xz_maybe;?>
         <br /> (请输入名称附件，水印图片不需要透明，代码会自动产生半透明效果。)
       <br />
       <?php
          if($water<>'')  echo  check_blockid($water);
      ?>

       <div class="c5"> </div>
       水印位置是否居中：
       <select name="waterposi">
    <?php
    select_from_arr($arr_yn,$waterposi,'');?>
     </select>

       <span  class="cgray">如果不居中，则位于右下角。</span>
       <div class="c5"> </div>
      水印透明度： <input  type="text" name="waterpercent"   size="10" value="<?php echo $waterpercent;?>"  >
      <span  class="cgray">1-100间的数字，100表示不透明。默认为30。</span>

        </td>
    </tr>


  <tr>
      <td class="tr">请选择编辑器：</td>
      <td>
      <select name="editor" class="form-control">
    <?php select_from_arr($arr_editor,$editor,'');?>
     </select>
          <br /><span class="cgray">如果选择其他编辑器，需要下载相关文件，
<?php
        echo admlink('',$dmlink_editor,'具体请看教程');
     ?>

 </td>
    </tr>



    <tr>
      <td class="tr">ico图片：</td>
      <td>  <input  type="text" name="ico"  size="30"    value="<?php echo $ico;?>" ><?php echo $xz_must;?>
     <?php
     if($ico<>'')  echo  check_blockid($ico);

     ?>
   </td>
    </tr>
      <tr>
      <td class="tr">前台是否开启编辑功能：</td>
      <td>  <select name="sta_frontedit" class="form-control">
    <?php select_from_arr($arr_yn,$sta_frontedit,'');?>
     </select>
       <?php
        echo admlink('',$dmlink_frontedit,'什么是前台编辑');
     ?>

   </td>
    </tr>
 


  <tr>
      <td class="tr">开启标签：
      <br />
      <span class="cgray">在相关的分类里 开启 标签功能</span>
      </td>
      <td>


    <div class="c5"> </div>
     字样：<input name="tag_title" type="text"  value="<?php echo $tag_title;?>" size="20">

   <div class="c5"> </div>
   效果：

  <?php

$filedir = SYSBLOCKROOT.'/tag/';

$filearr = getFile($filedir);

$filedirself = TPLCURROOT.'selfblock/tag/';
//echo $filedirself;
if(is_dir($filedirself)) {
$filearr2 = getFile($filedirself);
$filearr = array_merge($filearr,$filearr2);
 }

echo ' <select name="tag_fg">';
select_from_arr2($filearr,$tag_fg,'');
echo '</select>';

  //---------
  if(substr($tag_fg,0,5)=='self_')   $file =  TPLCURROOT.'selfblock/tag/'.$tag_fg;
  else  $file =  SYSBLOCKROOT.'tag/'.$tag_fg;

// echo '<br />效果文件：';
 checkfile($file) ;




?>



 <div class="c5"> </div>
   显示个数：<select name="sta_tag_shownum">
    <?php
    select_from_arr($arr_yn,$sta_tag_shownum,'');?>
     </select>
     <div class="c5"> </div>
 每页记录数：<input name="tagmaxline" type="text"  value="<?php echo (int)$tagmaxline;?>" size="10">


        </td>
    </tr>


 


    <tr>
      <td class="tr"> 搜索框：</td>
      <td>
      是否弹出搜索框： <select name="sta_searchpop">
        <?php
        select_from_arr($arr_yn,$sta_searchpop,'');?>
        </select>
   <div class="c5"> </div>
      提示报错文字：<input name="searcherror" type="text"  value="<?php echo $searcherror;?>" size="35" />
      <div class="c5"> </div>
     默认关键字：<input name="searchtext" type="text"  value="<?php echo $searchtext;?>" size="35" />

        </td>
    </tr>

    <tr>
      <td class="tr"> 搜索推荐关键字：</td>
      <td>
      推荐字样：
      <input name="searchkeytj" type="text"  value="<?php echo $searchkeytj;?>" size="35" />
      <div class="c5"> </div>
     推荐关键字：
     <textarea cols="110" rows="3" name="searchkeytjlist"><?php echo $searchkeytjlist;?></textarea>
     <p>用|分开，比如 电视|手机</p>

        </td>
    </tr>



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

        <br />
        </td>
    </tr>
  </table>

  <?php echo $inputmust;?>

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

<script>
function  checkhere(thisForm){



      if ($.trim(thisForm.waterpercent.value)==""){
          alert("请输入水印透明度");
          thisForm.waterpercent.focus();
          return (false);
        }




}



</script>



<?php
}

require_once HERE_ROOT.'mod_common/tpl_footer.php';

?>
