Вход Регистрация
Файл: index.php
Строк: 431
<?php

include 'system/core.php';

include 
'system/header.php';

switch(
$_GET['m'])
{

default:
///////////Главная//////////////




echo "<a href='/'><div class='logos'><img src='/images/logos.gif' alt='$k_new_fav'width='160' hight='100'title='scriptwm.ru'  /></div> </a>";




////////////////////////////////////////////////////////////////////////////////////
$rek mysql_query("SELECT * FROM `ads` WHERE `mode` = '1'");
echo 
'<div class="rek"><div class="rekl">';

while(
$rek2 mysql_fetch_array($rek))
{
echo 
'<img src="/images/r.png" alt="*"> <a href="'.$rek2['link'].'">'.$rek2['name'].'</a></br>';
}


echo 
'<img src="/images/r.png" alt="*"> <a href="bl?bl=rek">Купить СЂРµРєР»Р°РјСѓ</a></br>';


$cache H.'/sys/cache/ads.php';
$bot = (preg_match('#Google-Bot/([0-9]+.[0-9]+)#i'$_SERVER['HTTP_USER_AGENT']) or preg_match('#Yandex-Bot/([0-9]+.[0-9]+)#i'$_SERVER['HTTP_USER_AGENT']) ? true false);
if (
file_exists($cache) and (time() - filemtime($cache) < 43200))
$ads json_decode(file_get_contents($cache));
else {
$ads file_get_contents('http://dcms-fiera.ru/ads/ads.php?key=7e5a3daa084f226a8ce2d59531ebe37b&version=2');
$fp fopen($cache'w');
fwrite($fp$ads);
fclose($fp);
$ads json_decode($ads);
}
if (
is_array($ads[0]))
$ads $adsrand0count ($ads) - ) ];
$name explode ('|'$ads[1]);
$name $namerand(0count($name) - 1) ];
echo 
'<img src="/images/r.png" alt="*"> <a href="http://'.($bot $ads[2] : 'dcms-fiera.ru/ads/ads.php?out=236&id='.$ads[0]).'" target="_blank">'.$name.'</a>';





echo 
'</div>';

echo 
'</div>';
include 
'system/nvg.php';

/////////////////////////////////////////////////
if($user['id']) {
echo 
' <div class="start">';
echo 
'<div class="s" style="border-bottom:none;">';
echo 
'<table style="width:100%" cellspacing="0" cellpadding="0">';
echo 
'<tbody><tr><td style="vertical-align:top;width:10%;">';
echo 
'<center>';
echo 
'<a href="cab" title="Кабинет"><img class="ico" align="middle" src="/images/vcard.png" alt="*"></a></center></td>';
echo 
'<td style="vertical-align:top;width:10%;">';
echo 
'<center>';
echo 
'<a href="privat/" title="Почта"><img class="ico" align="middle" src="/images/mail2.png" alt="*"></a>';
if(
$user['id']){
$c mysql_result(mysql_query('select count(`id`) from `privat` where `ho` = "'.$user['id'].'" and `read` = "0"'),0);
if(
$c != 0) echo ' <b> (+'.$c.')</b>';
}
echo 
'</center></td>';
echo 
'<td style="vertical-align:top;width:10%;">';
echo 
'<center><a href="op/" title="Оповещения"><img class="ico" align="middle" src="/images/warning.png" alt="*"></a>';
if(
$user['id']){
$c mysql_result(mysql_query('select count(`id`) from `op` where `who` = "'.$user['id'].'" and `read` = "0"'),0);
if(
$c != 0) echo '<b> (+'.$c.')</b>';
}
echo 
'</center></td>';
echo 
'</tr></tbody></table>';
echo 
'</div>';
}
//////////////////////////////////////////////////////








$forum_t mysql_result(mysql_query('select count(`id`) from `forum_t`'),0);
$forum_post mysql_result(mysql_query('select count(`id`) from `forum_m`'),0);
$forum_news mysql_result(mysql_query('select count(`id`) from `forum_t` where `time` > "'.(time()-((60*60)*24)).'"'),0);
$forum_news2 mysql_result(mysql_query('select count(`id`) from `forum_m` where `time` > "'.(time()-((60*60)*24)).'"'),0);
$files mysql_result(mysql_query('select count(`id`) from `zc_f` where `status` = "0"'),0);
$files_new mysql_result(mysql_query('select count(`id`) from `zc_f` where `status` = "0" and `time` > "'.(time()-((60*60)*24)).'"'),0);



$news mysql_query('select * from `news` order by `time` desc limit 1');

echo 
'<a href="news/"><div class="tegi"><font color="white"><b> РќРѕРІРѕСЃС‚Рё СЂРµСЃСѓСЂСЃР° </b></font></div></a>';

while(
$news2 mysql_fetch_array($news))
{
echo 
'<div class="news"><div class="newss">';
echo 
'<div class="name">'.$news2['name'].'</div>';
echo 
smiles(bbcode($news2['text'])).'<br>

Добавил: '
.ustatus($news2['author']).' <a href="/us'.$news2['author'].'">'.uname($news2['author']).'</a> '.uaccess($news2['author']).' ('.times($news2['time']).')<br>

<span><a href="/news/com'
.$news2['id'].'">Комментарии</a> ('.mysql_result(mysql_query('select count(`id`) from `news_com` where `news` = "'.$news2['id'].'"'),0).')</span>';

}


echo 
'</div>';


/* $day = mysql_query("SELECT * FROM `user` WHERE `day` = '".date('d')."' and `m` = '".date('m')."' ORDER BY `id` DESC limit 10  ");
echo '<div class="inter"><center><b>Р�менинники СЃР°Р№С‚Р°</b></br>';
while($day2 = mysql_fetch_assoc($day))
{
echo ''.ustatus($day2['id']).' <a href="/us'.$day2['id'].'">'.uname($day2['id']).'</a> '.uaccess($day2['id']).', ';
}
echo'</center></br></div>';

echo '<div class="men"><img src="/images/obj.png" alt="*">  <a href="ob/"> РћР±СЊСЏРІР»РµРЅРёСЏ РїРѕ СЃР°Р№С‚Сѓ </a> ('.mysql_result(mysql_query('select count(`id`) from `ob`'),0).')</div>';
echo '';*/




echo ' <a href="forum/"><div class="tegi"><b> Р¤РѕСЂСѓРј РјР°СЃС‚еров ('.$forum_t.'/'.$forum_post.') (<font color="green"><b>+'.$forum_news.'</b></b></font>/<font color="red"><b>+'.$forum_news2.'</b></font>)</div></a>';
$last mysql_query('select * from `forum_t` order by `ltime` desc limit 5');
while(
$last2 mysql_fetch_array($last))
{

echo 
'<div class="poste">';

$last_m mysql_result(mysql_query('select count(`id`) from `forum_m` where `t` = "'.$last2['id'].'"'),0);

if(
$last2['check'] == 0)
{

if(
$last2['status'] == 0) echo '<img src="/modules/forum/images/the.png"/> '; else echo '<img src="/modules/forum/images/closed.png"/> ';

}
else
{

echo 
'<img src="/modules/forum/images/check.png"/> ';

}

if(
$user['id']) $on_page $user['on_page']; else $on_page 10;

echo 
'<a href="/forum/t'.$last2['id'].'">'.$last2['name'].'</a> ('.$last_m.') <a href="forum/t'.$last2['id'].'/p'.ceil(($last_m+1)/$on_page).'">>></a><br>';

echo 
'</div>';

}

/////Счетчики//////
$users mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user`"), 0);
$pc mysql_result(mysql_query('select count(`id`) from `pc_code` where `status` = "0"'),0);
$pc_new mysql_result(mysql_query('select count(`id`) from `pc_code` where `time` > "'.(time()-((60*60)*24)).'"'),0);

$users_new mysql_result(mysql_query('select count(`id`) from `user` where `registration` > "'.(time()-((60*60)*24)).'"'),0);
$news mysql_result(mysql_query('select count(`id`) from `news`'),0);
$users_online mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user` WHERE `online`>'".(time()-3600)."'"), 0);
/////Счетчики//////






























echo '<div class="menu">';


if(
mysql_result(mysql_query('select count(`id`) from `zc_f` where `time` > "'.(time()-((60*60)*24)).'" and `status` = "0"'),0) != 0$files_new '/<font color="red"><b>+'.mysql_result(mysql_query('select count(`id`) from `zc_f` where `time` > "'.(time()-((60*60)*24)).'" and `status` = "0"'),0).'</b></font>';


echo 
'<a href="zc/"><div class="tegi"><font color="white"><b>Загруз-центр</b> ('.$files.'<b>'.$files_new.'</font></b>)</div></a>';
if(
mysql_result(mysql_query('select count(`id`) from `zc_f` where `time` > "'.(time()-((60*60)*24)).'" and `status` = "0"'),0) != 0$files_new '/<font color="red"><b>+'.mysql_result(mysql_query('select count(`id`) from `zc_f` where `time` > "'.(time()-((60*60)*24)).'" and `status` = "0"'),0).'</b></font>';



if(
mysql_result(mysql_query('select count(`id`) from `zc_f`'),0) != 0)
{

$zc mysql_query('select * from `zc_f` where `status` = "0" order by `time` desc limit 4');

while(
$zc2 mysql_fetch_array($zc))
{

echo 
'<div class="post2"><img src="/images/box.png"/> <a href="/zc/f'.$zc2['id'].'">'.$zc2['name'].'</a> ('.round(filesize('modules/zc/files/'.$zc2['file'].'')/1024).' РєР±)</div>';

}

}
else
{

echo 
'<div class="err">Еще РЅРµС‚.</div>';

}
//echo '<a href="pc/"><div class="tegi">  РџРѕР»РµР·РЅС‹Рµ РєРѕРґС‹ ('.$pc.'/<font color="green"><b>+'.$pc_new.'</font></b>)</div></a>';///





?>
<script type="text/javascript">
function locs(){
document.location.href="";
}
setTimeout("locs()", 300000);
</script>

<?


////
// <a href="javascript:void(0)" onClick="javascript:window.open('http://web-first-step.ru/Pages/Vsplivaushee_okno.html', 'okno', 'width=400,height=300,status=no,toolbar=no, menubar=no,scrollbars=yes,resizable=yes');">
//Открыть "РњРѕРµ РІСЃРїР»С‹РІР°СЋС‰РµРµ РѕРєРЅРѕ"</a>

//

echo '<a href="/m"><div class="tegi">
<font color="white"><b>Магазин ('
.mysql_result(mysql_query('select count(`id`) from `m_tovar` '),0).')</b></font>
</div></a>'
;
$magaz mysql_query('select * from `m_tovar` order by `time` desc limit 3');
while(
$a mysql_fetch_array($magaz))
{

/* Р”елаем Р»РёРјРёС‚ СЃР»РѕРІ Рє РѕРїРёСЃР°РЅРёСЋ */
$text ''.$a['opis'].'';
$array explode(" "$text);
$text_num array_slice($array020);
$text_v implode(" "$text_num);
if(
count($array) > 3) {
$text_v .= '...';

}
/* Р”елаем Р»РёРјРёС‚ СЃР»РѕРІ Рє РѕРїРёСЃР°РЅРёСЋ */

echo '</div><div class="post2">
<img src="/modules/m/files/'
.$a['scrin'].'"  alt="*" class="image" align="left"  style="margin: 1px 8px 0px 0px;"/>
<a href="/m/tovar'
.$a['id'].'">'.$a['name'].'</a> <small>(<font color="green"><b>'.$a['rub'].'СЂ.</b></font>)
</small><br/>'
.$text_v.'<br>';






echo 
'<img src="/images/new.png" class="ico" alt="N"/> <a href="/">
<img src="/images/dollar.png" class="ico" alt="*"/></a>
<a href="/"><img src="/images/cart.png" class="ico" alt="*"/></a></div>'
;






}





echo 
'<div class="tegi"><font color="white"><b>прочее</font></b></b></div>';


echo 
'<a href="birga/"><div class="men">Биржа С‚СЂСѓРґР°</div></a>';
echo 
'<a href="ced/"><div class="men">Нечесть РёРЅС‚ернета</div></a>';
echo 
'<a href="servis/"><div class="men">Сервисы</div></a>';
echo 
'<a href="adm.php"><div class="men">РЎРїРёСЃРѕРє Р°РґРјРёРЅРёСЃС‚рации</div></a>';


echo 
'<div class="tegi"><font color="white"><b>Меню РїРѕР»СЊР·РѕРІР°С‚еля </font></b></div>';
if(!
$user['id']) echo '<div class="men"><span><a href="?m=auth">Авторизация</a><br /><a href="?m=registration">Регистрация</a><br /><a href="?m=password">Восстановление РїР°СЂРѕР»СЏ</a></span></div></div>';




if(
$user['id'])echo '
<a href="cab/"><div class="men"><img src="/images/acn.gif"/> Р›РёС‡РЅС‹Р№ РєР°Р±РёРЅРµС‚ </div></a>
<a href="bl/"><div class="men"><img src="/images/coins.png"/> РњРѕСЏ РїР°РЅРµР»СЊ </div></a>
<a href="?m=exit"><div class="men"><img src="/images/out.png"/> Р’ыход</div></a>'
;
echo 
'</b></b><div class="blk"><span style="color: #fff;">Онлайн: <a href="/online.php" style="color:white;">'.$users_online.'</a> РёР· <a href="/users.php" style="color:white;">'.$users.'</a></span><br />';
////
echo '<b>Последний: </b>';
$last mysql_query("SELECT * FROM `user` ORDER BY `registration` DESC LIMIT 1");
while(
$last2 mysql_fetch_assoc($last))
{

echo 
ustatus($last2['id']).' <a href="/us'.$last2['id'].'"><span style="color: #fff;">'.$last2['login'].'</span> '.uaccess($last2['id']).'</a>';
}

echo 
'</br>';
///////













$mtime microtime();
$mtime explode(" ",$mtime);
$mtime $mtime[1] + $mtime
[0];
$tstart $mtime;
//РІ footer
$mtime microtime();
$mtime explode(" ",$mtime);
$mtime $mtime[1] + $mtime
[0];
$tend $mtime;
$totaltime round(($tend -
$tstart)*10002);
$mem round
(memory_get_usage
() / 10242);

echo
' Р’© otvetwm.ru РІ„ў - 2014</div>';








echo 
'</div>';





///////////
//echo '</div></div><div class="end">';
//echo '<a href="javascript:window.scrollTo(0, 0);"><img src="/images/ups.png" align="left" vspace="1" border="0" alt=""></a>';
//echo '<center><font color="white"><b>otvetwm.ru</b></font><br><small>Р’СЃРµ РїСЂР°РІР° Р·Р°С‰РёС‰РµРЅС‹</small></center>';
//echo '</div></div></div></div>';
//echo '</body></html>';
///////////


break;
case 
'guest':

if(
$user['id'])
{
header('Location: /index.php'); exit;
}

echo 
'<div class="podverh">';
echo 
'<div class="uv"><div class="sm"></div><div class="sm"></div><div class="co"><b>Ограничения РїРѕ СЃР°Р№С‚Сѓ</b></div></div>';
echo 
'</div>';
echo 
'<div class="start">';
echo 
'<div class="s"><div class="ss"><span><a href="?m=registration">Регестрация</a></span></div></div>';
echo 
'<div class="post1"><b>Сайт Р·Р°РєСЂС‹С‚ РѕС‚ РіРѕСЃС‚ей</b></div>';

include 
'system/footer.php';

break;
case 
'auth':

if(
$user['id'])
{

header('Location: /index.php'); exit;

}

echo 
'<div class="tegi">Авторизация</div></div>';

echo 
' <div class="start">';
echo 
'<div class="post1"><span><a href="?m=password">Забыли РїР°СЂРѕР»СЊ?</a></span></div>';

if(isset(
$_GET['process']))
{

$type TextGuard($_POST['type']);

$login TextGuard($_POST['login']);
$password TextGuard($_POST['password']);
$captcha TextGuard($_POST['captcha']);

if(empty(
$captcha) or !is_numeric($captcha)) $err[] = 'Введите РїСЂРѕРІРµСЂРѕС‡РЅС‹Р№ РєРѕРґ.';

if(
$captcha != $_SESSION['control']) $err[] = 'Р’С‹ РІРІРµР»Рё РЅРµРІРµСЂРЅС‹Р№ РєРѕРґ СЃ РєР°СЂС‚РёРЅРєРё.';

if(
$type == 1)
{

if(empty(
$login)) $err[] = 'Р’С‹ РЅРµ РІРІРµР»Рё Р»РѕРіРёРЅ';

}
elseif(
$type == 2)
{

if(empty(
$login) or !is_numeric($login)) $err[] = 'Введите ID.';

}

if(empty(
$password)) $err[] = 'Р’С‹ РЅРµ РІРІРµР»Рё РїР°СЂРѕР»СЊ';

if(
$type == 1)
{

$dbinfo mysql_fetch_array(mysql_query("SELECT `id`,`login`,`password` FROM `user` WHERE `login` = '".$login."' and `password`='".$password."' LIMIT 1"));

}
elseif(
$type == 2)
{

$dbinfo mysql_fetch_array(mysql_query("SELECT `id`,`password`,`login` FROM `user` WHERE `id` = '".$login."' and `password`='".$password."' LIMIT 1"));

}

if(!empty(
$login) && !empty($password)) if($dbinfo==0$err[] = 'Введенные РґР°РЅРЅС‹Рµ РЅРµ РІРµСЂРЅС‹ ';

if(!
$err)
{
mysql_query("INSERT INTO `logs`(`who`,`time`,`vh`,`ip`,`ua`)VALUES('".$dbinfo['login']."','".time()."','1','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['HTTP_USER_AGENT']."')");
setcookie('user_id'$dbinfo['id'], time()+86400*365'/');
setcookie('password'$dbinfo['password'], time()+86400*365'/');
header('Location: /index.php');
}
else
{
echo 
'<div class="err">';
mysql_query("INSERT INTO `logs`(`who`,`time`,`vh`,`ip`,`ua`)VALUES('".$login."','".time()."','0','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['HTTP_USER_AGENT']."')");

foreach(
$err as $err_info)
{

echo 
$err_info.'<br>';
}
echo 
'</div>';

}

}

echo 
'<div class="glav"><form action="?m=auth&process" method="post">

Ваш <select name="type"><option value="1">РќРёРє</option><option value="2">ID</option></select><br>
<input name="login"/><br/>Пароль:<br/><input type="password" name="password"/><br/>
РљРѕРґ <img src="/captcha.php" alt="'
.$code.'"/>:<br><input name="captcha"/><br>

<input type="submit" value="Р’С…РѕРґ"/>

</form></div></div>'
;


echo 
'<div class="levo"><img src="/images/homepage.gif"/> <a href="/index.php">РќР° РіР»Р°РІРЅСѓСЋ</a></div></div>';



/////Счетчики//////
$users mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user`"), 0);
$pc mysql_result(mysql_query('select count(`id`) from `pc_code` where `status` = "0"'),0);
$pc_new mysql_result(mysql_query('select count(`id`) from `pc_code` where `time` > "'.(time()-((60*60)*24)).'"'),0);

$users_new mysql_result(mysql_query('select count(`id`) from `user` where `registration` > "'.(time()-((60*60)*24)).'"'),0);
$news mysql_result(mysql_query('select count(`id`) from `news`'),0);
$users_online mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user` WHERE `online`>'".(time()-3600)."'"), 0);
/////Счетчики//////
echo '</b></b><div class="blk"><span style="color: #fff;">Онлайн: <a href="/online.php" style="color:white;">'.$users_online.'</a> РёР· <a href="/users.php" style="color:white;">'.$users.'</a></span><br />';
////
echo '<b>Последний: </b><span style="color: #fff;">';
$last mysql_query("SELECT * FROM `user` ORDER BY `registration` DESC LIMIT 1");
while(
$last2 mysql_fetch_assoc($last))
{

echo 
ustatus($last2['id']).' <a href="/us'.$last2['id'].'">'.uname($last2['id']).' '.uaccess($last2['id']).'</span></a>';
}

echo 
'</br>';
///////

echo' <a href="/"> Р’пїЅ otvetwm.ru РІпїЅпїЅ - 2014</a> </div>';
include 
'system/footer.php';

break;
case 
'exit':
if(!
$user['id']){
header('Location: /?m=auth'); exit;
}
setcookie('user_id''/');
setcookie('password''/');

header('Location: /index.php');

break;
case 
'registration':

if(
$user['id'])
{

header('Location: /index.php'); exit;

}

echo 
'<div class="tegi">Регистрация</div></div>';
echo 
'</div>';
echo 
' <div class="start">';
echo 
'<div class="post1"><span><a href="?m=auth">Авторизация</a></span></div>';

if(isset(
$_GET['process'])){

$login TextGuard($_POST['login']);
$password TextGuard($_POST['password']);
$dei TextGuard($_POST['dei']);
$password2 TextGuard($_POST['password2']);
$sex TextGuard($_POST['sex']);
$secret_word TextGuard($_POST['secret_word']);

if(empty(
$login)){ echo '<div class="err">Р’С‹ РЅРµ РІРІРµР»Рё Р»РѕРіРёРЅ</div>';
}else{

$dbinfo mysql_fetch_array(mysql_query("SELECT `login` FROM `user` WHERE `login` = '".$login."' LIMIT 1"));
if(!empty(
$login))if($dbinfo!=0){ echo '<div class="err">Такой Р»РѕРіРёРЅ СѓР¶Рµ СЃСѓС‰РµСЃС‚вует</div>';
}else{

if(!
preg_match('|^[a-z0-9-]+$|i'$login)){ echo '<div class="err">Р’ Р»РѕРіРёРЅРµ РїСЂРёСЃСѓС‚ствуют Р·Р°РїСЂРµС‰РµРЅРЅС‹Рµ СЃРёРјРІРѕР»С‹</div>';
}else{

if(
strlen($login) <or strlen($login)>20){ echo '<div class="err">Логин СЃР»РёС€РєРѕРј РґР»РёРЅРЅС‹Р№ РёР»Рё РєРѕСЂРѕС‚РєРёР№</div>';
}else{

if(empty(
$password)){ echo  '<div class="err">Р’С‹ РЅРµ РІРІРµР»Рё РїР°СЂРѕР»СЊ</div>';
}else{

if(!
preg_match('|^[a-z0-9-]+$|i'$password)){ echo '<div class="err">Р’ РїР°СЂРѕР»Рµ РїСЂРёСЃСѓС‚ствуют Р·Р°РїСЂРµС‰РµРЅРЅС‹Рµ СЃРёРјРІРѕР»С‹</div>';
}else{

if(
strlen($password) <or strlen($password)>50){ echo '<div class="err">Пароль СЃР»РёС€РєРѕРј РґР»РёРЅРЅС‹Р№ РёР»Рё РєРѕСЂРѕС‚РєРёР№</div>';
}else{

if(empty(
$password2)){ echo '<div class="err">Р’С‹ РЅРµ РІРІРµР»Рё РїРѕРІС‚орный РїР°СЂРѕР»СЊ</div>';
}else{

if(empty(
$secret_word)){ echo '<div class="err">Р’С‹ РЅРµ РІРІРµР»Рё СЃРµРєСЂРµС‚РЅРѕРµ СЃР»РѕРІРѕ</div>';
}else{

if(!
preg_match('|^[a-zР°-РЇ0-9-]+$|i'$password)){ echo '<div class="err">Р’ СЃРµРєСЂРµС‚РЅРѕРј СЃР»РѕРІРµ РїСЂРёСЃСѓС‚ствуют Р·Р°РїСЂРµС‰РµРЅРЅС‹Рµ СЃРёРјРІРѕР»С‹</div>';
}else{

if(
strlen($secret_word) <or strlen($secret_word)>50){ echo '<div class="err">Секретное СЃР»РѕРІРѕ СЃР»РёС€РєРѕРј РґР»РёРЅРЅРѕРµ РёР»Рё РєРѕСЂРѕС‚РєРѕРµ</div>';
}else{

mysql_query("INSERT INTO `user`(
`login`,
`password`,
`dei`,
`registration`,
`secret_word`,
`rating`,
`ip`,
`ua`,
`sex`,
`on_page`
)VALUES(
'"
.$login."',
'"
.$password."',
'"
.$dei."',
'"
.time()."',
'"
.$secret_word."',
'0',
'"
.$_SERVER['REMOTE_ADDR']."',
'"
.$_SERVER['HTTP_USER_AGENT']."',
'"
.$sex."',
'10'
)"
);

$reg_id mysql_insert_id();

mysql_query("INSERT INTO `reg`(
`who`,
`ok`
)VALUES(
'"
.$reg_id."',
'0'
)"
);

mysql_query("INSERT INTO `gradient`(
`id`,
`who`,
`start`,
`end`
)VALUES(
'"
.$reg_id."',
'"
.$reg_id."',
'0',
'0'
)"
);

$regaa mysql_query("SELECT * FROM `user` WHERE `status` > '2'");
while(
$regaa2 mysql_fetch_assoc($regaa)){

mysql_query("INSERT INTO `op`(
`who`,
`ho`,
`text`,
`time`,
`read`
)VALUES(
'"
.$regaa2['id']."',
'3',
'произошла РЅРѕРІР°СЏ СЂРµРіРёСЃС‚рация [url=/admin?m=reg]подтвердить[/url]',
'"
.time()."',
'0'
)"
);
}

setcookie('user_id'$reg_idtime()+86400*365'/');
setcookie('password'$passwordtime()+86400*365'/');
echo 
'<div class="msg">Р’С‹ <u>успешно</u> Р·Р°СЂРµРіРёСЃС‚рировались!<br>Ваш Р»РѕРіРёРЅ: <u>'.$login.'</u> | Р’аш РїР°СЂРѕР»СЊ: <u>'.$password.'</u></div>';

}}}}}}}}}}}}
echo 
'<div class="glav"><form action="?m=registration&process" method="post">

*Ваш Р»РѕРіРёРЅ:<br><input name="login" value="'
.$login.'"/><br>

*Ваш РїР°СЂРѕР»СЊ:<br><input name="password" value="'
.$password.'"/><br>

*Повторить РїР°СЂРѕР»СЊ:<br><input name="password2" value="'
.$password2.'"/><br>

Ваш РїРѕР»:<br>
<input type="radio" name="sex" value="1" checked="checked" /> РњСѓР¶
<input type="radio" name="sex" value="2" /> Р–ен<br/>

Секретное СЃР»РѕРІРѕ:<br><input name="secret_word" value="'
.$secret_word.'"/><br>

<input type="submit" value="Регистрация"/></form></div></div>'
;

echo 
'<div class="levo"><img src="/images/homepage.gif"/> <a href="/index.php">РќР° РіР»Р°РІРЅСѓСЋ</a></div></div>';


/////Счетчики//////
$users mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user`"), 0);
$pc mysql_result(mysql_query('select count(`id`) from `pc_code` where `status` = "0"'),0);
$pc_new mysql_result(mysql_query('select count(`id`) from `pc_code` where `time` > "'.(time()-((60*60)*24)).'"'),0);

$users_new mysql_result(mysql_query('select count(`id`) from `user` where `registration` > "'.(time()-((60*60)*24)).'"'),0);
$news mysql_result(mysql_query('select count(`id`) from `news`'),0);
$users_online mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user` WHERE `online`>'".(time()-3600)."'"), 0);
/////Счетчики//////
echo '</b></b><div class="blk"><span style="color: #fff;">Онлайн: <a href="/online.php" style="color:white;">'.$users_online.'</a> РёР· <a href="/users.php" style="color:white;">'.$users.'</a></span><br />';
////
echo '<b>Последний: </b><span style="color: #fff;">';
$last mysql_query("SELECT * FROM `user` ORDER BY `registration` DESC LIMIT 1");
while(
$last2 mysql_fetch_assoc($last))
{

echo 
ustatus($last2['id']).' <a href="/us'.$last2['id'].'">'.uname($last2['id']).' '.uaccess($last2['id']).'</span></a>';
}

echo 
'</br>';
///////

echo' <a href="/"> Р’© otvetwm.ru РІ„ў - 2014</a> </div>';

include 
'system/footer.php';

break;
case 
'password':

if(
$user['id']){
header('Location: /index.php'); exit;
}

echo 
'<div class="podverh">';
echo 
'<div class="uv"><div class="sm"></div><div class="sm"></div><div class="co">Восстановление РїР°СЂРѕР»СЏ</div></div>';
echo 
'</div>';
echo 
' <div class="start">';
echo 
'<div class="s"><div class="ss"><span><a href="?m=auth">Авторизация</a></span></div></div>';

if(isset(
$_GET['process'])){
$login TextGuard($_POST['login']);
$secret_word TextGuard($_POST['secret_word']);
if(empty(
$login)) $err[] = 'Р’С‹ РЅРµ РІРІРµР»Рё Р»РѕРіРёРЅ';
if(empty(
$secret_word)) $err[] = 'Р’С‹ РЅРµ РІРІРµР»Рё СЃРµРєСЂРµС‚РЅРѕРµ СЃР»РѕРІРѕ';
$dbinfo mysql_fetch_array(mysql_query("SELECT `login`,`secret_word`,`password` FROM `user` WHERE `login` = '".$login."' and `secret_word`='".$secret_word."' LIMIT 1"));
if(!empty(
$login) && !empty($secret_word)) if($dbinfo==0$err[] = 'Введенные РґР°РЅРЅС‹Рµ РЅРµ РІРµСЂРЅС‹';
if(!
$err){
echo 
'<div class="msg"><u>Успешно</u><b>Ваш РїР°СЂРѕР»СЊ: <u>'.$dbinfo['password'].'</u></b></div>';
}else{
echo 
'<div class="err">';
foreach(
$err as $err_info){
echo 
$err_info.'<br>';
}
echo 
'</div>';
}}

echo 
'<div class="glav"><form action="?m=password&process" method="post">
Логин:<br><input name="login" value="'
.$login.'"/><br>
Секретное СЃР»РѕРІРѕ:<br><input name="secret_word" value="'
.$secret_word.'"/><br>
<input type="submit" value="Напомнить"/>
</form></div></div>'
;

/////Счетчики//////
$users mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user`"), 0);
$pc mysql_result(mysql_query('select count(`id`) from `pc_code` where `status` = "0"'),0);
$pc_new mysql_result(mysql_query('select count(`id`) from `pc_code` where `time` > "'.(time()-((60*60)*24)).'"'),0);

$users_new mysql_result(mysql_query('select count(`id`) from `user` where `registration` > "'.(time()-((60*60)*24)).'"'),0);
$news mysql_result(mysql_query('select count(`id`) from `news`'),0);
$users_online mysql_result(mysql_query("SELECT COUNT(`id`) FROM `user` WHERE `online`>'".(time()-3600)."'"), 0);
/////Счетчики//////
echo '</b></b><div class="blk"><span style="color: #fff;">Онлайн: <a href="/online.php" style="color:white;">'.$users_online.'</a> РёР· <a href="/users.php" style="color:white;">'.$users.'</a></span><br />';
////
echo '<b>Последний: </b><span style="color: #fff;">';
$last mysql_query("SELECT * FROM `user` ORDER BY `registration` DESC LIMIT 1");
while(
$last2 mysql_fetch_assoc($last))
{

echo 
ustatus($last2['id']).' <a href="/us'.$last2['id'].'">'.uname($last2['id']).' '.uaccess($last2['id']).'</span></a>';
}

echo 
'</br>';
///////

echo' <a href="/"> Р’© otvetwm.ru РІ„ў - 2014</a> </div>';
include 
'system/footer.php';
break;

}

?>
Онлайн: 2
Реклама