Jump to content
  • 0

Problema Search player panel


iSkull

Question

Problema intalnita (descriere):  Am facut un buton ptr cautarea unui jucator din "bara de sus unde se afiseaza profiul" dar nu imi da rezultatul cautarii, ma trimite pe pagina de cautare in loc sa mi-l caute :|
Ero(area / rile) / warning-(ul / urile): nu imi da erori si nici la http//
Liniile de cod / sursa / script-ul(obligatoriu): 

<?php require_once("./includes/Header.php"); ?>
<?php
$pagina = 'Cautare';
if(!isset($_SESSION['username']))
{
	Header("Location: /panel");
	return 1;
}

if(isset($_SESSION['username'])) 
{
	$antibug = 1;
	$verificare = mysqli_query($DB_H, "SELECT * FROM  ".$mysqli['SQL_ACCOUNTS']." WHERE `Name` = '".$_SESSION['username']."'");
	while($rowcheck = mysqli_fetch_array($verificare)) 
	{
		$antibug = 0;	
	}
	if($antibug == 1)
	{
		echo "
		<script type='text/javascript'>
		<!--
		function Redirect()
		{
			window.location='/panel/index.php?out';
		}
		setTimeout('Redirect()', 1);
		//-->
		</script>";
	}		
}
?>

<div class="breadcrumbs" id="breadcrumbs">
	<script type="text/javascript">
    try
	{
		ace.settings.check('breadcrumbs' , 'fixed')
	}
	catch(e)
	{
    
	}
	</script>
	<ul class="breadcrumb">
    <li>
      <i class="icon-home home-icon">
      </i>
      <a href="index"><?= $Informatii['NumeleComunitatii'] ?>
      </a>
    </li>
    <li class="active">
		<i class="icon-angle-right">
		</i>
      <?php echo htmlspecialchars($pagina);?>
    </li>
  </ul>
</div>


<div class="page-content">
<div class="row-fluid">


<div class="span12">
			
			<!-- BEGIN PAGE HEADER-->
			
			
			<!-- END PAGE HEADER-->
			<!-- BEGIN DASHBOARD STATS -->
<?php if(isset($_POST['search'])) { ?>
	<h3 class="page-title">Rezultatul cautarii tale:</h3></br>
	
	<?php } ?>
<?php
if(isset($_POST['search']) && isset($_POST['username']))
{
	$username = mysqli_real_escape_string($DB_H, $_POST['username']);
	
	if(count($username) < 3 && count($username) > 24) {
		$msg = "Username are invalid."; $class = "error";
	}
	else {
		$check = mysqli_query($DB_H, "SELECT * FROM  ".$mysqli['SQL_ACCOUNTS']." WHERE `Name` LIKE '%$username%' LIMIT 50");
		if(mysqli_num_rows($check) == 0){
			$msg = "Acest nume nu exista."; $class = "error";
			 echo "Acest jucator nu a putut fi gasit in baza noastra de date!</br>Urmeaza sa fi redirectionat in 3,5 secunde..";
			 echo "
		<script type='text/javascript'>
		<!--
		function Redirect()
		{
			window.location='/panel/panel/search.php';
		}
		setTimeout('Redirect()', 3550);
		//-->
		</script>";
		}
		else {
			echo "";
			while($row = mysqli_fetch_array($check)){
				echo "
				<b>(".$row['ID'].")</b> <a href=\"/panel/pages/account.php?id=".$row['ID']."\">".$row['Name']."</a><br/>";
			}
		}
	}

}


	
if(!isset($_POST['search']))
{
?>
<center>
<?php if(isset($msg)): ?>
	<div class="alert alert-danger" role="alert"><?= $msg ?></div>
	<?php endif; ?>
<h3 class="page-title">
Caută jucător<small> </br>Obține informații despre un anumit jucător</small>
</h3>
<form method="POST" action="">			
<label for="username">Nume din joc:</label>
<input name="username" type="text">
<br>
<input class="btn btn-inverse" name = "search" type="submit" value="Search">
</form>
</center>


<?php } ?>
				
			
			<!-- END DASHBOARD STATS -->
			
			
			
	


<?php require_once("./includes/Footer.php"); ?>


Imagini / Video (optional):  -
Ati incercat sa rezolvati singur?: Da 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Aceasta nu este o problema de scripting, aici se posteaza dificultati in limbajul pawn, acolo este php curat, posteaza la discutii libere sau pe o comunitatr de php.

T.C si in arhiva peste 24/h

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.