Quote:
Originally Posted by Polo
here
|
:ermm: There is something wrong then...
The page I don't want the guest to view is this one:
http://www.interfans.org/forum/profil_pic.php
Here's the code, as u can see there is no the code mentioned before
Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'profil_pic');
// get special phrase groups
$phrasegroups = array('cpglobal','forum','user');
// get special data templates from the datastore
$specialtemplates = array();
// on met en cache les templates
$globaltemplates = array('PROFIL_PIC','profil_pic_lettres','profil_pic_liste');
// pre-cache templates used by specific actions
$actiontemplates = array();
require_once('./global.php');
globalize($_REQUEST, array(
'lettre' => STR,
'usergroup' => STR,
'ordre' => STR
));
if (!$ordre)
{
$ordre="ASC";
$image="desc";
}
if ($ordre == "ASC")
{
$ordre2 = "DESC";
$image="desc";
} else {
$ordre2 = "ASC";
$image = "asc";
}
if ($lettre!="")
{
$condition = "AND user.username LIKE ('$lettre%')";
$tri = "ORDER BY user.username";
if (!$ordre)
{
$ordre = "ASC";
$ordre2 = "DESC";
}
}
if ($usergroup != "")
{
$tri = "ORDER BY user.usergroupid";
if ($ordre=="DESC")
{
$ordre2 = "ASC";
$image = "asc";
} else
{$ordre2 = "DESC";
$image="desc";
}
} else $tri = "ORDER BY user.username";
$pagenumber = $_REQUEST['page'];
if ($pagenumber == "") $pagenumber=1;
$page_start=($pagenumber-1)*10;
$listes = $DB_site->query("
SELECT profil.userid, profil.profilepicdata, profil.filename, user.username AS username, user.usergroupid AS usergroupid, usergroup.title AS title, usergroup.opentag AS open, usergroup.closetag AS fin
FROM ". TABLE_PREFIX ."customprofilepic AS profil
LEFT JOIN ". TABLE_PREFIX ."user AS user ON (user.userid=profil.userid)
LEFT JOIN ". TABLE_PREFIX ."usergroup AS usergroup ON (user.usergroupid = usergroup.usergroupid)
WHERE profil.visible='1' $condition
$tri $ordre LIMIT $page_start,10 ");
$result= $DB_site->query_first("SELECT COUNT(profil.userid) AS nb FROM ". TABLE_PREFIX ."customprofilepic AS profil LEFT JOIN ". TABLE_PREFIX ."user AS user ON (user.userid=profil.userid)
LEFT JOIN ". TABLE_PREFIX ."usergroup AS usergroup ON (user.usergroupid = usergroup.usergroupid)
WHERE profil.visible='1' $condition
$tri $ordre");
// on construit maintenant la navigation entre les pages
$totalpages=ceil(($result[nb])/10);
$alt = "1";
$show['first'] = "1";
$show['prev'] = "1";
$show['next'] = "1";
$show['last'] = "1";
$firstnumbers[first] = "1";
$firstnumbers['last'] = $totalpages;
$total = $totalpages;
if ($pagenumber==1) $show['prev'] = "0";
else $prevpage=$pagenumber-1;
if ($pagenumber == $total) $show['next'] = "0";
else $nextpage=$pagenumber+1;
for($i=0;$i<$totalpages;$i++) {
$curpage=$i+1;
if($pagenumber==$curpage) {
eval("\$pagenav .= \"".fetch_template('pagenav_curpage')."\";");
} else {
if ($usergroup!="")
{
$address = "profil_pic.php?usergroup=oui&ordre=$ordre";
eval("\$pagenav .= \"".fetch_template('pagenav_pagelink')."\";");
}
else if ($lettre != "")
{
$address = "profil_pic.php?lettre=$lettre";
eval("\$pagenav .= \"".fetch_template('pagenav_pagelink')."\";");
}
else {
$address = "profil_pic.php?";
eval("\$pagenav .= \"".fetch_template('pagenav_pagelink')."\";");
}
}
}
eval("\$navigation = \"".fetch_template('pagenav')."\";");
while ($liste=$DB_site->fetch_array($listes))
{
eval("\$pic .= \"".fetch_template('profil_pic_liste')."\";");
$alt++;
if ($alt>2) $alt="1";
}
$navbits[lastelement] = "Gallery";
for ($i=65; $i < 91; $i++)
{
$currentletter = chr($i);
if($currentletter==$lettre)
{
$thisletter="1";
} else
{
$thisletter="0";
}
eval("\$lettres .= \"".fetch_template('profil_pic_lettres')."\";");
}
eval("\$navbar = \"".fetch_template('navbar')."\";");
eval("print_output(\"".fetch_template('PROFIL_PIC')."\");");
?>