Jump to content
php.lv forumi

Simple WEB+IPB User panel


Recommended Posts

Posted

Kāds nevarētu padotmājienu kā varētu dabūt gatavu apmēram kautko šādu?.:

2434qc3.th.jpg

Tas login panelis ir apvienots ar ipb forumu..

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Kā jau teicu, ar $_COOKIE no IPB dabūn cepumu member_id un uzraksti kveriju. Ja member_id = 0, tad parāda login formu, ja cits, tad login forma pazūd, bet parādās logged in saturs.

Posted (edited)
Kā jau teicu, ar $_COOKIE no IPB dabūn cepumu member_id un uzraksti kveriju. Ja member_id = 0, tad parāda login formu, ja cits, tad login forma pazūd, bet parādās logged in saturs.

To kaut kā ar if else dabū gatavu vai kā??

Edited by ashais13
Posted

Nesen te vienam taisīju galveno lapu ipb forumam, tāka varu padalīties ar jūzeru autorizācijas kodu:

<?php
if(isset($_COOKIE['member_id'])){
$get=mysql_query("SELECT * FROM `ibf_members` WHERE id='".intval($_COOKIE['member_id'])."'") or die(mysql_error());
$udata=mysql_fetch_object($get);
if($udata->member_login_key==$_COOKIE['pass_hash']) {
//izvadam kko shaadu: echo "Cau ".$udata->members_display_name."";
}else{
echo "tu neesi autorizeets";
//izvadam logina paneli
}
}else{
echo "tu neesi autorizeets1";
//izvadam logina paneli
}
?>

Posted (edited)

<form action='http://tava_ip/index.php?act=Login&CODE=01' method='post' name='theform'>
<div align="left"><font size="1" face="Arial, Helvetica, sans-serif">Username
<input type='text' class='text' name='username'>
<br>
Password</font>
<input type='password' class='text' name='parole'>
<br>
<input name="submit" type='submit' class='submit' value='Login'>
</div>
</form>

Rekur login panelītis!

Edited by waplet
Posted

<?php

if(isset($_COOKIE['member_id'])){

$get=mysql_query("SELECT * FROM `ibf_members` WHERE id='".intval($_COOKIE['member_id'])."'") or die(mysql_error());

$udata=mysql_fetch_object($get);

if($udata->member_login_key==$_COOKIE['pass_hash']) {

//izvadam kko shaadu: echo "Cau ".$udata->members_display_name."";

}else{

echo "tu neesi autorizeets";

//izvadam logina paneli

}

}else{

echo "tu neesi autorizeets1";

//izvadam logina paneli

<form action='http://tava_ip/index.php?act=Login&CODE=01' method='post' name='theform'>

<div align="left"><font size="1" face="Arial, Helvetica, sans-serif">Username

<input type='text' class='text' name='username'>

<br>

Password</font>

<input type='password' class='text' name='parole'>

<br>

<input name="submit" type='submit' class='submit' value='Login'>

</div>

</form>

}

?>

 

es ieliku shadi un man rada balto lapu


×
×
  • Create New...