hey all, im working on coding from lava - v2, its the private profile code, cant seem to get it to work at all,
When i recoded it to work on v2, and put my profile on private, it does work but for some reason not even i can view my profile... ooops!!
Something deffo wrong, heres the code's im using, can anybody help?
in funtions.php:
In privatepro.php
Settings.php
Profile.php
SQL
When i recoded it to work on v2, and put my profile on private, it does work but for some reason not even i can view my profile... ooops!!
Something deffo wrong, heres the code's im using, can anybody help?
in funtions.php:
PHP Code:
function shad0w($uid, $who)
{
$pm = mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id='".$who."'"));
if($pm[0]=='2')
{
if (ismod($uid))
{
return true;
}else{
return false;
}
return false;
}else if($pm[0]=='1')
{
if($uid==$who||arebuds($uid,$who)||ismod($uid))
{
return true;
}else{
return false;
}
}else if($pm[0]=='0')
{
return true;
}
}
In privatepro.php
PHP Code:
if($action=="viewpro")
{
addonline(getuid_sid($sid),"Profile","");
$act = $_GET["act"];
$acts = ($act=="dis" ? 0 : 1);
$main.="<card id=\"main\" title=\"Site\">";
$main.="<p align=\"center\">";
//$uid = getuid_sid($sid);
$res = mysql_query("UPDATE users SET viewpro='".$acts."' WHERE id='".$uid."'");
if($res)
{
$main.="<img src=\"images/ok.gif\" alt=\"o\"/>Profile changed!<br/>";
}else{
$main.="<img src=\"images/notok.gif\" alt=\"x\"/>
It's impossible to update your profile!<br/>";
}
$main.="<br/><a href=\"main.php?sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
$main.="Home</a>";
$main.="</p></card>";
}
PHP Code:
$viewpro = mysql_fetch_array(mysql_query("SELECT viewpro FROM users WHERE id = '".$uid."'"));
if($viewpro[0]=="1")
{
$main.="<a href=\"privatepro.php?action=viewpro&sid=$sid&act=dis\">Make Profile Public </a><br/>";
}else{
$main.="<a href=\"privepro.php?action=viewpro&sid=$sid&act=enb\">Make Profile Private </a><br/>";
}
PHP Code:
if (shad0w($uid,$who)) {
>>>code profile<<<
}else{
$main.="<b>Private Profile !!!</ b> <br/> Ya cant view this profile as it is private, ya Daft Pervert!!<br/>You will need to add this geezer to ya budlist first!!<br/> ";
}
PHP Code:
add in users
viewpro int 1 default 0
Comment