- Joined
- Mar 30, 2018
- Messages
- 82
- Reaction score
- 44
- Points
- 18
I have developed Admin Credit Log section for xtream v.1.6
With this script you can view all the movements and top-ups of your resellers and your administrators.
I am available for all questions.
With this script you can view all the movements and top-ups of your resellers and your administrators.
I am available for all questions.
Code:
Create table credit_log ( you can import table credit log for xc v2)
Add file admin log with this code in www/dir/admin
<!--?php
define('MAIN_DIR', '/home/xtreamcodes/');
define('IPTV_PANEL_DIR', MAIN_DIR . 'iptv_xtream_codes/');
require_once(IPTV_PANEL_DIR . 'wwwdir/includes/utils.php');
$username = is_admin();
if (!$username) {
header('Location: ../index.php?error=NO_ADMIN');
}
$servername = "localhost";
$username = "xxxx";
$password = "xxxx";
$dbname = "xtream_iptvpro";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn--->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "select username,amount,credits_log.user_ope, from_unixtime(date) as data,notes from credits_log inner join reg_users on target_id = reg_users.id order by data DESC";
$result = $conn->query($sql);
?>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css">
<script type="text/javascript" src="bootstrap/jquery.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="DataTables/datatables.css">
<script type="text/javascript" src="DataTables/datatables.js"></script>
<script>
$(document).ready( function () {
$('#myTable').DataTable();
} );
</script>
<h1 style="text-align: center;padding-top: 6%;">Report Crediti Entrata/Uscita by KernelPanic</h1>
num_rows > 0) {
while($campo = $result->fetch_assoc()){
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
}echo "<table id="myTable" class="table table-striped table-condensed table-bordered table-rounded" style="padding:50px; width:50%;">
<tbody><tr style="background-color: #ff4400;color: white;">
<th scope="col">USERNAME RESELLER </th>
<th scope="col">CREDITS </th>
<th scope="col">USER MOVIMENTS</th>
<th scope="col">DATE</th>
<th scope="col">NOTES</th>
</tr>
<!--?php
if ($result---><tr><td>". $campo['username']."</td><td>". $campo['amount']."</td><td>". $campo['user_ope']."</td><td>". $campo['data']."</td><td>". $campo['notes']."</td></tr></tbody></table>";
} else {
echo "0 results";
}
$conn->close();
get_head();
?>
<!-- file picker -->
<div id="dialog-explorer" title="File Browser" style="display: none;">
<div id="dialogContent"></div>
</div>
<section id="secondary_bar">
<div class="user">
<p><!--?php echo $username['username'] ?--> (<a href="index.php?action=logout">Logout</a>)</p>
</div>
</section>
<!--?php get_sidebar_admin();?-->