Размер файла: 26.53Kb
- <?php
- ########################################
- ## WAP-ENGINE ##
- ########################################
- ## ##
- ## Автор : CHUMA (Токарев Владимир) ##
- ## e-mail : crazychuma@gmail.com ##
- ## WAP : http://wap-engine.ru ##
- ## ##
- ########################################
- ## ВЫ НЕ ИМЕЕТЕ ПРАВО ##
- ## ИЗМЕНЯТЬ КОД СКРИПТА ##
- ## ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ! ##
- ########################################
- include ('../../config.php');
- include ('../../templates/run.php');
- include ('../../templates/func.php');
- $title_page = 'Форум';
- ####################
- $login_in = $login;
- $passw_in = $passw;
- $status_in = $status;
-
- if ($portal=='off')
- {
- include '../../themes/'.$themes.'.php';
- echo'<p align="center">'.$offmes.'</p>';
- include ('../../templates/foot.php');
-
- }
- if ($portal=='on')
- {
- $id = filter($_GET['id']);
- $str = filter($_GET['str']);
- $str_r = filter($_GET['str_r']);
-
- $razdel_data = '../../data/forum/razdel.php';
- $razdel_f = file($razdel_data);
- $razdel_count = count($razdel_f);
- $podrazdel_data = '../../data/forum/podrazdel.php';
- $podrazdel_f = file($podrazdel_data);
- $podrazdel_count = count($podrazdel_f);
- ####################
- if(empty($_GET['act']))
- {
- $m_polozhenie = 'На форуме';
- include '../../themes/'.$themes.'.php';
-
- echo'<p class="modul_name" align="center">Форум</p>';
- echo'<p align="center">Последние <a href="index.php?act=last_temy&'.session_name().'='.session_id().'">темы</a> | <a href="index.php?act=last_mes&'.session_name().'='.session_id().'">ответы</a></p>';
-
- if((isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in) || $dostup_forum == 1)
- {
- if($razdel_count == 4)
- {
- echo"<p class=\"err\">Нет ни одного раздела.</p>";
- }
-
- for($i = 2; $i < $razdel_count - 2; $i++)
- {
- $razdel_arr = explode('|', $razdel_f[$i]);
-
- echo'<p class="a"><a href="index.php?act=showrazdel&str_r='.$i.'&'.session_name().'='.session_id().'" class="aa">'.$razdel_arr[1].'</a><br /></p>';
- # echo'<p class="b">';
- $a = 0;
- for($ii = 2; $ii < $podrazdel_count - 2; $ii++)
- {
- $podrazdel_arr = explode('|', $podrazdel_f[$ii]);
-
- if($podrazdel_arr[1] == $razdel_arr[0])
- {
- $temy_count = $podrazdel_arr[4];
- if(empty($temy_count))
- { $temy_count = 0; }
- unset($mes_c);
- $mes_c = trim($podrazdel_arr[5]);
- if(empty($mes_c))
- { $mes_c = 0; }
-
- # echo'<a href="index.php?act=showforum&id='.$podrazdel_arr[0].'&str='.$ii.'&str_r='.$i.'&'.session_name().'='.session_id().'">'.$podrazdel_arr[2].'</a> ('.$temy_count.'|'.$mes_c.')<br />';
- $a = 1;
- }
- }
- if(empty($a))
- {
- echo"<p class=\"b\">Нет ни одного подраздела.</p>";
- }
- #echo"</p>";
- }
- }
- else
- {
- echo'<p class="err">Вы не авторизованы!!! Войдите в личный кабинет.<br /></p>';
- echo'<p><br /><a href="../kabinet/index.php?'.session_name().'='.session_id().'">В кабинет</a><br /></p>';
- }
- include ('../../templates/foot.php');
- }
- ####################
- if($_GET['act'] == 'showforum')
- {
- $podrazdel_arr = explode('|', $podrazdel_f[$str]);
- $razdel_arr = explode('|', $razdel_f[$str_r]);
-
- $title_page = $podrazdel_arr[2].' » '.$razdel_arr[1].' » Форум';
-
- include '../../themes/'.$themes.'.php';
-
- if((isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in) || $dostup_forum == 1)
- {
- if($str_r > 1 && $str_r < $razdel_count - 2 && $podrazdel_arr[1] == $razdel_arr[0])
- {
- echo'<p class="modul_name"align="center"><a href="index.php?'.session_name().'='.session_id().'">Форум</a> » <a href="index.php?act=showrazdel&str_r='.$str_r.'&'.session_name().'='.session_id().'">'.$razdel_arr[1].'</a> » '.$podrazdel_arr[2].'</p>';
-
- $m_polozhenie = 'На форуме в разделе "'.trim($razdel_arr[1]).' » '.trim($podrazdel_arr[2]).'"';
-
- $temy_data = '../../data/forum/podrazdel/'.$id.'.php';
- $temy_f = @file($temy_data);
- @array_splice($temy_f, 0, 2);
- @array_splice($temy_f, -2, 2);
- $temy_count = count($temy_f);
-
- if(!empty($podrazdel_arr[3]) && $_SESSION['passrazd'] != trim($podrazdel_arr[3]))
- {
- if($_GET['err'] == 1)
- {
- echo'<p class="err">ОШИБКА!!! Вы не ввели пароль.<br /></p>';
- }
- if($_GET['err'] == 2)
- {
- echo'<p class="err">ОШИБКА!!! Неправильный пароль.<br /></p>';
- }
- echo'<p class="err">Внимание!!! Данный раздел под паролем.<br /></p>';
- echo'<form method="post" action="vhod.php?id='.$id.'&str='.$str.'&str_r='.$str_r.'&'.session_name().'='.session_id().'">';
- echo'<p class="b">Пароль:<br /><input name="passrazd" maxlength="10" value="" /><br />';
- echo'<input value="Войти" name="do" type="submit" /></p></form>';
- echo'<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a><br /></p>';
- include ('../../templates/foot.php');
- exit;
- }
-
- if(empty($_GET['page']))
- {
- $page_get = 1;
- }
- else
- {
- $page_get = $_GET['page'];
- }
-
- if (preg_match("#^[0-9]*$#", $page_get) && preg_match("#^[0-9]*$#", $num) && $id == $podrazdel_arr[0])
- {
- echo'<p class="a"><img src="/images/st/plys.gif"alt=""/> <a href="newtema.php?id='.$id.'&str='.$str.'&str_r='.$str_r.'&'.session_name().'='.session_id().'">Новая тема</a></p>';
-
- if ($page_get < 0 || $page_get > $stranic && $stranic >=1)
- {
- echo'<p>Данной страницы несуществует!</p>';
- }
-
- if(empty($temy_f))
- {
- echo'<p class="err">Нет ни одной темы.</p>';
- }
- else
- {
- for ($i = 0; $i <= $temy_count; $i++)
- {
- if (!empty($temy_f[$i]))
- {
- $temy_arr = explode('|',$temy_f[$i]);
- $stranic_tem = ceil($temy_arr[8]/$koltemmes);
- $str_t = $i + 2;
-
- if($temy_arr[5] == '!')
- {
- echo'<p class="b">';
- echo'<img src="/themes/chuma/01.gif"alt=""/> ';
- if($temy_arr[6] == '#')
- {
- echo'<img src="/themes/chuma/02.gif"alt=""/> ';
- }
- user_data('../../data/users/'.$temy_arr[7].'.php');
- $nick_name_arr = explode('::', $nickname);
- $nickname = $nick_name_arr[0];
- $nickcolor = $nick_name_arr[1];
- if(!empty($nickname))
- {
- if(!empty($nickcolor))
- {
- $login_nick_color = ''.$nickname.'';
- }
- else
- {
- $login_nick_color = ''.$nickname.'';
- }
- }
- else
- {
- $login_nick_color = ''.$temy_arr[7].'';
- }
- echo'<a href="showtema.php?id='.$temy_arr[0].'&str='.$str.'&str_r='.$str_r.'&'.session_name().'='.session_id().'">'.$temy_arr[4].'</a> ('.trim($temy_arr[8]).') '.$login_nick_color.' <a href="showtema.php?id='.$temy_arr[0].'&str='.$str.'&str_r='.$str_r.'&page='.$stranic_tem.'&'.session_name().'='.session_id().'">»</a><br />';
- echo'</p>';
- if(isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in && ($status_in == '1' || $status_in == '2' || $status_in == '3'))
- {
- echo'<p class="dy">';
- echo"[<a href=\"admin.php?act=deltem&id=$id&str_t=$str_t&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\"onclick=\"return confirm('Подтверждаете удаление?')\">Удал</a>]";
- echo"[<a href=\"admin.php?act=edittem&id=$id&str_t=$str_t&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\">Ред</a>]";
-
- echo"[<a href=\"admin.php?act=movetem&id=$id&str_t=$str_t&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\">Перенести</a>]";
- if($status_in == "1" || $status_in == "2")
- {
- echo"[<a href=\"admin.php?act=osvob&id=$id&str_t=$str_t&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\">Открепить</a>]";
- }
- echo"</p>";
- }
- }
- else
- {
- $not_top_tema[] = $temy_f[$i].'|'.$str_t;
- }
- }
- }
-
- $temy_count = count($not_top_tema);
- $kolmes = $koltem;
- $stranic = ceil($temy_count/$kolmes);
-
- if($page_get < 0)
- {
- $page_get = 1;
- }
- if($page_get > $stranic)
- {
- $page_get = $stranic;
- }
-
- $do = $kolmes * ($page_get - 1);
- $end = $kolmes * $page_get;
-
- $page_nazad = $page_get - 1;
- $page_dalee = $page_get + 1;
-
- for ($i = $do; $i < $end; $i++)
- {
- if (!empty($not_top_tema[$i]))
- {
- $temy_arr = explode('|',$not_top_tema[$i]);
- $stranic_tem = ceil($temy_arr[8]/$koltemmes);
- $str_t = $i + 2;
-
- echo'<p class="b">';
- if($temy_arr[6] == '#')
- {
- echo'<img src="/themes/chuma/02.gif"/> ';
- }
- user_data('../../data/users/'.$temy_arr[7].'.php');
- $nick_name_arr = explode('::', $nickname);
- $nickname = $nick_name_arr[0];
- $nickcolor = $nick_name_arr[1];
- if(!empty($nickname))
- {
- if(!empty($nickcolor))
- {
- $login_nick_color = ''.$nickname.'';
- }
- else
- {
- $login_nick_color = ''.$nickname.'';
- }
- }
- else
- {
- $login_nick_color = ''.$temy_arr[7].'';
- }
- echo'<a href="showtema.php?id='.$temy_arr[0].'&str='.$str.'&str_r='.$str_r.'&'.session_name().'='.session_id().'">'.$temy_arr[4].'</a> ('.trim($temy_arr[8]).') '.$login_nick_color.' <a href="showtema.php?id='.$temy_arr[0].'&str='.$str.'&str_r='.$str_r.'&page='.$stranic_tem.'&'.session_name().'='.session_id().'">»</a><br />';
- echo'</p>';
- if(isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in && ($status_in == '1' || $status_in == '2' || $status_in == '3'))
- {
- echo'</p><p class="dy">';
- echo"[<a href=\"admin.php?act=deltem&id=$id&str_t=$temy_arr[9]&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\"onclick=\"return confirm('Подтверждаете удаление?')\">Удал</a>]";
- echo"[<a href=\"admin.php?act=edittem&id=$id&str_t=$temy_arr[9]&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\">Ред</a>]";
-
- echo"[<a href=\"admin.php?act=movetem&id=$id&str_t=$temy_arr[9]&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\">Перенести</a>]";
- if($status_in == "1" || $status_in == "2")
- {
- echo"[<a href=\"admin.php?act=zakrep&id=$id&str_t=$temy_arr[9]&str=$str&str_r=$str_r&page=$page_get&".session_name()."=".session_id()."\">Закрепить</a>]";
- }
- echo'</p>';
- }
- }
- }
-
- if($stranic > 1)
- {
- echo'<p align="center" class="d">';
- echo'Страницы:';
- echo'<br />';
- if($page_get > 4)
- {
- echo"<a href=\"index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=1&".session_name()."=".session_id()."\">1</a>...";
- }
-
- $start_1 = $page_get - 3;
- $end_1 = $page_get - 1;
- if($start_1 < 1)
- {
- $start_1 = 1;
- }
-
- for($i = $start_1; $i <= $end_1; $i++)
- {
- echo"<a href=\"index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$i&".session_name()."=".session_id()."\">$i</a> ";
- }
-
- echo$page_get;
-
- $start_2 = $page_get + 1;
- $end_2 = $page_get + 3;
- if($start_2 < 1)
- {
- $start_2 = 1;
- }
- if($end_2 > $stranic)
- {
- $end_2 = $stranic;
- }
-
- for($i = $start_2; $i <= $end_2; $i++)
- {
- echo" <a href=\"index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$i&".session_name()."=".session_id()."\">$i</a>";
- }
-
- if($stranic > $page_get && $page_get < ($stranic-3))
- {
- echo"...<a href=\"index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$stranic&".session_name()."=".session_id()."\">$stranic</a>";
- }
- echo'<br />';
-
- if($page_get > 1)
- {
- echo"<a href=\"index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page_nazad&".session_name()."=".session_id()."\">Назад</a>";
- }
- echo' | ';
- if($stranic > $page_get)
- {
- echo"<a href=\"index.php?act=showforum&id=$id&str=$str&str_r=$str_r&page=$page_dalee&".session_name()."=".session_id()."\">Дальше</a>";
- }
- echo'</p>';
- }
- }
- # echo'<p><a href="newtema.php?id='.$id.'&str='.$str.'&str_r='.$str_r.'&'.session_name().'='.session_id().'">Начать тему</a><br /></p>';
- }
- else
- {
- echo"<p class=\"err\">Попытка взлома или данный подраздел не существует!<br /></p>";
- }
- }
- elseif($str_r > 1 && $str_r < $razdel_count - 2 && $podrazdel_arr[1] != $razdel_arr[0])
- {
- echo'<p class="err">ОШИБКА!!! Данный подраздел не существует или находится в другом разделе.<br /></p>';
- }
- else
- {
- echo'<p class="err">ОШИБКА!!! Такой раздел не существует.<br /></p>';
- }
- }
- else
- {
- echo'<p class="err">Вы не авторизованы!!! Войдите в личный кабинет.<br></p>';
- echo'<p><a href="../kabinet/index.php?'.session_name().'='.session_id().'">В кабинет</a><br /></p>';
- }
- echo'<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a><br /></p>';
- include ('../../templates/foot.php');
- }
- ####################
- if($_GET['act'] == 'showrazdel')
- {
- if($str_r > 1 && $str_r < $razdel_count - 2)
- {
- $razdel_arr = explode('|', $razdel_f[$str_r]);
- }
- $title_page = $razdel_arr[1].' » Форум';
- $m_polozhenie = 'На форуме в разделе '.trim($razdel_arr[1]);
- include '../../themes/'.$themes.'.php';
-
- echo'<p class="modul_name"align="center"><a href="index.php?'.session_name().'='.session_id().'">Форум</a></p>';
-
- if((isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in) || $dostup_forum == 1)
- {
- if($str_r > 1 && $str_r < $razdel_count - 2)
- {
- echo'<p class="a">'.$razdel_arr[1].'<br /></p>';
- echo'<p class="b">';
- $a = 0;
- for($ii = 2; $ii < $podrazdel_count - 2; $ii++)
- {
- $podrazdel_arr = explode('|', $podrazdel_f[$ii]);
-
- if($podrazdel_arr[1] == $razdel_arr[0])
- {
- $temy_f = @file("../../data/forum/podrazdel/$podrazdel_arr[0].php");
- if(!empty($temy_f))
- { $temy_count = count($temy_f) - 4; } else { $temy_count = 0; }
-
- unset($mes_c);
- for($c = 2; $c < $temy_count + 2; $c++)
- {
- $c_tem_arr = explode('|', $temy_f[$c]);
- $mes_c = $mes_c + $c_tem_arr[8];
- }
- if(empty($mes_c))
- { $mes_c = 0; }
-
- echo'<a href="index.php?act=showforum&id='.$podrazdel_arr[0].'&str='.$ii.'&str_r='.$str_r.'&'.session_name().'='.session_id().'">'.$podrazdel_arr[2].'</a> ('.$temy_count.'|'.$mes_c.')<br />';
- $a = 1;
- }
- }
- if(empty($a))
- {
- echo'Нет ни одного подраздела.';
- }
- echo'</p>';
- }
- else
- {
- echo'<p class="err">ОШИБКА!!! Такой раздел не существует.<br /></p>';
- }
- }
- else
- {
- echo'<p class="err">Вы не авторизованы!!! Войдите в личный кабинет.<br></p>';
- echo'<p><a href="../kabinet/index.php?'.session_name().'='.session_id().'">В кабинет</a><br /></p>';
- }
- echo'<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a><br /></p>';
- include ('../../templates/foot.php');
- }
- ####################
- if($_GET['act'] == 'last_temy')
- {
- $title_page = 'Последние темы » Форум';
- $m_polozhenie = 'На форуме смотрит последние темы';
- include '../../themes/'.$themes.'.php';
-
- if((isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in) || $dostup_forum == 1)
- {
- echo'<p class="modul_name"align="center"><a href="index.php?'.session_name().'='.session_id().'">Форум</a></p>';
- echo'<p class="a">Последние 20 тем</p>';
- $last_temy_data = '../../data/forum/last_temy.php';
- $last_temy_f = @file($last_temy_data);
- @array_splice($last_temy_f, 0, 2);
- @array_splice($last_temy_f, -2, 2);
- $last_temy_count = count($last_temy_f);
- $kolmes = $koltem;
- $stranic = ceil($last_temy_count/$kolmes);
-
- if(empty($_GET['page']))
- {
- $page_get = 1;
- }
- else
- {
- $page_get = $_GET['page'];
- }
-
- if($page_get < 0)
- {
- $page_get = 1;
- }
- if($page_get > $stranic)
- {
- $page_get = $stranic;
- }
-
- $do = $kolmes * ($page_get - 1);
- $end = $kolmes * $page_get;
-
- $page_nazad = $page_get - 1;
- $page_dalee = $page_get + 1;
-
- if (preg_match("#^[0-9]*$#", "$page_get"))
- {
- if(empty($last_temy_f))
- {
- echo'<p class="err">Нет ни одной темы.</p>';
- }
- else
- {
- for ($i = $do; $i < $end; $i++)
- {
- if (!empty($last_temy_f[$i]))
- {
- $last_temy_arr = explode('|',"$last_temy_f[$i]");
-
- echo'<p class="b">';
- user_data('../../data/users/'.$last_temy_arr[3].'.php');
- $nick_name_arr = explode('::', $nickname);
- $nickname = $nick_name_arr[0];
- $nickcolor = $nick_name_arr[1];
- if(!empty($nickname))
- {
- if(!empty($nickcolor))
- {
- $login_nick_color = ''.$nickname.'';
- }
- else
- {
- $login_nick_color = ''.$nickname.'';
- }
- }
- else
- {
- $login_nick_color = ''.$last_temy_arr[3].'';
- }
- echo'<a href="showtema.php?id='.$last_temy_arr[0].'&str='.$last_temy_arr[1].'&str_r='.$last_temy_arr[2].'&'.session_name().'='.session_id().'">'.$last_temy_arr[6].'</a> Автор: '.$login_nick_color.' ('.$last_temy_arr[4].' '.$last_temy_arr[5].')<br />';
- echo'</p>';
- }
- }
-
- if($stranic > 1)
- {
- echo'<p align="center" class="d">';
- echo'Страницы:';
- echo'<br />';
- if($page_get > 4)
- {
- echo"<a href=\"index.php?act=last_temy&page=1&".session_name()."=".session_id()."\">1</a>...";
- }
-
- $start_1 = $page_get - 3;
- $end_1 = $page_get - 1;
- if($start_1 < 1)
- {
- $start_1 = 1;
- }
-
- for($i = $start_1; $i <= $end_1; $i++)
- {
- echo"<a href=\"index.php?act=last_temy&page=$i&".session_name()."=".session_id()."\">$i</a> ";
- }
-
- echo$page_get;
-
- $start_2 = $page_get + 1;
- $end_2 = $page_get + 3;
- if($start_2 < 1)
- {
- $start_2 = 1;
- }
- if($end_2 > $stranic)
- {
- $end_2 = $stranic;
- }
-
- for($i = $start_2; $i <= $end_2; $i++)
- {
- echo" <a href=\"index.php?act=last_temy&page=$i&".session_name()."=".session_id()."\">$i</a>";
- }
-
- if($stranic > $page_get && $page_get < ($stranic-3))
- {
- echo"...<a href=\"index.php?act=last_temy&page=$stranic&".session_name()."=".session_id()."\">$stranic</a>";
- }
- echo'<br />';
-
- if($page_get > 1)
- {
- echo"<a href=\"index.php?act=last_temy&page=$page_nazad&".session_name()."=".session_id()."\">Назад</a>";
- }
- echo' | ';
- if($stranic > $page_get)
- {
- echo"<a href=\"index.php?act=last_temy&page=$page_dalee&".session_name()."=".session_id()."\">Дальше</a>";
- }
- echo'</p>';
- }
- }
- }
- else
- {
- echo"<p class=\"err\">Попытка взлома!<br /></p>";
- }
- }
- else
- {
- echo'<p class="err">Вы не авторизованы!!! Войдите в личный кабинет.<br></p>';
- echo'<p><a href="../kabinet/index.php?'.session_name().'='.session_id().'">В кабинет</a><br /></p>';
- }
- echo'<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a><br /></p>';
- include ('../../templates/foot.php');
- }
- ####################
- if($_GET['act'] == 'last_mes')
- {
- $title_page = 'Последние ответы » Форум';
- $m_polozhenie = 'На форуме смотрит последние ответы';
- include '../../themes/'.$themes.'.php';
-
- if((isset($_SESSION['sespass']) && isset($passw_in) && $_SESSION['sespass'] == $passw_in) || $dostup_forum == 1)
- {
- echo'<p class="modul_name"align="center"><a href="index.php?'.session_name().'='.session_id().'">Форум</a></p>';
- echo'<p class="a">Последние 100 ответов</p>';
- $last_temy_data = '../../data/forum/last_mes.php';
- $last_temy_f = @file($last_temy_data);
- @array_splice($last_temy_f, 0, 2);
- @array_splice($last_temy_f, -2, 2);
- $last_temy_count = count($last_temy_f);
- $kolmes = $koltem;
- $stranic = ceil($last_temy_count/$kolmes);
-
- if(empty($_GET['page']))
- {
- $page_get = 1;
- }
- else
- {
- $page_get = $_GET['page'];
- }
-
- if($page_get < 0)
- {
- $page_get = 1;
- }
- if($page_get > $stranic)
- {
- $page_get = $stranic;
- }
-
- $do = $kolmes * ($page_get - 1);
- $end = $kolmes * $page_get;
-
- $page_nazad = $page_get - 1;
- $page_dalee = $page_get + 1;
-
- if (preg_match("#^[0-9]*$#", "$page_get"))
- {
- if(empty($last_temy_f))
- {
- echo'<p class="err">Нет последних сообщений.</p>';
- }
- else
- {
- for ($i = $do; $i < $end; $i++)
- {
- if (!empty($last_temy_f[$i]))
- {
- $last_temy_arr = explode('|',"$last_temy_f[$i]");
- $stranic_tem = ceil($last_temy_arr[7]/$koltemmes);
-
- echo'<p class="b">';
- user_data('../../data/users/'.$last_temy_arr[3].'.php');
- $nick_name_arr = explode('::', $nickname);
- $nickname = $nick_name_arr[0];
- $nickcolor = $nick_name_arr[1];
- if(!empty($nickname))
- {
- if(!empty($nickcolor))
- {
- $login_nick_color = ''.$nickname.'';
- }
- else
- {
- $login_nick_color = ''.$nickname.'';
- }
- }
- else
- {
- $login_nick_color = ''.$last_temy_arr[3].'';
- }
- echo'<a href="showtema.php?id='.$last_temy_arr[0].'&str='.$last_temy_arr[1].'&str_r='.$last_temy_arr[2].'&page='.$stranic_tem.'&'.session_name().'='.session_id().'">'.$last_temy_arr[6].'</a> Ответил: '.$login_nick_color.' ('.$last_temy_arr[4].' '.$last_temy_arr[5].')<br />';
- echo'</p>';
- }
- }
-
- if($stranic > 1)
- {
- echo'<p align="center" class="d">';
- echo'Страницы:';
- echo'<br />';
- if($page_get > 4)
- {
- echo"<a href=\"index.php?act=last_mes&page=1&".session_name()."=".session_id()."\">1</a>...";
- }
-
- $start_1 = $page_get - 3;
- $end_1 = $page_get - 1;
- if($start_1 < 1)
- {
- $start_1 = 1;
- }
-
- for($i = $start_1; $i <= $end_1; $i++)
- {
- echo"<a href=\"index.php?act=last_mes&page=$i&".session_name()."=".session_id()."\">$i</a> ";
- }
-
- echo$page_get;
-
- $start_2 = $page_get + 1;
- $end_2 = $page_get + 3;
- if($start_2 < 1)
- {
- $start_2 = 1;
- }
- if($end_2 > $stranic)
- {
- $end_2 = $stranic;
- }
-
- for($i = $start_2; $i <= $end_2; $i++)
- {
- echo" <a href=\"index.php?act=last_mes&page=$i&".session_name()."=".session_id()."\">$i</a>";
- }
-
- if($stranic > $page_get && $page_get < ($stranic-3))
- {
- echo"...<a href=\"index.php?act=last_mes&page=$stranic&".session_name()."=".session_id()."\">$stranic</a>";
- }
- echo'<br />';
-
- if($page_get > 1)
- {
- echo"<a href=\"index.php?act=last_mes&page=$page_nazad&".session_name()."=".session_id()."\">Назад</a>";
- }
- echo' | ';
- if($stranic > $page_get)
- {
- echo"<a href=\"index.php?act=last_mes&page=$page_dalee&".session_name()."=".session_id()."\">Дальше</a>";
- }
- echo'</p>';
- }
- }
- }
- else
- {
- echo"<p class=\"err\">Попытка взлома!<br /></p>";
- }
- }
- else
- {
- echo'<p class="err">Вы не авторизованы!!! Войдите в личный кабинет.<br></p>';
- echo'<p><a href="../kabinet/index.php?'.session_name().'='.session_id().'">В кабинет</a><br /></p>';
- }
- echo'<p><a href="index.php?'.session_name().'='.session_id().'">В форум</a><br /></p>';
- include ('../../templates/foot.php');
- }
- }
- ####################
-
- ?>