<?php
/*
  power by JASON.ZHANG  DM建站  www.demososo.com
*/
if(!defined('IN_DEMOSOSO')) {
  exit('this is wrong page,please back to homepage');
}
function strchang236($addcss){    
    $addcss=str_replace("\\","/",$addcss);
    $addcss=str_replace(chr(13),"|",$addcss);
    $addcss=str_replace(chr(32),"",$addcss);

    return $addcss;

}

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


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


      //$addDMcssjs =  htmlentitdm(@$_POST['addDMcssjs']); --no use

      $abc2 =  strchang236($abc2); 
      $abc4 =  strchang236($abc4);  
      $abc5 =  strchang236($abc5);  

 
 
     $ss = "update ".TABLE_NODE." set pbrand='$abc1',deliverybatch='$abc2',coinwhat='$abc3',coinwith='$abc4',coinfor='$abc5'  where id='$tid' $andlangbh limit 1";
      // echo $ss;exit;
      iquery($ss);
  
     jump($jumpv_file);
 
 
 }
 else
 {
 
$stock=10000;
$detpriceold=$detprice=0;
 
 
$author=$authorcompany = $detlinktitle=$detlinkurl=$downloadurl=$linkmore='';
$nodebz1=$nodebz2=$nodebz3=$nodekvshow='';

$sql = "SELECT * from ".TABLE_NODE."  where  id='$tid' $andlangbh   order by id limit 1";
$row = getrow($sql); 
$sku=$row['sku'];

$pbrand=$row['pbrand']; 
$deliverybatch=$row['deliverybatch']; 


$coinwhat=$row['coinwhat']; 

$coinwith=$row['coinwith'];  
$coinfor=$row['coinfor']; 



$deliverybatch=str_replace("|",chr(13),$deliverybatch);
$coinwith=str_replace("|",chr(13),$coinwith);
$coinfor=str_replace("|",chr(13),$coinfor);
 ?>
 
 <section class="content-header">
   <h1>
      其他参数：
      </h1>
  
    </section>

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

 <table class="formtab" >


   <tr>
      <td class="tr">
    品牌 ：
      </td>
      <td>  
          <?php 
               
                $sql = "SELECT * from ".TABLE_NODE."  where  ppid='cate20201104_1922381676' $andlangbh   order by pos desc,id desc";
               // $nodenum = getnum($sql);
               $rows= getall($sql);
                
          
          ?>
          <select name="brand" id="brand">
              <?php 
               echo '<option value="">pls select...</option>';
                    foreach($rows as $v){
                      $selectv = $pbrand == $v['pidname']?' selected ':'';
                       
                       echo '<option '.$selectv.'  value="'.$v['pidname'].'">'.$v['title'].'</option>';

                    }
              ?>
               

          </select>


        </td>
    </tr>
 
    


<tr>
      <td class="tr">
      delivery batch： 
      </td>
      <td>  
          <textarea name="deliverybatch" cols="110" rows="10"><?php echo $deliverybatch;?></textarea>
        </td>
    </tr>




<tr>
      <td class="tr">
      Minable coins with or for what?  
     
      </td>
      <td>  
          
      <input name="coinwhat" type="text"  value="<?php echo $coinwhat;?>" class="form-control" /> 
    
        </td>
    </tr>


<tr>
      <td class="tr">
      <strong>Minable coins with： </strong>
      <div>


<?php 

$sqleff1 = "SELECT * from ".TABLE_NODE."  where  pid='dsub20211130_1535133349' $andlangbh   order by pos desc,id desc";
// $nodenum = getnum($sql);
$rowseff1= getall($sqleff1);
foreach($rowseff1 as $veff1) {
    echo  $veff1['title'].' - '.$veff1['pidname'].'<br />';


}

?>
</div>


      </td>
      <td>  
          <textarea name="coinwith" cols="110" rows="10"><?php echo $coinwith;?></textarea>


          <?php 
            if($row['coinwith'] <>''){
                $arr = explode('|',$row['coinwith']);
               // pre($arr);
                if(count($arr)>0){
                    foreach($arr as $v){
                        $arrfield = get_fieldarr(TABLE_NODE,$v,'pidname');
                         $img = $arrfield['kv'];
                         echo '<p><img src="'.get_img($img).'" /><br />'.$arrfield['title'].'</p>';

                    }
                    
                    
                }
                
            }
          ?>
        </td>
    </tr>


    <tr>
      <td class="tr">
     
      <strong>Minable coins for： </strong>

      <div>


<?php 

$sqleff1 = "SELECT * from ".TABLE_NODE."  where  pid='dsub20211130_1535224538' $andlangbh   order by pos desc,id desc";
 
$rowseff1= getall($sqleff1);
foreach($rowseff1 as $veff1) {
    echo  $veff1['title'].' - '.$veff1['pidname'].'<br />';


}

?>
</div>


      </td>
      <td>  
          <textarea name="coinfor" cols="110" rows="10"><?php echo $coinfor;?></textarea>

          <?php 
            if($row['coinfor'] <>''){
                $arr = explode('|',$row['coinfor']);
               // pre($arr);
                if(count($arr)>0){
                    foreach($arr as $v){
                        $arrfield = get_fieldarr(TABLE_NODE,$v,'pidname');
                         $img = $arrfield['kv'];
                         echo '<p><img src="'.get_img($img).'" /><br />'.$arrfield['title'].'</p>';

                    }
                    
                    
                }
                
            }
          ?>

        </td>
    </tr>

 
  

</table>

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

 </div>

 </form>
<?php
  }
  ?>
  