Dj-marc wrote:
I'm currently working on a adult gallery on my site but would like to place a code so that persons under the age of 18 cant view the page.
I use
if(getage(getuid_sid($strdate))>18)
but still they can view the page.
any help please?
///////////////////////////////////in core
function smalldick($sid)
{
$xpmyid = getuid_sid($sid);
$agex = mysql_fetch_array(mysql_query("SELECT birthday FROM lib3rtymrc_users WHERE id='".$xpmyid."'"));
$age = getage($agex[0]);
if($age>=18)
{
return true;
}else{
return false;
}
}
/////////////////////////////////in gallery
if(!smalldick($sid))
{
echo "<card id=\"main\" title=\"Under 18 Years\">";
echo "<p align=\"center\">";
$ideu = getuid_sid($sid);
$sexx = mysql_fetch_array(mysql_query("SELECT sex FROM lib3rtymrc_users WHERE id='".$ideu."'"));
if($sexx[0]=='M')
{
$sex = "dick";
}else if($sexx[0]=='F'){
$sex = "pussy";
}else{
$sex = "dick";
}
echo "You are unde 18 years!<br/>";
echo "Go away.Your $sex is to young!<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
/////////////////////////////