Jump to content
php.lv forumi

login php


Edgars Kanavins

Recommended Posts

Sveicināti lietā šada http://prntscr.com/eafy3b kā to atrisināt?

 

	<?php
mysql_connect("localhost","_forums","arthost");
mysql_select_db("test");
	if(isset($_COOKIE['member_id'])){
$get=mysql_query("SELECT * FROM `members` WHERE member_id='".intval($_COOKIE['member_id'])."'") or die(mysql_error());
$id=$_COOKIE['member_id'];
$dati="SELECT * FROM `vnk_members` WHERE id = $id LIMIT 1";
$dati1=mysql_query($dati) or mysql_error();
$dati2=mysql_fetch_array($dati1);
$avatar= "SELECT * FROM `vnk_member_extra` WHERE id = $id LIMIT 1";
$avatar1=mysql_query($avatar) or mysql_error();
$avatar2= mysql_fetch_array($avatar1);
$udata=mysql_fetch_object($get);
if($udata->member_login_key==$_COOKIE['pass_hash']) {
	$logout = md5($dati2['email']."&".$dati2['member_login_key']."&".$dati2['joined']);
$bilde = ($avatar2['avatar_location']);
echo "
	<center>Sveiks ".$udata->members_display_name."</center><br>
	<ul class='colomn'>
    <li><a href='{$link_addnews}'><img src='{THEME}/images/add_news.gif' alt='Pievienot jaunumus' />Pievienot jaunumus</a></li>
    <li><a href='f/index.php?app=core&module=usercp&tab=members'><img src='{THEME}/images/profile.gif' alt='Tavs profils' />Labot profilu</a></li>
    <li><a href='f/index.php?app=members&module=messaging'><img src='{THEME}/images/message.gif' alt='VД“stules' />VД“stules</a></li>
</ul>
<ul class='colomn'>
    <li><a href='{$link_favorites}'><img src='{THEME}/images/tabs.gif' alt='FavorД«ti' />FavorД«ti</a></li>
    <li><a href='{$link_stats}'><img src='{THEME}/images/statistic.gif' alt='Statistika' />Statistika</a></li>
    <li><a href='f/index.php?app=core&module=search&do=active'><img src='{THEME}/images/massage_view.gif' alt='Jaunie posti' />Jaunie posti</a></li>
</ul>";
	}else{
	echo "
	
<div class='loginbox'>
    <form method='post' action='f/index.php?app=core&module=global&section=login&do=process&return=http://localhost/' name='LOGIN'>
    <div class='lfield'>
        <img class='logform_login' src='{THEME}/images/spacer.gif' alt='Логин' />
        <div><input id='username' class='input_text' name='username' type='text'></div>
    </div>
    <div class='lfield'>
        <img class='logform_pass' src='{THEME}/images/spacer.gif' alt='Пароль' />
        <div><input id='password' class='input_text' name='password' type='password'></div>
    </div>
    <input value=' ienakt ' name='CookieDate' type='submit'>    <div class='olinks'><a href='/index.php?do=register' title='ReДЈistrДЃcija'>ReДЈistrДЃcija</a> | <a href='/index.php?do=lostpassword' title='Aizmirsi paroli?'>Aizmirsi paroli?</a></div>
    </form></div>";
	}
	}else{
	echo "
	<div class='loginbox'>
    <form method='post' action='forums/index.php?app=core&module=global&section=login&do=process&return=http://localhost/' name='LOGIN'>
    <div class='lfield'>
        <img class='logform_login' src='{THEME}/images/spacer.gif' alt='Логин' />
        <div><input id='username' class='input_text' name='username' type='text'></div>
    </div>
    <div class='lfield'>
        <img class='logform_pass' src='{THEME}/images/spacer.gif' alt='Пароль' />
        <div><input id='password' class='input_text' name='password' type='password'></div>
    </div>
    <input value=' ienakt ' name='CookieDate' type='submit'>    <div class='olinks'><a href='/index.php?do=register' title='registe'>register</a> | <a href='/index.php?do=lostpassword' title='Aizmirsi paroli?'>Aizmirsi paroli?</a></div>
    </form></div>";
	}
	?>

Link to comment
Share on other sites

  • briedis locked and unlocked this topic
×
×
  • Create New...