require ("connection.inc");
require ("listc.inc");
require ("listm.inc");
require ("club_news.inc");
require ("auth.inc");
//echo 'mypid = '.$mypid.'
';
$mypid = $_GET['mypid'];
If (!$mypid || $mypid==0) {
print "ERROR!";
exit();
} else {
$query=mysql_query("select permission from clubs where club_id='$mypid'") OR DIE (mysql_error());
$c_row=mysql_fetch_array($query);
if ($c_row[permission]>0) {
if (!isset($PHP_AUTH_USER)) {
Header("WWW-authenticate: basic realm=\"www.eprst.ru\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "Эта страница требует регистрации с правами модератора\n";
exit();
} else {
$query=mysql_query("select * from users where nick_name='$PHP_AUTH_USER'") OR DIE (mysql_error());
if (!mysql_num_rows($query)) {
Header("WWW-authenticate: basic realm=\"www.eprst.ru\"");
Header( "HTTP/1.0 401 Unauthorized");
print"Пользователя с именем $PHP_AUTH_USER нет в базе!\n";
exit();
} else {
$row=mysql_fetch_array($query);
$access_level=$row[level];
if ($row[password]<>$PHP_AUTH_PW) {
Header("WWW-authenticate: basic realm=\"www.eprst.ru\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "
clubs.eprst.ru : include ("date.inc"); ?> |
Регистрация | Вход для пользователей | Создать свой клуб |
|
|
Регистрация | Вход для пользователей | Создать свой клуб |
clubs.eprst.ru : include ("date.inc"); ?> |