<?php
/*
  power by JASON.ZHANG  DM建站  www.demososo.com
*/
if(!defined('IN_DEMOSOSO')) {
  exit('this is wrong page,please back to homepage');
}
$pid4 = substr($pidname,0,4);
$pid3 = substr($pidname,0,3);
if($pid3=='tag')  $pid4 = 'tagg';;
 
 if($pid4=='page') $table = TABLE_PAGE;
 elseif($pid4=='cate'  || $pid4=='csub') $table = TABLE_CATE;
  elseif($pid4=='node') $table = TABLE_NODE;
  elseif($pid4=='tagg') $table = TABLE_TAG;
 

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

   
  $bscnt22 = '';
  if(count($_POST)>1){
          foreach ($_POST as  $k=>$v) {
            if(strtolower($k)=='submit') break;if(strtolower($k)=='inputmust') break;
            $bscnt22 .= $k.':##'.htmlentitdm(trim($v)).'==#==';
             
          }
      }
       $bscnt22 = substr($bscnt22,0,-5);




  $ss = "update ".$table." set arr_sitehf='$bscnt22'  where pidname='$pidname' $andlangbh limit 1";

   //  echo $ss;exit;
    iquery($ss);
  
  $jumpv = $jumpv_seoedit.'&pidname='.$pidname.'&type='.$type;
  //echo $jumpv; exit;
 
  jump($jumpv);
 }
 else
 {



  $sql = "SELECT * from ".$table."  where  pidname='$pidname' $andlangbh   order by id limit 1";
$row = getrow($sql);
 //pre($row);
 
if($pid4=='page') {
  $name=decode($row['name']);
  $title2 = ' 页面：';
}
elseif($pid4=='cate' || $pid4=='csub') {
  $name=decode($row['name']);
  $title2 = ' 分类：';
}
elseif($pid4=='node') {
  $name=decode($row['title']);
  $title2 = '文章：';
}
elseif($pid4=='tagg') {
  $name=decode($row['name']);
  $title2 = '标签';
}

$arr_sitehf=$row['arr_sitehf'];
 

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



 
 $jumpv = $jumpv_seoedit.'&pidname='.$pidname.'&type='.$type;

?>

<form  action="<?php echo $jumpv; ?>&act=update" method="post" enctype="multipart/form-data">

 <p style="padding:20px 0">
 	输入hide，表示隐藏。<a target="_blank" href="<?php echo fronturl('https://www.demososo.com/detail-247.html');?>">具体看视频教程> </a>
 </p>
  <table class="formtab" >
 
 
  <tr>
    <td width="12%" class="tr"><?php echo $title2;?></td>
    <td width="88%">  <?php echo $name;?>
    <p><?php
    // echo admlink($row);
      ?></p>
    </td>
    </tr> 

 <tr>
    <td width="12%" class="tr">网站头部：</td>
    <td width="88%">   <input name="siteheader" type="text"  value="<?php echo $siteheader;?>" class="form-control form-controldi" />
      <?php echo $xz_maybe;?> 
<p>
   <?php 

   if($siteheader<>'') echo check_blockid($siteheader);
   ?>
</p>
      </td>
  </tr>
 
 <tr>
    <td   class="tr">网站底部：</td>
    <td>   <input name="sitefooter" type="text"  value="<?php echo $sitefooter;?>" class="form-control form-controldi" />
      <?php echo $xz_maybe;?> 
<p>
<?php 

   if($sitefooter<>'') echo check_blockid($sitefooter);
   ?>
</p>
      </td>
  </tr>

 <tr>
    <td   class="tr">网站浮动部分：</td>
    <td>   <input name="sitefooterlast" type="text"  value="<?php echo $sitefooterlast;?>" class="form-control form-controldi" />
      <?php echo $xz_maybe;?> 
<p>
<?php 

   if($sitefooterlast<>'') echo check_blockid($sitefooterlast);
   ?>
</p>
      </td>
  </tr>






</table>

 

<div class="c tc"> 
 
 <input class="mysubmit"     type="submit" name="Submit" value="提交" /> 
     
<?php echo $inputmust;?>
 </div>

 </form>
<?php
  }
  ?>
  
 