/** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); $rootpath = ''; require 'incfiles/core.php'; $textl = $lng['registration']; $headmod = 'registration'; require 'incfiles/head.php'; $lng_reg = core::load_lng('registration'); // Если регистрация закрыта, выводим предупреждение if (core::$deny_registration || !$set['mod_reg']) { echo '<p>' . $lng_reg['registration_closed'] . '</p>'; require 'incfiles/end.php'; exit; } $captcha = isset($_POST['captcha']) ? trim($_POST['captcha']) : NULL; $reg_nick = isset($_POST['nick']) ? trim($_POST['nick']) : ''; $lat_nick = functions::rus_lat(mb_strtolower($reg_nick)); $reg_pass = isset($_POST['password']) ? trim($_POST['password']) : ''; $reg_name = isset($_POST['imname']) ? trim($_POST['imname']) : ''; $reg_about = isset($_POST['about']) ? trim($_POST['about']) : ''; $reg_sex = isset($_POST['sex']) ? functions::check(mb_substr(trim($_POST['sex']), 0, 2)) : ''; echo '<div class="phdr"><b>' . $lng['registration'] . '</b></div>'; if (isset($_POST['submit'])) {
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); $headmod = 'library'; require_once '../incfiles/core.php'; $lng_lib = core::load_lng('library'); $textl = $lng['library']; // Ограничиваем доступ к Библиотеке $error = ''; if (!$set['mod_lib'] && $rights < 7) { $error = $lng_lib['library_closed']; } elseif ($set['mod_lib'] == 1 && !$user_id) { $error = $lng['access_guest_forbidden']; } if ($error) { require_once '../incfiles/head.php'; echo '<div class="rmenu"><p>' . $error . '</p></div>'; require_once '../incfiles/end.php'; exit; } // Заголовки библиотеки if ($id) { $req = mysql_query("SELECT * FROM `lib` WHERE `id`= '{$id}'");
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ defined('_IN_JOHNCMS') or die('Error: restricted access'); $headmod = 'userban'; $lng_ban = core::load_lng('ban'); require '../incfiles/head.php'; $ban = isset($_GET['ban']) ? intval($_GET['ban']) : 0; switch ($mod) { case 'do': /* ----------------------------------------------------------------- Баним пользователя (добавляем Бан в базу) ----------------------------------------------------------------- */ if ($rights < 1 || $rights < 6 && $user['rights'] || $rights <= $user['rights']) { echo functions::display_error($lng_ban['ban_rights']); } else { echo '<div class="phdr"><b>' . $lng_ban['ban_do'] . '</b></div>'; echo '<div class="rmenu"><p>' . functions::display_user($user) . '</p></div>'; if (isset($_POST['submit'])) { $error = false; $term = isset($_POST['term']) ? intval($_POST['term']) : false; $timeval = isset($_POST['timeval']) ? intval($_POST['timeval']) : false;
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); require_once '../incfiles/core.php'; $headmod = 'mail'; $lng_mail = core::load_lng('mail'); if (isset($_SESSION['ref'])) { unset($_SESSION['ref']); } //Проверка авторизации if (!$user_id) { Header('Location: ' . $home . '/?err'); exit; } function formatsize($size) { // Форматирование размера файлов if ($size >= 1073741824) { $size = round($size / 1073741824 * 100) / 100 . ' Gb'; } elseif ($size >= 1048576) { $size = round($size / 1048576 * 100) / 100 . ' Mb'; } elseif ($size >= 1024) { $size = round($size / 1024 * 100) / 100 . ' Kb';
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); require '../incfiles/core.php'; $lng_faq = core::load_lng('faq'); $lng_smileys = core::load_lng('smileys'); $textl = 'FAQ'; $headmod = 'faq'; require '../incfiles/head.php'; // Обрабатываем ссылку для возврата if (empty($_SESSION['ref'])) { $_SESSION['ref'] = isset($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : $home; } // Сколько смайлов разрешено выбрать пользователям? $user_smileys = 20; switch ($act) { case 'forum': /* ----------------------------------------------------------------- Правила Форума ----------------------------------------------------------------- */ echo '<div class="phdr"><a href="faq.php"><b>F.A.Q.</b></a> | ' . $lng_faq['forum_rules'] . '</div>' . '<div class="menu"><p>' . $lng_faq['forum_rules_text'] . '</p></div>' . '<div class="phdr"><a href="' . $_SESSION['ref'] . '">' . $lng['back'] . '</a></div>';
/** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ defined('_IN_JOHNADM') or die('Error: restricted access'); // Проверяем права доступа if ($rights < 9) { header('Location: http://johncms.com/?err'); exit; } $panel_lng = core::load_lng('panel_lng'); /* ----------------------------------------------------------------- Читаем каталог с файлами языков ----------------------------------------------------------------- */ $lng_list = array(); $lng_desc = array(); foreach (glob('../incfiles/languages/*/_core.ini') as $val) { $dir = explode('/', dirname($val)); $iso = array_pop($dir); $desc = parse_ini_file($val); $lng_list[$iso] = isset($desc['name']) && !empty($desc['name']) ? $desc['name'] : $iso; $lng_desc[$iso] = $desc; } /*
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); require '../incfiles/core.php'; $lng_profile = core::load_lng('profile'); $textl = $lng_profile['album']; $headmod = 'album'; $max_album = 10; $max_photo = 200; $al = isset($_REQUEST['al']) ? abs(intval($_REQUEST['al'])) : NULL; $img = isset($_REQUEST['img']) ? abs(intval($_REQUEST['img'])) : NULL; /* ----------------------------------------------------------------- Закрываем от неавторизованных юзеров ----------------------------------------------------------------- */ if (!$user_id) { require '../incfiles/head.php'; echo functions::display_error($lng['access_guest_forbidden']); require '../incfiles/end.php'; exit; } /*
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); $headmod = 'load'; require_once '../incfiles/core.php'; $lng_dl = core::load_lng('downloads'); require_once '../incfiles/lib/mp3.php'; require_once '../incfiles/lib/pclzip.lib.php'; $textl = $lng['downloads']; $filesroot = '../download'; $screenroot = "{$filesroot}/screen"; $loadroot = "{$filesroot}/files"; // Ограничиваем доступ к Загрузкам $error = ''; if (!$set['mod_down'] && $rights < 7) { $error = $lng_dl['downloads_closed']; } elseif ($set['mod_down'] == 1 && !$user_id) { $error = $lng['access_guest_forbidden']; } if ($error) { require_once '../incfiles/head.php'; echo '<div class="rmenu"><p>' . $error . '</p></div>'; require_once "../incfiles/end.php";
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ @ini_set("max_execution_time", "600"); define('_IN_JOHNCMS', 1); define('_IN_JOHNADM', 1); require '../incfiles/core.php'; // Подключаем язык Админ-панели $lng = array_merge($lng, core::load_lng('admin')); // Проверяем права доступа if (core::$user_rights < 1) { header('Location: http://johncms.com/?err'); exit; } $headmod = 'admin'; $textl = $lng['admin_panel']; require '../incfiles/head.php'; $array = array('forum', 'news', 'ads', 'counters', 'ip_whois', 'languages', 'settings', 'sitemap', 'smileys', 'access', 'antispy', 'httpaf', 'ipban', 'antiflood', 'ban_panel', 'karma', 'reg', 'mail', 'search_ip', 'usr', 'usr_adm', 'usr_clean', 'usr_del', 'info', 'style'); if ($act && ($key = array_search($act, $array)) !== false && file_exists('includes/' . $array[$key] . '.php')) { require 'includes/' . $array[$key] . '.php'; } else { $regtotal = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `preg`='0'"), 0); $bantotal = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `ban_time` > '" . time() . "'"), 0); echo '<div class="phdr"><b>' . $lng['admin_panel'] . '</b></div>';
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); require '../incfiles/core.php'; $lng_pass = core::load_lng('pass'); $textl = $lng_pass['password_restore']; require '../incfiles/head.php'; function passgen($length) { $vals = "abcdefghijklmnopqrstuvwxyz0123456789"; $result = ''; for ($i = 1; $i <= $length; $i++) { $result .= $vals[rand(0, strlen($vals))]; } return $result; } switch ($act) { case 'sent': /* ----------------------------------------------------------------- Отправляем E-mail с инструкциями по восстановлению пароля ----------------------------------------------------------------- */
/** * Показываем местоположение пользователя * * @param int $user_id * @param string $place * * @return mixed|string */ public static function display_place($user_id = 0, $place = '') { global $headmod; $place = explode(",", $place); $placelist = parent::load_lng('places'); if (array_key_exists($place[0], $placelist)) { if ($place[0] == 'profile') { if ($place[1] == $user_id) { return '<a href="' . self::$system_set['homeurl'] . '/users/profile.php?user='******'">' . $placelist['profile_personal'] . '</a>'; } else { $user = self::get_user($place[1]); return $placelist['profile'] . ': <a href="' . self::$system_set['homeurl'] . '/users/profile.php?user='******'id'] . '">' . $user['name'] . '</a>'; } } elseif ($place[0] == 'online' && isset($headmod) && $headmod == 'online') { return $placelist['here']; } else { return str_replace('#home#', self::$system_set['homeurl'], $placelist[$place[0]]); } } return '<a href="' . self::$system_set['homeurl'] . '/index.php">' . $placelist['homepage'] . '</a>'; }
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ defined('_IN_JOHNCMS') or die('Error: restricted access'); $lng_set = core::load_lng('settings'); $textl = $lng['settings']; require '../incfiles/head.php'; /* ----------------------------------------------------------------- Проверяем права доступа ----------------------------------------------------------------- */ if ($user['id'] != $user_id) { echo functions::display_error($lng['access_forbidden']); require '../incfiles/end.php'; exit; } $menu = array(!$mod ? '<b>' . $lng['common_settings'] . '</b>' : '<a href="profile.php?act=settings">' . $lng['common_settings'] . '</a>', $mod == 'forum' ? '<b>' . $lng['forum'] . '</b>' : '<a href="profile.php?act=settings&mod=forum">' . $lng['forum'] . '</a>'); /* ----------------------------------------------------------------- Пользовательские настройки ----------------------------------------------------------------- */ switch ($mod) {
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); require '../incfiles/core.php'; $headmod = 'gallery'; $lng_gal = core::load_lng('gallery'); $textl = $lng['gallery']; require '../incfiles/head.php'; // Ограничиваем доступ к Галерее $error = ''; if (!$set['mod_gal'] && $rights < 7) { $error = $lng_gal['gallery_closed']; } elseif ($set['mod_gal'] == 1 && !$user_id) { $error = $lng['access_guest_forbidden']; } if ($error) { require_once '../incfiles/head.php'; echo '<div class="rmenu"><p>' . $error . '</p></div>'; require_once '../incfiles/end.php'; exit; } $array = array('new', 'edf', 'delf', 'edit', 'del', 'load', 'upl', 'cral', 'razd'); if (in_array($act, $array) && file_exists($act . '.php')) {
} } else { // Выводим сообщение об ошибке require '../incfiles/head.php'; echo functions::display_error($error, '<a href="index.php?act=nt&id=' . $id . '">' . $lng['repeat'] . '</a>'); require '../incfiles/end.php'; exit; } } else { $res_r = mysql_fetch_assoc($req_r); $req_c = mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $res_r['refid'] . "'"); $res_c = mysql_fetch_assoc($req_c); require '../incfiles/head.php'; if ($datauser['postforum'] == 0) { if (!isset($_GET['yes'])) { $lng_faq = core::load_lng('faq'); echo '<p>' . $lng_faq['forum_rules_text'] . '</p>'; echo '<p><a href="index.php?act=nt&id=' . $id . '&yes">' . $lng_forum['agree'] . '</a> | <a href="index.php?id=' . $id . '">' . $lng_forum['not_agree'] . '</a></p>'; require '../incfiles/end.php'; exit; } } $msg_pre = functions::checkout($msg, 1, 1); if ($set_user['smileys']) { $msg_pre = functions::smileys($msg_pre, $datauser['rights'] ? 1 : 0); } $msg_pre = preg_replace('#\\[c\\](.*?)\\[/c\\]#si', '<div class="quote">\\1</div>', $msg_pre); echo '<div class="phdr"><a href="index.php?id=' . $id . '"><b>' . $lng['forum'] . '</b></a> | ' . $lng_forum['new_topic'] . '</div>'; if ($msg && $th && !isset($_POST['submit'])) { echo '<div class="list1"><img src="../theme/default/images/op.gif" border="0" alt="op" /> <span style="font-weight: bold">' . $th . '</span></div>' . '<div class="list2">' . functions::display_user($datauser, array('iphide' => 1, 'header' => '<span class="gray">(' . functions::display_date(time()) . ')</span>', 'body' => $msg_pre)) . '</div>'; }
<?php /* dev agssbuzz@catroxs.org site http://catroxs.org */ define('_IN_JOHNCMS', 1); $headmod = 'journal'; require '../incfiles/core.php'; $lng_forum = core::load_lng('forum'); $textl = 'Forum Notifikasi'; require '../incfiles/head.php'; if (!$user_id) { echo 'Anda belum login'; require '../incfiles/end_utama.php'; exit; } echo '<div class="phdr"><b>Forum Notifikasi</b></div>'; if ($datauser['journal_forum']) { echo '<div class="topmenu">Notifikasi Baru : ' . $datauser['journal_forum'] . '</div>'; mysql_query("UPDATE `users` SET `journal_forum`='0' WHERE `id` = '{$user_id}'"); } $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `id_user`='{$user_id}'" . ($rights >= 7 ? "" : " AND `close` != '1'")), 0); if ($total) { $req = mysql_query("SELECT `forum`.*, `users`.`sex`, `users`.`rights`, `users`.`lastdate`, `users`.`status`, `users`.`datereg`\n \tFROM `forum` LEFT JOIN `users` ON `forum`.`user_id` = `users`.`id`\n \tWHERE `forum`.`type` = 'm' AND `forum`.`id_user`='{$user_id}'" . ($rights >= 7 ? "" : " AND `forum`.`close` != '1'") . " ORDER BY `forum`.`id` DESC LIMIT {$start}, {$kmess}"); while (($res = mysql_fetch_assoc($req)) !== false) { if ($res['close']) { echo '<div class="rmenu">'; } else { echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; }
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ define('_IN_JOHNCMS', 1); require_once "../incfiles/core.php"; $lng_pm = core::load_lng('pm'); $headmod = 'ignor'; $textl = 'Block List'; require_once '../incfiles/head.php'; if (!empty($_SESSION['uid'])) { if (!empty($_GET['act'])) { $act = $_GET['act']; } switch ($act) { case "add": echo '<div class="phdr">' . $lng_pm['add_to_ignor'] . '</div>'; echo "<form action='ignor.php?act=edit&add=1' method='post'>" . $lng_pm['enter_nick'] . "<br/>"; echo "<input type='text' name='nik' value='' /><br/><input type='submit' value='" . $lng['add'] . "' /></form>"; echo '<a href="ignor.php">' . $lng['back'] . '</a><br/>'; break; case "edit": if (!empty($_POST['nik'])) { $nik = functions::check($_POST['nik']); } elseif (!empty($_GET['nik'])) {
<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ defined('_IN_JOHNCMS') or die('Error: restricted access'); $lng_karma = core::load_lng('karma'); $textl = $lng['karma']; require '../incfiles/head.php'; if ($set_karma['on']) { switch ($mod) { case 'vote': /* ----------------------------------------------------------------- Отдаем голос за пользователя ----------------------------------------------------------------- */ if (!$datauser['karma_off'] && !$ban) { $error = array(); if ($user['rights'] && $set_karma['adm']) { $error[] = $lng_karma['error_not_for_admins']; } if ($user['ip'] == $ip) { $error[] = $lng_karma['error_rogue']; } if ($datauser['total_on_site'] < $set_karma['karma_time'] || $datauser['postforum'] < $set_karma['forum']) {