D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
grandhou
/
www
/
admin
/
Filename :
edit-pkg1.php
back
Copy
<?php require_once "includes/includepath.php"; $objgen = new general(); $objPN = new page(1); /** Page Settings **/ $pagesize = 20; $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : "1"; if(isset($_GET['del'])) { $id= $_GET['del']; $img_cnt = $objgen->get_AllRowscnt("pkg_images1","AND pkg_id=".$id); if($img_cnt>0) { $img_arr = $objgen->get_AllRows("pkg_images1",0,$img_cnt,"id desc","AND pkg_id=".$id); foreach($img_arr as $key=>$val) { if(file_exists("../photos/thumb/".stripslashes($val['image']))) unlink("../photos/thumb/".stripslashes($val['image'])); $msg = $objgen->del_Row('pkg_images1','id='.$val['id']); } } $msg = $objgen->del_Row('tour_packages1','id='.$id); if($msg=="") { header("location:edit-pkg1.php?msg=2"); } } if($_GET['msg']==2) { $msg2 = "Pre-wedding details Deleted Successfully."; } if($_GET['msg']==1) { $msg2 = "Pre-wedding Details Updated Successfully."; } $where = ""; $row_count = $objgen->get_AllRowscnt("tour_packages1",$where); if($row_count>0) { $objPN->setCount($row_count); $objPN->pageSize($pagesize); $objPN->setCurrPage($page); $pages = $objPN->get(array(), 1, $_SERVER['PHP_SELF'], "text", "link_text"); $res_arr = $objgen->get_AllRows("tour_packages1",$pagesize*($page-1),$pagesize,"id desc",$where); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Admin| Edit Pre-Weddings</title> <link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"> <link rel="shortcut icon" href="upload/favicon.ico"> <link type="text/css" href="css/theme.css" rel="stylesheet"> <link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet"> <link type="text/css" href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'> </head> <body oncontextmenu="return false;"> <script> document.onkeydown = function(e) { if(event.keyCode == 123) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){ return false; } } </script> <?php include('include/header.php');?> <div class="wrapper"> <div class="container"> <div class="row"> <?php include('include/sidebar.php');?> <div class="span9"> <div class="content"> <?php if($row_count > $pagesize) { ?> <div class="pagination" align="center"> <?php echo $pages; ?> </div> <?php } ?> <div class="module"> <div class="module-head"> <h3>Manage Pre-Weddings</h3> </div> <div class="module-body table"> <?php if($msg2!="") { ?> <div class="alert alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <strong><?php echo $msg2; ?></strong> </div> <?php } ?> <br /> <table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-bordered table-striped display" width="100%"> <thead> <tr> <th>Sl. No.</th> <th>Heading</th> <th>List Image</th> <th>Edit</th> <th>Delete</th> </tr> </thead> <tbody> <?php if($row_count>0) { $n='1'; foreach($res_arr as $key=>$val) { ?> <tr> <td><?php echo $n;?></td> <td><?php echo stripslashes($val['heading']); ?></td> <td><img src="upload/<?php if($val['listimage']!==''){echo $val['listimage'];}else{echo "no-image.jpg";}?>" height="50" width="50"></td> <td> <a href="add-pkg1.php?edit=<?=$val['id']?>&page=<?=$page?>" ><i class="icon-edit"></i></a> </td> <td><a href="edit-pkg1.php?del=<?=$val['id']?>&page=<?=$page?>" role="button" onClick="return confirm('Are you want to delete this Pre Wedding Details?')"><i class="icon-trash"></i></a> </td> </tr> <?php $n=$n+1; } } else { ?> <tr> <td colspan="6">No Data.</td> </tr> <?php } ?> </tbody> </table> </div> <div class="pagination" align="center"> <?php if($row_count > $pagesize) { echo $pages; } ?> </div> <div class="modal small hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Delete Confirmation</h3> </div> <div class="modal-body"> <p class="error-text"><i class="icon-warning-sign modal-icon"></i>Are you sure you want to delete the Wedding?</p> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button> <button class="btn btn-danger" data-dismiss="modal">Delete</button> </div> </div> </div> </div><!--/.content--> </div><!--/.span9--> </div> </div><!--/.container--> </div><!--/.wrapper--> <?php include('include/footer.php');?> <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script> $(document).ready(function() { $('.datatable-1').dataTable(); $('.dataTables_paginate').addClass("btn-group datatable-pagination"); $('.dataTables_paginate > a').wrapInner('<span />'); $('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left shaded"></i>'); $('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right shaded"></i>'); } ); </script> </body>