:: **Zploit** v1.0 | Current Path: **/home/bbbncs7/amtechint.com/admin/**
:: Editing File: prods.php
<?php include "param.php"; include "func.php"; include "chk_login.php"; ?> <html> <head> <title><?=$web_title?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="style.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="chk_frm.js"></script> <script language="JavaScript"> function chk_form() { if (checkempty(document.frm_add.pname,":.. Please enter Product Name.:")==false) return false; return true; } function more_prods(id1,id2,id3,id4){ var url; url = 'more_prods.php?mid='+id1+'&sec='+id2+'&cat='+id3+'&pid='+id4 microsite_window=window.open(url,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=yes,menubar=no,scrollbars=yes,top=150,left=100,resizable=no,width=825,height=260') microsite_window.focus(); } function related_prods(id1,id2,id3,id4) { var url; url = 'related_prods.php?mid='+id1+'&sec='+id2+'&cat='+id3+'&m_pid='+id4 microsite_window=window.open(url,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=yes,menubar=no,scrollbars=yes,top=150,left=100,resizable=no,width=825,height=360') microsite_window.focus(); } function assign_prods(id1,id2,id3,id4) { var url; url = 'assign_prods.php?mid='+id1+'&sec='+id2+'&cat='+id3+'&m_pid='+id4 microsite_window=window.open(url,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=yes,menubar=no,scrollbars=yes,top=150,left=100,resizable=no,width=825,height=360') microsite_window.focus(); } function move_prods(id4){ var url; url = 'move_prods.php?pid='+id4 microsite_window=window.open(url,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=yes,menubar=no,scrollbars=yes,top=150,left=100,resizable=no,width=825,height=260') microsite_window.focus(); } </script> <script src="//cdn.ckeditor.com/4.7.3/standard/ckeditor.js"></script> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="21" align="center" valign="top"><?php include("top_cp.php"); ?></td> </tr> <tr> <td align="center" valign="top"><table width="990" height="100%" border="0" cellpadding="0" cellspacing="0" class="base"> <tr> <td height="2" colspan="2"><img src="imgs/cp/spacer.gif" width="8" height="8"></td> </tr> <tr> <td width="190" valign="top"><?php include("left_cp.php"); ?></td> <td width="800" valign="top"><table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <?php $cate = ""; $RNK = qry_run("select * from tbl_main where mainid = ".ch_lvl('mid')." order by ranking"); if (num_rec($RNK) > 0) { $rk = fetch_rec($RNK); $cate = $rk['pname']; } $section = ""; $RNK = qry_run("select * from tbl_section where secid = ".ch_lvl('sec')." order by ranking"); if (num_rec($RNK) > 0) { $rk = fetch_rec($RNK); $section = $rk['pname']; } $category = ""; $RNK = qry_run("select * from tbl_cat where catid = ".ch_lvl('cat')." order by ranking"); if (num_rec($RNK) > 0) { $rk = fetch_rec($RNK); $category = $rk['pname']; } ?> <td width="671" height="29" background="imgs/cp/menu_cat_bg.jpg" class="left_menu_head" style="padding:4px;"><a href="home.php" class="left_menu_head">Home</a> <?php if (ch_lvl('mid') != 0){ ?>| <a href="main.php" class="left_menu_head"><?=$cate?></a><?php }?><?php if (ch_lvl('sec') != 0){ ?> | <a href="secions.php?mid=<?=ch_lvl('mid')?>" class="left_menu_head"><?=$section?></a><?php }?><?php if (ch_lvl('cat') != 0){ ?> | <a href="category.php?mid=<?=ch_lvl('mid')?>&sec=<?=ch_lvl('sec')?>" class="left_menu_head"><?=$category?></a><?php }?> </td> <td width="129" align="right" background="imgs/cp/menu_cat_bg.jpg" class="left_menu_head" style="padding:4px;"><a href="javascript:showp('new');hidep('CATs');" class="btn">Add New Item</a> </td> </tr> <tr> <td colspan="2"><div id="new" style="display:none"> <table width="800" border="0" cellpadding="4" cellspacing="0" class="base"> <form action="cat_prcess.php" method="post" enctype="multipart/form-data" name="frm_add" onSubmit="javascript:return chk_form();"> <input type="hidden" name="sub_mit" value="Y"> <input type="hidden" name="LVL" value="4"> <input type="hidden" name="mid" value="<?=ch_lvl('mid')?>"> <input type="hidden" name="sec" value="<?=ch_lvl('sec')?>"> <input type="hidden" name="cat" value="<?=ch_lvl('cat')?>"> <input type="hidden" name="C_TYPE" value="NEW"> <tr background="imgs/cp/menu_bg.jpg"> <td height="29" colspan="4" align="left"><strong>Add New Item</strong></td> </tr> <tr> <td width="125" height="25" align="right">Product Name:</td> <td><input name="pname" type="text" class="txt_id" id="pname" size="40" maxlength="100" required></td> <td align="right"> </td> <td><input name="pcode" type="hidden" class="txt_id" id="pcode" size="39" maxlength="50" value="<?php echo rand(0,999999999);?>"> </td> </tr> <tr> <td height="25" align="right">Product Code/SKU:</td> <td colspan="3"><input name="part" type="text" class="txt_id" id="part" size="20" maxlength="50" required></td> </tr> <?php if ($MANUFACTURE == "Yes"){ ?> <tr> <td height="25" align="right">Manufacturer:</td> <td colspan="3"><select name="brand" id="brand"> <option value="0^0">~ Manufacturer ~</option> <?php $QRYb = qry_run("select * from tbl_brands where pshow = 'Yes' order by ranking"); if (num_rec($QRYb) > 0) { while($rsb = fetch_rec($QRYb)) { ?> <option value="<?=$rsb['mainid']?>^<?=$rsb['bname']?>"> <?=$rsb['bname']?> </option> <?php } } ?> </select></td> </tr> <?php }?> <tr> <td height="25" align="right" valign="top">Short Detail:</td> <td colspan="3"> <textarea name="sdetail" id="sdetail" required></textarea> <script> CKEDITOR.replace( 'sdetail' ); </script> </td> </tr> <tr> <td align="right" valign="top">Complete Detail:</td> <td colspan="3" valign="top"> <textarea name="pdetail" id="pdetail" required></textarea> <script> CKEDITOR.replace( 'pdetail' ); </script> </td> </tr> <tr align="left"> <td height="29" background="imgs/cp/menu_bg.jpg" colspan="4"><strong>Product Setting</strong></td> </tr> <tr> <td height="25" align="right"> </td> <td colspan="3"><p>Publish: <input name="pshow" type="checkbox" id="pshow2" value="Yes" checked> <?php if ($Feature == "Yes"){ ?> <br> Feature: <input name="feature" type="checkbox" id="pshow3" value="Yes"> <?php }?> <?php if ($Latest == "Yes"){ ?> <br> Sale: <input name="new" type="checkbox" id="pshow5" value="Yes"> <?php }?> </p></td> </tr> <?php if ($Market_price == "Yes"){ ?> <tr> <td height="25" align="right">List / Market Price:</td> <td colspan="3"><input name="market_rate" type="text" class="txt_id" id="market_rate" value="0" size="10"> <?=$currency?> </td> </tr> <?php }?> <!-- <tr> <td height="25" align="right">Our Price:</td> <td colspan="3"><input name="prate" type="text" class="txt_id" id="prate" value="0" size="10"> <?=$currency?> </td> </tr> --> <?php if ($Special == "Yes"){ ?> <tr> <td height="25" align="right">Special:</td> <td colspan="3"><input name="special" type="checkbox" id="pshow4" value="Yes"> <input name="spl_rate" type="text" class="txt_id" id="spl_rate" value="0" size="10"> <?=$currency?> </td> </tr> <?php }?> <?php if ($Stock == "Yes"){ ?> <tr> <td height="25" align="right">Stock:</td> <td colspan="3"><input name="stock" type="text" class="txt_id" id="stock" value="0" size="10"></td> </tr> <?php }?> <?php if ($Ship == "Yes"){ ?> <tr> <td height="25" align="right">Shipping:</td> <td colspan="3"><input name="shipping" type="text" class="txt_id" id="shipping" value="0" size="10"> <?=$currency?> <input name="free_shipping" type="checkbox" id="free_shipping" value="Yes"> Free Shipping</td> </tr> <?php }?> <?php if ($Tax == "Yes"){ ?> <tr> <td height="25" align="right">Tax:</td> <td colspan="3"><input name="tax" type="text" class="txt_id" id="tax" value="0" size="10"> % <input name="taxable" type="checkbox" id="taxable" value="Yes"> Taxable </td> </tr> <?php }?> <tr> <td height="25" colspan="4" align="left" background="imgs/cp/menu_bg.jpg" bgcolor="#F8FCFF"><strong>Product Options / Variations</strong></td> </tr> <?php $QRYs = qry_run("select * from tbl_options where pshow = 'Yes' order by ranking"); if (num_rec($QRYs) > 0) { $p = 1; while($rss = fetch_rec($QRYs)) { ?> <tr bgcolor="#F1F1F1"> <td height="25" colspan="4" align="left"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="base"> <tr> <td height="21"><strong> <?=$rss['pname']?> </strong></td> </tr> </table></td> </tr> <tr> <td height="25" colspan="4" align="left"> <?php $QRYo = qry_run("select * from tbl_sub_opt where mainid = ".$rss['mainid']." order by ranking"); if (num_rec($QRYo) > 0) { ?> <table border="1" cellpadding="0" cellspacing="0" class="base" style="border-collapse:collapse;"> <?php $tr = "Yes"; $prow = 1; while($rso = fetch_rec($QRYo)) { if ($tr == "Yes"){ ?> <tr> <?php }?> <td align="left" width="263" height="21"><table width="263" border="0" cellpadding="4" cellspacing="0" class="base"> <tr> <td width="10%" height="21"><input type="checkbox" name="opt<?=$rss['mainid']?>[]" value="<?=$rso['subid']?>"></td> <td width="90%"> <?=$rso['pname']?> </td> <!-- <td width="32">Price: </td> <td width="80"><input name="prate<?=$rso['subid']?>" type="text" class="txt_id" id="prate<?=$rso['subid']?>" value="0" size="2"> <select name="ptype<?=$rso['subid']?>" id="ptype<?=$rso['subid']?>" class="txt_id"> <option value="Plus">+</option> <option value="Minus">-</option> </select> </td> --> </tr> </table></td> <?php if ($prow == 3){?> </tr> <?php } if ($prow < 3) { $tr = "No"; $prow +=1; }else{ $tr = "Yes"; $prow =1; } } ?> </table> <?php } ?> </td> </tr> <tr> <td height="25" colspan="4" align="left"> </td> </tr> <?php $p = $p + 1; } } ?> <tr> <td height="25" colspan="4" align="left" background="imgs/cp/menu_bg.jpg" bgcolor="#F8FCFF"><strong>Item Images</strong></td> </tr> <?php if ($auto_thumb == "No"){?> <tr> <td height="25" align="right">Image 1:</td> <td width="265"><input name="img1" type="file" class="txt_id" id="img1"></td> <td width="101" align="right"> </td> <td width="277"> </td> </tr> <tr> <td height="25" align="right">Image 2:</td> <td><input name="img2" type="file" class="txt_id" id="img2"></td> <td align="right"> </td> <td> </td> </tr> <?php }else{?> <tr> <td height="25" align="right">Product Image:</td> <td><input name="img2" type="file" class="txt_id" id="img2" required></td> <td colspan="2" align="left"> </td> </tr> <?php }?> <tr> <td height="25" colspan="4" align="left" background="imgs/cp/menu_bg.jpg" bgcolor="#F8FCFF"><strong>SEO Detail</strong></td> </tr> <tr> <td height="25" align="right">Page Heading:</td> <td colspan="3"><input name="phead" type="text" class="txt_id" id="phead" size="40" maxlength="100"></td> </tr> <tr> <td height="25" align="right">Keywords:</td> <td colspan="3"><input name="keywords" type="text" class="txt_id" id="keywords" value="" style="width:100%;"></td> </tr> <tr> <td height="25" align="right">Description:</td> <td colspan="3"><input name="description" type="text" class="txt_id" id="description" value="" style="width:100%;"></td> </tr> <tr> <td height="25" align="right"> </td> <td colspan="3"><input name="Submit" type="submit" class="btn" value="Submit"> <input name="Submit2" type="button" class="btn" value="Cancel" onClick="hidep('new');showp('CAT');"></td> </tr> </form> </table> </div></td> </tr> <tr> <td colspan="2"><div id="CATs" style="display:block;"> <table width="800" border="0" cellpadding="4" cellspacing="0" class="base"> <tr> <td width="32" height="29" background="imgs/cp/menu_bg.jpg"><strong>#</strong></td> <td width="398" background="imgs/cp/menu_bg.jpg"><strong>Product Heading</strong></td> <td width="56" background="imgs/cp/menu_bg.jpg"> </td> <td width="78" background="imgs/cp/menu_bg.jpg"><strong>Ranking</strong></td> <td width="53" background="imgs/cp/menu_bg.jpg"><strong>Publish</strong></td> <td width="4" background="imgs/cp/menu_bg.jpg"> </td> <td width="123" background="imgs/cp/menu_bg.jpg"> </td> </tr> <?php $QRY = qry_run("select * from tbl_prods where mainid = ".ch_lvl('mid')." AND secid = ".ch_lvl('sec')." AND catid = ".ch_lvl('cat')." order by ranking"); if (num_rec($QRY) > 0) { $p = 1; while($rs = fetch_rec($QRY)) { ?> <tr bgcolor="#FFFFFF" onMouseOver="this.bgColor = '#F8FCFF'" onMouseOut ="this.bgColor = '#FFFFFF'"> <td height="29" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> <?=$p?> .</td> <td height="29" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> <?=$rs['pname']?> (#<?=$rs['part']?>)</td> <td height="29" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> </td> <form name="frm_ranking<?=$rs['pid']?>" method="post" action="ranking.php"> <input type="hidden" name="main" value="<?=$rs['mainid']?>"> <input type="hidden" name="sec" value="<?=$rs['secid']?>"> <input type="hidden" name="cat" value="<?=$rs['catid']?>"> <input type="hidden" name="pid" value="<?=$rs['pid']?>"> <input type="hidden" name="LVL" value="4"> <input type="hidden" name="sub_mit" value="Yes"> <td height="29" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> <input name="ranking<?=$rs['pid']?>" type="text" class="txt_id" value="<?=$rs['ranking']?>" size="4" style="text-align:center;"> <a href="#" class="base_link" onClick="javascript:document.frm_ranking<?=$rs['pid']?>.submit();"><img src="imgs/page_white_go.png" width="16" height="16" border="0"></a> </td> </form> <td height="29" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> <a href="cat_prcess.php?mid=<?=$rs['mainid']?>&sec=<?=$rs['secid']?>&cat=<?=$rs['catid']?>&pid=<?=$rs['pid']?>&C_TYPE=PSHOW&P_show=<?=$rs['pshow']?>&LVL=4" class="base_link"> <?=$rs['pshow']?> </a> </td> <td height="29" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> </td> <td height="29" align="right" style="border-style:solid;border-width:0px 0px 1px 0px;border-color:#DFEDF8;"> <table border="0" cellpadding="0" cellspacing="0" class="base_2"> <tr align="center"> <td width="23"><a href="javascript:move_prods(<?=$rs['pid']?>);" title="Move/Copy Products"><img src="imgs/move2.jpeg" alt="Move/Copy Products" width="20" height="20" border="0"></a></td> <!--<td width="25"><a href="javascript:related_prods(<?=$rs['mainid']?>,<?=$rs['secid']?>,<?=$rs['catid']?>,<?=$rs['pid']?>);" title="Related Products"><img src="imgs/application_view_tile.png" alt="Related Products" width="16" height="16" border="0"></a></td>--> <td width="25"><a href="javascript:more_prods(<?=$rs['mainid']?>,<?=$rs['secid']?>,<?=$rs['catid']?>,<?=$rs['pid']?>);" title="Upload More Style"><img src="imgs/application_view_tile.png" alt="More Style" width="16" height="16" border="0"></a></td> <td width="25"><a href="edit_prod.php?mid=<?=$rs['mainid']?>&sec=<?=$rs['secid']?>&cat=<?=$rs['catid']?>&pid=<?=$rs['pid']?>"><img src="imgs/page_paintbrush.png" width="16" height="16" border="0"></a></td> <td width="25"><a href="cat_prcess.php?mid=<?=$rs['mainid']?>&sec=<?=$rs['secid']?>&cat=<?=$rs['catid']?>&pid=<?=$rs['pid']?>&C_TYPE=DEL&LVL=4" onClick="return confirm('Are you sure you want to delete?')"><img src="imgs/ed_delete.gif" width="18" height="18" border="0"></a></td> </tr> </table> </td> </tr> <?php $p += 1; } } ?> </table> </div></td> </tr> </table></td> </tr> <tr> <td height="2" colspan="2"><img src="imgs/cp/spacer.gif" width="8" height="8"></td> </tr> </table></td> </tr> <tr> <td height="29" align="center" background="imgs/cp/btm_bg22.jpg"><?php include("btm_cp.php"); ?></td> </tr> </table> </body> </html>