hjkhhrterwefdgdfgdfgdfgdgdfgdfgdsvstertrt
bnmbertsdfsdfgdfgdfgfffdgdfgdfgrtdfg
/
home
/
u652258970
/
domains
/
drgreal.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php session_start(); require "../config.php"; require_once("../my_pagina_class.php"); //require_once("CSSPagination.class.php"); //require_once("CSSPagination1.class.php"); $page_name="state"; if(!isset($_SESSION['adminid'])) { echo("<script language='javascript'>window.location.href='index.php'</script>"); exit; } $sestype=$_SESSION['ses_atype']; if($sestype=='O') { $sel_operator=mysql_query("select * from tbl_splituser where split_id = '".$_SESSION['ses_op_id']."'") or die(mysql_error()); $res_operator=mysql_fetch_array($sel_operator); $menu_feat_id=explode(",",$res_operator['feat_id']); //echo "<pre>"; print_r($menu_feat_id); exit; if(!in_array("Masters", $menu_feat_id)) { echo("<script language='javascript'>window.location.href='index.php'</script>"); exit; } } ?> <?php if(isset($_REQUEST['inactive'])) { $stateids = implode(',',$_POST['selecta']); $status ='N'; $state_query = "UPDATE tbl_state set stat_status='$status' where stat_id IN ($stateids)"; $result = mysql_query($state_query); if($result) { echo "<script>alert('selected rows successfully updated');</script>"; echo "<script>window.location.href='state.php';</script>"; } } if(isset($_REQUEST['active'])) { $stateids = implode(',',$_POST['selectin']); $status ='Y'; $state_query = "UPDATE tbl_state set stat_status='$status' where stat_id IN ($stateids)"; $result = mysql_query($state_query); if($result) { echo "<script>alert('selected rows successfully updated');</script>"; echo "<script>window.location.href='state.php';</script>"; } } ?> <body class="page-header-fixed page-quick-sidebar-over-content "> <!-- BEGIN HEADER --> <?php include "header.php"; ?> <!-- END HEADER --> <div class="clearfix"> </div> <!-- BEGIN CONTAINER --> <div class="page-container"> <!-- BEGIN SIDEBAR --> <?php include "sidebar_menu.php"; ?> <!-- END SIDEBAR --> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM--> <div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> <h4 class="modal-title">Modal title</h4> </div> <div class="modal-body"> Widget settings form goes here </div> <div class="modal-footer"> <button type="button" class="btn blue">Save changes</button> <button type="button" class="btn default" data-dismiss="modal">Close</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <h3 class="page-title"> States <small>States listing</small> </h3> <div class="page-bar"> <ul class="page-breadcrumb"> <li> <i class="fa fa-home"></i> <a href="index.php">Home</a> <i class="fa fa-angle-right"></i> </li> <li> <a href="#">State</a> <i class="fa fa-angle-right"></i> </li> </ul> <div class="page-toolbar"> <div class="btn-group pull-right"> </div> </div> </div> <div class="portlet box green"> <div class="portlet-title"> <div class="caption"> <i class="fa fa-gift"></i>States </div> <div class="actions"> <div class="btn-group"> <img src="images/icon/add_icon.gif" width="12" height="12" /> <a href="add_state.php" class="add_link" style="color:#fff !important;">Add state </a> </div> </div> </div> </div> <form method="post" name="forma" enctype="multipart/form-data" id="forma" action="" onsubmit="return valida();"> <table class="table table-bordered table-striped"> <tr role="row" class=" filter heading"> <th width="3%" height="30" class="head_text">No.</th> <th width="10%" class="head_text">State Name</th> <th width="4%" class="head_text">Edit</th> <th width="4%" class="head_text">Delete</th> <th width="3%" height="30" class="head_text">Select</th> <?php $sql_users = "select * from tbl_state where stat_status='Y'"; //$usersquery = mysql_query($sql_users); $test = new MyPagina(50); $test->number_links = 5; $test->rows_on_page = 10; $test->extraqs = "&type=a"; $test->sql = $sql_users; // the (basic) sql statement (use the SQL whatever you like) $result1 = $test->get_page_result(); // result set $num_rows = $test->get_page_num_rows(); // number of records in result set $nav_info = $test->page_info("Result: %d - %d of %d records"); // information about the number of records on page (example: "Result: 10 - 20 of 100 records") $nav_links = $test->navigation(" | ", "currentStyle", false, false, false, true); // the navigation links (define a CSS class selector for the current link) $numbers_only = $test->navigation("", "current", true); // navigation links using number only $simple_nav_links = $test->back_forward_link(true); // the navigation with only the back and forward links, use true to use images $test->forw = "►"; $test->back = "◄"; $simple_nav_txt_links = $test->back_forward_link(); $total_recs = $test->get_total_rows(); // the total number of records (not used with this example) if(!empty($result1)) { if($num_rows>0) { for ($i = 0; $i < $num_rows; $i++) { $stat_id = mysql_result($result1, $i, "stat_id"); $statename = mysql_result($result1, $i, "stat_name"); ?> <tr class="row_color" id="row"> <td><?php echo $i+1;?></td> <td class="table_text"><?php echo $statename; ?></td> <td align="center" class="table_text" style="text-align:center;"><a href="editstate.php?id=<?php echo base64_encode($stat_id); ?>"><img src="images/icon/edit_icon.jpg" width="16" height="15" border="0" /></a></td> <td align="center"><?php echo '<a href="delete_state.php?id='.$stat_id.'" onclick="return confirm(\'Are you sure ?\')"><img src="../images/close.png"></a>'?> </td> <td align="center" class="table_text"> <input name="selecta[]" id="selecta<?php echo $i+1;?>" type="checkbox" value="<?php echo $stat_id;?>" /></td> </tr> <?php } ?> <tr></tr> <?php } } ?> </tr> </table> <div width="70%" class="pagena col-md-4" align="left"><?php echo "<p>".$nav_links."</p>\n"; ?></div> <div class="col-md-3"></div><div class="col-md-5" align="right"><input name="inactive" id="inactive" type="submit" class=" btn yellow update_button" value="Inactive" /> <input name="btn_iselect" type="button" class="btn red button_bg" value="Select All" onclick="javascript:checkAll('forma', true);" /> <input name="btn_idselect" type="button" class="btn green button_bg" value="Deselect All" onclick="javascript:checkAll('forma', false);" /> </div> </form> <br><br> <div class="portlet box green" style="margin-top:20px;"> <div class="portlet-title"> <div class="caption"> <i class="fa fa-gift"></i>Inactive States </div> <div class="actions"> <div class="btn-group"> </div> </div> </div> </div> <?php ?> <form method="post" name="formu" enctype="multipart/form-data" id="formu" action="" onsubmit="return valida();"> <table class="table table-bordered table-striped"> <tr role="row" class=" filter heading"> <th width="3%" height="30" class="head_text">No.</th> <th width="10%" class="head_text">State Name</th> <th width="4%" class="head_text">Edit</th> <th width="4%" class="head_text">Delete</th> <th width="3%" height="30" class="head_text">Select</th> <?php $sql_users1 = "select * from tbl_state where stat_status='N'"; //$usersquery1 = mysql_query($sql_users); $test1 = new MyPagina(50); $test1->number_links = 10; $test1->rows_on_page = 10; $test1->extraqs = "&type=u"; $test1->sql = $sql_users1; // the (basic) sql statement (use the SQL whatever you like) $result2 = $test1->get_page_result(); // result set //echo count($result2);die; $num_rows1 = $test1->get_page_num_rows(); // number of records in result set //echo $num_rows1;die; $nav_info1 = $test1->page_info("Result: %d - %d of %d records"); // information about the number of records on page (example: "Result: 10 - 20 of 100 records") $nav_links1 = $test1->navigation(" | ", "currentStyle", false, false, false, true); // the navigation links (define a CSS class selector for the current link) $numbers_only1 = $test1->navigation("", "current", true); // navigation links using number only $simple_nav_links1 = $test1->back_forward_link(true); // the navigation with only the back and forward links, use true to use images $test1->forw = "►"; $test1->back = "◄"; $simple_nav_txt_links1 = $test1->back_forward_link(); $total_recs1 = $test1->get_total_rows(); // the total number of records (not used with this example) if(!empty($result2)) { if($num_rows1>0) { $k=1; for ($i = 0; $i < $num_rows1; $i++) { $stat_id = mysql_result($result2, $i, "stat_id"); $statename = mysql_result($result2, $i, "stat_name"); ?> <tr class="row_color" id="row"> <td><?php echo $k;?></td> <td class="table_text"><?php echo $statename; ?></td> <td align="center" class="table_text" style="text-align:center;"><a href="editstate.php?id=<?php echo base64_encode($stat_id); ?>"><img src="images/icon/edit_icon.jpg" width="16" height="15" border="0" /></a></td> <td align="center"><?php echo '<a href="deleteuser.php?id='.$user_id.'" onclick="return confirm(\'Are you sure ?\')"><img src="../images/close.png"></a>'?> </td> <td align="center" class="table_text"> <input name="selectin[]" id="selectin<?php echo $i+1;?>" type="checkbox" value="<?php echo $stat_id;?>" /></td> </tr> <?php $k++;} ?> <tr></tr> <?php } else {?> <tr> <td height="100" align="center"><img src="images/no_record.gif" width="184" /></td> </tr><?php }}?> </tr> </table> <div width="70%" class="pagena col-md-4" align="left"><?php echo "<p>".$nav_links1."</p>\n"; ?></div> <div class="col-md-4"></div><div class="col-md-4"><input name="active" id="active" type="submit" class=" btn yellow update_button" value="Active" /> <input name="btn_aselect" id="selectall" type="button" class="btn red button_bg" value="Select All" onclick="javascript:checkAll('formu', true);"> <input name="btn_adselect" type="button" class="btn green button_bg" value="Deselect All" onclick="javascript:checkAll('formu', false);" /> </div> </form> <div class="clearfix"></div> <br> </div> <div class="page-footer"> <div class="page-footer-inner"> </div> <div class="scroll-to-top"> <i class="icon-arrow-up"></i> </div> </div> <script src="js/custom.js" type="text/javascript"></script> </body> </html>