
<form method=post action="<?php echo $jumpv_catid;?>&act=pos">
  <table class="formtab formtabhovertr">
  <tr style="font-weight:bold;background:#eeefff">
  <td  align="center">排序号</td>
   <td  width="85" align="center">图片</td>
   <td  align="left">标题</td>
  
  
    <td  width="160"  align="center">操作</td>
    <td  align="center" width="80" >推荐与最新</td>
    <td  align="center" >状态</td>

  </tr>
  <?php

        foreach($rowlisttext as $v){
    //echo print_r($rowlist,1);
 // get arr value here. put head...
$arr_can=$v['arr_can'];
$bscntarr = explode('==#==',$arr_can);
     if(count($bscntarr)>1){
          foreach ($bscntarr as   $bsvalue) {
             if(strpos($bsvalue, ':##')){
               $bsvaluearr = explode(':##',$bsvalue);
               $bsccc = $bsvaluearr[0];
               $$bsccc=$bsvaluearr[1];
             }
          }
      }
      //-----------------
      
            $tid = $v['id'];  $langrelid = $v['langrelid'];
             $jsname = jsdelname($v['title']);
           // echo $jsname;

      $name = '<strong>'.$v['title'].'</strong>';

      $dateedit = $v['dateedit'];
      $pbrand = $v['pbrand'];

      $pidarr = $v['pid'];

      if(strlen($pidarr)>30){
           $pidarr2 = explode("-",$pidarr);
            $pid = $pidarr2[0];
      }
      else  $pid = $pidarr;




      $curnodepidname = $pidname = $v['pidname'];$alias_jump = $v['alias_jump'];
      $kv = $v['kv'];
       $kvsm = $v['kvsm'];
        $kvsm_cus = $v['kvsm_cus'];
     //if($sta_kvtothumb=='y') $kvsm = $kv; //$sta_kvtothumb in arr_can

       $kvsm2 = $v['kvsm2'];
      $alias = alias($pidname,'node');

      $sta_noaccess = $v['sta_noaccess'];
      $sta_new = $v['sta_new'];$sta_tj = $v['sta_tj'];
     // $despcan = $v['despcan'];
     // $despcanv = $despcan<>''?' <span class="cred">[有产品参数]</span>':'';




$sta_access_v = $sta_noaccess=='y'?'<span class="cred">(禁止访问)</span>':'';
//$sta_new_v = $sta_new=='y'?'<span class="cred">(最新)</span>':'';
//$sta_tj_v = $sta_tj=='y'?'<span class="cred">(推荐)</span>':'';
 $tjdel = '<span class="cred">已推荐</span> <a href="'.$jumpv_catid.'&tid='.$tid.'&v=n&act=nodetj" style="color:#999">取消</a>';
 $tjadd = '<a href="'.$jumpv_catid.'&tid='.$tid.'&v=y&act=nodetj">设置推荐</a>';
$nodetj = $sta_tj=='y'?$tjdel:$tjadd;
 //sta_new
 $newdel = '<span class="cred">已最新</span> <a href="'.$jumpv_catid.'&tid='.$tid.'&v=n&act=nodenew" style="color:#999">取消 </a>';
 $newadd = '<a href="'.$jumpv_catid.'&tid='.$tid.'&v=y&act=nodenew">设置最新</a>';
$nodenew = $sta_new=='y'?$newdel:$newadd;

 //sta_noaccess
// $noaccessdel = '<span class="cred">禁止访问</span> <a href="'.$jumpv_catid.'&tid='.$tid.'&v=n&act=nodenoaccess" style="color:#999">取消 </a>';
 //$noaccessadd = '<a href="'.$jumpv_catid.'&tid='.$tid.'&v=y&act=nodenoaccess">设置禁止访问</a>';
//$nodenoaccess = $sta_noaccess=='y'?$noaccessdel:$noaccessadd;

//

$sqlalbum = "SELECT id from ".TABLE_ALBUM." where pid='$pidname' $andlangbh order by id desc";//$pidname is in pro-modnews.php
//$num_abm = '  <a target="_blank" href="mod_node_edit.php?lang=cn&tid='.$tid.'&act=list&file=editalbum">[相册图片有<span class="cred">'.getnum($sqlalbum).'</span>个]</a>';
$num_abm ='';
$albumlink = '../mod_album/mod_mainalbum.php?lang='.LANG.'&pid='.$pidname;
if(getnum($sqlalbum)>0)  $num_abm = ' <a target="_blank" href="'.$albumlink.'"><span class="cred">(album)</span> </a>';
//

$num_imgfj = ' | [私有编辑器附件'.num_imgfj($pidname).']';

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

 menu_changesta($v['sta_visible'],$jumpv_catid,$tid,'sta_node');

//$edit_text= "<a class='but1' href='mod_node_edit.php?lang=".LANG."&act=editcan&tid=$tid&file=editcan' target='_blank'>修改标题</a>";
$edit_text2= "<a class='but1' href='mod_node_edit.php?lang=".LANG."&act=editdesp&tid=$tid&file=editdesp' target='_blank'><i class='fa fa-pencil-square-o'></i> 修改</a>";

 //$del_text= "<a href=javascript:delself('$PHP_SELF','$tid')  class=but2>删除</a>";

//$del_text= " <a href=javascript:del('delnode','$pidname','$jumpv_catid','$jsname')  class=but2><i class='fa fa-trash-o'></i> 删除</a>";
 
$linkdel = $jumpv_catid.'&pidname='.$pidname.'&act=delnode';
$del_text= " <a href=javascript:delnew('$jsname','$linkdel')  class=but2><i class='fa fa-trash-o'></i> 删除</a>";

 ?>
  <tr <?php echo $tr_hide?>>
  <td align="center">
  <input type="text" name="<?php echo $tid;?>"  value="<?php echo $v['pos'];?>" size="5" />
<?php //if($sta_sticky=='y') echo '<p class="cgray">置顶</p>'?>
  </td>
<td align="center"  class="tc">
<?php
  $imgeditlink1 = '../mod_module/mod_uploadkvsm.php?lang='.LANG.'&pidname='.$pidname.'&type=nodekvsm';
   $imgeditlink2 = '../mod_module/mod_uploadkvsm.php?lang='.LANG.'&pidname='.$pidname.'&type=nodekvsm2';
    $imgeditlinkkv = '../mod_module/mod_uploadkv.php?lang='.LANG.'&pidname='.$pidname.'&type=nodekv';

if($kvsm_cus=='') {

    if($kvsm<>'') {  
      $img = get_img($kvsm,'','');
      echo '<a style="color:#333" title="编辑缩略图1" class="needpopup" href="'.$imgeditlink1.'"><img style="height:60px" src="'.$img.'" alt="" /><br />编辑缩略图</a>';
    }
    else echo '<a class="needpopup" href="'.$imgeditlink1.'">添加缩略图</a>';
}
else {
  //no use cus kvsm
 // $kvsm_cus=zbdesp_imgpath($kvsm_cus); 
 // echo '<a style="display:block;padding:10px 0" title="自定义缩略图" href="'.$kvsm_cus.'" target="_blank"><img style=" width:auto;height:60px" src="'.$kvsm_cus.'" alt="" /><br />自定义缩略图</a>' ;
}
// echo  p2030_imgyt($kvsm,'y','n');
//echo    '<img style="width:120px" src="'.get_img($kvsm,$title,'nodiv').'" >';
//echo '<br />';
//if($kvsm2<>'')   echo '<a style="color:#FF9935" class="needpopup" href="'.$imgeditlink2.'">编辑缩略图2</a>'; 
//else echo '<a class="needpopup" href="'.$imgeditlink2.'">添加缩略图2</a>';
//echo '<br />';
//if($kv<>'')   echo '<a style="color:#FF9935" class="needpopup" href="'.$imgeditlinkkv.'">编辑kv图片</a>'; 
//else echo '<a class="needpopup" href="'.$imgeditlinkkv.'">添加kv图片</a>';
?>
 

</td>



    <td align="left">

    <?php
     //   $pidname=decode(web_getcatname2($pid));
        $catname = get_field(TABLE_CATE,'name',$pid,'pidname');
        $pidlink="<a href='$jumpv&catid=$pid' title='显示这个分类'>[$catname]</a>";

     
        
    echo $pidlink.$name;
    

    langrel_show_inlist(TABLE_NODE,'title',$langrelid,$pidname);

   

    echo $num_imgfj.$sta_access_v.$num_abm;

    //if($kvsm2<>"") echo '<span class="cred">(有小图2)</span>';
    echo '<br />'.admlink($v);


    ?>
      |  <a class="needpopup" href="../mod_seo/mod_alias_edit.php?lang=<?php echo LANG;?>&act=edit&pidname=<?php echo $pidname;?>&type=node">修改别名</a> 
  <?php 
  //$alias= alias($pidname,'node');
  //if($alias<>'') echo '( '.spangray($alias).' )';
  ?> 
 


<?php 
if($sta_tag=='y'){
   $framesrc='../mod_tag/mod_tagnode.php?file=addnode&pid='.$pidname.'&catpid='.$catpid.'&lang='.LANG.'&type=cate';
    echo '<br /><a  class="needpopup"  href="'.$framesrc.'"> 标签管理 </a>';


   $ss="select * from  ".TABLE_TAGNODE."  where node='$pidname'  ".ANDLANGBH." order by id desc";
  // echo $ss;exit;
      if(getnum($ss)>0){

  echo '<span class="cgray"> ';

        $res = getall($ss);
          foreach ($res as $v) {
              $tag = $v['tag'];
              echo get_field(TABLE_TAG,'name',$tag,'pidname').'&nbsp;&nbsp;';

          }//end foreach

      }
echo '</span>';


}

//------------------
//$nodereldir = HERE_ROOT.'mod_node/mod_nodelangrel.php'; 
 
 //$sqllang222 = "SELECT * from ".TABLE_LANG." where procatpid='$catpid'";     
 

//if(is_file($nodereldir) && ENABLEMULTISITE=='y' && getnum($sqllang222)>0) echo '<br /><a class="needpopup" href="mod_nodelangrel.php?pid='.$curnodepidname.'&lang='.LANG.'">语言关联</a>';
if(ENABLEMULTISITE=='y') echo '<br /><span class="cgray">'.$pidname.'</span>';
?>


 
    </td>
 

    <td  align="center"><?php echo  $edit_text2.$del_text;
     
    
    ?>
    
  <p style="padding:5px 0">
  <a  class="needpopup"  href="mod_node_pop.php?lang=<?php echo LANG?>&file=editcate&catpid=<?php echo $catpid?>&tid=<?php echo $tid?>"> 修改分类</span></a>  | 

   <a class="needpopup" href="../mod_seo/mod_seo_edit.php?lang=<?php echo LANG;?>&act=edit&pidname=<?php echo $pidname;?>&type=node">修改SEO</a>
  
</p>

<p style="padding:2px 0">
  <a  target="_blank"  href="mod_node_edit.php?lang=<?php echo LANG?>&file=editbrand&tid=<?php echo $tid?>"> 修改brand</span></a> 
 <?php 
  if($pbrand<>'') {
      echo get_field(TABLE_NODE,'title',$pbrand,'pidname');
  }
 
 ?>
</p>

   
 

  </p>
  
  
  </td>
    <td  align="center">
    <?php
    //推荐---
      echo  $nodetj;  echo '<div class="c5"></div>';
      //最新---
      echo  $nodenew;  echo '<div class="c5"></div>';

    ?>
    </td>

    <td  align="center">
      <?php   echo $sta_visible;?>
        <br/>
   <?php echo $dateedit;?>


    </td>
  </tr>
<?php

    } ?>
</table>


<div style="padding-bottom:22px"><input class="mysubmit" type="submit" name="Submit" value="修改排序" />
<br />
<?php
echo $sortid_date;
?>
 </div>
</form>

<?php

require_once HERE_ROOT.'plugin/page_2010.php';

?>
