Jump to content

Problema Nu pot accesa Profile-ul.


DarkWind
 Share

Recommended Posts

  • Username: DarkWind
  • Problema: nu pot apasa pe Faction History, vehicles si restu, Admin Tool.
  • Imagini/Videoclipuri cu problema: https://imgur.com/a/giBFVaq
  • Cod sursă: Panel Bluffs v3.
  • Alte detalii: 
    
    
    <?php
    
    if(!defined('panel'))
    
    	die('Nope.');
    
    if(!isset($_SESSION['user']) && !isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'login\'/>';
    
    if(isset(Config::$_url[1])) $user = Config::$_url[1];
    
    if(!isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'\'/>';
    
    $q = Config::$g_con->prepare('SELECT * FROM `users` WHERE `name` = ?');
    
    $q->execute(array(Config::$_url[1]));
    
    if(!$q->rowCount()) {
    
    	echo '
    <section class="content">
    <div class="page-content"><div class="row-fluid"><div class="span12">
    
    	<div class="alert alert-danger">This user doesn\'t exist.</div></section>';
    
    	return;
    
    }
    
    $data = $q->fetch(PDO::FETCH_OBJ);
    
    
    
    //include 'inc/config.php';
    
    $respect = $data->Level*3+3;
    
     ?> 
    <title><?php echo Config::$_SITE_NAME; ?> - <?php echo $user;?>'s profile</title>
    
    <section class='content'>
    <?php 
    	if(isset($_POST['jail'])) {
    		if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    			if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
    			else {
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    					echo '<div class="alert alert-success">Jucatorul a primit jail cu succes.</div>';
    					if($_POST['duration']) {
    						$duration = $_POST['duration'];
    					}
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    					$q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
    					$q->execute(array(0,$duration,3,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
    					
    					$q = Config::$g_con->prepare('UPDATE `users` SET `Jailed` = ? AND `JailTime` = ? WHERE `id` = ?');
    					$q->execute(array(2,Config::getID('users','JailTime',Config::$_url[1])+$duration,Config::getID('users','id',Config::$_url[1])));
    					
    					echo '<meta http-equiv="refresh" content="2">';		
    						}
    	}
    	if(isset($_POST['panelblock'])) {
    		if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    			if(Config::getID('users','panelblock',Config::$_url[1]) == 1 || Config::getID('users','Admin',Config::$_url[1]) > Config::getData('users','Admin',$_SESSION['user'])) echo '<div class="alert alert-danger">Contul este deja suspendat.</div>';
    			else if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
    			else {
    
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    					echo '<div class="alert alert-success">Jucatorul a primit suspend cu succes.</div>';
    			$duration = $_POST['duration'];
    			if($duration != 0) $duration = time()+$duration*86400; 
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    					$q = Config::$g_con->prepare('INSERT INTO `panelactions2` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
    					$q->execute(array(0,$duration,69,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
    					
    					$q = Config::$g_con->prepare('UPDATE `users` SET `panelblock` = 1 WHERE `id` = ?');
    					$q->execute(array(Config::getID('users','id',Config::$_url[1])));
    					
    					echo '<meta http-equiv="refresh" content="2">';		
    			}
    	}
    	if(isset($_POST['ban'])) {
    		if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1  && Config::getID('users','Admin',Config::$_url[1]) < Config::getData('users','Admin',$_SESSION['user']))
    		if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
    		else {
    			echo '<div class="alert alert-success">Jucatorul a primit ban cu succes.</div>';
    			if($_POST['duration'] == 0) {
    				$permanentban = 1;	
    				$duration = 0; 
    			} else {
    				$permanentban = 0;	
    				$duration = $_POST['duration'];		
    			}
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    
    
    					$q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
    					$q->execute(array(0,$duration,1,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
    					
    					$q = Config::$g_con->prepare('INSERT INTO `bans` (
    					`IP`, 
    					`Active`, 
    					`Permanent`, 
    					`IPBan`, 
    					`Time`, 
    					`PlayerName`, 
    					`Days`, 
    					`AdminName`, 
    					`Reason`
    					) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
    					$q->execute(array(
    					Config::getID('users','IP',Config::$_url[1]),
    					1,
    					$permanentban,
    					$_POST['banip'],
    					(time()+$duration*86400),
    					Config::getID('users','name',Config::$_url[1]),
    					$duration,
    					Config::getData('users','name',$_SESSION['user']),
    					$_POST['reason']
    					));
    
    
    					if($_POST['duration'] == 0) { 
    						$durata = "permanent"; 
    					} else { 
    						$durata = "". $_POST['duration'] ." days"; 
    					}
    					
    					echo '<meta http-equiv="refresh" content="2">';					
    					}
    				
    	}
    	if(isset($_POST['warn'])) {
    		if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    			if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
    			else {
    				echo '<div class="alert alert-success">Jucatorul a primit warn cu succes.</div>';
    				if($_POST['duration']) {
    					$duration = 0;
    				} else { $duration = 0; }
    				
    
    				$q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
    				$q->execute(array(0,$duration,4,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
    				
    				$q = Config::$g_con->prepare('UPDATE `users` SET `Warnings` = ? WHERE `id` = ?');
    				$q->execute(array(Config::getID('users','Warnings',Config::$_url[1])+1,Config::getID('users','id',Config::$_url[1])));
    				
    				echo '<meta http-equiv="refresh" content="2">';		
    				
    					}
    				
    		}
    		if(isset($_POST['mute'])) {
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    				if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
    				else {
    			if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
    					echo '<div class="alert alert-success">Jucatorul a primit mute cu succes.</div>';
    					if($_POST['duration']) {
    						$duration = $_POST['duration'];
    					}
    
    
    					$q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
    					$q->execute(array(0,$duration,5,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
    					
    					$q = Config::$g_con->prepare('UPDATE `users` SET `Muted` = ? AND `MuteTime` = ? WHERE `id` = ?');
    					$q->execute(array(1,Config::getID('users','MuteTime',Config::$_url[1])+$duration,Config::getID('users','id',Config::$_url[1])));
    					
    					echo '<meta http-equiv="refresh" content="2">';		
    						
    					}
    		}
    ?>
    <?php
       
    
            $q = Config::$g_con->prepare('SELECT * FROM `bans` WHERE `PlayerName` = ? AND `Active` = 1 LIMIT 1');
    		
    
            $q->execute(array($data->name));
    
            	if($q->rowCount()) 
    
    			while($row = $q->fetch(PDO::FETCH_OBJ)) {
    
    				$date = $row->BanTimeDate;
    
    					if($row->Permanent == 1)	{
    
    						$expira = "Contul este banat permanent (banul nu va expira automat)";
    
    						} else {
    
                            $expira = "Banul expira pe data de <b>". gmdate("Y-m-d H:i", $row->Time) ."</b>";
    
    					}				
    
    				$numeadmin = $row->AdminName; $motiv = $row->Reason;			
    
                    echo "
    
    					<div class='alert alert-danger'>
    
    					<b>This account is banned.</b><br/><br/>
    
    					Banat de: <b>$numeadmin</b> pe data de <b>$date</b>, motivul banului: <b>$motiv</b>.<br/>
    
    					$expira.</div> ";
    
    			}
    	?>
    	<?php
       
    
            $q = Config::$g_con->prepare('SELECT * FROM `panelactions2` WHERE `actionid` = 69 AND `playername` = ?');
    		
    
            $q->execute(array($data->name));
    
            	if($q->rowCount()) 
    
    			while($row = $q->fetch(PDO::FETCH_OBJ)) {
    
    					if($row->actiontime == 0)	{
    
    						$expira = "Contul este suspendat permanent (suspend-ul nu va expira automat)";
    
    						} else {
    
                            $expira = "Suspend-ul expira pe data de <b>". gmdate("Y-m-d H:i", $row->actiontime) ."</b>";
    
    					}				
    
    				$numeadmin = $row->givername; $motiv = $row->reason;			
    
                    echo "
    
    					<div class='alert alert-danger'>
    
    					<b>This account is suspended.</b><br/><br/>
    
    					Suspended by: <b>$numeadmin</b>, motivul suspend-ului: <b>$motiv</b>.<br/>
    
    					$expira.</div> ";
    
    			}
    	?>
        <div class = "row">
    	<div class="col-md-12">
    		<div class="col-md-3">
    			<div class="box box-primary" id="newboxstyle">
    				<div class="box-body">
    					<div class="col-xs-12" style="padding-bottom: 5%;">
    						<div class="" style="display:block; white-space: nowrap;">
    							<div class="col-md-12">
    								<center>
    									<div>
    										<img src="<?php echo Config::$_PAGE_URL; ?>assets/images/avatars/<?php echo Config::getID('users','Model',$data->name); ?>.png" class="user-image" width="50px" height="50px" alt="User Image">
    									</div>
    									<h3 class="profile-username">
    										<?php echo (!$data->Status ? "<i class='fa fa-circle text-danger' data-toggle='tooltip' title='offline'></i> " : "<i class='fa fa-circle text-success data-toggle='tooltip' title='offline''></i> "); ?> 
    										<?php echo $data->name; ?> 
    									</h3>
    								</center>
    							</div>
    							<div class="col-md-12 col-lg-12">
    								<center>
    									<?php if($data->name == "Ionut") { ?>		
    									<span class="label bg-green"> <font style="font-family:verdana;"><i class="fa fa-code"></i> scripter </font></span><br>
    									<?php } if($data->Admin == 7 && $data->name != "Ionut") { ?>
    									<span class="label bg-green"><font style="font-family:verdana;"><i class="fa fa-shield"></i> owner </font></span><br>
    									<?php } else if($data->Admin > 0 ) { ?>	
    									<span class="label bg-black"> <font style="font-family:verdana;"><i class="fa fa-cogs"></i> admin level <?php echo $data->Admin; ?></font></span><br>
    									<?php } if($data->Helper > 0 ) { ?>	
    									<span class="label bg-black"><font style="font-family:verdana;"><i class="fa fa-comment"></i> helper level <?php echo $data->Helper; ?></font></span><br>
    									<?php } if($data->Premium == 1) { ?>	
    									<span class="label bg-yellow"><font style="font-family:verdana;"><i class="fa fa-star"></i> premium user</font></span><br>
    									<?php } if($data->Premium == 2 ) { ?>	
    									<span class="label bg-yellow"><font style="font-family:verdana;"><i class="fa fa-star"></i> vip user</font></span><br>
    									<?php } if($data->CRank == 7) { ?>
    									<span class="label" style="background: #00aa00"><font style="font-family:verdana;"><a href="<?php echo Config::$_PAGE_URL; ?>clan/<?php echo $data->Clan ?>" style="color: #FFF"><i class="fa fa-group"></i> clan owner</a>
    										</font>
    									</span>
    									<br/>
    									<?php } if(isset($_SESSION['user']) && Config::$_url[1] != Config::getData('users','name',$_SESSION['user'])) { ?>
    									<hr style="border:0.7px solid #000">
    									<a href="<?php echo Config::$_PAGE_URL; ?>createcomplaint/<?php echo $data->id?>" target="_blank" class="btn btn-danger btn-block"><b>reclama player</b></a> 
    									<?php }?>
    								</center>
    							</div>
    						</div>
    					</div>
    				</div>
    			</div>
    		</div>
    		<div class="nav-tabs-custom col-md-8">
    			<ul class="nav nav-tabs">
    				<li class="active"><a href="#maininfo" data-toggle="tab" aria-expanded="false"><i class = "fa fa-bullseye"></i> Main Info</a></li>
    				<li class=""><a href="#factionhistory" data-toggle="tab" aria-expanded="false"><i class = "fa fa-feed"></i> Faction History</a></li>
    				<li class=""><a href="#properties" data-toggle="tab" aria-expanded="false"><i class = "fa fa-usd"></i> Properties</a></li>
    				<li class=""><a href="#vehicles" data-toggle="tab" aria-expanded="false"><i class = "fa fa-car"></i> Vehicles</a></li>
    				<?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1) {	?>
    				<li class=""><a href="#admintools" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Admin Tools</a></li>
    				<?php } if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1) {	?>
    				<li class=""><a href="#ppunish" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Player Punish</a></li>
                    <?php } if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) {	?>
                    <li class=""><a href="#piplogs" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Player IP Logs</a></li>
                    <?php } ?>
    			</ul>
    			<hr style="border:0.7px solid #000">
    			<div class="tab-content">
    				<div class="tab-pane active" id="maininfo">
    					<div class="box-body table-responsive no-padding">
    						<table class="table table-striped">
    						<tbody>	
    	                        <ul class="list-group">
    								<li class="list-group-item">
    									<b>Faction</b> <a class="pull-right"><?php echo Config::$factions[$data->Member] ?><?php if($data->Member >=1) { ?>, rank <?php echo $data->Rank; ?> <?php } ?></a>
    								</li>
    								<li class="list-group-item">
    									<b>Level</b> <a class="pull-right"><?php echo $data->Level; ?></a>
    								</li>
    								<li class="list-group-item">
    									<b>Played Hours</b> <a class="pull-right"><?php echo number_format($data->ConnectedTime, 2, '.', ''); ?></a>
    								</li>
    								<?php if($data->Clan>0) { ?>
    								<li class="list-group-item">
    									<b>Clan</b> <a href="<?php echo Config::$_PAGE_URL; ?>clan/<?php echo $data->Clan ?>" class="pull-right"><?php echo Config::getClan('clans','clanName',$data->Clan)?>, rank <?php echo $data->CRank?></a>
    								</li>
    								<?php }?>
    								<li class="list-group-item">
    									<b>Phone number</b> <a class="pull-right"> <?php echo $data->PhoneNr; ?></a>
    								</li>
    								<li class="list-group-item">
    									<b>Registered</b> <a class="pull-right"><?php
    										$date = date_create($data->RegisterDate);
                                            echo Config::time_elapsed_string(date_format($date, 'd-M-Y H:i:s'), false);
    										?></a>
    								</li>
    								<li class="list-group-item">
    									<b>Last Online</b> <a class="pull-right"><?php
    										$date = date_create($data->lastOn);
                                            echo Config::time_elapsed_string(date_format($date, 'd-M-Y H:i:s'), false);
    										?></a>
    								</li>
    								<li class="list-group-item">
    									<b>Faction Punish</b> <a class="pull-right"><?php echo $data->FPunish; ?></a>
    								</li>
    								<li class="list-group-item">
    									<b>Warnings</b> <a class="pull-right"><?php echo $data->Warnings; ?>/3</a>
    								</li>
    								<li class="list-group-item">
    									<b>Job</b> <a class="pull-right"><?php echo Config::$jobs[$data->Job]; ?></a>
    								</li>
    		                        <?php if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
    								<li class="list-group-item">
    									<b>Premium</b> <a class="pull-right"><?php echo (!$data->Premium ? "No ($data->PremiumPoints premium points)" : "Yes ($data->PremiumPoints premium points)"); ?></a>
    								</li>
    		                        <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 1) { ?>
    								<li class="list-group-item">
    									<b>Premium</b> <a class="pull-right"><?php echo (!$data->Premium ? "No ($data->PremiumPoints premium points)" : "Yes ($data->PremiumPoints premium points)"); ?></a>
    								</li>
    		                        <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 1) { ?>
    								<li class="list-group-item">
    									<b>IP/GPCI</b> <a class="pull-right"><?php echo $data->IP; ?> / <?php echo $data->gpci; ?></a>
    								</li>
    		                        <?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
    								<li class="list-group-item">
    									<b>Email</b> <a class="pull-right"><?php if($data->Email == "email@yahoo.com") { echo "(UNCONFIRMED)"; } else echo $data->Email; ?> <a href="<?php echo Config::$_PAGE_URL; ?>changemail"><i class="ace-icon fa fa-edit"></i></a></a>
    								</li>
    		                        <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 1) { ?>
    								<li class="list-group-item">
    									<b>Email</b> <a class="pull-right"><?php if($data->Email == "email@yahoo.com") { echo "(UNCONFIRMED)"; } else echo $data->Email; ?></a>
    								</li>
    								<?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
    								<li class="list-group-item">
    									<b>Money</b> <a class="pull-right">$<?php echo number_format($data->Money,0,'.','.'); ?> / $<?php echo number_format($data->Bank,0,'.','.'); ?></a>
    								</li>
    		                        <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 1) { ?>
    								<li class="list-group-item">
    									<b>Money</b> <a class="pull-right">$<?php echo number_format($data->Money,0,'.','.'); ?> / $<?php echo number_format($data->Bank,0,'.','.'); ?></a>
    								</li>
    								<?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
    								<li class="list-group-item">
    									 <?php
    				                    	$nrz = 0;
    				                    	$countz = 0;
    				                        $q = Config::$g_con->prepare('SELECT * FROM `timeplayed` WHERE `pid` = ?');
    
    										$q->execute(array(Config::getID('users','id',Config::$_url[1])));
    
    										while($row = $q->fetch(PDO::FETCH_OBJ)) 
    											if($row->unixtime) {
    												$now = time(); // or your date as well
    												$your_date = $row->unixtime;		
    												$datediff = $now - $your_date;
    												 
    												$countz = floor($datediff / (60*60*24) );
    												if($countz <= 7) $nrz+=$row->time;
    											}
    										$nrz/=3600;
    				                     ?>
    									<b>Last 7 days activity</b> <a class="pull-right"><?php echo number_format($nrz, 2, '.', ''); ?> hours</a>
    								</li>
    		                        <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 1) { ?>
    								<li class="list-group-item">
    									<?php
    				                    	$nrz = 0;
    				                    	$countz = 0;
    				                        $q = Config::$g_con->prepare('SELECT * FROM `timeplayed` WHERE `pid` = ?');
    
    										$q->execute(array(Config::getID('users','id',Config::$_url[1])));
    
    										while($row = $q->fetch(PDO::FETCH_OBJ)) 
    											if($row->unixtime) {
    												$now = time(); // or your date as well
    												$your_date = $row->unixtime;		
    												$datediff = $now - $your_date;
    												 
    												$countz = floor($datediff / (60*60*24) );
    												if($countz <= 7) $nrz+=$row->time;
    											}
    										$nrz/=3600;
    				                     ?>
    									<b>Last 7 days activity</b> <a class="pull-right"><?php echo number_format($nrz, 2, '.', ''); ?> hours</a>
    								</li>
    								<?php } ?>
    							</ul>								
    						</tbody>
    					</table>
    					</div>
    				</div>
    				<div class="tab-pane" id="factionhistory">
    					<div class="box-body table-responsive no-padding">
    						<table class="table table-striped">
    							<tbody>	
    								<ul class="timeline timeline-danger">
    	                        		<li class="time-label">
    										<span class="bg-blue">
    										<?php echo date("d M Y"); ?>
    										</span>
    									</li>
    									<?php
    	                        			$s = Config::$g_con->prepare('SELECT * FROM `faction_logs` WHERE `player` = ? ORDER BY `id` DESC');
    	                        			$s->execute(array(Config::getID('users','id',$data->name)));
    	                        			while($flog = $s->fetch(PDO::FETCH_OBJ))
    	                        		{	?>
    			                        <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3){ ?>
    			                        <?php if($flog->deleted == 1 && isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
    			                        <?php } else { ?>
    			                        <?php } ?>
    				                        <li>
    											<?php if(strpos($flog->Text, 'is now the leader') == true)
    	                                            echo "<i data-toggle='tooltip' title='joined' class='fa fa-chevron-circle-up bg-green'></i>";
    	                                            else if(strpos($flog->Text, 'joined the group') == true)
    	                                               echo "<i data-toggle='tooltip' title='joined' class='fa fa-chevron-circle-up bg-green'></i>";
    	                                           else 
    	                                            echo "<i data-toggle='tooltip' title='uninvited' class='fa fa-chevron-circle-down bg-red'></i>";
    	                                        ?>
    											<div class="timeline-item">
    												<span class="time"><i class="fa fa-clock-o"></i> <?php echo $flog->time; ?></span>
    												<div class="timeline-body">
    													<?php echo $flog->Text; ?>
    													<?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
    				                        			<a href="<?php echo Config::$_PAGE_URL; ?>editfh/<?php echo $flog->id; ?>" class="ace-icon fa fa-edit" title="Edit FH"></a>
    												</div>
    											</div>
    										</li>
    			                        <?php } ?>
    			                        <?php } else { ?>
    			                        <?php if($flog->deleted == 0) { ?>
    										<li>
    											<?php if(strpos($flog->Text, 'is now the leader') == true)
    	                                            echo "<i data-toggle='tooltip' title='joined' class='fa fa-chevron-circle-up bg-green'></i>";
    	                                            else if(strpos($flog->Text, 'joined the group') == true)
    	                                               echo "<i data-toggle='tooltip' title='joined' class='fa fa-chevron-circle-up bg-green'></i>";
    	                                           else 
    	                                            echo "<i data-toggle='tooltip' title='uninvited' class='fa fa-chevron-circle-down bg-red'></i>";
    	                                        ?>
    											<div class="timeline-item">
    												<span class="time"><i class="fa fa-clock-o"></i> <?php echo $flog->time; ?></span>
    												<div class="timeline-body">
    													<?php echo $flog->Text; ?>
    												</div>
    											</div>
    										</li>
    			                        <?php } ?>
    			                        <?php } ?>
    			                        <?php } ?>	
    			                        <li>
    			                            <i data-toggle="tooltip" title="<?php
    											$date = date_create(Config::getData('users','RegisterDate',$_SESSION['user']));
    											echo date_format($date, 'd M Y');
    											?>" class="fa fa-clock-o bg-gray">
    			                            </i>
    			                            
    			                        </li>
                           			</ul>									
    							</tbody>
    						</table>
    					</div>
    				</div>
    				<div class="tab-pane" id="properties">
    					<div class="box-body">
    			           	<div class="info-box">
    								<br><left><span class="info-box-number"><small>						
    								<?php
    
    								if($user != Config::getData('houses','Owner',$data->House)) {
    
    								if(isset($_SESSION['user']) && (Config::getData('users','name',$_SESSION['user']) == $user))
    
    									echo 'You don\'t have a house.';
    
    								else 
    
    									echo 'This user doesn\'t have a house.';
    
    								} else {
    
    									$s = Config::$g_con->prepare('SELECT * FROM `houses` WHERE `Owner` = ?');
    
    									$s->execute(array($data->name));
    
    									while($house = $s->fetch(PDO::FETCH_OBJ)) 
    
    									{ ?>
    									<div class="box box-primary" id="newboxstyle">
    										<div class="box-header">
    											<h3 class="box-title">
    												House
    											</h3>
    										</div>
    										<div class="box-body table-responsive">
    											<table class="table table-condensed table-hover">
    												<thead>
    													<tr>
    														<td>#ID</td>
    														<td>Rent</td>
    														<td>Price</td>
    														<td>Type</td>
    														<td>Options</td>
    													</tr>
    												</thead>
    												<tbody>
    													<tr>
    														<td><b><?php echo $house->ID ?></b></td>
    														<td><b>$<?php echo  number_format($house->Rent,0,'.','.') ?></b></td>
    														<td><b><?php if($house->Owned==0) { ?>$<?php echo number_format($row->Value,0,'.','.') ?><?php }?>
    
    																<?php if($house->Owned==1) { ?>Not for sale<?php }?></b></td>
    														<td><b><?php if($house->InteriorType==0) { ?>Small<?php }?>
    
    																<?php if($house->InteriorType==1) { ?>Medium<?php }?>
    																<?php if($house->InteriorType==2) { ?>Big<?php }?></b></td>
    														<td><a  href="#" type="button" data-toggle="modal" data-target="#modal<?php echo $house->ID ?>">Display on map</a>
    															<div id="modal<?php echo $house->ID ?>" class="modal fade" role="dialog">
    															  <div class="modal-dialog">
    															    <div class="modal-content">
    															      <div class="modal-header">
    															        <button type="button" class="close" data-dismiss="modal">&times;</button>
    															        <center><h2 class="modal-title">House <?php echo $house->ID ?></h2></center>
    															      </div>
    															      <div class="modal-body">
    															        <center><img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $house->Entrancex ?>&y=<?php echo $house->Entrancey ?>" alt="Smiley face" height="500" width="550"></center>
    															      </div>
    															      <div class="modal-footer">
    															        <center><button type="button" class="btn btn-primary" data-dismiss="modal">Close</button></center>
    															      </div>
    															    </div>
    															  </div>
    															</div></td>
    													</tr>
    												</tbody>
    											</table>
    										</div>
    									</div>
    									<?php	}}?>
    								</small></span></center>
    				        </div>
    						<div class="">
    				              <div class="info-box">
    									<div class = "">				
    										<?php
    
    											if($data->Bizz == 255) {
    
    											if(isset($_SESSION['user']) && (Config::getData('users','name',$_SESSION['user']) == $user))
    
    												echo '<b>You don\'t have a business.</b>';
    
    											else 
    
    												echo '<b>This user doesn\'t have a business.</b>';
    
    											} else {
    
    													$s = Config::$g_con->prepare('SELECT * FROM `bizz` WHERE `Owner` = ?');
    
    													$s->execute(array($data->name));
    
    													while($bizz = $s->fetch(PDO::FETCH_OBJ)) 
    
    													{	?>					
    
    														<b><div class="box box-primary">
    															<div class="box-header">
    																<h3 class="box-title">
    																Business
    																</h3>
    															</div>
    															<div class="box-body table-responsive">
    																<table class="table table-condensed table-hover">
    																	<thead>
    																		<tr>
    																			<td>#ID</td>
    																			<td>Fee</td>
    																			<td>Price</td>
    																			<td>Options</td>
    																		</tr>
    																	</thead>
    																	<tbody>
    																		<tr>
    																			<td><b><?php echo $bizz->ID ?></b></td>
    																			<td><b>$<?php echo number_format($bizz->EntranceCost,0,'.','.') ?></b></td>
    																			<td><b><?php echo $bizz->BuyPrice ?></b></td>
    																			<td><a  href="#" type="button" data-toggle="modal" data-target="#modalb<?php echo $bizz->ID ?>">Display on map</a>
    																					<div id="modalb<?php echo $bizz->ID ?>" class="modal fade" role="dialog">
    																					  <div class="modal-dialog">
    																					    <div class="modal-content" id="clan_descedit">
    																					      <div class="modal-header">
    																					        <button type="button" class="close" data-dismiss="modal">&times;</button>
    																					        <center>
    																					        	<h2 class="modal-title">House <?php echo $bizz->ID ?></h2>
    																					    	</center>
    																					      </div>
    																					      <div class="modal-body">
    																					        <center><img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $bizz->EntranceX ?>&y=<?php echo $bizz->EntranceY ?>" alt="Smiley face" height="500" width="550"></center>
    																					      </div>
    																					      <div class="modal-footer">
    																					        <center><button type="button" class="btn btn-primary" data-dismiss="modal">Close</button></center>
    																					      </div>
    																					    </div>
    																					  </div>
    																					</div></td>
    																		</tr>
    																	</tbody>
    																</table>
    															</div>
    															<center></center>
    														</div></b>
    													<?php }					
    
    											}
    
    										?>
    						          </div>
    					        </div>
    						</div>
    					</div>
    				</div>
    				<div class="tab-pane" id="vehicles">
    					<div class="box-body table-responsive no-padding">
    						<table class="table table-striped">
    							<tbody>	
    			                   <?php
    
    			                   		$q = Config::$g_con->prepare('SELECT * FROM `cars` WHERE `Owner` = ? AND `Active` = 1');
    
    			                   		$q->execute(array($data->name));
    
    			                   		if(!$q->rowCount()) {
    
    			                        if(!isset($_SESSION['user']))
    
    			                          echo '<p>This user has no vehicles.</p>';
    
    			                        else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
    
    			                          echo '<p>You have no vehicles.</p>';
    
    			                        else 
    
    			                          echo '<p>No personal vehicles owned.</p>';
    
    			                   		} else {
    
    										echo '
    
    											<table class="table table-striped">
    
    												<thead>
    
    													<tr>
    
    														<th>Image</th>
    
    														<th class="hidden-480">Vehicle Name</th>
    
    														<th class="hidden-100">Age</th>
    
    														<th class="hidden-100">Odometer</th>
    
    														<th class="hidden-100">Colours</th>
    
    														<th class="center">Neon</th>
    
    														<th class="center">Options</th>
    
    													</tr>
    
    												</thead>
    
    											<tbody>';
    
    										$s = Config::$g_con->prepare('SELECT * FROM `cars` WHERE `Owner` = ? AND `Active` = 1');
    
    										$s->execute(array($data->name));
    
    										while($car = $s->fetch(PDO::FETCH_OBJ)) 
    										{ ?>
    											<?php if($car->VIP >= 1) { ?>
    											<tr class="danger">
    											<?php } else { ?>
    											<tr>
    											<?php } ?>
    											<td class="center">
    												<img src="<?php echo Config::$_PAGE_URL ?>assets/images/vehicles/Vehicle_<?php echo $car->Model ?>.jpg" alt="490" style="height: 65px"/>
    											</td>
    											<td>
    												<?php echo Config::$namevehicles[$car->Model]; ?> (ID: <?php echo $car->ID ?>)
    												<?php if($car->VIP >=1) { ?>
    												<p>
    												<br>
    												<b class="text-warning">VIP</b>
    												<br>
    												<?php if(!is_null($car->VipText)) { ?>
    												Text:
    												<?php echo $car->VipText;?>
    												<?php } } ?>
    											</td>
    											<td>
    												<?php 
    													$then = gmdate("Y-m-d", $car->BuyTime);		
    
    													$then = strtotime($then);
    
    													$now = time();
    													 
    													$difference = $now - $then;
    													 
    													$days = floor($difference / (60*60*24) );
    													 
    													echo $days;
    													 ?> days
    											</td>
    											<td>
    												<?php echo number_format($car->KM,0,'.','.') ?> km
    											</td>
    											<td>
    												<i class="fa fa-square" style="color: <?php echo Config::$vehColors[$car->ColorOne] ?>; font-weight: bold;" data-toggle="tooltip" title="<?php echo $car->ColorOne ?>"></i>
    												<i class="fa fa-square" style="color: <?php echo Config::$vehColors[$car->ColorTwo] ?>; font-weight: bold;" data-toggle="tooltip" title="<?php echo $car->ColorTwo ?>"></i>
    											</td>
    											<td>
    												<?php if($car->Neon == 1) echo "<font color='E02121'>red</font>";
    													else if($car->Neon == 2) echo "<font color='28E128'>green</font>";
    													else if($car->Neon == 3) echo "<font color='DCE617'>yellow</font>";
    													else if($car->Neon == 4) echo "<font color='E617CA'>pink</font>";
    													else if($car->Neon == 5) echo "<font color='1E5EE0'>blue</font>";
    													else echo "none";
    												?>
    												<?php ?>
    											</td>
    											<td>
    												<a href="#" type="button" data-toggle="modal" data-target="#modalv<?php echo $car->ID ?>">display on map</a>
    												<div id="modalv<?php echo $car->ID ?>" class="modal fade" role="dialog">
    												  <div class="modal-dialog">
    												    <div class="modal-content" id="clan_descedit">
    												      <div class="modal-header">
    												        <button type="button" class="close" data-dismiss="modal">&times;</button>
    												        <h2 class="modal-title">
    												        	<center><?php echo Config::$namevehicles[$car->Model]; ?> (ID: <?php echo $car->ID ?>) location</center>
    												        </h2>
    												      </div>
    												      <div class="modal-body">
    												      	<center>
    												        <img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $car->Locationx ?>&y=<?php echo $car->Locationy ?>" alt="Smiley face" height="550" width="500">
    												    	</center>
    												      </div>
    												      <div class="modal-footer">
    												        <center><button type="button" class="btn btn-primary" data-dismiss="modal">Close</button></center>
    												      </div>
    												    </div>
    												  </div>
    												</div><br>
    											</td>
    										</tr>
    										<?php }
    										echo '
    											</tbody>
    											</table>';
    			                   		} ?>											
    								</tbody>
    							</table>
    					</div>
    				</div>
    				
    					
    				<div class="tab-pane" id="admintools">
    					<div class="box-body table-responsive no-padding">
    						<table class="table table-striped">
    							<tbody>		
    								<ul>
    	                                <div class="box box-primary" id="newboxstyle">
    										<div class="box-header">
    											<h3 class="box-title">
    											Actions
    											</h3>
    										</div>
    										<form method="POST" action="" disabled>
    											<div class="box-body table-responsive">
    												<div class="col-sm-5"> Reason: <br/>
    													<input name="reason" type="text" class="col-xs-10 col-sm-10" />
    												</div>
    												<div class="col-sm-5"> Time: <br/>
    													<input name="duration" type="text" class="col-xs-10 col-sm-10" />
    												</div>
    												<div class="col-sm-10"><br />
    												Time 0 pentru permanent<br />
    												Tip:<br>
    												<select name="banip" class="col-xs-10 col-sm-10">
    													<option value="0">Cont</option>
    													<option value="1">IP</option>
    												</select>
    												</div>
    												<div class="col-sm-10"><br />
    													<input type="submit" name="warn" class="btn btn-small btn-purple" value="warn"/>
    													<input type="submit" name="ban" class="btn btn-small btn-danger" value="ban"/>
    													<input type="submit" name="mute" class="btn btn-small btn-grey" value="mute"/>
    													<input type="submit" name="jail" class="btn btn-small btn-pink" value="jail"/>
    													<input type="submit" name="panelblock" class="btn btn-small btn-pink" value="panel suspend"/>
    												</div>
    											</div>
    										</form>	
    										<li><a href="<?php echo Config::$_PAGE_URL;?>playerlogs/<?php echo Config::$_url[1];?>">View player logs</a><br>
    										<li><a href="<?php echo Config::$_PAGE_URL;?>removesuspend/<?php echo Config::$_url[1];?>">remove suspend</a> (only player is suspended, abuse of this function is sanctionated)<br>
    										<li><a href="<?php echo Config::$_PAGE_URL;?>unbanp/<?php echo Config::$_url[1];?>">unban</a> (only player is banned, abuse of this function is sanctionated)<br>
    	                                	<li><a href="<?php echo Config::$_PAGE_URL;?>kick/<?php echo Config::$_url[1];?>">kick</a>
    									</div>
    	                            </ul>
                                </tbody>       
    						</table>
    					</div>
    				</div>
    				
    				<div class="tab-pane" id="ppunish">
    					<div class="box box-primary" id="newboxstyle">
    						<div class="box-header">
    						<h3 class="box-title">
    						Punish logs
    						</h3>
    						</div>
    							<div class="box-body table-responsive">
    							<table class="table table-condensed table-hover">
    							<thead>
    							<tr>
    							<td>ID SQL</td>
    
                                <td>Action</td>
    
                            	<td>Admin</td>
                            
                            	<td>Reason</td>
                            
                            	<td>Time</td>
    							</tr>
    							</thead>
    							<tbody>
    							<tr>
    							<?php
                                
                                	$q = Config::$g_con->prepare('SELECT * FROM `punishlogs` WHERE `playername` = ? ORDER BY `id` DESC');
                                
                                	$q->execute(array($data->name));
                                
                                	while($row = $q->fetch(PDO::FETCH_OBJ)) {
                                
                                		echo "<tr>
                                
                                			<td>{$row->id}</td>";?>
                                			<td>
    											<?php if($row->actionid==2) { ?> ban <?php } ?>
    											<?php if($row->actionid==1) { ?> permanent ban <?php } ?>
    					                        <?php if($row->actionid==6) { ?> jail <?php } ?>
    					                        <?php if($row->actionid==5) { ?> warn <?php } ?>
    					                        <?php if($row->actionid==7) { ?> mute <?php } ?>
    					                        <?php if($row->actionid==8) { ?> relase jail <?php } ?>
    					                        <?php if($row->actionid==3) { ?> permanent ban IP <?php } ?>
    					                        <?php if($row->actionid==4) { ?> ban IP <?php } ?>
    										</td>
    										<?php echo"
                                
                                			<td><a href='".Config::$_PAGE_URL.'profile/'.$row->givername."'>{$row->givername}</a></td>
                                				
                                			<td>{$row->reason}</td>
                                			
                                			<td>{$row->time}</td>
                                
                                			<td>";
                                
                                
                                } ?>
    							</tr>
    							</tbody>
    							</table>
    						</div>
    						<center></center>
    					</div>
    				</div>
    				
    				<div class="tab-pane" id="piplogs">
    					<div class="box box-primary" id="newboxstyle">
    						<div class="box-header">
    						<h3 class="box-title">
    						IP logs
    						</h3>
    						</div>
    							<div class="box-body table-responsive">
    							<table class="table table-condensed table-hover">
    							<thead>
    							<tr>
    							<td>ID Sesiune</td>
                            
                            	<td>IP</td>
                            
                            	<td>Time</td>
    							</tr>
    							</thead>
    							<tbody>
    							<?php
                            
                            	$q = Config::$g_con->prepare('SELECT * FROM `playerconnections` WHERE `playerid` = ? ORDER BY `id` DESC LIMIT 20');
                            
                            	$q->execute(array($data->id));
                            
                            	while($row = $q->fetch(PDO::FETCH_OBJ)) {
                            
                            		echo "<tr>
                            
                            			<td>{$row->id}</td>
                            
                            			<td>{$row->ip}</td>
                            			
                            			<td>{$row->time2}</td>
                            
                            			<td>";
                            
                            
                            	} ?>
    							</tbody>
    							</table>
    						</div>
    						<center></center>
    					</div>
    				</div>
    			</div>
    		</div>
    	</div>
    </div>
    						
    </section>
    
    

     

Ko62bp8.png

Link to comment
Share on other sites

T/C la cerere.

                                                                                                                              

Link to comment
Share on other sites

  • s0nyx locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...