login problema
Scris: Dum Ian 23, 2011
Cod: Selectaţi tot
<?
include("config.php");
include("include/session.php");
if($session->logged_in){
echo "
<a href=\"http://ro-gamblers.info/userinfo.php?user=$session->username\">Contul meu</a><br> <br>"
." <a href=\"http://ro-gamblers.info/useredit.php\">Editeaza cont</a><br> <br>";
if($session->isAdmin()){
echo " <a href=\"http://ro-gamblers.info/admin/index.php\">Panou administrare</a> <br> <br> ";
}
echo " <a href=\"http://ro-gamblers.info/process.php\">Iesire</a>";
}
else{
?>
<div id="fcf2">
<form action="http://ro-gamblers.info/process.php" method="POST">
<table border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td></tr>
<tr><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td></tr>
<tr><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2""><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">Retine-ma
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2"><br><font size="2">[<a href="http://ro-gamblers.info/forgotpass.php">Ai uitat parola?</a>]</font></td></tr>
<tr><td colspan="2"><br>N-ai cont? <a href="http://ro-gamblers.info/inregistrare.php">Sign-Up!</a></td></tr>
</table>
</form>
</div>
<?
};
?>
<?
echo "</td></tr><tr><td align=\"center\"><br><br>";
echo "<b>Total membri inregistrati:</b> ".$database->getNumMembers()."<br>";
echo "$database->num_active_users user<b>(i)</b> navigheaza pe site <br> ";
echo "$database->num_active_guests vizitator<b>(i)</b> navigheaza pe site.<br>";
?>
Cod: Selectaţi tot
<?php
session_start();
switch($_GET['actiune'])
{
case '':
$sql="SELECT * FROM `poker-categ`";
$r=mysql_query($sql);
while($row = mysql_fetch_array($r)){
echo '<table cellpadding=10 cellspacing=10>';
echo '<tr><td><b><a href=http://www.ro-gamblers.info/poker/forum.php?actiune='.$row[2].'>'.$row[0].'</a></b></td></tr><tr><td>'.$row[1].'</td></tr>';
echo '</table>';
}
break;
case '1':
$sql="SELECT * FROM `poker` WHERE categorie = '1' ";
echo '<a href="http://www.ro-gamblers.info/poker/newtopic.php?actiune=1"><img src="http://ro-gamblers.info/images/new_topic.gif" ></a>';
$r=mysql_query($sql);
while($row = mysql_fetch_array($r)){
$data = time() + (7 * 24 * 60 * 60);
echo '<table cellpadding=10 cellspacing=10>';
echo '<tr><td><b><a href=http://ro-gamblers.info/userinfo.php?user='.$row[0].'>'.$row[0].'</a></b></td><td><a href=http://www.ro-gamblers.info/poker/forum.php?categ='.$row[5].'>'.$row[2].'</a></td><td>'.date('Y-m-d').'</td></tr>';
echo '</table>';
}
break;
case '2':
$sql="SELECT * FROM `poker` WHERE categorie = '2' ";
echo '<a href="http://www.ro-gamblers.info/poker/newtopic.php?actiune=2"><img src="http://ro-gamblers.info/images/new_topic.gif" ></a>';
$r=mysql_query($sql);
while($row = mysql_fetch_array($r)){
$data = time() + (7 * 24 * 60 * 60);
echo '<table cellpadding=10 cellspacing=10>';
echo '<tr><td><b><a href=http://ro-gamblers.info/userinfo.php?user='.$row[0].'>'.$row[0].'</a></b></td><td><a href=http://www.ro-gamblers.info/poker/forum.php?categ='.$row[5].'>'.$row[2].'</a></td><td>'.date('Y-m-d').'</td></tr>';
echo '</table>';
}
break;
}
?>
problema e ca daca eu ma loghez si cand intru pe aceasta pagina [a 2-a] .. imi arata pagina de log-in.. in stanga unde este inclus meniul .. faza e ca daca dau pe alta pagina.. imi arata ca sunt logat , iar daca dau inapoi pe acea pagina , imi arata pagina de login... de la ce ar putea fi ?