eT` Posted January 17, 2010 Report Share Posted January 17, 2010 (edited) tamm uz localhost ( OS=win7, webserveris=xampp ar defaultajiem konfigiem ) uztaisīju webu un uzlieku viņu uz hosta ( garmtech ) un nomainu confgius un tml, bet webs ir kļūdains. Apraksts - login f-jā tiek saglabāti 2 sesijas. pirmā - user_id, otrā adminstrator ( izpildās tad ja usera statuss > 1 ) uz localhost viss iet un darbojas tā kā jābūt bet uz hosta pēkšņi mistiskā kārtā ik pa laikam uzmetas, ka 2 jaunas vēstules, bet saņemtajās nekā nav ( uz local tādas kļūdas nebija ) + vēl man kā sysop nerādās admincp, bet vienam jūzerim, kurš ielogojas rāda ka viņš ir sysop un viņam ir admincp utt. pamanīju mazu atšķirību - uz localhost ielogojoties tiek saglabāts cookie ( PHPSESSID ) bet uz garma ( GARMSESSID ), bet ielogoties izdodas, errrori parādās tālāk. CHMOD 0777 uzliku pilnīgi visiem failiem un mapēm jo nezināju kur tieši vajadzētu ( webs kodēts no 0 ). nezinu, kas varētu būt pie vainas. ja vajag kādu failu vai f-ju sakiet. Edited January 17, 2010 by eT` Quote Link to comment Share on other sites More sharing options...
Pentiums Posted January 17, 2010 Report Share Posted January 17, 2010 kodu uz skatuves Quote Link to comment Share on other sites More sharing options...
eT` Posted January 19, 2010 Author Report Share Posted January 19, 2010 tāmmm šī ir login f-ja: if(isset($_GET["action"]) && $_GET["action"] == "login") { $user = html(strtolower($_POST["user"])); $pass = md5($_POST['pass'].'manssaltsuncitaslietas'); $login = mysql_query("SELECT * FROM useryoy WHERE name='$user' AND pass='$pass'"); $logrow = mysql_fetch_row($login); $id = $logrow[0]; $stat = $logrow[4]; if(mysql_num_rows($login) == 1) { if($stat != "5") { $_SESSION['admins'] = $stat; } mysql_query("UPDATE useriyoy SET online='Y' WHERE id=$id"); $_SESSION['id'] = $id; echo "<script language='JavaScript'>window.location='".$_SERVER['HTTP_REFERER']."';</script>"; } else { $error = "Nepareizs e-pasts un/vai parole!"; } } tad viena no vietā kur lago : <? if(isset($_SESSION['id'])) { $id = $_SESSION['id']; //atjauno pedejo apmeklejumu lastvisit($id); $laiks = time(); $laiks2 = strtotime(date("Y-m-d 00:00:00")); $s = mysql_result(mysql_query("SELECT COUNT(*) AS s FROM tabula1 WHERE skatitais='$id' AND laiks BETWEEN $laiks2 AND $laiks"),0);//sheit lago $t = mysql_result(mysql_query("SELECT COUNT(*) AS t FROM tabula2 WHERE sanemejs='$id' AND lasita='0'"),0);//shite lago :( $f = mysql_result(mysql_query("SELECT COUNT(*) AS f FROM tabula3 WHERE ielugtais='$id'"),0); $u = mysql_result(mysql_query("SELECT COUNT(*) AS u FROM tabula4 WHERE friend1='$id' OR friend2='$id'"),0); if($t > 0) { $t = "<b><font color=red>$t</font></b>"; } if($f > 0) { $bilde = "images/invite_y.png"; } else { $bilde = "images/invite_n.png"; } ?> <br /> <div id="top"> <table width="95%" align="center"> <? if(isset($_SESSION['admins'])) { echo "<tr><td><img src=images/admincp.png /> <a href=admincp.php>Adminu panelis</a></td></tr>"; } ?> <tr> <td><img src="images/home.png" /> <a href="index.php?lapa=jaunumi">SÄkums</a></td> <td><img src="images/edit.png" /> <a href="index.php?lapa=editprofile">Labot profilu</a></td> </tr> <tr> <td><img src="images/sms.png" /> <a href="index.php?lapa=sms">SMS pakalpojumi</a></td> <td><img src="images/my.png" /> <a href="index.php?lapa=viewuser&id=<?=$_SESSION["id"]?>">Mans profils</a></td><!--te arii lago--> </tr> <tr> <td><img src="images/online.png" /> <a href="index.php?lapa=online">Online lietotÄji</a></td> <td><img src="images/view.png" /> <a href="index.php?lapa=statistika">Statistika [<?=$s?>]</a></td> </tr> <tr> <td><img src="images/rules.png" /> <a href="index.php?lapa=rules">Noteikumi</a></td> <td><img src="images/msg.png" /> <a href="index.php?lapa=vestules&action=sanemtas">VÄ“stules [<?=$t?>]</a></td> </tr> <tr> <td><img src="images/xxx.png" /> <a href="index.php?lapa=xxx">XXX</a></td> <td><img src="<?=$bilde?>" /> <a href="index.php?lapa=ielugumi">IelÅ«gumi [<?=$f?>]</a></td> </tr> <tr> <td><img src="images/chat.png" /> <a href="index.php?lapa=chat">Äats</a></td> <td><img src="images/friends.png" /> <a href="index.php?lapa=draugi">Draugi [<?=$u?>]</a></td> </tr> <tr> <td><img src="images/logout.png" /> <a href="header.php?action=iziet"><b>Iziet</b></a></td> <td><img src="images/req.png" /> <a href="index.php?lapa=pieprasijumi">PieprasÄ«jumi</a></td> </tr> </table> <img src="images/right_bg_b.gif" /> </div> Quote Link to comment Share on other sites More sharing options...
eT` Posted January 21, 2010 Author Report Share Posted January 21, 2010 neviens nezin.? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.