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
/
public_html
/
admin
/
View File Name :
mg_clienttest.php
<?php include('config.php'); ?> <?php /* $con = mysql_connect('localhost', 'root', ''); mysql_select_db("ecomm", $con); */ error_reporting(0); ?> <?php $CID = $_GET['CID']; $view = mysql_query("select * from client where CID = '".$CID."'"); // for editing $data = mysql_fetch_array($view); if($_GET['SAI']){ $STS = $_GET['C_STS']; if($STS == 0){ $upd_sts = mysql_query("UPDATE client SET C_STS ='0' WHERE CID ='".$_GET['SAI']."'"); //for changing status } else{ $upd_sts = mysql_query("UPDATE client SET C_STS ='1' WHERE CID ='".$_GET['SAI']."'"); } } if($_GET['del_id']){ ?> <?php $del = mysql_query("delete from client where CID='".$_GET['del_id']."'"); //for deleting status if($del){?> <script> alert("Agent detail deleted sucessfully"); window.location= "mg_clienttest.php"; </script> <?php } if(!$del){?> <script> alert("Agent detail Not deleted sucessfully"); window.location= "mg_clienttest.php"; </script> <?php } } if($_POST['submit']){ $cname = mysql_real_escape_string($_POST['cname']); $cphone = mysql_real_escape_string($_POST['cphone']); $cemail = mysql_real_escape_string($_POST['cemail']); $cmsg = mysql_real_escape_string($_POST['cmsg']); if($_GET['CID']==""){ $ins = mysql_query("insert into client (C_NAME,C_PHONE,C_EMAIL,C_MSG) values('$cname','$cphone','$cemail','$cmsg')"); ?><script>alert("Inserted sucessfully"); </script><? } if($_GET['CID']!=""){ { $upd = mysql_query("update client set C_NAME='$cname',C_PHONE='$cphone',C_EMAIL='$cemail',C_MSG='$cmsg' WHERE CID ='".$CID."'"); } if($upd){?> <script>alert("updated sucessfully"); window.location ="mg_clienttest.php" </script> <?php } if(!$upd){?> <script>alert("Not updated sucessfully"); window.location ="mg_clienttest.php" </script> <?php } } } ?> <script> function del(id){ var del = confirm("Are you sure Want to delete"); if(del){ window.location.href = "mg_clienttest.php?del_id="+id+"&del=1"; } else{ window.location.href = "mg_clienttest.php"; } } </script> <!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]--> </head> <script type="text/javascript" src="js/tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init({ selector: "textarea", themes: "modern", forced_root_block : 'p' plugins: [ "advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste" ], toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" }); </script> <script> function getstate(cid){ $.ajax({ type: "GET", url: "../get_state.php?cid="+cid, success: function(result){ $("#state").html(result); } }); } function getcity(sid){ alert $.ajax({ type: "GET", url: "../get_city.php?sid="+sid, success: function(result){ $("#city").html(result); } }); } </script> <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-3 col-lg-2 sidebar"> <form role="search"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search"> </div> </form> <? include('header.php');?> </div><!--/.sidebar--> <div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main"> <div class="row"> <ol class="breadcrumb"> <li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li> <li class="active">Manage Client Testmonial Details</li> </ol> </div><!--/.row--> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">Add Client Testmonial</h2> </div> </div><!--/.row--> <section class="content"> <div class="row"> <!-- left column --> <div class="col-xs-12"> <!-- general form elements --> <div class="box box-primary"> <!-- form start --> <div class="container"> <form role="form" method="post" action="" enctype="multipart/form-data"> <div class="box-body"> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Name</label> <input type="text" class="form-control" name="cname" value="<?php echo $data['C_NAME']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Phone Number</label> <input type="text" class="form-control" name="cphone" value="<?php echo $data['C_PHONE']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Email-ID</label> <input type="email" class="form-control" name="cemail" value="<?php echo $data['C_EMAIL']; ?>"> </div> <div class="form-group col-sm-11"> <label for="exampleInputEmail1">Message</label> <textarea name="cmsg" class="form-control" id="pageBody" rows="8"><?php echo $data['C_MSG']; ?></textarea> </div> <div class="box-footer col-sm-11"> <button type="submit" name="submit" value="submit" class="btn btn-primary">Submit</button> <button type="reset" class="btn btn-primary">Reset</button> </div> </div> </form> </div> </div> </div> </div> </section> <hr> <div class="row" style="position: absolute;width:100%"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading">Agent Client Testmonial</div> <div class="panel-body"> <table 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 data-field="name" data-sortable="true">Name</th> <th data-field="cname" data-sortable="true">Message</th> <th data-field="status" data-sortable="true">Status</th> <th data-field="action" data-sortable="true">Action</th> </tr> </thead> <tbody> <?php $table = mysql_query("select * from client"); $CID=1; while($row=mysql_fetch_array($table)) { ?> <tr> <td></td> <td><?php echo $CID;?></td> <td><?php echo $row['C_NAME'];?></td> <td><?php echo $row['C_MSG'];?></td> <td><a href= "mg_clienttest.php?CID=<?php echo $row['CID'];?>">Edit</a>/<a href="#" onclick="del(<?php echo $row['CID'];?>)">Delete</a></td> <td><?php if($row['C_STS']==1) {?> <a href = "mg_clienttest.php?C_STS=0&SAI=<?php echo $row['CID'];?>">Active</a> <?php } else {?> <a href = "mg_clienttest.php?C_STS=1&SAI=<?php echo $row['CID'];?>">InActive </a> <?php } ?></td> </tr> <?php $CID++; }?> </tbody> </table> </div> </div> </div> </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> $(document).ready(function() { $('ul.subcat').hide(); $('li').click(function(event) { event.stopPropagation(); $('> ul', this).toggle(); }); }); </script> </body> </html>