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

if($act=='list') $act='edit';

if ($act == 'update') {
  

//--------------------------
        $ss = "update " . TABLE_BLOCK . " set pidstylebh='$abc1'  where   pidname='$pidname' $andlangbh limit 1";
      // echo $ss;exit;
       //echo $jumpvp;exit;
        iquery($ss);

        $jumpvinsert = $jumpv.'&ppid=alledit&pidname='.$pidname;

        //echo $jumpvinsert;exit;

        jump($jumpvinsert);



}
 
 
 if($act=='edit'){

  $sqlsub = "SELECT * from ".TABLE_BLOCK."  where pidname='$pidname' $andlangbh order by id limit 1";
  //echo $sqlsub;exit;
$rowsub = getrow($sqlsub);


    $titleh2 = '修改';

    $name = $rowsub['name'];
    $pid = $rowsub['pid'];
    $ppid = $pidstylebh = $rowsub['pidstylebh'];
 

	$jumpvinsert = $jumpv.'&ppid=alledit&act=update&pidname='.$pidname;
}

if( $act=='edit'){
?>

<form  onsubmit="javascript:return checkhere(this)" action="<?php echo $jumpvinsert; ?>" method="post" enctype="multipart/form-data">
    <table class="formtab">
        <tr>
            <td width="12%" class="tr">标题：</td>
            <td width="88%">
            <?php echo $name; ?>

            </td>
        </tr>

        <tr>
            <td width="12%" class="tr">pidstylebh ：</td>
            <td width="88%">
            <input name="pidstylebh" type="text"   class="inputcss form-control" value="<?php echo $pidstylebh; ?>"  /> 


            <?php 
            $ppid7 = substr($ppid,0,7);
                 
                 if(ifhaspidname2(TABLE_STYLE,$ppid)) {
                    $filefolder = TPLCURROOT.'selfblock/'.$pid;
                    $foldername = 'DM-template/'.HTMLDIR.'/selfblock/'.$pid;
                  }
                  else if($ppid7 =='jtblock'){ 
                    $filefolder = BLOCKROOT.'jtblock/'.$pidstylebh;
                    $foldername = 'jtblock/'.$pidstylebh.'不是目录';
                  }
                  else if($ppid7 =='jthome_'){ 
                    $filefolder = BLOCKROOT.'jthome/'.$pidstylebh;
                    $foldername = 'jthome/'.$pidstylebh.'不是目录';
                  }
              
                   if(!is_dir($filefolder)) echo '<p class="cred">'.$foldername.'不是目录</p>';
 
                   

            ?>
            </td>
        </tr>


 


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

      <?php echo $inputmust;?>

</form>


<script>
    function checkhere(thisForm) {
        if ($.trim(thisForm.pidstylebh.value) == "")
        {
            alert("请输入pidstylebh。");
            thisForm.pidstylebh.focus();
            return (false);
        }
 

        // return;

    }




</script>

<?php

}


?>
