Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require 'link.php';
- require 'req.php';
- ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
- @$user = $_SESSION['user'];
- if(@$_POST['rmv']){
- $cn = fopen($dir1.'/'.$user.'.log', 'w');
- fwrite($cn, '');
- fclose($cn);
- }
- @$pass = $_SESSION['pass'];
- if($user and $pass){
- if(checkLogin($user, $pass, $dir2)){
- $loggedin = true;
- }else{
- header("Location: index.php");
- die;
- }
- }else{
- header("Location: index.php");
- die;
- }
- if(@$_SESSION['error'] == '1'){
- $error = '<div id="closer" class="alert alert-dismissible alert-danger">
- <button type="button" onClick="document.getElementById(\'closer\').style.display = \'none\';"class="close" data-dismiss="alert">×</button>
- <strong>Oh snap!</strong> It looks like something went wrong.
- </div>';
- }elseif(@$_SESSION['error'] == '2'){
- $error = '<div id="closer" class="alert alert-dismissible alert-danger">
- <button type="button" onClick="document.getElementById(\'closer\').style.display = \'none\';"class="close" data-dismiss="alert">×</button>
- <strong>Oh snap!</strong> It looks like you don\'t have enough funds. Add some!
- </div>';
- }
- ?>
- <html>
- <head>
- <title>Order History</title>
- <?php
- include 'head.php';
- ?>
- </head>
- <body>
- <center>
- <?php require 'navbar.php'; echo @$error;?>
- <table style="width:80%; max-width:80%;" class="table table-striped table-hover ">
- <thead>
- <tr>
- <th>#</th>
- <th>Order #</th>
- <th>Link</th>
- <th>Status</th>
- <th>Time - H:M:S</th>
- <th>Info</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $file = file_get_contents($dir1.'/'.$_SESSION['user'].'.log');
- $exp = explode('`', $file);
- $x = 0;
- $tabel = '';
- if($exp){
- foreach($exp as $test){
- if($test <> null){
- $x++;
- $expl = explode('-', $test);
- $time = $_SERVER['REQUEST_TIME']-$expl[2];
- $time = gmdate("H:i:s", $time);
- if(strlen($expl[1]) > 75){
- $expl[1] = substr($expl[1],0,72).'...';
- }
- $file = json_decode(@file_get_contents('https://musicroot.org/services/api.php?key='.$key.'&order='.$expl[0]));
- if($file->status == false){
- @$file->status = 'API Error';
- }
- if($file->start_count === '0'){
- $isDone = 'Not Complete';
- }else{
- $isDone = 'Worked';
- }
- if($file->status == 'Canceled'){
- $isDone = 'Failed';
- }
- $tabel .= '<tr>';
- $tabel .= '<td>'.$x.'</td>';
- $tabel .= '<td>'.$expl[0].'</td>';
- $tabel .= '<td>'.$expl[1].'</td>';
- $tabel .= '<td>'.$file->status.'</td>';
- $tabel .= '<td>'.$time.'</td>';
- $tabel .= '<td>'.$isDone.'</td>';
- $tabel .= '</tr>';
- }
- }
- }
- if($tabel){
- echo $tabel;
- }
- ?>
- </tbody>
- </table>
- <form method="POST">
- <input type="hidden" value="1" name="rmv">
- <input type="submit" class="btn btn-danger" value="Remove All Entries">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement