:: **Zploit** v1.0 | Current Path: **/home/bbbncs7/amtechint.com/admin/**
:: Editing File: secions.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 Category Name.:")==false) return false; return true; } </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']; } $QRY = qry_run("select * from tbl_section where mainid = ".ch_lvl('mid')." order by ranking"); if (num_rec($QRY) > 0) { $plink = "No"; }else{ $plink = "Yes"; } ?> <td width="598" 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> | <a href="main.php" class="left_menu_head"><?=$cate?></a> </td> <td width="202" align="right" background="imgs/cp/menu_cat_bg.jpg" class="left_menu_head" style="padding:4px;"><a href="javascript:showp('new');hidep('CAT');" class="btn">Add New Section</a> <?php if ($plink == "Yes"){?> <a href="prods.php?mid=<?=ch_lvl('mid')?>&sec=0&cat=0" class="btn">Add New Item</a> <?php }?> </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="2"> <input type="hidden" name="mid" value="<?=ch_lvl('mid')?>"> <input type="hidden" name="C_TYPE" value="NEW"> <tr align="left"> <td height="29" colspan="4" background="imgs/cp/menu_bg.jpg"><strong>Add New Section</strong></td> </tr> <tr> <td width="102" height="25" align="right">Category Name:</td> <td><input name="pname" type="text" class="txt_id" id="pname" size="40" maxlength="100" required></td> <td align="right">Publish:</td> <td><input name="pshow" type="checkbox" id="pshow" value="Yes" checked></td> </tr> <tr> <td height="25" align="right">Category Detail:</td> <td colspan="3"><input name="pdetail" type="text" class="txt_id" id="pdetail" value="" style="width:100%;"></td> </tr> <tr> <td height="25" align="right">Thumbnail:</td> <td width="291"><input name="img1" type="file" class="txt_id" id="img1" required></td> <td width="64" align="right">Banner Image:</td> <td width="311"><input name="img2" type="file" class="txt_id" id="img2"></td> </tr> <tr align="left" bgcolor="#F8FCFF"> <td height="25" colspan="4"><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="CAT" style="display:block;"> <table width="800" border="0" cellpadding="4" cellspacing="0" class="base"> <tr> <td width="34" height="29" background="imgs/cp/menu_bg.jpg"><strong>#</strong></td> <td width="449" background="imgs/cp/menu_bg.jpg"><strong>Product Sections</strong></td> <td width="84" background="imgs/cp/menu_bg.jpg"><strong>Ranking</strong></td> <td width="65" background="imgs/cp/menu_bg.jpg"><strong>Publish</strong></td> <td width="64" background="imgs/cp/menu_bg.jpg"> </td> <td width="56" background="imgs/cp/menu_bg.jpg"> </td> </tr> <?php if (num_rec($QRY) > 0) { $p = 1; while($rs = fetch_rec($QRY)) { $slink = "No"; $catid = 0; $QRYs = qry_run("select * from tbl_prods where mainid = ".$rs['mainid']." AND secid = ".$rs['secid']." AND catid = ".$catid." order by ranking"); if (num_rec($QRYs) > 0) { $slink = "Yes"; }else{ if ($LVL > 2) { $slink = "No"; }else{ $slink = "Yes"; } } ?> <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;"><a href="<?php if ($slink == "No"){?>category.php?mid=<?=$rs['mainid']?>&sec=<?=$rs['secid']?><?php }else{?>prods.php?mid=<?=$rs['mainid']?>&sec=<?=$rs['secid']?>&cat=0<?php }?>" class="base_link"> <?=$rs['pname']?> </a></td> <form name="frm_ranking<?=$rs['secid']?>" 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="LVL" value="2"> <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['secid']?>" 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['secid']?>.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']?>&C_TYPE=PSHOW&P_show=<?=$rs['pshow']?>&LVL=2" 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 width="50" border="0" cellpadding="0" cellspacing="0" class="base_2"> <tr align="center"> <td width="25"><a href="edit_section.php?mid=<?=$rs['mainid']?>&sec=<?=$rs['secid']?>"><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']?>&C_TYPE=DEL&LVL=2" 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>