Accounts Validation
Started on the old forum in June 2007 · view the original in the archive · old links redirect here
TL;DR · summary of 48 replies
- - The code provided in the thread can be used to validate users based on their points (plusses).
- - To implement this, the validation condition should be placed in various parts of the forum like Main Page, Chat, Forums, Buddies, Statistics etc.
- - For chat functionality, a conditional statement is needed to prevent users without 25 plusses from sending messages.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
how i can make to validate an account of a user if he dont have 25plusses!pls help! THANX
The code you can copy from Shot Box if you want Its similar whith this And you can modify haw you wont e.g.: if(getplusses(getuid_sid($sid))<25) { echo "Please note you are not activated yet, this some actions will be disabled for you, our staff will check your info, and activate you as soon as possible, and you'll get a pm once your activated to notify you "; echo "<a href="index.php?action=cpanel&sid=$sid">»Cpanel</a>"; }
This is one example to validation users whith 25 plusses Put this code in Main Page, Chat, Forums, Buddies, Staristics etc (all linck`s from Main page and users can enter because they not have 25 plusses yet
echo "<a href="http://wapcomunity.ro">[-Enter Here-]</a>";
The code you can copy from Shot Box if you want Its similar whith this And you can modify haw you wont e.g.: if(getplusses(getuid_sid($sid))<25) { echo "Please note you are not activated yet, this some actions will be disabled for you, our staff will check your info, and activate you as soon as possible, and you'll get a pm once your activated to notify you "; echo "<a href="index.php?action=cpanel&sid=$sid">»Cpanel</a>"; }
This is one example to validation users whith 25 plusses Put this code in Main Page, Chat, Forums, Buddies, Staristics etc (all linck`s from Main page and users can enter because they not have 25 plusses yet
hmmm so it cn b used 4 plusses shop too???? cuz i wanna close shop 4 new users
eeeeerrr....
The code you can copy from Shot Box if you want Its similar whith this And you can modify haw you wont e.g.: if(getplusses(getuid_sid($sid))<25) { echo "Please note you are not activated yet, this some actions will be disabled for you, our staff will check your info, and activate you as soon as possible, and you'll get a pm once your activated to notify you "; echo "<a href="index.php?action=cpanel&sid=$sid">»Cpanel</a>"; }
This is one example to validation users whith 25 plusses Put this code in Main Page, Chat, Forums, Buddies, Staristics etc (all linck`s from Main page and users can enter because they not have 25 plusses yet
ok ms mult!si cum pun sami poata trimite pm sa ii activez contul dupa ce isi completeaza profilul?
ok ms mult!si cum pun sami poata trimite pm sa ii activez contul dupa ce isi completeaza profilul?
if(getplusses(getuid_sid($sid))<25)
{
echo "[b]Please note you are not activated yet, this some actions will be disabled for you, our staff will check your info, and activate you as soon as possible, and you'll get a pm once your activated to notify you[/b]
";
echo "<a href=\"index.php?action=cpanel&sid=$sid\">»Cpanel</a>";
echo "<a href=\"inbox.php?action=sendpm&who=1&sid=$sid\">»Send PM to admin</a>";
}
This is the link where who=1 is your ID number if you are ID nr.1
inbox.php?action=sendpm&who=1&sid=$sid
echo "<a href="http://wapcomunity.ro">[-Enter Here-]</a>";
if(getplusses(getuid_sid($sid))<25) { echo "Please note you are not activated yet, this some actions will be disabled for you, our staff will check your info, and activate you as soon as possible, and you'll get a pm once your activated to notify you "; echo "<a href=\"index.php?action=cpanel&sid=$sid\">»Cpanel</a>"; echo "<a href=\"inbox.php?action=sendpm&who=1&sid=$sid\">»Send PM to admin</a>"; }This is the link where who=1 is your ID number if you are ID nr.1
inbox.php?action=sendpm&who=1&sid=$sid
am o problema:( am pus asa cum ii scris aici dar aia care intra pe chat pot intra sa scrie pe chat si nush cum sa pun conditia sa nu poata scrie pe chat...External image (may be gone)
I hate kids lamers,you,Regele and Wmaster come here for help and in Romania you sold lavalair script or subdomains whit your copyright.Here it my idea that kids stoled from me enjoy and share to others:
else if ($action=="public") { addonline($uid,"mesaj camera",""); echo "<card id="say" title="MESAJ CAMERA">"; echo " "; if(getplusses(getuid_sid($sid))<25) { echo "(!) ne pare rau dar nu aveti acces in camera pina nu acumulati minimum 25 de plusuri. INFO: pentru a acumula plusurile necesare completati-va profilul corect aici la setari <a href="index.php?action=cpanel&sid=$sid">profil & extinse</a>"; }else{ echo "<input name="message" type="text" maxlength="160"/>"; echo "<anchor>>>"; echo "<go href="chat.php?sid=$sid&rid=$rid&rpw=$rpw" method="post">"; echo "<postfield name="message" value="$(message)"/>"; echo "</go></anchor>"; } echo " ";
echo "
"; echo "<a href="chat.php?sid=$sid&rid=$rid&rpw=$rpw">inapoi</a>|"; echo "<a href="index.php?action=wforums&sid=$sid">forum</a>|"; echo "<a href="index.php?action=main&sid=$sid">prim</a>"; echo " "; echo "</card>"; } do the same thing for user private.
www.inbuzunar.mobi -Your mobile portal pocket
import these into ur database
INSERT INTO ibwf_settings VALUES (10, 'vldtn', '0');
import this into ur users table
validated char(1) NOT NULL default '0',
add this to login.php
$validated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$uid."' AND pass='".$epwd."' AND validated='0'"));
if(($validated[0]>0)&&(validation()))
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>**Account Not Validated**
This could take up to 12hrs pls be patient and try again soon thank you
"; }
add these to core.php
function validation() { $getval = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'")); if($getval[0]=='1') { return true; }else { return false; } }
edit register() (may be different to urs jus use what u need for validation)
function register($name,$pass,$usex,$day,$month,$year,$uloc,$email,$info, $ubr) { $execms = mysql_query("SELECT * FROM ibwf_users WHERE name='".$name."';");
if (mysql_num_rows($execms)>0){ return 1; }else{ $pass = md5($pass); $validation = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'")); if($validation[0]==1) { $validated=0; }else{ $validated=1; } $reg = mysql_query("INSERT INTO ibwf_users SET name='".$name."', pass='".$pass."', birthday='".$year.$month.$day."', sex='".$usex."', location='".$uloc."', email='".$email."', signature='".$info."', regdate='".time()."', validated='".$validated."', ipadd='".getip()."', browserm='".$ubr."'");
if ($reg)
{
$uid = getuid_nick($name);
addonline($uid,"Just Registered","");
$delonline = mysql_query("DELETE FROM ibwf_online WHERE userid='".$uid."'");
$uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$name."'"));
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$msg = "Hello /reader =). Greetings from all $sitename[0] staff, we are happy to have you here, welcome to our big happy family!, If You Have any questions or comments about the site feel free to message me or any of the other staff members online. ENJOY! (excited)[br/][small]*p.s: this is an automated pm*[/small]";
$msg = mysql_escape_string($msg);
autopm($msg, $uid[0]);
return 0;
}else{
return 2;
}
} }
add this to register.php
if(validation()) { echo "Please give us up to 12hrs to validate you (normally it be done within an hour) if you have not been after this period of time u can email the owner at: afta_drk@hotmail.com"; }
this is for ownercp.php
else if($action=="general") { echo "<card id="main" title="Owner Tools">"; $xtm = getsxtm(); $paf = getpmaf(); $fvw = getfview(); $fmsg = htmlspecialchars(getfmsg()); $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'")); $sitename = $sitename[0]; if(canreg()) { $arv = "e"; }else{ $arv= "d"; } if(validation()) { $vldtn = "e"; }else{ $vldtn= "d"; } echo "<onevent type="onenterforward">"; echo "<refresh> <setvar name="sitename" value="$sitename"/> <setvar name="sesp" value="$xtm"/> <setvar name="pmaf" value="$paf"/> <setvar name="fmsg" value="$fmsg"/> <setvar name="areg" value="$arv"/> <setvar name="fvw" value="$fvw"/> <setvar name="vldtn" value="$vldtn"/> "; echo "</refresh></onevent>"; echo " "; echo "General Settings "; echo " "; echo "
"; echo "Site Name:"; echo "<input name="sitename" maxlength="255"/>"; echo " Session Period: "; echo "<input name="sesp" format="*N" maxlength="3" size="3"/>"; echo " PM Antiflood<input name="pmaf" format="*N" maxlength="3" size="3"/>"; echo " Forum Message: "; echo "<input name="fmsg" maxlength="255" />"; echo " Registration: "; echo "<select name="areg" value="$arv">"; echo "<option value="e">Enabled</option>"; echo "<option value="d">Disabled</option>"; echo "</select> "; echo "View:"; echo "<select name="fvw" value="$fvw">"; $vname[0]="Forums Page"; $vname[1]="Forums"; $vname[2]="Categories"; $vname[3]="Drop List"; for($i=0;$i<count($vname);$i++) { echo "<option value="$i">$vname[$i]</option>"; }
echo "</select>"; echo " Validation: <select name="vldtn" value="$vldtn">"; echo "<option value="e">Enabled</option>"; echo "<option value="d">Disabled</option>"; echo "</select> "; echo "
<anchor>Submit <go href="ownrproc.php?action=general&sid=$sid" method="post"> <postfield name="sitename" value="$(sitename)"/> <postfield name="sesp" value="$(sesp)"/> <postfield name="fmsg" value="$(fmsg)"/> <postfield name="areg" value="$(areg)"/> <postfield name="pmaf" value="$(pmaf)"/> <postfield name="fvw" value="$(fvw)"/> <postfield name="vldtn" value="$(vldtn)"/> </go></anchor> "; echo " "; echo " "; echo "<a href="ownercp.php?action=ownercp&sid=$sid"><img src="../images/admn.gif" alt=""/>Owner Tools</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " </card>"; }
add this to ownertools page
echo "<a href="ownercp.php?action=validatelist&sid=$sid">Validate List($noi[0])</a> ";
add this to modtools page in profiles
$noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE validated='0' AND id='".$who."'")); if($noi[0]==1) { echo "<a href="ownrproc.php?action=validate&sid=$sid&who=$who">Validate</a> "; }
add ths to ownercp.php
else if($action=="validatelist") { addonline(getuid_sid($sid),"Owner Tools",""); echo "<card id="main" title="Validate List">"; //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_users WHERE validated='0'")); $num_items = $noi[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)$items_per_page;
//changable sql
$sql = "SELECT id, name FROM ibwf_users WHERE validated='0' ORDER BY name LIMIT $limit_start, $items_per_page";
echo "
"; $items = mysql_query($sql);
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$item[0]."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M')
{$usex = "Male";}else
if($nopl[0]=='F'){$usex = "Female";}
else{$usex = "Argh! No Profile!";}
$nopl[2] = htmlspecialchars($nopl[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]($uage/$usex/$nopl[2])</a>";
echo "$lnk
"; } } echo " "; echo " "; if($page>1) { $ppage = $page-1; echo "<a href="ownercp.php?action=$action&page=$ppage&sid=$sid&who=$who">«Prev</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href="ownercp.php?action=$action&page=$npage&sid=$sid&who=$who">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "Jump to page<input name="pg" format="*N" size="3"/>"; $rets .= "<anchor>[GO]"; $rets .= "<go href="ownercp.php" method="get">"; $rets .= "<postfield name="action" value="$action"/>"; $rets .= "<postfield name="sid" value="$sid"/>"; $rets .= "<postfield name="page" value="$(pg)"/>"; $rets .= "</go></anchor>";
echo $rets;
}
echo "
"; echo " "; echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }
add this to ownerproc.php
if($action=="general")
{
$sitename = $_POST["sitename"];
$xtm = $_POST["sesp"];
$fmsg = $_POST["fmsg"];
$areg = $_POST["areg"];
$vldtn = $_POST["vldtn"];
$pmaf = $_POST["pmaf"];
$fvw = $_POST["fvw"];
if($areg=="d")
{
$arv = 0;
}else{
$arv = 1;
}
if($vldtn=="d")
{
$valid = 0;
}else{
$valid = 1;
}
echo "<card id="main" title="Owner Tools">";
echo "
";
$res = mysql_query("UPDATE ibwf_settings SET value='".$sitename."' WHERE name='sitename'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Site Name updated successfully
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating Site Name
";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$fmsg."' WHERE name='4ummsg'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Forum Message updated successfully
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating Forum message
";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$xtm."' WHERE name='sesxp'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Session Period updated successfully
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating Session Period
";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$pmaf."' WHERE name='pmaf'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>PM antiflood is $pmaf seconds
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating PM antiflood value
";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$arv."' WHERE name='reg'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Registration updated successfully
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating Registration
";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$fvw."' WHERE name='fview'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Forums View updated successfully
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating Forums View
";
}
$res = mysql_query("UPDATE ibwf_settings SET value='".$valid."' WHERE name='vldtn'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Validation updated successfully
";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error Updating Validation
";
}
echo "
";
echo "<a href="ownercp.php?action=general&sid=$sid">Edit general settings</a>
";
echo "<a href="ownercp.php?action=ownercp&sid=$sid"><img src="../images/admn.gif" alt=""/>Owner Tools</a>
";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "
</card>";
}
else if($action=="validate")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<card id="main" title="Owner Tools">";
echo "
";
$res = mysql_query("Update ibwf_users SET validated='1' WHERE id='".$who."'");
if($res)
{
mysql_query("INSERT INTO ibwf_mlog SET action='validation', details='".getnick_uid(getuid_sid($sid))." validated $user', actdt='".time()."'");
echo "<img src="../images/ok.gif" alt="O"/>$user validated successfully";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error validating $user";
}
echo "
<a href="index.php?action=viewuser&who=$who&sid=$sid">$user's Profile</a> "; echo "<a href="ownercp.php?action=ownercp&sid=$sid"><img src="../images/admn.gif" alt=""/>Owner Tools</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }
after i added that line to login.php i had to edit this part or u will hav serious problem
//check for pwd
$epwd = md5($pwd);
$uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$uid."' AND pass='".$epwd."'"));
if($uinf[0]==0)
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Incorrect Password
"; echo "<a href="index.php"><img src="../images/home.gif" alt=""/>Home</a>"; }
so change it to this
//check for pwd
$epwd = md5($pwd);
$uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$uid."' AND pass='".$epwd."'"));
if($uinf[0]==0)
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Incorrect Password
"; echo "<a href="index.php"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; echo "</wml>"; exit(); }
just replace the
echo "<a href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a>
";
with
echo "<a href=\"index.php?action=admincp&sid=$sid\">Admin CP</a>";
or whatever it is for admincp i never use this script anymore
and same goes with the admin tools just adjust accordingly to your script