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


 if($act=='update'){
// pre($_POST);

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


  if($abc1=='') $abc1 = 'pls input title';
 
   $desp = zbdesp_onlyinsert($_POST['despcontent']); //note: desp and addr not use variable abc1.
    $desptext = zbdesp_onlyinsert($_POST['editor1text']);

		 $ss = "update ".TABLE_PAGE." set name='$abc1',regionid='$abc2',regionidmobi='$abc3',desptext='$desptext',desp='$desp',sta_noaccess='$abc4' where id='$tid' $andlangbh limit 1";
	 // echo $ss;exit;
	 	iquery($ss);
  
	 jump($jumpv_back);


 }
 else
 {

  $desp=zbdesp_imgpath($row['desp']);
   $desptext=zbdesp_imgpath($row['desptext']);
   $pidname =$row['pidname'];
 
  $sta_noaccess =$row['sta_noaccess'];

   


 
 ?>

 <div class="contenttop">

<?php 
  $del_text= "<a href=javascript:del('delpage','$pidname','$jumpv','$jsname')  class='but2 fr' ><i class='fa fa-trash-o'></i> 删除</a>";
  
echo  $del_text;
?>

 
   <a class="needpopup" href="../mod_seo/mod_seo_edit.php?lang=<?php echo LANG;?>&act=edit&pidname=<?php echo $pidname;?>&type=page"><i class="fa fa-pencil-square-o"></i> 修改SEO</a>

&nbsp;&nbsp;&nbsp;&nbsp;
  <a class="needpopup" href="../mod_seo/mod_alias_edit.php?lang=<?php echo LANG;?>&act=edit&pidname=<?php echo $pidname;?>&type=page"><i class="fa fa-pencil-square-o"></i> 修改别名</a> 

  <?php 
  $alias= alias($pidname,'page');
  if($alias<>'') echo '( '.spangray($alias).' )';

  //echo $pidname;
  ?> 
 </div>
 <form  action="<?php echo $jumpv_file; ?>&act=update" method="post" enctype="multipart/form-data">
   
  <table class="formtab" >
   <tr>     
      <td>

 <div style="padding:10px"><strong style="font-size:16px"> 标题：</strong> 
 <input style="padding:3px;border:1px solid #999"  name="title" type="text" value="<?php echo $row['name']?>" class="form-control" />
</div>

<?php
//if($alias=='index') echo  '<p style="font-size:16px;color:red;padding:15px;">
//提示：因为别名设置为index,所有这是首页，一个网站，只能有一个首页。<br />
//首页的内容不在这里管理，在模板管理 -> 模板修改
//</p>';
?>


 <div style="padding:10px;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc"><strong style="font-size:16px;">
  内容标识：</strong> 

  <?php 
 if($alias=='index') echo '  <p style="font-size:16px;color:red">(提示：由于这里是首页，下面内容标识的值无效。首页请到这 <a href="../mod_style/mod_style.php?lang='.LANG.'" target="_blank">模板管理 -> 修改参数</a> 里修改。)</p>';
?>


 <div class="c5"> </div>
 pc端：<input    name="regionid" type="text" value="<?php echo $regionid?>" size="30" />
 <?php  
  if($regionid<>'') echo  check_blockid($regionid);
  ?>
 <div class="c5"> </div>
 移动端：<input   name="regionidmobi" type="text" value="<?php echo $regionidmobi?>" size="30" />
 <?php  
   if($regionidmobi<>'')  echo  check_blockid($regionidmobi);
  ?>
 <p class="cblue">（提示：移动端为空，则会使用pc端的。
 <br />
 如果 内容标识 有值，则会替代下面编辑器的内容。页面内容 由内容标识决定。 ）


 <br />


 
 
 </p>

</div>
<div style="padding:10px;border-bottom: 1px solid #ccc">
禁止访问:  <select name="sta_noaccess">
    <?php select_from_arr($arr_yn,$sta_noaccess,'');?>
     </select>
   <?php
   if($sta_noaccess=='y') echo '<span style="color:red">禁止访问</span>';
   ?>
 </div>
 
 <div class="" style="margin:0px;padding:6px;border:0px solid blue">
<?php 
  $jump_imgfj='../mod_imgfj/mod_imgfj.php?pid='.$pidname.'&lang='.LANG;
  
  $numregion = num_subnode(TABLE_REGION,'pidstylebh',$pidname);
  
  $numalbum = num_subnode(TABLE_ALBUM,'pid',$pidname);
  $numvideo = num_subnode(TABLE_VIDEO,'pid',$pidname);
  $nummusic = num_subnode(TABLE_MUSIC,'pid',$pidname);
  ?>
 <a href="<?php echo $jump_imgfj; ?>"  class="needpopup">私有编辑器附件管理(<?php echo num_imgfj($pidname);?>)  </a>
  或  <?php echo $text_imgfjlink_bjq ?>
   | 
 

    <a target="_blank" href="../mod_album/mod_mainalbum.php?lang=<?php echo LANG?>&pid=<?php echo $pidname?>">相册(<span class="cred"><?php echo $numalbum;?></span>)</a>
  |   <a target="_blank" href="../mod_video/mod_video.php?lang=<?php echo LANG?>&pid=<?php echo $pidname?>">视频(<span class="cred"><?php echo $numvideo;?></span>)</a>

  | <a target="_blank" href="../mod_music/mod_mainmusic.php?lang=<?php echo LANG?>&pid=<?php echo $pidname?>">音乐(<span class="cred"><?php echo $nummusic;?></span>)</a> 

   <br />

 
 </div>

        </td>
    </tr>
 
   <tr>
  
      <td>
 
      <?php 
      require_once('../plugin/editor_textarea.php');//textarea is in this file
      ?>

        </td>
    </tr>
 


</table>
 
 </div>
 

  


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

 </form>

   <?php 
   //require_once('../plugin/editor_imgintroduce.php'); 
   ?>


<?php
  }
  ?>
 


 <script>
 $(function(){

    $('.mysubmitnew').click(function(){


 var titlev =  $("input[name='title']").val().trim();
    if(titlev=='') {
      alert('请输入标题');
      $("input[name='title']").focus();
      return false;

    }

  
  //-------------
}

      );

 });
 
 </script>
 <div class="c tc" style="height:100px"> </div>