Server IP : 103.53.40.154 / Your IP : 18.119.121.234 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/pccaterers.in/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php ob_start(); require_once("../includes/dbsmain.inc.php"); if(is_post_back()) { $arr_ids = $_REQUEST['arr_ids']; if(is_array($arr_ids)) { $str_ids = implode(',', $arr_ids); if(isset($_REQUEST['Delete']) || isset($_REQUEST['Delete_x']) ) { db_query("delete from tbl_site_pages where site_pages_id in ($str_ids)"); } else if(isset($_REQUEST['Activate']) || isset($_REQUEST['Activate_x']) ) { db_query("update tbl_site_pages set site_pages_status = 'Active' where site_pages_id in ($str_ids)"); } else if(isset($_REQUEST['Deactivate']) || isset($_REQUEST['Deactivate_x']) ) { db_query("update tbl_site_pages set site_pages_status = 'Inactive' where site_pages_id in ($str_ids)"); }else if(isset($_REQUEST['show_in_header']) || isset($_REQUEST['show_in_header_x']) ) { db_query("update tbl_site_pages set site_pages_show_in_header='Yes' where site_pages_id in ($str_ids)"); }else if(isset($_REQUEST['show_in_header_r']) || isset($_REQUEST['show_in_header_r_x']) ) { db_query("update tbl_site_pages set site_pages_show_in_header='No' where site_pages_id in ($str_ids)"); }else if(isset($_REQUEST['show_in_footer']) || isset($_REQUEST['show_in_footer_x']) ) { db_query("update tbl_site_pages set site_pages_show_in_footer='Yes' where site_pages_id in ($str_ids)"); }else if(isset($_REQUEST['show_in_footer_r']) || isset($_REQUEST['show_in_footer_r_x']) ) { db_query("update tbl_site_pages set site_pages_show_in_footer='No' where site_pages_id in ($str_ids)"); } } if(isset($_REQUEST['Update'])){ foreach($site_pages_order_by as $key=>$value){ db_query("update tbl_site_pages set site_pages_order_by='$value' where site_pages_id='$key'"); } } header("Location: ".$_SERVER['HTTP_REFERER']); exit; } $start = intval($start); $pagesize = intval($pagesize)==0?$pagesize=DEF_PAGE_SIZE:$pagesize; $order_by == '' ? $order_by = 'site_pages_status' : true; $order_by2 == '' ? $order_by2 = 'asc' : true; $sql = "select * from tbl_site_pages where 1"; $sql = apply_filter($sql, $site_pages_name, 'like','site_pages_name'); $sql .= " order by $order_by $order_by2 "; $sql .= " limit $start, $pagesize "; $pager = new midas_pager_sql($sql, $pagesize, $start); if($pager->total_records) { $result = db_query($sql); } ?> <link href="styles.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/javascript" src="../includes/general.js"></script> <?php include("top.inc.php");?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="pageHead"><div id="txtPageHead">Static Page list </div></td> </tr> </table> <strong class="msg" style="margin-left:500px;"><?=display_sess_msg()?></strong> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="content"> <form method="get" name="form2" id="form2" onsubmit="return confirm_submit(this)"> <br /> <table border="0" align="center" cellpadding="2" cellspacing="0" class="tableSearch" style="width:300px; height:90px; border:2px outset #fff;"> <tr align="center"> <th colspan="2">Search</th> </tr> <tr> <td class="tdLabel">Name</td> <td><input name="site_pages_name" type="text" value="<?=$site_pages_name?>" style="width:200px; height:24px;" /></td> </tr> <tr> <td> </td> <td><input name="pagesize" type="hidden" id="pagesize" value="<?=$pagesize?>" /> <input type="image" name="imageField" src="images/buttons/search.gif" /><?php if($_REQUEST['pagesize']){ ?><a href="static_page_list.php"><span style="vertical-align:top; margin-left:5px; font-size:12px; color:#0000CC; font-weight:bold; font-family:Arial, Helvetica, sans-serif;">View All</span></a><? } ?></td> </tr> </table> </form> <br /> <div align="right"> <a href="static_page_f.php" style="font-size:12px; font-weight:bold;">Add New Page </a></div> <? if($pager->total_records==0) {?> <div class="msg">Sorry, no records found.</div> <? } else { ?> <div align="right"> <? $pager->show_displaying()?> </div> <div>Records Per Page: <?=pagesize_dropdown('pagesize', $pagesize);?> </div> <form method="post" name="form1" id="form1" onsubmit="confirm_submit(this)"> <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tableList" style=" border:1px outset #fff;"> <tr> <th width="35%" nowrap="nowrap" style="padding:7px;font-size:12px;">Page Name <?=sort_arrows('site_pages_name')?></th> <th width="14%" nowrap="nowrap" style="padding:7px;font-size:12px;">Show In Header</th> <th width="14%" nowrap="nowrap" style="padding:7px;font-size:12px;">Show In Footer</th> <th width="14%" nowrap="nowrap" style="padding:7px;font-size:12px;">Status <?=sort_arrows('site_pages_status')?></th> <th width="10%" nowrap="nowrap">Order By</th> <th width="6%" style="padding:7px;"> </th> <th width="7%" style="padding:7px;"><input name="check_all" type="checkbox" id="check_all" value="1" onclick="checkall(this.form)" /></th> </tr> <? while ($line_raw = mysqli_fetch_array($result)) { $line = ms_display_value($line_raw); @extract($line); $css = ($css=='trOdd')?'trEven':'trOdd'; ?> <tr class="<?=$css?>"> <td nowrap="nowrap" align="center" style="padding:7px;"><?=$site_pages_name?></td> <td nowrap="nowrap" align="center" style="padding:7px;"><?=$site_pages_show_in_header?></td> <td nowrap="nowrap" align="center" style="padding:7px;"><?=$site_pages_show_in_footer?></td> <td nowrap="nowrap" align="center" style="padding:7px;"><?=$site_pages_status?></td> <td nowrap="nowrap" align="center"><input type="text" name="site_pages_order_by[<?=$site_pages_id?>]" id="site_pages_order_by[<?=$site_pages_id?>]" value="<?=$site_pages_order_by?>" style="width:55px; height:20px; font-weight:bold; font-size:12px; text-align:center;"/></td> <td align="center" style="padding:7px;"><a href="static_page_f.php?site_pages_id=<?=$site_pages_id?>"><img src="images/icons/edit.png" alt="Edit" width="16" height="16" border="0" /></a></td> <td align="center" style="padding:7px;"><input name="arr_ids[]" type="checkbox" id="arr_ids[]" value="<?=$site_pages_id?>" /></td> </tr> <? } ?> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" style="padding:2px"> <input type="submit" name="show_in_header" value="Show in Header" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#006BD7; border-radius:4px; cursor:pointer; width:140px;"/> <input type="submit" name="show_in_header_r" value="Remove From Header" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#66B3FF; border-radius:4px; cursor:pointer; width:150px;"/> <input type="submit" name="show_in_footer" value="Show in Footer" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#5B5B00; border-radius:4px; cursor:pointer; width:140px;"/> <input type="submit" name="show_in_footer_r" value="Remove From Footer" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#B9B900; border-radius:4px; cursor:pointer; width:150px;"/> <input type="submit" name="Update" value="Update Order" class="button" style="font-size:12px; font-weight:bold; height:26px; background-color:#804040; border-radius:4px; cursor:pointer; width:120px;"/> <input type="submit" name="Activate" value="Activate" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#1F3E00; border-radius:4px; cursor:pointer; width:100px;"/> <input type="submit" name="Deactivate" value="Deactivate" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#FF6F6F; border-radius:4px; cursor:pointer; width:100px;" /> <input type="submit" name="Delete" value="Delete" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#CA0000; border-radius:4px; cursor:pointer; width:100px;"/> </td> </tr> </table> </form> <? $pager->show_pager();?> <? } ?> </td> </tr> </table> <? include("bottom.inc.php");?> <script language="javascript"> function select_chk(){ var chks = document.getElementsByName('arr_ids[]'); var hasChecked = false; for (var i = 0; i < chks.length; i++){ if (chks[i].checked){ hasChecked = true; break; } } if (hasChecked == false){ alert("Please Select At Least One."); return false; } } </script>