hooligan (12.12.2011/13:45)
rumit, значит в index.php
а где ?
<?php
/*myjornal by hooligan
http://kiket.ru просьба не убирать копирайт 2 недели*/
define('_IN_JOHNCMS', 1);
$headmod = 'myjornal';
$kop = 'kiket.ru';
require_once ('../incfiles/core.php');
$textl = 'Журнал';
require_once ('../incfiles/head.php');
if (!$user_id) {
display_error('Только для зарегистрированных посетителей');
require_once ('../incfiles/end.php');
exit;
}
/*модуль может быть любой, пишу на заказ...*/
$rank = array(
1 => 'Форум:',
2 => 'Дневник:',
3 => 'Фотоальбом:',
4 => 'Файлы:',
5 => 'Стена:',
6 => 'Карма',
11 => 'Клубы',
12 => 'Новое в клубе'
);
$chit = array(
0 => '<span class="red">не прочитано</span>',
1 => '<span class="green">прочитано</span>',
);
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `myjornal` WHERE `login`='$login' AND `chit`='0'"), 0);
$totalh = mysql_result(mysql_query("SELECT COUNT(*) FROM `myjornal` WHERE `login`='$login'"), 0);
echo '<div class="phdr">Журнал</div>';
echo 'Непрочитанное';if($total>0)
echo '<span class="red">+'.$total.'</span>';
echo '|<a href="history.php">История</a>('.$totalh.')';
if ($total) {
$req = mysql_query("SELECT * FROM `myjornal`
WHERE `login`='$login' AND `chit`='0' ORDER BY `time` DESC LIMIT $start, $kmess");
while ($res = mysql_fetch_assoc($req)) {
/*Для форума на какой странице сообщение?*/
$page = $set_forum['upfp'] ? 1 : ceil(mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type` = 'm' AND `refid` = '" . $res['r_id'] . "'" . ($rights >= 7 ? '' : " AND `close` != '1'")), 0) / $kmess);
echo '<div class="menu">';
if($res['modul']==1){
echo '<a href="case.php?act=del&idjornal='.$res['id'].'">[<span class="red"><b>X</b></span>]</a><span class="gray"><b>' . $rank[$res['modul']] . '</b></span>';
if($res['autor'])
echo '<b> '.$res['autor'].'</b>';
echo '<br/><a href="case.php?act=redirf&idjornal='.$res['id'].'&link='.$home.'/forum/index.php?id=' . $res['r_id'] . '&page=' . $page . '">'.$res['text'].'</a>';
echo '<br/><span class="gray"><b>' . $res['by'] . '</b> (<span class="green">'.$res['count'].'</span>)</span> ' . date("d.m.Y (H:i)", $res['time']) . '';
//echo '' . $chit[$res['chit']] . '';
}elseif($res['modul']==11){
/*Для клубов на какой странице сообщение?*/
$page = $set_forum['upfp'] ? 1 : ceil(mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_soo` WHERE `type` = 'm' AND `refid` = '" . $res['r_id'] . "'" . ($rights >= 7 ? '' : " AND `close` != '1'")), 0) / $kmess);
echo '<a href="case.php?act=del&idjornal='.$res['id'].'">[<span class="red"><b>X</b></span>]</a><span class="gray"><b>' . $rank[$res['modul']] . '</b></span>';
if($res['autor'])
echo '<b> '.$res['autor'].'</b>';
echo '<br/><a href="case.php?act=redirf&idjornal='.$res['id'].'&link='.$home.'/users_soo/index.php?id=' . $res['r_id'] . '&page=' . $page . '">'.$res['text'].'</a>';
echo '<br/><span class="gray"><b>' . $res['by'] . '</b> (<span class="green">'.$res['count'].'</span>)</span> ' . date("d.m.Y (H:i)", $res['time']) . '';
//echo '' . $chit[$res['chit']] . '';
}else{
echo '<a href="del.php?idjornal='.$res['id'].'">[<span class="red"><b>X</b></span>]</a><span class="gray"><b>' . $rank[$res['modul']] . '</b></span>';
if($res['autor'])
echo '<b> '.$res['autor'].'</b>';
echo '<br/><a href="case.php?act=redir&idjornal='.$res['id'].'">'.$res['text'].'</a>';
echo '<br/><span class="gray"><b>' . $res['by'] . '</b> (<span class="green">'.$res['count'].'</span>)</span> ' . date("d.m.Y (H:i)", $res['time']) . ' ';
}
echo '</div>';
}
++$i;
}else{
echo '<br/><span class="red">Нет новых уведомлений</span>';
}
if ($total > $kmess)
{
echo '<p><b>' . pagenav('index.php?', $start, $total, $kmess) . '</b></p>';
}
echo '<div class="phdr">Всего:'.$total.'';
echo '<a href="http://kiket.ru"><span style="float:right;">'.$kop.'</span></a>';
if(!$kop){
echo 'верни копирайт!';
}
echo '</div>';
$del = mysql_result(mysql_query("SELECT COUNT(*) FROM `myjornal` WHERE `login`='$login' AND `del`='1'"), 0);
echo '<a href="case.php?act=sbros"><span class="red">Сброс</span></a>|';
echo '<a href="dell.php"><span class="red">Отключенные ('.$del.')</span></a>';
require_once ('../incfiles/end.php');
?>