Вход Регистрация
Файл: info/star.php
Строк: 51
<?
require'../shaxty.php'// waphp.ru - закрытый клуб вап мастеров!
check_login();

$title 'Звезды';
$align 'left';
$head 'Звезды';
include_once (
H.'shaxty/head.php');



$data $_SERVER['QUERY_STRING'];
list(
$nk$mod) = explode(";"$data);

$nk check(abs(intval($nk)));
if (!
user_inf($nk)){
echo 
'Такого пользователя не существует!<br />';
//include_once (H.'shaxty/foot.php');
}
$inf mysql_fetch_array (@mysql_query ("Select * from users where id = '".$nk."'"));

$mod check($mod);


if(
$mod=='add'){
levels(7);
if (
$inf[id]==$user[id])echo '<b>Себе звезды ставить нельзя!</b><br />';
else{

if (empty(
$_POST['msg'])){
echo 
'<form action="?'.$inf['id'].';add" method="post">';
echo 
'Здесь Вы, как представитель администрации сайта, можете наградить пользователя звездой за помощь другим юзерам, помощь сайту, активное посещение сайта/форума или иные действия во благо сайта и его пользователей.<br /><br />';
echo 
'Причина награждения:<br /><textarea cols="'.$user['pole2'].'" rows="'.$user['pole1'].'" name="msg"></textarea><br/>';

echo 
'<input type="submit" class="ibutton" value="Добавить"/></form><br /><br />';
}else{
kiks(); // Проверяем не выпнут ли юзер

if (strlen2($_POST['msg'])<10){echo 'Комментрарий не должен быть короче 10 символов!<br />';
include_once (
H.'shaxty/foot.php');
}

if (
$user['translit']==1)$_POST['msg'] = translit($_POST['msg']);


mysql_query ("INSERT INTO star_users (star_id,user_id,time,msg) VALUES ('$inf[id]','$user[id]','$time','".check($_POST['msg'])."')");
$m mysql_insert_id();
if (
$user['sex']==1)$sex 'дал'; else $sex 'дала';
$msgpr '[b]'.$user['user'].'[/b] '.$sex.' вам   [url=http://'.$_SERVER['HTTP_HOST'].'/info/star.php?'.$inf['id'].';'.$m.']звезду[/url]';
if (
$inf['id'] != $user['id'])mysql_query("INSERT INTO lenta (user_id,news_id,news_razd,news_col,news_time,news_read,news_sort,text) VALUES ('".$inf['id']."','".$m."','star','1','".$time."','0','2','".$msgpr."')");    //news_sort =  '1-Подписки','2-Мои','3-Участвовал
header("Location: /$inf[id]");exit;
}

}

}else{
$mod intval($mod);
$a mysql_fetch_array (@mysql_query ("Select * from star_users where star_id = '".$inf['id']."' and id = '".$mod."'"));

echo 
'Звезда <img src="/img/star.png" alt="*"/> вручена пользователю <b>'.$inf['user'].'</b><br />';
echo 
'Причина: <b>'.text($a['msg']).'</b>';
echo 
'<br />Вручил: '.nik($a['user_id']).' ('.times($a['time']).')<br />';








}

echo 
'<br />';
echo 
$div1.'<a href="'.H.$inf[id].'">В анкету</a>'.$div9;
include_once (
H.'shaxty/foot.php');
?>
Онлайн: 0
Реклама