@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_write.php
<? //include"$_SERVER[DOCUMENT_ROOT]/admin/_lib/admin_check.php"; 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(oldcode){ 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']){ if(category['mcode'] == oldcode) var newoption = new Option(category['name'], category['mcode'], true); // select var newoption = new Option(category['name'], category['mcode'], false); f.mcode.options[ai] = newoption; ai++; } } } function mcate_sel(oldcode){ 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']){ if(category['scode'] == oldcode) var newoption = new Option(category['name'], category['scode'], false); // select else var newoption = new Option(category['name'], category['scode'], false); f.scode.options[ai] = newoption; ai++; } } } function goods_check(){ var f = document.form; // if(!valcheck(f.lcode, 1, 'Ä«Å×°í¸®¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. ')) return false; if(!valcheck(f.name, 1, 'Á¦Ç°¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. ')) return false; if(f.mode.value == 'regist'){ if(!valcheck(f.upfile1, 1, 'Á¦Ç°À̹ÌÁö¸¦ µî·ÏÇØ ÁÖ¼¼¿ä. ')) return false; } f.content.value = bodyGet(); } //--> </script> <h2>Á¦Ç°µî·Ï</h2> <form name='form' method='post' action='./_product/proc.php' enctype='multipart/form-data' onsubmit='return goods_check()'> <input type='hidden' name='mode' value='$mode' /> <input type='hidden' name='num' value='$row[num]' /> <input type='hidden' name='barcode' value='$row[barcode]' /> <input type='hidden' name='content' /> <table id='f-table'> <!-- <tr> <th height='30' class='form'>Ä«Å×°í¸®</th> <td class='form' style='padding-top:5px; padding-bottom:5px;'> <select size='5' name='lcode' style='width:150px; height:80px' onchange='lcate_sel()'>"; $__res = $mysql->res("adw_cate", "*", " where cate_level = 'L' order by cate_step asc"); while($__row = $mysql->farray($__res)){ echo" <option value='$__row[lcode]' "; if($row[lcode] == $__row[lcode]) echo"selected='selected'"; echo">$__row[cate_name]</option>"; } echo" </select> <select size='5' name='mcode' style='width:150px; height:80px' onchange='mcate_sel()'> <option value=''></option> </select> <select size='5' name='scode' style='width:150px; height:80px'> <option value=''></option> </select> </td> </tr> --> <tr> <th height='30' class='form'>Á¦Ç°¸í</th> <td class='form'><input type='text' size='30' name='name' value='$row[name]' /></td> </tr> <tr> <th height='30' class='form'>ÆÇ¸Å°¡°Ý</th> <td class='form'><input type='text' size='10' name='price' value='$row[price]' /> ¼ýÀڷθ¸ ÀÔ·ÂÇØÁÖ¼¼¿ä</td> </tr> <tr> <th height='30' class='form'>À̹ÌÁö(¸®½ºÆ®)</th> <td class='form'><input type='file' size='30' name='upfile1' /> [ »çÀÌÁî : °¡·Î 140 Çȼ¿]</td> </tr> <tr> <th height='30' class='form'>À̹ÌÁö(»ó¼¼)</th> <td class='form'><input type='file' size='30' name='upfile2' /> [ »çÀÌÁî : °¡·Î 260 Çȼ¿]</td> </tr> <tr> <th height='30' class='form'>À̹ÌÁö(È®´ë)</th> <td class='form'><input type='file' size='30' name='upfile3' /> [ »çÀÌÁî : °¡·Î 600 Çȼ¿]</td> </tr> <tr> <td height='150' class='form' colspan='2' style='padding:5px; padding:10px'>"; $e_height = 400; include"./editer/index.php"; echo" </td> </tr> </table> <p id='bottom-btn'> <input type='submit' value=' È® ÀÎ ' /> <input type='button' value='»óǰ°Ë»ö' onclick=\"location.href=('$_SERVER[PHP_SELF]?amode=goods_list&page=$page');\" /> </p> <textarea style='display:none' name='oldcontents' title='°³¹ß¿ëµµ' cols='' rows=''>$row[content]</textarea> </form> "; if($mode == "modify"){ echo" <script type='text/javascript'> <!-- var f = document.form; lcate_sel(); for(i=0; i<f.mcode.length; i++){ if(f.mcode[i].value == '$row[mcode]') f.mcode[i].selected = true; } mcate_sel(); for(i=0; i<f.scode.length; i++){ if(f.scode[i].value == '$row[scode]') f.scode[i].selected = true; } //--> </script>"; } ?>