diff --git a/upload/.htaccess b/upload/.htaccess new file mode 100644 index 0000000..3874f09 --- /dev/null +++ b/upload/.htaccess @@ -0,0 +1,4 @@ +AddDefaultCharset UTF-8 +DefaultLanguage ru-RU + +Options -Indexes \ No newline at end of file diff --git a/upload/blocks/1_notify.php b/upload/blocks/1_notify.php new file mode 100644 index 0000000..9fbf20b --- /dev/null +++ b/upload/blocks/1_notify.php @@ -0,0 +1,23 @@ + $this->db->HSC($_SESSION['notify_type']), + "TITLE" => $this->db->HSC($_SESSION['notify_title']), + "MESSAGE" => $this->db->HSC($_SESSION['notify_msg']) + ); + + echo $this->sp(MCR_THEME_PATH."blocks/notify/alert.html", $new_data); + + unset($_SESSION['mcr_notify']); + unset($_SESSION['notify_type']); + unset($_SESSION['notify_title']); + unset($_SESSION['notify_msg']); +} + + + +?> \ No newline at end of file diff --git a/upload/blocks/2_profile.php b/upload/blocks/2_profile.php new file mode 100644 index 0000000..7457109 --- /dev/null +++ b/upload/blocks/2_profile.php @@ -0,0 +1,9 @@ +user->is_auth) ? "unauth" : "auth"; + +echo $this->sp(MCR_THEME_PATH."blocks/profile/$authfile.html"); + +?> \ No newline at end of file diff --git a/upload/blocks/3_monitor.php b/upload/blocks/3_monitor.php new file mode 100644 index 0000000..65096ed --- /dev/null +++ b/upload/blocks/3_monitor.php @@ -0,0 +1,9 @@ +is_access("sys_monitoring")){ + echo $this->sp(MCR_THEME_PATH."blocks/monitor/main.html"); +} + +?> \ No newline at end of file diff --git a/upload/blocks/4_top.php b/upload/blocks/4_top.php new file mode 100644 index 0000000..6abc466 --- /dev/null +++ b/upload/blocks/4_top.php @@ -0,0 +1,9 @@ +is_access("sys_adm_main")){ + echo $this->sp(MCR_THEME_PATH."blocks/top/main.html"); +} + +?> \ No newline at end of file diff --git a/upload/configs/db.php b/upload/configs/db.php new file mode 100644 index 0000000..ceec5b0 --- /dev/null +++ b/upload/configs/db.php @@ -0,0 +1,10 @@ + 'localhost', + 'user' => 'root', + 'pass' => '', + 'base' => 'webmcr', + 'port' => 3306, + 'backend' => 'mysqli', +); +?> \ No newline at end of file diff --git a/upload/configs/functions.php b/upload/configs/functions.php new file mode 100644 index 0000000..3552b7b --- /dev/null +++ b/upload/configs/functions.php @@ -0,0 +1,8 @@ + true, + "breadcrumbs" => true, +); + +?> \ No newline at end of file diff --git a/upload/configs/mail.php b/upload/configs/mail.php new file mode 100644 index 0000000..27c850d --- /dev/null +++ b/upload/configs/mail.php @@ -0,0 +1,13 @@ + false, + 'from' => 'from@site.ru', + 'from_name' => 'WebMCR', + 'reply' => 'reply@site.ru', + 'reply_name' => 'WebMCR', + 'cc' => false, + 'smtp_host' => 'smtp.site.ru', + 'smtp_user' => 'admin@site.ru', + 'smtp_pass' => '', +); +?> \ No newline at end of file diff --git a/upload/configs/main.php b/upload/configs/main.php new file mode 100644 index 0000000..b341a22 --- /dev/null +++ b/upload/configs/main.php @@ -0,0 +1,26 @@ + 'WebMCR', + 's_about' => 'Система управления сайтом', + 's_keywords' => 'Minecraft, webmcr, сервер, Qexy', + 's_dpage' => 'news', + 's_theme' => 'default', + 'rewrite' => false, + 'log' => false, + 'install' => true, + 'p_logic' => 'usual', + 'debug' => true, + 's_lang' => 'ru_RU', + 's_root' => '/', + 's_root_full' => 'http://site.ru', + 'mcr_secury' => '', + 'crypt' => 0, + 'reg_accept' => true, + 'captcha' => 0, + 'rc_public' => '', + 'rc_private' => '', + 'kc_public' => '', + 'kc_private' => '', + 'mon_type' => 1 +); +?> \ No newline at end of file diff --git a/upload/configs/pagin.php b/upload/configs/pagin.php new file mode 100644 index 0000000..c3890d7 --- /dev/null +++ b/upload/configs/pagin.php @@ -0,0 +1,23 @@ + 2, + 'news' => 10, + 'comments' => 10, + 'search_news' => 10, + 'search_comments' => 10, + 'adm_news' => 10, + 'adm_comments' => 10, + 'adm_news_cats' => 10, + 'adm_news_views' => 10, + 'adm_news_votes' => 10, + 'adm_menu' => 10, + 'adm_menu_adm' => 10, + 'adm_menu_groups' => 10, + 'adm_menu_icons' => 10, + 'adm_monitoring' => 10, + 'adm_users' => 10, + 'adm_groups' => 10, + 'adm_permissions' => 10, + 'adm_statics' => 10, +); +?> \ No newline at end of file diff --git a/upload/configs/search.php b/upload/configs/search.php new file mode 100644 index 0000000..52a6ded --- /dev/null +++ b/upload/configs/search.php @@ -0,0 +1,14 @@ + + array ( + 'title' => 'По новостям', + 'permissions' => 'sys_search_news', + ), + 'comments' => + array ( + 'title' => 'По комментариям', + 'permissions' => 'sys_search_comments', + ), +); +?> \ No newline at end of file diff --git a/upload/engine/cloak.class.php b/upload/engine/cloak.class.php new file mode 100644 index 0000000..a345fd9 --- /dev/null +++ b/upload/engine/cloak.class.php @@ -0,0 +1,193 @@ +core = $core; + $this->user = $core->user; + $this->db = $core->db; + $this->lng = $core->lng; + + if(!is_writable(MCR_CLOAK_PATH)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_cloak_folder'], 2, '?mode=profile'); } + + $size = intval($obj['size']); + $tmp = $obj['tmp_name']; + + switch(intval($obj['error'])){ + case 0: break; + + case 1: + case 2: $this->core->notify($this->lng['e_msg'], $this->lng['e_load_size'], 2, '?mode=profile'); break; + + case 3: + case 4: $this->core->notify("", $this->lng['e_load_cloak'], 2, '?mode=profile'); break; + + case 6: $this->core->notify($this->lng['e_msg'], $this->lng['e_load_temp'], 2, '?mode=profile'); break; + + case 7: $this->core->notify($this->lng['e_msg'], $this->lng['e_load_perm'], 2, '?mode=profile'); break; + + default: $this->core->notify("", $this->lng['e_load_undefined'], 2, '?mode=profile'); break; + } + + if(($size/1024)>$this->user->permissions->sys_max_file_size){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_size'], 2, '?mode=profile'); } + + if(!file_exists($tmp)){ + $this->core->notify($this->lng['e_msg'], $this->lng['e_load_tempfile'], 2, '?mode=profile'); + } + + if(substr($obj['name'], -4)!='.png'){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + $get_size = @getimagesize($tmp); + + if(!$get_size){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + $width = $get_size[0]; + $height = $get_size[1]; + + if(!$this->is_cloak_valid($get_size)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_format'], 2, '?mode=profile'); } + + // Resave head of skin + + if(!file_exists(MCR_SKIN_PATH.'interface/'.$this->user->login.'_mini.png')){ + if(!copy(MCR_SKIN_PATH.'interface/.default_mini.png', MCR_SKIN_PATH.'interface/'.$this->user->login.'_mini.png')){ $this->core->notify("", $this->lng['e_load_save'], 2, '?mode=profile'); } + } + // Resave head of skin - + + // Create and save preview of cloak + + $new_preview = $this->create_preview($tmp); + + if($new_preview===false){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + imagepng($new_preview, MCR_SKIN_PATH.'interface/'.$this->user->login.'.png'); + // Create and save preview of cloak - + + // Save new cloak + + if(!file_exists(MCR_CLOAK_PATH.$this->user->login.'.png')){ + if(!copy($tmp, MCR_CLOAK_PATH.$this->user->login.'.png')){ $this->core->notify("", $this->lng['e_load_save'], 2, '?mode=profile'); } + } + // Save new cloak - + } + + /** + * Создание миниатюры + * @param $path - путь к изображению + * @param $size - размер + * @return resource + */ + public function create_preview($path, $size=224){ + //header('Content-Type: image/png'); + $size_x = 32; + + $image = @imagecreatefrompng($path); + + if(!$image){ return false; } + + if(file_exists(MCR_SKIN_PATH.'interface/'.$this->user->skin.'.png')){ + $skin_path_int = MCR_SKIN_PATH.'interface/'.$this->user->skin.'.png'; + $skin_path = MCR_SKIN_PATH.$this->user->skin.'.png'; + }else{ + $skin_path_int = MCR_SKIN_PATH.'interface/.default.png'; + $skin_path = MCR_SKIN_PATH.'.default.png'; + } + + $skin_string = file_get_contents($skin_path_int); + + $skin = imagecreatefromstring($skin_string); + + $skin_size = @getimagesize($skin_path); + + $multiple = $skin_size[0] / 64; + + $mp_x_h = ($this->mp > $multiple) ? ($size_x * $this->mp) / 2 : ($size_x * $multiple) / 2; + $mp_result = ($this->mp > $multiple) ? $this->mp : $multiple; + + $preview = imagecreatetruecolor($size_x * $mp_result, 32 * $mp_result); + $transparent = imagecolorallocatealpha($preview, 255, 255, 255, 127); + imagefill($preview, 0, 0, $transparent); + + imagecopyresized( + $preview, // result image + $image, // source image + round(3 * $mp_result), // start x point of result + round(8 * $mp_result), // start y point of result + round(12 * $multiple), // start x point of source img + round(1 * $multiple), // start y point of source img + round(10 * $mp_result), // result <- width -> + round(16 * $mp_result), // result /|\ height \|/ + round(10 * $multiple), // width of cloak img (from start x \ y) + round(16 * $multiple) // height of cloak img (from start x \ y) + ); + + imagecopyresized($preview, $skin, 0, 0, 0, 0, imagesx($preview), imagesy($preview), imagesx($skin), imagesy($skin)); + + imagecopyresized( + $preview, + $image, + $mp_x_h + 3 * $mp_result, + round(8 * $mp_result), + round(1 * $multiple), + round(1 * $multiple), + round(10 * $mp_result), + round(16 * $mp_result), + round(10 * $multiple), + round(16 * $multiple) + ); + + $fullsize = imagecreatetruecolor($size, $size); + + imagesavealpha($fullsize, true); + $transparent = imagecolorallocatealpha($fullsize, 255, 255, 255, 127); + imagefill($fullsize, 0, 0, $transparent); + + imagecopyresized($fullsize, $preview, 0, 0, 0, 0, imagesx($fullsize), imagesy($fullsize), imagesx($preview), imagesy($preview)); + + imagedestroy($preview); + imagedestroy($image); + imagedestroy($skin); + + return $fullsize; + } + + /** + * Валидация формата изображения + * @param $tmp - путь к изображению + * @return boolean + * - Проверяет права на максимальный размер изображения + */ + public function is_cloak_valid($size){ + $formats = $this->core->get_array_formats(); + + $max_ratio = $this->user->permissions->max_ratio; + + if($max_ratio<=0){ return false; } + + $width = $formats[$max_ratio]["cloak_w"]; + $height = $formats[$max_ratio]["cloak_h"]; + + /* + if($this->is_skin){ + if($size[0]!=22 || $size[1]!=17){ return false; } + }else{ + $skin_size = @getimagesize(MCR_UPL_PATH.'skins/'.$this->user->login.'.png'); + $key = $this->core->find_in_formats($skin_size[0], $skin_size[1]); + if(!$key){ return false; } + if($formats[$key]["cloak_w"]!==$width || $formats[$key]["cloak_h"]!==$height){ return false; } + } + */ + + if($size[0]>$width || $size[1]>$height){ return false; } + + if($width<22 || $height<17){ return false; } + + if(round($size[0]/$size[1], 2) != 1.29){ return false; } + + return true; + } + +} + +?> \ No newline at end of file diff --git a/upload/engine/config.class.php b/upload/engine/config.class.php new file mode 100644 index 0000000..8336a28 --- /dev/null +++ b/upload/engine/config.class.php @@ -0,0 +1,30 @@ +main = $main; + $this->mail = $mail; + $this->db = $db; + $this->func = $func; + $this->pagin = $pagin; + $this->search = $search; + } +} + + +?> \ No newline at end of file diff --git a/upload/engine/core.class.php b/upload/engine/core.class.php new file mode 100644 index 0000000..de2546b --- /dev/null +++ b/upload/engine/core.class.php @@ -0,0 +1,722 @@ + "---", + 1 => "ReCaptcha", + 2 => "KeyCaptcha" + ); + + public function __construct(){ + + // Load class config + require_once(MCR_TOOL_PATH.'config.class.php'); + + // Create & set new object of config + $this->config = new config(); + + if(!file_exists(MCR_LANG_PATH.$this->config->main['s_lang'].'/main.php')){ exit("Language path not found"); } + + // Load language package + require_once(MCR_LANG_PATH.$this->config->main['s_lang'].'/main.php'); + + // Set language var + $this->lng = $lng; + + $this->title = $lng['t_main']; + + // Load database class + require_once(MCR_TOOL_PATH.'db/'.$this->config->db['backend'].'.class.php'); + + // Create & set new object of database + $this->db = new db($this->config, $lng); + + // Load user class + require_once(MCR_TOOL_PATH.'user.class.php'); + + // Create & set new object of user + $this->user = new user($this); + + // Load menu class + require_once(MCR_TOOL_PATH.'menu.class.php'); + + // Create & set new object of menu + $this->menu = new menu($this); + + // Generate CSRF Secure key + define("MCR_SECURE_KEY", $this->gen_csrf_secure()); + } + + /** + * Генерация защиты от CSRF + * @return String - ключ защиты + */ + public function gen_csrf_secure(){ + + $time = time(); + + $new_key = $time.'_'.md5($this->user->ip.$this->config->main['mcr_secury'].$time); + + if(!isset($_COOKIE['mcr_secure'])){ + setcookie("mcr_secure", $new_key, time()+$this->csrf_time, '/'); + return $new_key; + } + + $cookie = explode('_', $_COOKIE['mcr_secure']); + + $old_time = intval($cookie[0]); + + $old_key = md5($this->user->ip.$this->config->main['mcr_secury'].$old_time); + + if(!isset($cookie[1]) || $cookie[1] !== $old_key || ($old_time+$this->csrf_time)<$time){ + setcookie("mcr_secure", $new_key, time()+$this->csrf_time, '/'); + return $new_key; + } + + return $_COOKIE['mcr_secure']; + } + + /** + * Генерация AJAX оповещений + * @param String $message - Сообщение + * @param Boolean $status - Статус ошибки (true|false - Истина|Ложь) + * @param Array $data - Основное содержимое оповещения и доп. поля + * @return JSON exit + */ + public function js_notify($message='', $status=false, $data=array()){ + + $data = array( + "_status" => $status, + "_message" => $message, + "_data" => $data + ); + + echo json_encode($data); + + exit; + } + + /** + * Генерация основных оповещений движка + * @param String $title - Название оповещения + * @param String $text - Текст оповещения + * @param Integer $type - Тип оповещения (1 - Warning | 2 - Error | 3 - Success | 4 - Info) + * @param String $url - URL путь, куда будет направлено оповещение + * @param Boolean $out - указывается, если URL является внешним и будет начинаться с http + */ + public function notify($title='', $text='', $type=2, $url='', $out=false){ + + $new_url = (!$out) ? $this->base_url().$url : $url; + + if($url === true){ $new_url = $_SERVER['REQUEST_URI']; } + + if($out || (empty($title) && empty($text))){ header("Location: ".$new_url); exit; } + + switch($type){ + case 2: $_SESSION['notify_type'] = 'alert-error'; break; + case 3: $_SESSION['notify_type'] = 'alert-success'; break; + case 4: $_SESSION['notify_type'] = 'alert-info'; break; + + default: $_SESSION['notify_type'] = ''; break; + } + + $_SESSION['mcr_notify'] = true; + $_SESSION['notify_title'] = $title; + $_SESSION['notify_msg'] = $text; + + header("Location: ".$new_url); + + exit; + } + + /** + * Адрес сайта по умолчанию + * @return String - адрес сайта + */ + public function base_url(){ + return "http://".$_SERVER['HTTP_HOST']."/"; + } + + /** + * pagination(@param) - Pagination method + * + * @param Integer $res - Кол-во результатов на страницу + * @param String $page - Адрес страниц без идентификаторов (YOUR_PAGE) + * @param Integer $count - Кол-во результатов в базе + * @param String $theme - нестандартный шаблон + * + * @return String - результаты + * + */ + public function pagination($res=10, $page='', $count=0, $theme=''){ + ob_start(); + + if($this->db===false){ return ob_get_clean(); } + + $pid = (isset($_GET['pid'])) ? intval($_GET['pid']) : 1; + + $start = $pid * $res - $res; if($page===0 && $count===0){ return $start; } + + $max = intval(ceil($count / $res)); + + if($pid<=0 || $pid>$max){ return ob_get_clean(); } + + if($max>1){ + + $path = (empty($theme)) ? MCR_THEME_PATH."pagination/" : $theme; + + // First page + + $fp_data = array( + "URL" => BASE_URL.$page.'1', + "VALUE" => "<<" + ); + + $page_first = $this->sp($path."page-id.html", $fp_data); + // First page + + + // Prev pages + + $page_prev = ''; + + for($pp = $this->config->pagin['arrows']; $pp > 0; $pp--){ + + if($pid-$pp <= 0){ continue; } + + $pp_data = array( + "URL" => BASE_URL.$page.($pid-$pp), + "VALUE" => $pid-$pp + ); + + $page_prev .= $this->sp($path."page-id.html", $pp_data); + } + // Prev pages - + + // Selected page + + $tp_data = array( + "URL" => BASE_URL.$page.$pid, + "VALUE" => $pid + ); + + $page_this = $this->sp($path."page-id-this.html", $tp_data); + // Selected page - + + // Next pages + + $page_next = ''; + + for($np = 1; $np <= $this->config->pagin['arrows']; $np++){ + + if($pid+$np > $max){ continue; } + + $np_data = array( + "URL" => BASE_URL.$page.($pid+$np), + "VALUE" => $pid+$np + ); + + $page_next .= $this->sp($path."page-id.html", $np_data); + } + // Next pages - + + // Last page + + $lp_data = array( + "URL" => BASE_URL.$page.$max, + "VALUE" => ">>" + ); + + $page_last = $this->sp($path."page-id.html", $lp_data); + // Last page - + + $data = array( + "PAGE_FIRST" => $page_first, + "PAGE_PREV" => $page_prev, + "PAGE_THIS" => $page_this, + "PAGE_NEXT" => $page_next, + "PAGE_LAST" => $page_last + ); + + echo $this->sp($path."object.html", $data); + } + return ob_get_clean(); + } + + /** + * Загрузка класса BB кодов + * @return object + */ + public function load_bb_class(){ + include(MCR_TOOL_PATH.'libs/bb.class.php'); + + return new bb($this); + } + + /** + * Валидатор защиты от CSRF атаки + * При ошибке возвращается на главную страницу с сообщение "Hacking Attempt!" + */ + public function csrf_check(){ + if($_SERVER['REQUEST_METHOD']=='POST'){ + if(!isset($_POST['mcr_secure'])){ $this->notify('Hacking Attempt!'); } + + $secure_key = explode('_', $_POST['mcr_secure']); + + if(!isset($secure_key[1])){ $this->notify('Hacking Attempt!'); } + + $secure_time = intval($secure_key[0]); + + if(($secure_time+$this->csrf_time)notify('Hacking Attempt!'); } + + $secure_var = $secure_key[1]; + + $mcr_secure = $secure_time.'_'.md5($this->user->ip.$this->config->main['mcr_secury'].$secure_time); + + if($mcr_secure!==$_POST['mcr_secure']){ $this->notify('Hacking Attempt!'); } + } + } + + /** + * Генератор случайной строки + * @param $length - длина строки (integer) + * @param $safe - По умолчанию строка будет состоять только из латинских букв и цифр (boolean) + */ + public function random($length=10, $safe = true) { + $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789"; + if(!$safe){ $chars .= '$()#@!'; } + + $string = ""; + + $len = strlen($chars) - 1; + while (strlen($string) < $length){ + $string .= $chars[mt_rand(0,$len)]; + } + + return $string; + } + + private function gen_bc_list($array=array()){ + + if(empty($array)){ return; } + + $count = count($array)-1; + $i = 0; + $string = ''; + + ob_start(); + + foreach($array as $title => $url){ + if($count==$i){ + echo $this->sp(MCR_THEME_PATH."breadcrumbs/id-active.html", array("TITLE" => $title)); + }else{ + $data['TITLE'] = $title; + $data['URL'] = $url; + echo $this->sp(MCR_THEME_PATH."breadcrumbs/id-inactive.html", $data); + } + $i++; + } + + return ob_get_clean(); + } + + public function gen_bc($array=array()){ + if(!$this->config->func['breadcrumbs']){ return false; } + + $data['LIST'] = $this->gen_bc_list($array); + + ob_start(); + + echo $this->sp(MCR_THEME_PATH."breadcrumbs/list.html", $data); + + return ob_get_clean(); + } + + public function load_mode($mode){ + if(!file_exists(MCR_MODE_PATH.$mode.".php")){ $this->title = $this->lng['e_mode_found']; return $this->sp(MCR_THEME_PATH."default_sp/404.html"); } + + include_once(MCR_MODE_PATH.$mode.".php"); + + if(!class_exists("module")){ return $this->lng['e_mode_class']; } + + $module = new module($this); + + if(!method_exists($module, "content")){ return $this->lng['e_mode_method']; } + + return $module->content(); + } + + public function gen_password($string='', $salt='', $crypt=false){ + if($crypt===false){ + $crypt = $this->config->main['crypt']; + } + switch($crypt) { + case 1: return sha1($string); break; + + case 2: return hash('sha256', $string); break; + + case 3: return hash('sha512', $string); break; + + case 4: return md5(md5($string)); break; + + case 5: return md5($string.$salt); break; // Joomla + + case 6: return md5($salt.$string); break; // osCommerce, TBDev + + case 7: return md5(md5($salt).$string); break; // vBulletin, IceBB, Discuz + + case 8: return md5(md5($string).$salt); break; + + case 9: return md5($string.md5($salt)); break; + + case 10: return md5($salt.md5($string)); break; + + case 11: return sha1($string.$salt); break; + + case 12: return sha1($salt.$string); break; + + case 13: return md5(md5($salt).md5($string)); break; // ipb, MyBB + + case 14: return hash('sha256', $string.$salt); break; + + case 15: return hash('sha512', $string.$salt); break; + + default: return md5($string); break; + } + } + + public function load_def_mode($mode){ + + include_once(MCR_MODE_PATH.$mode.".php"); + + $module = new module($this); + + return $module->content(); + } + + public function load_def_blocks(){ + $list = scandir(MCR_SIDE_PATH); + + if(empty($list)){ return false;; } + + ob_start(); + + foreach($list as $key => $file){ + if($file=='.' || $file=='..' || substr($file, -4)!='.php'){ continue; } + + include_once(MCR_SIDE_PATH.$file); + + } + + return ob_get_clean(); + } + + public function sp($path, $data=array()){ + ob_start(); + + include($path); + + return ob_get_clean(); + } + + public function advice(){ + + if(!$this->config->func['advice']){ return ''; } + + $data = file(MCR_THEME_PATH."default_sp/advice.txt"); + $size = count($data); + $sp_data["ADVICE"] = ($size<=0) ? $this->lng['e_advice_found'] : $data[rand(0, $size-1)]; + + ob_start(); + + echo $this->sp(MCR_THEME_PATH."default_sp/advice.html", $sp_data); + + return ob_get_clean(); + } + + /** + * Поиск размеров скина или плаща по форматам + * @param $width - width of skin + * @param $height - height of skin + * @return key of format (integer) + * + */ + public function find_in_formats($width, $height){ + foreach($this->core->get_array_formats() as $key => $value){ + if($value["skin_w"] == $width && $value["skin_h"] == $height){ return $key; } + } + + return false; + } + + public function imageflip(&$result, &$img, $rx = 0, $ry = 0, $x = 0, $y = 0, $size_x = null, $size_y = null){ + if($size_x < 1){ + $size_x = imagesx($img); + } + + if($size_y < 1){ + $size_y = imagesy($img); + } + + imagecopyresampled($result, $img, $rx, $ry, ($x + $size_x - 1), $y, $size_x, $size_y, 0 - $size_x, $size_y); + } + + /** + * Получить массив доступных форматов скинов и плащей + * @return formats (array) + * + */ + public function get_array_formats(){ + + $w = 64; + $h = 32; + + $c_w = 22; + $c_h = 17; + + $i = 1; + + $array = array(); + + $skin_h = $h; + $skin_w = $w; + $cloak_w = $c_w; + $cloak_h = $c_h; + + while($i<=32){ + + $skin_w = $i*$w; + $skin_h = $i*$h; + + $cloak_w = $i*$c_w; + $cloak_h = $i*$c_h; + + $array[$i] = array( + "skin_w" => $skin_w, + "skin_h" => $skin_h, + "cloak_w" => $cloak_w, + "cloak_h" => $cloak_h + ); + + $i = ($i<2) ? $i+1 : $i+2; + } + + return $array; + } + + public function send_mail($to, $subject='[WebMCR]', $message='', $altmassage='', $smtp=false, $cc=false){ + require(MCR_TOOL_PATH.'smtp/PHPMailerAutoload.php'); + + PHPMailerAutoload('smtp'); + + include_once(MCR_TOOL_PATH.'smtp/class.phpmailer.php'); + + $mail = new PHPMailer; + + //$mail->SMTPDebug = 3; + + if($this->config->mail['smtp']){ + $mail->isSMTP(); + $mail->Host = $this->config->mail['smtp_host']; // Specify main and backup SMTP servers + $mail->SMTPAuth = true; // Enable SMTP authentication + $mail->Username = $this->config->mail['smtp_user']; // SMTP username + $mail->Password = $this->config->mail['smtp_pass']; // SMTP password + $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted + $mail->Port = 587; // TCP port to connect to + } + + $mail->CharSet = 'UTF-8'; + $mail->setLanguage('ru', MCR_TOOL_PATH.'smpt/language/'); + $mail->From = ($this->config->mail['smtp']) ? $this->config->mail['smtp_user'] : $this->config->mail['from']; + $mail->FromName = $this->config->mail['from_name']; + if(is_array($to)){ + foreach($to as $key => $value){ $mail->addAddress($value); } + }else{ + $mail->addAddress($to); + } + + $mail->addReplyTo($this->config->mail['reply'], $this->config->mail['reply_name']); + if($this->config->mail['cc']){ $mail->addCC($this->config->mail['from']); } + //$mail->addBCC($this->config->mail['bcc']); + + $mail->isHTML(true); // Set email format to HTML + + $mail->Subject = $subject; + $mail->Body = $message; + $mail->AltBody = $altmassage; + + return $mail->send(); + } + + public function captcha_check(){ + + if(!isset($this->captcha[$this->config->main['captcha']])){ return true; } + + switch($this->config->main['captcha']){ + case 1: + $response = @$_POST['g-recaptcha-response']; + $request = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$this->config->main['rc_private']."&response=".$response."&remoteip=".$this->user->ip); + $request = json_decode($request); + + if(!$request->success){ return false; } + + return true; + break; + + case 2: + $response = @$_POST['capcode']; + require(MCR_TOOL_PATH.'libs/keycaptcha.php'); + $kc = new KeyCAPTCHA_CLASS('', $this); + + if(!$kc->check_result($response)){ return false; } + + return true; + break; + + + default: return true; break; + } + } + + public function captcha(){ + switch($this->config->main['captcha']){ + case 1: $content = $this->sp(MCR_THEME_PATH."captcha/recaptcha.html"); break; + + case 2: require(MCR_TOOL_PATH.'libs/keycaptcha.php'); $kc = new KeyCAPTCHA_CLASS('', $this); + $data["CONTENT"] = $kc->render_js(); + $content = $this->sp(MCR_THEME_PATH."captcha/keycaptcha.html", $data); + break; + + + default: return; break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } + + public function safestr($string=''){ + $string = trim(strip_tags($string)); + + return $this->db->HSC($string); + } + + public function filter_int_array($array){ + if(empty($array)){ return false; } + + $new_array = array(); + + foreach($array as $key => $value){ + $new_array[] = intval($value); + } + + return $new_array; + } + + public function is_access($name=''){ + if(empty($name)){ return false; } + + if(!@$this->user->permissions_v2[$name]){ return false; } + + return true; + } + + private function search_array($active = 'news'){ + if(empty($this->config->search)){ return; } + + ob_start(); + + foreach($this->config->search as $key => $value){ + if(!$this->is_access($value['permissions'])){ continue; } + + $data = array( + "ID" => $key, + "TITLE" => $value['title'], + "ACTIVE" => ($key==$active) ? 'active' : '' + ); + + echo $this->sp(MCR_THEME_MOD."search/elem-id.html", $data); + } + + return ob_get_clean(); + } + + public function search(){ + if(!$this->is_access('sys_search')){ return; } + + $type = (isset($_GET['type'])) ? $_GET['type'] : 'news'; + + ob_start(); + + $data['SEARCH_ELEMENTS'] = $this->search_array($type); + + echo $this->sp(MCR_THEME_MOD."search/form.html", $data); + + return ob_get_clean(); + } + + public function perm_list($selected=''){ + $query = $this->db->query("SELECT title, `value` FROM `mcr_permissions` ORDER BY title ASC"); + + if(!$query || $this->db->num_rows($query)<=0){ return; } + + ob_start(); + + while($ar = $this->db->fetch_assoc($query)){ + $title = $this->db->HSC($ar['title']); + $value = $this->db->HSC($ar['value']); + + $select = ($value==$selected) ? 'selected' : ''; + + echo ""; + } + + return ob_get_clean(); + } + + public function savecfg($cfg=array(), $file='main.php', $var='main'){ + + if(empty($cfg)){ return false; } + + $filename = MCR_ROOT."configs/".$file; + + $txt = ''; + + if(file_exists($filename) && !is_writable($filename)){ return false; } + + $result = file_put_contents($filename, $txt); + + if (is_bool($result) and $result == false){return false;} + + return true; + } + + public function validate_perm($perm){ + $perm = $this->db->safesql($perm); + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_permissions` WHERE `value`='$perm'"); + if(!$query){ return false; } + + $ar = $this->db->fetch_array($query); + + return ($ar[0]<=0) ? false : true; + } +} + +?> \ No newline at end of file diff --git a/upload/engine/db/mysql.class.php b/upload/engine/db/mysql.class.php new file mode 100644 index 0000000..91f264d --- /dev/null +++ b/upload/engine/db/mysql.class.php @@ -0,0 +1,65 @@ +obj = @mysql_connect($config->db['host'].':'.$config->db['port'], $config->db['user'], $config->db['pass']); + + if(!@mysql_select_db($config->db['base'], $this->obj)){ return; } + + @mysql_set_charset("UTF8", $this->obj); + } + + public function query($string){ + $this->count_queries += 1; + + return @mysql_query($string, $this->obj); + } + + public function affected_rows(){ + return mysql_affected_rows(); + } + + public function fetch_array($query=false){ + return mysql_fetch_array($query); + } + + public function fetch_assoc($query=false){ + return mysql_fetch_assoc($query); + } + + public function free($query=false){ + return mysql_free_result($query); + } + + public function num_rows($query=false){ + return mysql_num_rows($query); + } + + public function insert_id(){ + return mysql_insert_id(); + } + + public function safesql($string){ + return mysql_real_escape_string($string); + } + + public function HSC($string){ + return htmlspecialchars($string); + } + + public function error(){ + return mysql_error(); + } +} + +?> \ No newline at end of file diff --git a/upload/engine/db/mysqli.class.php b/upload/engine/db/mysqli.class.php new file mode 100644 index 0000000..337083e --- /dev/null +++ b/upload/engine/db/mysqli.class.php @@ -0,0 +1,67 @@ +obj = @new mysqli($config->db['host'], $config->db['user'], $config->db['pass'], $config->db['base'], $config->db['port']); + + if(mysqli_connect_errno($this->obj)){ return; } + + if(!$this->obj->set_charset("utf8")){ return; } + } + + public function query($string){ + $this->count_queries += 1; + + $this->result = @$this->obj->query($string); + + return $this->result; + } + + public function affected_rows(){ + return $this->obj->affected_rows; + } + + public function fetch_array($query=false){ + return $this->result->fetch_array(); + } + + public function fetch_assoc($query=false){ + return $this->result->fetch_assoc(); + } + + public function free(){ + return $this->result->free(); + } + + public function num_rows($query=false){ + return $this->result->num_rows; + } + + public function insert_id(){ + return $this->obj->insert_id; + } + + public function safesql($string){ + return $this->obj->real_escape_string($string); + } + + public function HSC($string=''){ + return htmlspecialchars($string); + } + + public function error(){ + return $this->obj->error; + } +} + +?> \ No newline at end of file diff --git a/upload/engine/libs/bb.class.php b/upload/engine/libs/bb.class.php new file mode 100644 index 0000000..790216d --- /dev/null +++ b/upload/engine/libs/bb.class.php @@ -0,0 +1,122 @@ +core = $core; + $this->lng = $core->lng; + } + + public function bb_panel($for=''){ + + $data['PANEL_ID'] = $for; + $data['SMILES'] = $this->get_smiles_bb(); + + ob_start(); + + echo $this->core->sp(MCR_THEME_PATH.'default_sp/bb-panel.html', $data); + + return ob_get_clean(); + } + + /** + * BBquote(@param) - Recursive function for bb codes + * + * @param - String + * + * @return callback function + * + */ + private function BBquote($text){ + + $reg = '#\[quote]((?:[^[]|\[(?!/?quote])|(?R)?)+)\[/quote]#isu'; + + if (is_array($text)){$text = '
'.$text[1].'
';} + + return preg_replace_callback($reg, 'self::BBquote', $text); + } + + public function get_smiles_bb(){ + include(MCR_TOOL_PATH.'libs/smiles.php'); + + ob_start(); + + foreach($smiles as $key => $img){ + + $data = array( + "NAME" => $key, + "IMG" => $img + ); + + echo $this->core->sp(MCR_THEME_PATH.'default_sp/smile-id.html', $data); + } + + return ob_get_clean(); + } + + private function smile_decode($text){ + include(MCR_TOOL_PATH.'libs/smiles.php'); + + foreach($smiles as $key => $value){ + $smiles[$key] = ''.$key.''; + } + + $search = array_keys($smiles); + $replace = array_values($smiles); + + return str_replace($search, $replace, $text); + } + + /** + * bb_decode(@param) - Change BB-code to HTML + * + * @param - String + * + * @return String + * + */ + public function decode($text){ + + $text = nl2br($text); + + $patern = array( + '/\[b\](.*?)\[\/b\]/Usi', + '/\[i\](.*?)\[\/i\]/Usi', + '/\[s\](.*?)\[\/s\]/Usi', + '/\[u\](.*?)\[\/u\]/Usi', + '/\[left\](.*?)\[\/left\]/Usi', + '/\[center\](.*?)\[\/center\]/Usi', + '/\[right\](.*?)\[\/right\]/Usi', + '/\[code\](.*?)\[\/code\]/Usi', + ); + + $replace = array( + '$1', + '$1', + '$1', + '$1', + '

$1

', + '

$1

', + '

$1

', + '$1', + ); + + $text = preg_replace($patern, $replace, $text); + $text = preg_replace("/\[url=(?:'|"|\'|\")((((ht|f)tps?|mailto):(?:\/\/)?)(?:[^<\s\'\"]+))(?:'|"|\'|\")\](.*?)\[\/url\]/Usi", "$5", $text); + $text = preg_replace("/\[img\](((ht|f)tps?:(?:\/\/)?)(?:[^<\s\'\"]+))\[\/img\]/Usi", "", $text); + $text = preg_replace("/\[color=(?:'|"|\'|\")((\#[a-z0-9]{6})|([a-z]{1,30}))(?:'|"|\'|\")\](.*?)\[\/color\]/Usi", "$4", $text); + $text = preg_replace("/\[size=(?:'|"|\'|\")([1-6]{1})(?:'|"|\'|\")\](.*?)\[\/size\]/Usi", "$2", $text); + + $text = $this->smile_decode($text); + + $text = $this->BBquote($text); + + return $text; + + } + +} +?> \ No newline at end of file diff --git a/upload/engine/libs/keycaptcha.php b/upload/engine/libs/keycaptcha.php new file mode 100644 index 0000000..aaac55b --- /dev/null +++ b/upload/engine/libs/keycaptcha.php @@ -0,0 +1,137 @@ +p_kc_session_id . (($use_visitor_ip) ? ($this->p_kc_visitor_ip) :("")) . $this->p_kc_private_key); + } + + function __construct($a_js_code='', $core=false) + { + $this->core = $core; + $this->p_kc_user_id = $core->config->main['kc_public']; + $this->p_kc_private_key = $core->config->main['kc_private']; + + if ( $a_js_code != '' ) { + $this->p_kc_js_code = $a_js_code; + } else { + $this->p_kc_js_code = ""; + } + $this->p_kc_session_id = uniqid() . '-4.0.0.001'; + $this->p_kc_visitor_ip = $core->user->ip; + } + + function http_get($path) + { + $arr = parse_url($path); + $host = $arr['host']; + $page = $arr['path']; + if ( $page=='' ) { + $page='/'; + } + if ( isset( $arr['query'] ) ) { + $page.='?'.$arr['query']; + } + $errno = 0; + $errstr = ''; + $fp = fsockopen ($host, 80, $errno, $errstr, 30); + if (!$fp){ return ""; } + $request = "GET $page HTTP/1.0\r\n"; + $request .= "Host: $host\r\n"; + $request .= "Connection: close\r\n"; + $request .= "Cache-Control: no-store, no-cache\r\n"; + $request .= "Pragma: no-cache\r\n"; + $request .= "User-Agent: KeyCAPTCHA\r\n"; + $request .= "\r\n"; + + fwrite ($fp,$request); + $out = ''; + + while (!feof($fp)) $out .= fgets($fp, 250); + fclose($fp); + $ov = explode("close\r\n\r\n", $out); + + return $ov[1]; + } + + public function check_result($response) + { + $kc_vars = explode("|", $response); + if ( count( $kc_vars ) < 4 ) + { + return false; + } + if ($kc_vars[0] == md5($this->c_kc_keyword . $kc_vars[1] . $this->p_kc_private_key . $kc_vars[2])) + { + if (stripos($kc_vars[2], "http://") !== 0) + { + $kc_current_time = time(); + $kc_var_time = split('[/ :]', $kc_vars[2]); + $kc_submit_time = gmmktime($kc_var_time[3], $kc_var_time[4], $kc_var_time[5], $kc_var_time[1], $kc_var_time[2], $kc_var_time[0]); + if (($kc_current_time - $kc_submit_time) < 15) + { + return true; + } + } + else + { + if ($this->http_get($kc_vars[2]) == "1") + { + return true; + } + } + } + return false; + } + + public function render_js () + { + if ( isset($_SERVER['HTTPS']) && ( $_SERVER['HTTPS'] == 'on' ) ) + { + $this->p_kc_js_code = str_replace ("http://","https://", $this->p_kc_js_code); + } + $this->p_kc_js_code = str_replace ("#KC_SESSION_ID#", $this->p_kc_session_id, $this->p_kc_js_code); + $this->p_kc_js_code = str_replace ("#KC_WSIGN#", $this->get_web_server_sign(1), $this->p_kc_js_code); + $this->p_kc_js_code = str_replace ("#KC_WSIGN2#", $this->get_web_server_sign(), $this->p_kc_js_code); + return $this->p_kc_js_code; + } + } +} +?> diff --git a/upload/engine/libs/smiles.php b/upload/engine/libs/smiles.php new file mode 100644 index 0000000..82a5ddb --- /dev/null +++ b/upload/engine/libs/smiles.php @@ -0,0 +1,20 @@ + "1.gif", + ":(" => "2.gif", + ";)" => "3.gif", + ":bear:" => "4.gif", + ":like:" => "5.gif", + ":wall:" => "6.gif", + ":D" => "7.gif", + ":shy:" => "8.gif", + ":secret:" => "9.gif", + ":party:" => "10.gif", + ":steep:" => "11.gif", + ":help:" => "12.gif", + ":girl:" => "13.gif", + ":facepalm:" => "14.gif", +); + +?> \ No newline at end of file diff --git a/upload/engine/libs/status_query/MinecraftPing.php b/upload/engine/libs/status_query/MinecraftPing.php new file mode 100644 index 0000000..5079ce4 --- /dev/null +++ b/upload/engine/libs/status_query/MinecraftPing.php @@ -0,0 +1,213 @@ +Query(); + * echo ''; + * + */ + + private $Socket; + private $ServerAddress; + private $ServerPort; + private $Timeout; + + public function __construct( $Address, $Port = 25565, $Timeout = 2 ) + { + $this->ServerAddress = $Address; + $this->ServerPort = (int)$Port; + $this->Timeout = (int)$Timeout; + + $this->Connect( ); + } + + public function __destruct( ) + { + $this->Close( ); + } + + public function Close( ) + { + if( $this->Socket !== null ) + { + fclose( $this->Socket ); + + $this->Socket = null; + } + } + + public function Connect( ) + { + $connectTimeout = $this->Timeout; + $this->Socket = @fsockopen( $this->ServerAddress, $this->ServerPort, $errno, $errstr, $connectTimeout ); + + if( !$this->Socket ) + { + throw new MinecraftPingException( "Failed to connect or create a socket: $errno ($errstr)" ); + } + + // Set Read/Write timeout + stream_set_timeout( $this->Socket, $this->Timeout ); + } + + public function Query( ) + { + $TimeStart = microtime(true); // for read timeout purposes + + // See http://wiki.vg/Protocol (Status Ping) + $Data = "\x00"; // packet ID = 0 (varint) + + $Data .= "\x04"; // Protocol version (varint) + $Data .= Pack( 'c', StrLen( $this->ServerAddress ) ) . $this->ServerAddress; // Server (varint len + UTF-8 addr) + $Data .= Pack( 'n', $this->ServerPort ); // Server port (unsigned short) + $Data .= "\x01"; // Next state: status (varint) + + $Data = Pack( 'c', StrLen( $Data ) ) . $Data; // prepend length of packet ID + data + + fwrite( $this->Socket, $Data ); // handshake + fwrite( $this->Socket, "\x01\x00" ); // status ping + + $Length = $this->ReadVarInt( ); // full packet length + + if( $Length < 10 ) + { + return FALSE; + } + + fgetc( $this->Socket ); // packet type, in server ping it's 0 + + $Length = $this->ReadVarInt( ); // string length + + $Data = ""; + do + { + if (microtime(true) - $TimeStart > $this->Timeout) + { + throw new MinecraftPingException( 'Server read timed out' ); + } + + $Remainder = $Length - StrLen( $Data ); + $block = fread( $this->Socket, $Remainder ); // and finally the json string + // abort if there is no progress + if (!$block) + { + throw new MinecraftPingException( 'Server returned too few data' ); + } + + $Data .= $block; + } while( StrLen($Data) < $Length ); + + if( $Data === FALSE ) + { + throw new MinecraftPingException( 'Server didn\'t return any data' ); + } + + $Data = JSON_Decode( $Data, true ); + + if( JSON_Last_Error( ) !== JSON_ERROR_NONE ) + { + if( Function_Exists( 'json_last_error_msg' ) ) + { + throw new MinecraftPingException( JSON_Last_Error_Msg( ) ); + } + else + { + throw new MinecraftPingException( 'JSON parsing failed' ); + } + + return FALSE; + } + + return $Data; + } + + public function QueryOldPre17( ) + { + fwrite( $this->Socket, "\xFE\x01" ); + $Data = fread( $this->Socket, 512 ); + $Len = StrLen( $Data ); + + if( $Len < 4 || $Data[ 0 ] !== "\xFF" ) + { + return FALSE; + } + + $Data = SubStr( $Data, 3 ); // Strip packet header (kick message packet and short length) + $Data = iconv( 'UTF-16BE', 'UTF-8', $Data ); + + // Are we dealing with Minecraft 1.4+ server? + if( $Data[ 1 ] === "\xA7" && $Data[ 2 ] === "\x31" ) + { + $Data = Explode( "\x00", $Data ); + + return Array( + 'HostName' => $Data[ 3 ], + 'Players' => IntVal( $Data[ 4 ] ), + 'MaxPlayers' => IntVal( $Data[ 5 ] ), + 'Protocol' => IntVal( $Data[ 1 ] ), + 'Version' => $Data[ 2 ] + ); + } + + $Data = Explode( "\xA7", $Data ); + + return Array( + 'HostName' => SubStr( $Data[ 0 ], 0, -1 ), + 'Players' => isset( $Data[ 1 ] ) ? IntVal( $Data[ 1 ] ) : 0, + 'MaxPlayers' => isset( $Data[ 2 ] ) ? IntVal( $Data[ 2 ] ) : 0, + 'Protocol' => 0, + 'Version' => '1.3' + ); + } + + private function ReadVarInt( ) + { + $i = 0; + $j = 0; + + while( true ) + { + $k = @fgetc( $this->Socket ); + + if( $k === FALSE ) + { + return 0; + } + + $k = Ord( $k ); + + $i |= ( $k & 0x7F ) << $j++ * 7; + + if( $j > 5 ) + { + throw new MinecraftPingException( 'VarInt too big' ); + } + + if( ( $k & 0x80 ) != 128 ) + { + break; + } + } + + return $i; + } +} diff --git a/upload/engine/libs/status_query/MinecraftPingException.php b/upload/engine/libs/status_query/MinecraftPingException.php new file mode 100644 index 0000000..bc6b927 --- /dev/null +++ b/upload/engine/libs/status_query/MinecraftPingException.php @@ -0,0 +1,8 @@ +Socket = @FSockOpen( 'udp://' . $Ip, (int)$Port, $ErrNo, $ErrStr, $Timeout ); + + if( $ErrNo || $this->Socket === false ) + { + throw new MinecraftQueryException( 'Could not create socket: ' . $ErrStr ); + } + + Stream_Set_Timeout( $this->Socket, $Timeout ); + Stream_Set_Blocking( $this->Socket, true ); + + try + { + $Challenge = $this->GetChallenge( ); + + $this->GetStatus( $Challenge ); + } + // We catch this because we want to close the socket, not very elegant + catch( MinecraftQueryException $e ) + { + FClose( $this->Socket ); + + throw new MinecraftQueryException( $e->getMessage( ) ); + } + + FClose( $this->Socket ); + } + + public function GetInfo( ) + { + return isset( $this->Info ) ? $this->Info : false; + } + + public function GetPlayers( ) + { + return isset( $this->Players ) ? $this->Players : false; + } + + private function GetChallenge( ) + { + $Data = $this->WriteData( self :: HANDSHAKE ); + + if( $Data === false ) + { + throw new MinecraftQueryException( 'Failed to receive challenge.' ); + } + + return Pack( 'N', $Data ); + } + + private function GetStatus( $Challenge ) + { + $Data = $this->WriteData( self :: STATISTIC, $Challenge . Pack( 'c*', 0x00, 0x00, 0x00, 0x00 ) ); + + if( !$Data ) + { + throw new MinecraftQueryException( 'Failed to receive status.' ); + } + + $Last = ''; + $Info = Array( ); + + $Data = SubStr( $Data, 11 ); // splitnum + 2 int + $Data = Explode( "\x00\x00\x01player_\x00\x00", $Data ); + + if( Count( $Data ) !== 2 ) + { + throw new MinecraftQueryException( 'Failed to parse server\'s response.' ); + } + + $Players = SubStr( $Data[ 1 ], 0, -2 ); + $Data = Explode( "\x00", $Data[ 0 ] ); + + // Array with known keys in order to validate the result + // It can happen that server sends custom strings containing bad things (who can know!) + $Keys = Array( + 'hostname' => 'HostName', + 'gametype' => 'GameType', + 'version' => 'Version', + 'plugins' => 'Plugins', + 'map' => 'Map', + 'numplayers' => 'Players', + 'maxplayers' => 'MaxPlayers', + 'hostport' => 'HostPort', + 'hostip' => 'HostIp', + 'game_id' => 'GameName' + ); + + foreach( $Data as $Key => $Value ) + { + if( ~$Key & 1 ) + { + if( !Array_Key_Exists( $Value, $Keys ) ) + { + $Last = false; + continue; + } + + $Last = $Keys[ $Value ]; + $Info[ $Last ] = ''; + } + else if( $Last != false ) + { + $Info[ $Last ] = mb_convert_encoding( $Value, 'UTF-8' ); + } + } + + // Ints + $Info[ 'Players' ] = IntVal( $Info[ 'Players' ] ); + $Info[ 'MaxPlayers' ] = IntVal( $Info[ 'MaxPlayers' ] ); + $Info[ 'HostPort' ] = IntVal( $Info[ 'HostPort' ] ); + + // Parse "plugins", if any + if( $Info[ 'Plugins' ] ) + { + $Data = Explode( ": ", $Info[ 'Plugins' ], 2 ); + + $Info[ 'RawPlugins' ] = $Info[ 'Plugins' ]; + $Info[ 'Software' ] = $Data[ 0 ]; + + if( Count( $Data ) == 2 ) + { + $Info[ 'Plugins' ] = Explode( "; ", $Data[ 1 ] ); + } + } + else + { + $Info[ 'Software' ] = 'Vanilla'; + } + + $this->Info = $Info; + + if( empty( $Players ) ) + { + $this->Players = null; + } + else + { + $this->Players = Explode( "\x00", $Players ); + } + } + + private function WriteData( $Command, $Append = "" ) + { + $Command = Pack( 'c*', 0xFE, 0xFD, $Command, 0x01, 0x02, 0x03, 0x04 ) . $Append; + $Length = StrLen( $Command ); + + if( $Length !== FWrite( $this->Socket, $Command, $Length ) ) + { + throw new MinecraftQueryException( "Failed to write on socket." ); + } + + $Data = FRead( $this->Socket, 4096 ); + + if( $Data === false ) + { + throw new MinecraftQueryException( "Failed to read from socket." ); + } + + if( StrLen( $Data ) < 5 || $Data[ 0 ] != $Command[ 2 ] ) + { + return false; + } + + return SubStr( $Data, 5 ); + } +} diff --git a/upload/engine/libs/status_query/MinecraftQueryException.php b/upload/engine/libs/status_query/MinecraftQueryException.php new file mode 100644 index 0000000..5984bf0 --- /dev/null +++ b/upload/engine/libs/status_query/MinecraftQueryException.php @@ -0,0 +1,8 @@ +core = $core; + $this->db = $core->db; + $this->user = $core->user; + //$this->lng = $core->lng; + } + + private function generate_sub_menu($tree){ + ob_start(); + + foreach ($tree as $key=>$ar){ + $id = intval($ar['id']); + $parent = intval($ar['parent']); + + $data = array( + "TITLE" => $this->db->HSC($ar['title']), + "URL" => $this->db->HSC($ar['url']), + "TARGET" => $this->db->HSC($ar['target']), + "SUB_MENU" => (!empty($ar['sons'])) ? $this->generate_sub_menu($ar['sons']) : "", + ); + + if(!empty($ar['sons'])){ + echo $this->core->sp(MCR_THEME_PATH."menu/menu-id-sub-parented.html", $data); + continue; + } + + echo $this->core->sp(MCR_THEME_PATH."menu/menu-id-sub.html", $data); + } + + return ob_get_clean(); + } + + private function generate_menu($array){ + ob_start(); + + $tree = $this->create_tree($array); + + foreach ($tree as $key=>$ar){ + + $id = intval($ar['id']); + $parent = intval($ar['parent']); + + $data = array( + "TITLE" => $this->db->HSC($ar['title']), + "URL" => $this->db->HSC($ar['url']), + "TARGET" => $this->db->HSC($ar['target']), + "SUB_MENU" => (!empty($ar['sons'])) ? $this->generate_sub_menu($ar['sons']) : "", + ); + + if(!empty($ar['sons'])){ + echo $this->core->sp(MCR_THEME_PATH."menu/menu-id-parented.html", $data); + continue; + } + + echo $this->core->sp(MCR_THEME_PATH."menu/menu-id.html", $data); + + } + + return ob_get_clean(); + } + + private function create_tree($categories){ + $tree = array(); + + $this->new_tree_element(&$categories, &$tree, null); + + return $tree; + } + + private function new_tree_element($categories, &$tree, $parent){ + + foreach($categories as $key => $ar){ + + if(intval($ar['parent']) == $parent){ + $tree[$key] = $categories[$key]; + $tree[$key]['sons'] = array(); + $this->new_tree_element($categories, &$tree[$key]['sons'], $key); + } + if(empty($tree['sons'])){ unset ($tree['sons']); } + + } + + unset($categories[$parent]); + return; + } + + private function menu_array(){ + ob_start(); + + $query = $this->db->query("SELECT id, title, `parent`, `url`, `target`, `permissions` + FROM `mcr_menu` + ORDER BY `parent` DESC"); + + if(!$query || $this->db->num_rows($query)<=0){ return ob_get_clean(); } + + $array = array(); + + while($ar = $this->db->fetch_assoc($query)){ + + if(!$this->core->is_access($ar['permissions'])){ continue; } + + $array[$ar['id']] = array( + "id" => $ar['id'], + "title" => $ar['title'], + "parent" => $ar['parent'], + "url" => $ar['url'], + "target" => $ar['target'], + "permissions" => $ar['permissions'] + ); + } + + $tree = $this->generate_menu($array); + + echo $tree; + + return ob_get_clean(); + } + + public function _list(){ + ob_start(); + + echo $this->menu_array(); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/engine/monitoring.class.php b/upload/engine/monitoring.class.php new file mode 100644 index 0000000..b1e702e --- /dev/null +++ b/upload/engine/monitoring.class.php @@ -0,0 +1,108 @@ +type = $type; + + switch($type){ + + default: + $this->socket = $this->get_socket_libs(); + break; + } + + } + + private function get_socket_libs(){ + + require_once(MCR_TOOL_PATH.'libs/status_query/MinecraftQuery.php'); + require_once(MCR_TOOL_PATH.'libs/status_query/MinecraftQueryException.php'); + + return new MinecraftQuery(); + } + + private function socket_connection($ip, $port){ + try{ + $this->socket->Connect($ip, $port, 5); + } catch( MinecraftQueryException $e ) { + $exception = $e; + } + + if(isset($exception) || ($data = $this->socket->GetInfo()) === false){ return false; } + + $array = array( + 'status' => 'online', + 'title' => $data['HostName'], + 'type' => $data['GameType'], + 'version' => $data['Version'], + 'players' => intval($data['Players']), + 'slots' => intval($data['MaxPlayers']), + 'player_list' => array() + ); + + if(($list = $this->socket->GetPlayers()) !== false){ $array['player_list'] = $list; } + + return $array; + } + + private function minetools_connection($ip, $port){ + $json = file_get_contents("http://www.api.minetools.eu/query/$ip/$port"); + + if(!$json){ return false; } + + $data = @json_decode($json, true); + + if(!$data || isset($data['error'])){ return false; } + + $array = array( + 'status' => 'online', + 'type' => $data['GameType'], + 'version' => $data['Version'], + 'players' => intval($data['Players']), + 'slots' => intval($data['MaxPlayers']) + ); + + $array['title'] = (is_null($data['HostName'])) ? '' : $data['HostName']; + $array['player_list'] = ($data['Playerlist']=='null') ? array() : $data['Playerlist']; + + return $array; + } + + public function connect($ip='localhost', $port=25565){ + + $array = array( + 'status' => 'offline', + 'title' => '', + 'type' => 'SMT', + 'version' => 0, + 'players' => 0, + 'slots' => 0, + 'player_list' => array() + ); + + $this->data = json_encode($array); + + if($this->type==1){ + $data = $this->minetools_connection($ip, $port); + if($data===false){ return false; } + }else{ + $data = $this->socket_connection($ip, $port); + if($data===false){ return false; } + } + + $this->data = json_encode($data); + + return true; + } + +} + +?> \ No newline at end of file diff --git a/upload/engine/skin.class.php b/upload/engine/skin.class.php new file mode 100644 index 0000000..46e6213 --- /dev/null +++ b/upload/engine/skin.class.php @@ -0,0 +1,172 @@ +core = $core; + $this->user = $core->user; + $this->db = $core->db; + $this->lng = $core->lng; + + if(!is_writable(MCR_SKIN_PATH)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_skin_folder'], 2, '?mode=profile'); } + if(!is_writable(MCR_SKIN_PATH.'interface/')){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_intf'], 2, '?mode=profile'); } + + $size = intval($obj['size']); + $tmp = $obj['tmp_name']; + + switch(intval($obj['error'])){ + case 0: break; + + case 1: + case 2: $this->core->notify($this->lng['e_msg'], $this->lng['e_load_size'], 2, '?mode=profile'); break; + + case 3: + case 4: $this->core->notify("", $this->lng['e_load_skin'], 2, '?mode=profile'); break; + + case 6: $this->core->notify($this->lng['e_msg'], $this->lng['e_load_temp'], 2, '?mode=profile'); break; + + case 7: $this->core->notify($this->lng['e_msg'], $this->lng['e_load_perm'], 2, '?mode=profile'); break; + + default: $this->core->notify("", $this->lng['e_load_undefined'], 2, '?mode=profile'); break; + } + + if(($size/1024)>$this->user->permissions->sys_max_file_size){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_size'], 2, '?mode=profile'); } + + if(!file_exists($tmp)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_tempfile'], 2, '?mode=profile'); } + + if(substr($obj['name'], -4)!='.png'){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + $get_size = @getimagesize($tmp); + + if(!$get_size){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + $width = $get_size[0]; + $height = $get_size[1]; + + if(!$this->is_skin_valid($get_size)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_format'], 2, '?mode=profile'); } + + $multiple = $get_size[0] / $this->mp; + + // Create and save head of skin + + $new_head = $this->create_head($tmp, $multiple); + + if($new_head===false){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + imagepng($new_head, MCR_SKIN_PATH.'interface/'.$this->user->login.'_mini.png'); + // Create and save head of skin - + + // Create and save preview of skin + + $new_preview = $this->create_preview($tmp, $multiple); + + if($new_preview===false){ $this->core->notify($this->lng['e_msg'], $this->lng['e_load_png'], 2, '?mode=profile'); } + + imagepng($new_preview, MCR_SKIN_PATH.'interface/'.$this->user->login.'.png'); + // Create and save preview of skin - + + // Save new skin + + if(!file_exists(MCR_SKIN_PATH.$this->user->login.'.png')){ + if(!copy($tmp, MCR_SKIN_PATH.$this->user->login.'.png')){ $this->core->notify("", $this->lng['e_load_save'], 2, '?mode=profile'); } + } + // Save new skin - + } + + public function create_head($path, $multiple=1, $size=151){ + + $image = @imagecreatefrompng($path); + + if(!$image){ return false; } + + $new = imagecreatetruecolor($size, $size); + + imagecopyresized($new, $image, 0, 0, 8 * $multiple, 8 * $multiple, $size, $size, 8 * $multiple, 8 * $multiple); + imagecopyresized($new, $image, 0, 0, 40 * $multiple, 8 * $multiple, $size, $size, 8 * $multiple, 8 * $multiple); + + imagedestroy($image); + + return $new; + } + + public function create_preview($path, $multiple, $size=224){ + + $image = @imagecreatefrompng($path); + + if(!$image){ return false; } + + $preview = imagecreatetruecolor(32 * $multiple, 32 * $multiple); + + $mp_x_h = imagesx($preview) / 2; + + $transparent = imagecolorallocatealpha($preview, 255, 255, 255, 127); + + imagefill($preview, 0, 0, $transparent); + + // Front skin + imagecopy($preview, $image, 4 * $multiple, 0 * $multiple, 8 * $multiple, 8 * $multiple, 8 * $multiple, 8 * $multiple); + imagecopy($preview, $image, 0 * $multiple, 8 * $multiple, 44 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + $this->core->imageflip($preview, $image, 12 * $multiple, 8 * $multiple, 44 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + imagecopy($preview, $image, 4 * $multiple, 8 * $multiple, 20 * $multiple, 20 * $multiple, 8 * $multiple, 12 * $multiple); + imagecopy($preview, $image, 4 * $multiple, 20 * $multiple, 4 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + $this->core->imageflip($preview, $image, 8 * $multiple, 20 * $multiple, 4 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + imagecopy($preview, $image, 4 * $multiple, 0 * $multiple, 40 * $multiple, 8 * $multiple, 8 * $multiple, 8 * $multiple); + + // Back skin + imagecopy($preview, $image, $mp_x_h + 4 * $multiple, 8 * $multiple, 32 * $multiple, 20 * $multiple, 8 * $multiple, 12 * $multiple); + imagecopy($preview, $image, $mp_x_h + 4 * $multiple, 0 * $multiple, 24 * $multiple, 8 * $multiple, 8 * $multiple, 8 * $multiple); + $this->core->imageflip($preview, $image, $mp_x_h + 0 * $multiple, 8 * $multiple, 52 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + imagecopy($preview, $image, $mp_x_h + 12 * $multiple, 8 * $multiple, 52 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + $this->core->imageflip($preview, $image, $mp_x_h + 4 * $multiple, 20 * $multiple, 12 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + imagecopy($preview, $image, $mp_x_h + 8 * $multiple, 20 * $multiple, 12 * $multiple, 20 * $multiple, 4 * $multiple, 12 * $multiple); + imagecopy($preview, $image, $mp_x_h + 4 * $multiple, 0 * $multiple, 56 * $multiple, 8 * $multiple, 8 * $multiple, 8 * $multiple); + + + $fullsize = imagecreatetruecolor($size, $size); + + imagesavealpha($fullsize, true); + + $transparent = imagecolorallocatealpha($fullsize, 255, 255, 255, 127); + + imagefill($fullsize, 0, 0, $transparent); + + imagecopyresized($fullsize, $preview, 0, 0, 0, 0, imagesx($fullsize), imagesy($fullsize), imagesx($preview), imagesy($preview)); + + imagedestroy($preview); + imagedestroy($image); + + return $fullsize; + } + + /** + * Валидация формата изображения + * @param $tmp - путь к изображению + * @return boolean + * - Проверяет права на максимальный размер изображения + */ + public function is_skin_valid($size){ + $formats = $this->core->get_array_formats(); + + $max_ratio = $this->user->permissions->max_ratio; + + if($max_ratio<=0){ return false; } + + $width = $formats[$max_ratio]["skin_w"]; + $height = $formats[$max_ratio]["skin_h"]; + + if($size[0]>$width || $size[1]>$height){ return false; } + + if($width<64 || $height<32){ return false; } + + if($width%$height != 0){ return false; } + + if($size[0]/$size[1] != 2){ return false; } + + return true; + } + +} + +?> \ No newline at end of file diff --git a/upload/engine/smtp/PHPMailerAutoload.php b/upload/engine/smtp/PHPMailerAutoload.php new file mode 100644 index 0000000..eaa2e30 --- /dev/null +++ b/upload/engine/smtp/PHPMailerAutoload.php @@ -0,0 +1,49 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer SPL autoloader. + * @param string $classname The name of the class to load + */ +function PHPMailerAutoload($classname) +{ + //Can't use __DIR__ as it's only in PHP 5.3+ + $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; + if (is_readable($filename)) { + require $filename; + } +} + +if (version_compare(PHP_VERSION, '5.1.2', '>=')) { + //SPL autoloading was introduced in PHP 5.1.2 + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + spl_autoload_register('PHPMailerAutoload', true, true); + } else { + spl_autoload_register('PHPMailerAutoload'); + } +} else { + /** + * Fall back to traditional autoload for old PHP versions + * @param string $classname The name of the class to load + */ + function __autoload($classname) + { + PHPMailerAutoload($classname); + } +} diff --git a/upload/engine/smtp/class.html2text.php b/upload/engine/smtp/class.html2text.php new file mode 100644 index 0000000..2060991 --- /dev/null +++ b/upload/engine/smtp/class.html2text.php @@ -0,0 +1,677 @@ + * + * * + * This script is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * The GNU General Public License can be found at * + * http://www.gnu.org/copyleft/gpl.html. * + * * + * This script is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + *************************************************************************/ + +/** + * Converts HTML to formatted plain text + */ +class Html2Text +{ + /** + * Contains the HTML content to convert. + * + * @type string + */ + protected $html; + + /** + * Contains the converted, formatted text. + * + * @type string + */ + protected $text; + + /** + * Maximum width of the formatted text, in columns. + * + * Set this value to 0 (or less) to ignore word wrapping + * and not constrain text to a fixed-width column. + * + * @type integer + */ + protected $width = 70; + + /** + * List of preg* regular expression patterns to search for, + * used in conjunction with $replace. + * + * @type array + * @see $replace + */ + protected $search = array( + "/\r/", // Non-legal carriage return + "/[\n\t]+/", // Newlines and tabs + '/]*>.*?<\/head>/i', // + '/]*>.*?<\/script>/i', // + + + + + + +
+
+
+
+
+

+

+
+ + +
+
+
+
+ + + +
+
+
+ +
+ + + +
+ + + +
+ + + + +
+ +
+
+
+ + + + + + \ No newline at end of file diff --git a/upload/install/theme/header.html b/upload/install/theme/header.html new file mode 100644 index 0000000..44edcb9 --- /dev/null +++ b/upload/install/theme/header.html @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/upload/install/theme/left-block.html b/upload/install/theme/left-block.html new file mode 100644 index 0000000..1249760 --- /dev/null +++ b/upload/install/theme/left-block.html @@ -0,0 +1,14 @@ +
+ +
Информация
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/upload/install/theme/settings.html b/upload/install/theme/settings.html new file mode 100644 index 0000000..e378d7f --- /dev/null +++ b/upload/install/theme/settings.html @@ -0,0 +1,99 @@ +
+ +
+
Настройки сайта
+
+ +
+ +
+
+ Основные + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + Почта + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +

+
+
+ +
\ No newline at end of file diff --git a/upload/install/theme/step_1.html b/upload/install/theme/step_1.html new file mode 100644 index 0000000..2104c17 --- /dev/null +++ b/upload/install/theme/step_1.html @@ -0,0 +1,133 @@ +
+ +
+
Подготовка к установке
+
+ +
+ +
+

Вас приветствует мастер установки системы WebMCR

+

Для продолжения вам необходимо сверить результаты проверки. Если результаты проверки помечены красным, вам необходимо настроить сервер так, чтобы значение соответствовало системным требованиям

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Системные требованияРезультат проверки
PHP >= 5.1
Register Globals
allow_url_fopen
Наличие библиотеки GD
Поддержка MySQL
Буферизация вывода
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Доступ к файлам и папкамРезультат проверки
Чтение и запись | configs/
Чтение и запись | configs/db.php
Чтение и запись | configs/functions.php
Чтение и запись | configs/mail.php
Чтение и запись | configs/main.php
Чтение и запись | configs/pagin.php
Чтение и запись | configs/search.php
Чтение и запись | uploads/
Чтение и запись | uploads/cloaks/
Чтение и запись | uploads/panel-icons/
Чтение и запись | uploads/skins/
Чтение и запись | uploads/skins/interface/
Чтение и запись | uploads/smiles/
+
+

+
+
+ +
\ No newline at end of file diff --git a/upload/install/theme/step_2.html b/upload/install/theme/step_2.html new file mode 100644 index 0000000..70fc5ea --- /dev/null +++ b/upload/install/theme/step_2.html @@ -0,0 +1,61 @@ +
+ +
+
Настройки базы
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +

+
+
+ +
\ No newline at end of file diff --git a/upload/install/theme/step_3.html b/upload/install/theme/step_3.html new file mode 100644 index 0000000..b5a7ab2 --- /dev/null +++ b/upload/install/theme/step_3.html @@ -0,0 +1,68 @@ +
+ +
+
Установка
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +

+
+
+ +
\ No newline at end of file diff --git a/upload/language/ru_RU/main.php b/upload/language/ru_RU/main.php new file mode 100644 index 0000000..c627603 --- /dev/null +++ b/upload/language/ru_RU/main.php @@ -0,0 +1,158 @@ + "Ошибка!", + "e_sql_connect" => "Ошибка соединения с базой", + "e_sql_charset" => "Ошибка установки кодировки баз дынных", + "e_sql_critical" => "Критическая ошибка баз данных. Обратитесь к администрации.", + "e_critical" => "Обратитесь к администрации", + "e_warn" => "Обнаружена ошибка!", + "e_attention" => "Внимание!", + "e_success" => "Поздравляем!", + "e_403" => "Доступ запрещен", + "e_captcha" => "Неверно введена каптча", + "e_hack" => "Hacking Attempt!", + + "e_reg_login_regexp" => "Логин может состоять только из латинских букв, цифр и знаков -_", + "e_reg_login_exist" => "Запрещено использовать данный логин", + "e_reg_email_regexp" => "Неверный формат E-Mail адреса", + "e_reg_email_exist" => "Запрещено использовать данный E-Mail", + "e_reg_already" => "Вы уже зарегистрированы", + "e_reg_rules" => "Для регистрации необходимо принять правила", + "e_reg_pass_length" => "Пароль должен быть не менее 6-ти символов", + "e_reg_pass_match" => "Пароли не совпадают", + "e_reg_success" => "Вы успешно зарегистрировались. Теперь вы можете войти под своим логином и паролем.", + "e_reg_success_mail" => "Письмо с подтверждением регистрации отправлено на E-Mail, указанный при регистрации", + "e_reg_accept" => "Вы успешно подтвердили регистрацию", + "e_reg_perm" => "Регистрация отключена для вашей группы пользователей", + + "e_auth_already" => "Вы уже авторизованны", + "e_auth_wrong_pass" => "Неверный логин или пароль", + "e_auth_success" => "Вы успешно авторизовались", + + "e_unauth_not" => "Вы не авторизованы", + "e_unauth_yes" => "Вы успешно покинули свой аккаунт", + + "e_valid_fname" => "Имя может состоять только из букв", + "e_valid_lname" => "Фамилия может состоять только из букв", + "e_valid_bday" => "Неверный формат даты рождения", + "e_valid_oldpass" => "Неверно введен старый пароль", + "e_valid_repass" => "Пароли не совпадают", + + "e_rest_eamil" => "Не заполнено поле E-Mail", + "e_rest_success" => "Инструкция по восстановлению пароля отправлена на указанный E-Mail", + "e_rest_limit" => "Привышен максимально допустимый лимит на восстановление пароля", + "e_rest_email" => "Пользователь с указанным E-Mail адресом не найден", + "e_rest_success2" => "Ваш пароль успешно изменен. Теперь вы можете войти", + "e_rest_perm" => "Восстановление пароля ограничено администрацией", + + "e_load_cloak_folder" => "Отсутствуют права на запись папки uploads/cloaks", + "e_load_skin_folder" => "Отсутствуют права на запись папки uploads/skins", + "e_load_intf" => "Отсутствуют права на запись папки uploads/interface", + "e_load_size" => "Привышен максимально допустимый размер файла", + "e_load_cloak" => "Ошибка загрузки плаща!", + "e_load_skin" => "Ошибка загрузки скина!", + "e_load_temp" => "Отсутствует временная папка", + "e_load_perm" => "Отсутствуют права на запись", + "e_load_undefined" => "Неизвестная ошибка", + "e_load_tempfile" => "Отсутствует временный файл", + "e_load_png" => "Разрешено загружать только png", + "e_load_format" => "Вам недоступен данный формат", + "e_load_save" => "Ошибка сохранения скина/плаща", + + "e_mode_found" => "Страница не найдена", + "e_mode_class" => "Объект module не найден", + "e_mode_method" => "Метод content в классе module не найден", + + "e_advice_found" => "Советов нет", + + "e_search_perm" => "Поиск ограничен администрацией", + + // "e_" => "", + + // Названия страниц + "t_main" => "Главная", + "t_403" => "Доступ запрещен", + "t_404" => "Страница не найдена", + "t_reg" => "Регистрация", + "t_restore" => "Восстановление пароля", + "t_profile" => "Профиль", + "t_admin" => "Панель управления", + "t_static" => "Статические страницы", + "t_search" => "Поиск", + // "t_" => "", + + // Названия переменных по умолчанию + "u_group_def" => "Гость", + "u_group_desc_def" => "Группа неавторизованных пользователей", + // "u_" => "", + + // Названия блоков + "b_alert" => "Оповещение", + "b_m-p" => "Мини-профиль", + "b_auth" => "Авторизация", + "b_reg" => "Регистрация", + "b_404" => "Страница не найдена", + "b_403" => "Доступ запрещен", + "b_restore" => "Восстановление пароля", + // "b_" => "", + + // Блок мини-профиля + "m-p_login" => "Логин", + "m-p_group" => "Группа", + "m-p_balance" => "Баланс", + "m-p_settings" => "Профиль", + "m-p_logout" => "Выход", + // "m-p_" => "", + + // Блок авторизации + "ath_remember" => "Запомнить", + "ath_auth" => "Вход", + "ath_reg" => "Регистрация", + // "ath_" => "", + + // Блок регистрации + "reg_login" => "Логин", + "reg_email" => "E-Mail", + "reg_pass" => "Пароль", + "reg_repass" => "Повторите пароль", + "reg_accept" => "Я принимаю данные правила и обязуюсь их соблюдать", + "reg_btn" => "Зарегистрироваться", + // "reg_" => "", + + "btn_restore" => "Восстановить", + "btn_edit" => "Изменить", + + "int_newpass" => "Новый пароль", + + // Placeholder'ы форм + "ph_login" => "Логин", + "ph_password" => "Пароль", + "ph_email" => "E-Mail", + "ph_repassword" => "Повторите пароль", + "ph_search" => "Поиск", + // "ph_" => "", + + // ToolTip'ы (title) + "tlp_restore_pass" => "Восстановление пароля", + //"tlp_" => "", + + // Разное + "sch_news" => "По новостям", + "sch_comm" => "по комментариям", + "load_client" => "СКАЧАТЬ КЛИЕНТ", + "copy_pre" => "Полное или частичное копирование сайта", + "copy_app" => "запрещено.", + "gender" => "Пол", + "gender_m" => "Мужской", + "gender_w" => "Женский", + //"" => "", + + "rest_title" => "[Восстановление пароля]", + "reg_title" => "[Регистрация]", +); + +?> \ No newline at end of file diff --git a/upload/license.txt b/upload/license.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/upload/license.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/upload/modules/admin.php b/upload/modules/admin.php new file mode 100644 index 0000000..eef2b18 --- /dev/null +++ b/upload/modules/admin.php @@ -0,0 +1,132 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin']; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + public function content(){ + if(!$this->core->is_access('sys_adm_main')){ $this->core->notify('403', $this->lng['e_403']); } + + $do = (isset($_GET['do'])) ? $_GET['do'] : 'main'; + + switch($do){ + case 'news': + if(!$this->core->is_access('sys_adm_news')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/news.class.php'); + break; + + case 'news_cats': + if(!$this->core->is_access('sys_adm_news_cats')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/news_cats.class.php'); + break; + + case 'news_views': + if(!$this->core->is_access('sys_adm_news_views')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/news_views.class.php'); + break; + + case 'news_votes': + if(!$this->core->is_access('sys_adm_news_votes')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/news_votes.class.php'); + break; + + case 'comments': + if(!$this->core->is_access('sys_adm_comments')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/comments.class.php'); + break; + + case 'menu': + if(!$this->core->is_access('sys_adm_menu')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/menu.class.php'); + break; + + case 'menu_adm': + if(!$this->core->is_access('sys_adm_menu_adm')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/menu_adm.class.php'); + break; + + case 'menu_groups': + if(!$this->core->is_access('sys_adm_menu_groups')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/menu_groups.class.php'); + break; + + case 'menu_icons': + if(!$this->core->is_access('sys_adm_menu_icons')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/menu_icons.class.php'); + break; + + case 'users': + if(!$this->core->is_access('sys_adm_users')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/users.class.php'); + break; + + case 'groups': + if(!$this->core->is_access('sys_adm_groups')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/groups.class.php'); + break; + + case 'permissions': + if(!$this->core->is_access('sys_adm_permissions')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/permissions.class.php'); + break; + + case 'statics': + if(!$this->core->is_access('sys_adm_statics')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/statics.class.php'); + break; + + case 'info': + if(!$this->core->is_access('sys_adm_info')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/info.class.php'); + break; + + case 'settings': + if(!$this->core->is_access('sys_adm_settings')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/settings.class.php'); + break; + + case 'monitoring': + if(!$this->core->is_access('sys_adm_monitoring')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/monitoring.class.php'); + break; + + case 'modules': + if(!$this->core->is_access('sys_adm_modules')){ $this->core->notify('403', $this->lng['e_403']); } + require_once(MCR_MODE_PATH.'admin/modules.class.php'); + break; + + default: + require_once(MCR_MODE_PATH.'admin/panel_menu.class.php'); + break; + } + + $submodule = new submodule($this->core); + + $content = $submodule->content(); + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/comments.class.php b/upload/modules/admin/comments.class.php new file mode 100644 index 0000000..e6a1d1d --- /dev/null +++ b/upload/modules/admin/comments.class.php @@ -0,0 +1,310 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Комментарии'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Комментарии' => BASE_URL."?mode=admin&do=comments" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function comment_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_comments'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_comments']; // Set end pagination + + $query = $this->db->query("SELECT `c`.id, `c`.nid, `c`.text_html, `n`.title AS `new` + FROM `mcr_comments` AS `c` + LEFT JOIN `mcr_news` AS `n` + ON `n`.id=`c`.nid + ORDER BY `c`.id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/comments/com-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $text = strip_tags($ar['text_html']); + + $text = mb_substr($text, 0, 24, "UTF-8").'...'; + + $new = (empty($ar['new'])) ? 'Новость удалена' : $this->db->HSC($ar['new']); + + $page_data = array( + "ID" => intval($ar['id']), + "NID" => intval($ar['nid']), + "NEW" => $new, + "TEXT" => $this->db->HSC($text) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/comments/com-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function comment_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_comments`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_comments'], "?mode=admin&do=comments&pid=", $ar[0]), + "COMMENTS" => $this->comment_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/comments/com-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=comments'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=comments'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete1 = $this->db->query("DELETE FROM `mcr_comments` WHERE id IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=comments'); } + + $count1 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: комментариев - $count1", 3, '?mode=admin&do=comments'); + + } + + private function news($selected=1){ + $selected = intval($selected); + $query = $this->db->query("SELECT id, title FROM `mcr_news` ORDER BY title ASC"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + + $data = array( + "ID" => 1, + "TITLE" => 'Без новости', + "SELECTED" => 'selected disabled' + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/comments/nid-list-id.html", $data); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + $data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "SELECTED" => ($selected==intval($ar['id'])) ? 'selected' : '' + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/comments/nid-list-id.html", $data); + } + + return ob_get_clean(); + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Комментарии' => BASE_URL."?mode=admin&do=comments", + 'Добавление' => BASE_URL."?mode=admin&do=comments&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $bb = $this->core->load_bb_class(); // Загрузка класса BB-кодов + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $nid = intval(@$_POST['nid']); + + // Обработка описания + + $text_bb = @$_POST['text']; + + $text_bb_trim = trim($text_bb); + + if(empty($text_bb_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Комментарий\"", 2, '?mode=admin&do=comments&op=add'); } + + $text_bb = $this->db->HSC($text_bb); + + $text_html = $bb->decode($text_bb); + + $safe_text_html = $this->db->safesql($text_html); + + $text_bb = $this->db->safesql($text_bb); + + $text_html_strip = trim(strip_tags($text_html, "")); + + if(empty($text_html_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Комментарий\"", 2, '?mode=admin&do=comments&op=add'); } + // Обработка описания - + + $new_data = array( + "time_create" => time(), + "time_last" => time() + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $insert = $this->db->query("INSERT INTO `mcr_comments` + (nid, text_bb, text_html, uid, `data`) + VALUES + ('$nid', '$text_bb', '$text_html', '{$this->user->id}', '$new_data')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=comments&op=add'); } + + $this->core->notify($this->lng["e_success"], "Комментарий успешно добавлен", 3, '?mode=admin&do=comments'); + } + + $data = array( + "PAGE" => "Добавление комментария", + "NEWS" => $this->news(), + "TEXT" => "", + "BB_PANEL" => $bb->bb_panel('bb-comment'), + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/comments/com-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT nid, text_bb, `data` + FROM `mcr_comments` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=comments'); } + + $ar = $this->db->fetch_assoc($query); + + $data = json_decode($ar['data']); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Комментарии' => BASE_URL."?mode=admin&do=comments", + 'Редактирование' => BASE_URL."?mode=admin&do=comments&op=edit&id=$id" + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $bb = $this->core->load_bb_class(); // Загрузка класса BB-кодов + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $nid = intval(@$_POST['nid']); + + // Обработка описания + + $text_bb = @$_POST['text']; + + $text_bb_trim = trim($text_bb); + + if(empty($text_bb_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Комментарий\"", 2, '?mode=admin&do=comments&op=add'); } + + $text_bb = $this->db->HSC($text_bb); + + $text_html = $bb->decode($text_bb); + + $safe_text_html = $this->db->safesql($text_html); + + $text_bb = $this->db->safesql($text_bb); + + $text_html_strip = trim(strip_tags($text_html, "")); + + if(empty($text_html_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Комментарий\"", 2, '?mode=admin&do=comments&op=add'); } + // Обработка описания - + + $new_data = array( + "time_create" => $data->time_create, + "time_last" => time() + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $update = $this->db->query("UPDATE `mcr_comments` + SET nid='$nid', text_bb='$text_bb', text_html='$safe_text_html', `data`='$new_data' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=comments&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Комментарий успешно изменен", 3, '?mode=admin&do=comments'); + } + + $data = array( + "PAGE" => "Редактирование комментария", + "NEWS" => $this->news($ar['nid']), + "TEXT" => $this->db->HSC($ar['text_bb']), + "BB_PANEL" => $bb->bb_panel('bb-comment'), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/comments/com-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->comment_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/groups.class.php b/upload/modules/admin/groups.class.php new file mode 100644 index 0000000..df03468 --- /dev/null +++ b/upload/modules/admin/groups.class.php @@ -0,0 +1,291 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Группы пользователей'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Группы пользователей' => BASE_URL."?mode=admin&do=groups" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function group_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_groups'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_groups']; // Set end pagination + + $query = $this->db->query("SELECT id, title, description + FROM `mcr_groups` + ORDER BY id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/groups/group-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['description']), + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/groups/group-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function group_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_groups`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_groups'], "?mode=admin&do=groups&pid=", $ar[0]), + "GROUPS" => $this->group_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/groups/group-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=groups'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=groups'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_groups` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=groups'); } + + $count = $this->db->affected_rows(); + + $delete1 = $this->db->query("DELETE FROM `mcr_users` WHERE gid IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=groups'); } + + $count1 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: групп - $count, пользователей - $count1", 3, '?mode=admin&do=groups'); + + } + + private function get_default_value($name='false', $value, $type='boolean'){ + switch($type){ + case 'integer': + $value = intval($value); + $input = ''; + break; + + case 'float': + $value = floatval($value); + $input = ''; + break; + + case 'string': + $value = $this->db->HSC($value); + $input = ''; + break; + + default: + $select = ($value=='true') ? 'selected' : ''; + $input = ''; + break; + } + + + return $input; + } + + private function perm_list($perm=''){ + $query = $this->db->query("SELECT title, `value`, `default`, `type` FROM `mcr_permissions`"); + if(!$query || $this->db->num_rows($query)<=0){ return; } + + if(!empty($perm)){ $json = json_decode($perm, true); } + + ob_start(); + + while($ar = $this->db->fetch_assoc($query)){ + $data["TITLE"] = $this->db->HSC($ar['title']); + $data["VALUE"] = $this->db->HSC($ar['value']); + + $data['DEFAULT'] = $this->get_default_value($ar['value'], $json[$ar['value']], $ar['type']); + + echo $this->core->sp(MCR_THEME_MOD."admin/groups/perm-id.html", $data); + } + + return ob_get_clean(); + } + + private function gen_permissions($data){ + if(empty($data)){ exit("System permissions error"); } + + foreach($data as $key => $value){ + if($value=='true' || $value=='false'){ + $data[$key] = ($value=='true') ? true : false; + }else{ + $data[$key] = intval($value); + } + } + + return json_encode($data); + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Группы пользователей' => BASE_URL."?mode=admin&do=groups", + 'Добавление' => BASE_URL."?mode=admin&do=groups&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $permissions = $this->db->safesql(@$_POST['permissions']); + + $perm_data = $_POST; + + unset($perm_data['submit'], $perm_data['mcr_secure'], $perm_data['title'], $perm_data['text']); + + $new_permissions = $this->db->safesql($this->gen_permissions($perm_data)); + + $insert = $this->db->query("INSERT INTO `mcr_groups` + (title, description, `permissions`) + VALUES + ('$title', '$text', '$new_permissions')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=groups'); } + + $this->core->notify($this->lng["e_success"], "Группа пользователей успешно добавлена", 3, '?mode=admin&do=groups'); + } + + $data = array( + "PAGE" => "Добавление группы", + "TITLE" => '', + "TEXT" => '', + "PERMISSIONS" => $this->perm_list(), + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/groups/group-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, `description`, `permissions` + FROM `mcr_groups` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=groups'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Группы пользователей' => BASE_URL."?mode=admin&do=groups", + 'Редактирование' => BASE_URL."?mode=admin&do=groups&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $permissions = $this->db->safesql(@$_POST['permissions']); + + $perm_data = $_POST; + + unset($perm_data['submit'], $perm_data['mcr_secure'], $perm_data['title'], $perm_data['text']); + + $new_permissions = $this->db->safesql($this->gen_permissions($perm_data)); + + $update = $this->db->query("UPDATE `mcr_groups` + SET title='$title', description='$text', `permissions`='$new_permissions' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=groups&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Группа пользователей успешно изменена", 3, '?mode=admin&do=groups&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование группы", + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['description']), + "PERMISSIONS" => $this->perm_list($ar['permissions']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/groups/group-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->group_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/info.class.php b/upload/modules/admin/info.class.php new file mode 100644 index 0000000..f494405 --- /dev/null +++ b/upload/modules/admin/info.class.php @@ -0,0 +1,128 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Информация'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Информация' => BASE_URL."?mode=admin&do=statics" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function main(){ + + $this->core->header .= ''; + + return $this->core->sp(MCR_THEME_MOD."admin/info/main.html"); + } + + private function users_stats(){ + $query = $this->db->query("SELECT `g`.id, `g`.title, COUNT(`u`.`id`) AS `count` + FROM `mcr_groups` AS `g` + LEFT JOIN `mcr_users` AS `u` + ON `u`.`gid`=`g`.`id` + GROUP BY `g`.`id`"); + if(!$query || $this->db->num_rows($query)<=0){ return; } + + ob_start(); + + while($ar = $this->db->fetch_assoc($query)){ + + switch(intval($ar['id'])){ + case 0: $class='error'; break; + case 1: $class='warning'; break; + case 2: $class='success'; break; + case 3: $class='info'; break; + + default: $class=''; break; + } + + $data = array( + "CLASS" => $class, + "TITLE" => $this->db->HSC($ar['title']), + "COUNT" => intval($ar['count']) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/info/group-id.html", $data); + } + + return ob_get_clean(); + } + + private function stats(){ + + $query = $this->db->query("SELECT COUNT(*) AS `users`, + (SELECT COUNT(*) FROM `mcr_news`) AS `news`, + (SELECT COUNT(*) FROM `mcr_news_cats`) AS `categories`, + (SELECT COUNT(*) FROM `mcr_comments`) AS `comments`, + (SELECT COUNT(*) FROM `mcr_statics`) AS `statics`, + (SELECT COUNT(*) FROM `mcr_groups`) AS `groups`, + (SELECT COUNT(*) FROM `mcr_news_views`) AS `views`, + (SELECT COUNT(*) FROM `mcr_news_votes`) AS `votes`, + (SELECT COUNT(*) FROM `mcr_permissions`) AS `permissions` + FROM `mcr_users`"); + + if(!$query || $this->db->num_rows($query)<=0){ return; } + + $ar = $this->db->fetch_assoc($query); + + $data = array( + "COUNT_USERS" => intval($ar['users']), + "COUNT_GROUPS" => intval($ar['groups']), + "COUNT_NEWS" => intval($ar['news']), + "COUNT_COMMENTS" => intval($ar['comments']), + "COUNT_CATEGORIES" => intval($ar['categories']), + "COUNT_STATICS" => intval($ar['statics']), + "COUNT_VIEWS" => intval($ar['views']), + "COUNT_VOTES" => intval($ar['votes']), + "COUNT_PERMISSIONS" => intval($ar['permissions']), + "USERS_STATS" => $this->users_stats() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/info/stats.html", $data); + + return ob_get_clean(); + } + + private function extensions(){ + + $this->core->header .= ''; + + return $this->core->sp(MCR_THEME_MOD."admin/info/extensions.html"); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'stats': $content = $this->stats(); break; + case 'extensions': $content = $this->extensions(); break; + + default: $content = $this->main(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/menu.class.php b/upload/modules/admin/menu.class.php new file mode 100644 index 0000000..6a42339 --- /dev/null +++ b/upload/modules/admin/menu.class.php @@ -0,0 +1,263 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Меню сайта'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Меню сайта' => BASE_URL."?mode=admin&do=menu" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function menu_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_menu'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_menu']; // Set end pagination + + $query = $this->db->query("SELECT `m`.id, `m`.title, `m`.`parent`, `m`.`url`, `m`.`target`, `p`.title AS `ptitle` + FROM `mcr_menu` AS `m` + LEFT JOIN `mcr_menu` AS `p` + ON `p`.id=`m`.`parent` + ORDER BY `m`.id ASC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/menu/menu-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $parent = (intval($ar['parent'])===0) ? "Верхний уровень" : $this->db->HSC($ar['ptitle']); + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "PID" => intval($ar['parent']), + "URL" => $this->db->HSC($ar['url']), + "TARGET" => $this->db->HSC($ar['target']), + "PARENT" => $parent + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu/menu-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function menu_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_menu`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_menu'], "?mode=admin&do=menu&pid=", $ar[0]), + "MENU" => $this->menu_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu/menu-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=menu'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=menu'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_menu` WHERE id IN ($list) AND `parent` IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu'); } + + $count = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: пунктов меню - $count", 3, '?mode=admin&do=menu'); + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Меню сайта' => BASE_URL."?mode=admin&do=menu", + 'Добавление' => BASE_URL."?mode=admin&do=menu&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $url = $this->db->safesql(@$_POST['url']); + $parent = intval(@$_POST['parent']); + $target = (@$_POST['target']=="_blank") ? "_blank" : "_self"; + $permissions = $this->db->safesql(@$_POST['permissions']); + + if(!$this->core->validate_perm($permissions)){ $this->core->notify($this->lng["e_msg"], "Привилегия не существует", 2, '?mode=admin&do=menu'); } + + $insert = $this->db->query("INSERT INTO `mcr_menu` + (title, `parent`, `url`, `target`, `permissions`) + VALUES + ('$title', '$parent', '$url', '$target', '$permissions')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu'); } + + $this->core->notify($this->lng["e_success"], "Пункт меню успешно добавлен", 3, '?mode=admin&do=menu'); + } + + $data = array( + "PAGE" => "Добавление меню", + "TITLE" => '', + "URL" => '', + "PERMISSIONS" => $this->core->perm_list(), + "PARENTS" => $this->parents(), + "TARGET" => '', + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu/menu-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, `parent`, `url`, `target`, permissions + FROM `mcr_menu` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Меню сайта' => BASE_URL."?mode=admin&do=menu", + 'Редактирование' => BASE_URL."?mode=admin&do=menu&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $url = $this->db->safesql(@$_POST['url']); + $parent = intval(@$_POST['parent']); + $target = (@$_POST['target']=="_blank") ? "_blank" : "_self"; + $permissions = $this->db->safesql(@$_POST['permissions']); + + if(!$this->core->validate_perm($permissions)){ $this->core->notify($this->lng["e_msg"], "Привилегия не существует", 2, '?mode=admin&do=menu'); } + + + $update = $this->db->query("UPDATE `mcr_menu` + SET title='$title', `parent`='$parent', `url`='$url', `target`='$target', `permissions`='$permissions' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Пункт меню успешно изменен", 3, '?mode=admin&do=menu&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование меню", + "TITLE" => $this->db->HSC($ar['title']), + "URL" => $this->db->HSC($ar['url']), + "PERMISSIONS" => $this->core->perm_list($ar['permissions']), + "PARENTS" => $this->parents($ar['parent'], $id), + "TARGET" => ($ar['target']=='_blank') ? 'selected' : '', + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu/menu-add.html", $data); + + return ob_get_clean(); + } + + private function parents($select=0, $not=false){ + + $select = intval($select); + + $not = ($not===false) ? -1 : intval($not); + + $query = $this->db->query("SELECT id, title + FROM `mcr_menu` + WHERE id!='$not' + ORDER BY title ASC"); + + ob_start(); + + $selected = ($select===0) ? 'selected' : ''; + + echo ''; + + if(!$query || $this->db->num_rows($query)<=0){ return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + $id = intval($ar['id']); + $selected = ($id == $select) ? "selected" : ""; + + $title = $this->db->HSC($ar['title']); + + echo ""; + } + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->menu_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/menu_adm.class.php b/upload/modules/admin/menu_adm.class.php new file mode 100644 index 0000000..db682c0 --- /dev/null +++ b/upload/modules/admin/menu_adm.class.php @@ -0,0 +1,345 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Меню ПУ'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Меню ПУ' => BASE_URL."?mode=admin&do=menu_adm" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function menu_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_menu_adm'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_menu_adm']; // Set end pagination + + $query = $this->db->query("SELECT `m`.id, `m`.gid, `m`.title, `m`.`url`, `m`.`target`, `g`.title AS `group` + FROM `mcr_menu_adm` AS `m` + LEFT JOIN `mcr_menu_adm_groups` AS `g` + ON `g`.id=`m`.gid + ORDER BY `m`.`priority` ASC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/menu_adm/menu-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "GID" => intval($ar['gid']), + "TITLE" => $this->db->HSC($ar['title']), + "URL" => $this->db->HSC($ar['url']), + "TARGET" => $this->db->HSC($ar['target']), + "GROUP" => $this->db->HSC($ar['group']), + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_adm/menu-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function menu_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_menu_adm`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_menu_adm'], "?mode=admin&do=menu_adm&pid=", $ar[0]), + "MENU" => $this->menu_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_adm/menu-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=menu_adm'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=menu_adm'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_menu_adm` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_adm'); } + + $count = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: пунктов меню - $count", 3, '?mode=admin&do=menu_adm'); + + } + + private function groups($selected=1){ + + $selected = intval($selected); + + $query = $this->db->query("SELECT id, title FROM `mcr_menu_adm_groups`"); + + if(!$query || $this->db->num_rows($query)<=0){ return; } + + ob_start(); + + while($ar = $this->db->fetch_assoc($query)){ + $id = intval($ar['id']); + $title = $this->db->HSC($ar['title']); + + $select = ($selected==$id) ? 'selected' : ''; + + echo ""; + } + + return ob_get_clean(); + } + + private function icons($selected=1){ + + $selected = intval($selected); + + $query = $this->db->query("SELECT id, title, img FROM `mcr_menu_adm_icons`"); + + if(!$query || $this->db->num_rows($query)<=0){ return; } + + ob_start(); + + $i = 0; + while($ar = $this->db->fetch_assoc($query)){ + + $data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']).$i, + "CHECKED" => ($selected==intval($ar['id'])) ? 'checked' : '', + "IMG" => $this->db->HSC($ar['img']) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_adm/icon-id.html", $data); + $i++; + } + + return ob_get_clean(); + + } + + private function validate_element($id=0, $table=''){ + $id = intval($id); + + $query = $this->db->query("SELECT COUNT(*) FROM `$table` WHERE id='$id'"); + + if(!$query){ return false; } + + $ar = $this->db->fetch_array($query); + + if($ar[0]<=0){ return false; } + + return true; + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Меню ПУ' => BASE_URL."?mode=admin&do=menu_adm", + 'Добавление' => BASE_URL."?mode=admin&do=menu_adm&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $gid = intval(@$_POST['gid']); + $text = $this->db->safesql(@$_POST['text']); + $url = $this->db->safesql(@$_POST['url']); + $target = (@$_POST['target']=="_blank") ? "_blank" : "_self"; + $permissions = $this->db->safesql(@$_POST['permissions']); + $priority = intval(@$_POST['priority']); + $icon = intval(@$_POST['icon']); + + if(!$this->core->validate_perm($permissions)){ $this->core->notify($this->lng["e_msg"], "Привилегия не существует", 2, '?mode=admin&do=menu_adm'); } + + // Check exist fields in base + if(!$this->validate_element($gid, 'mcr_menu_adm_groups')){ $this->core->notify($this->lng["e_msg"], $this->lng["e_hack"], 2, '?mode=admin&do=menu_adm'); } + if(!$this->validate_element($icon, 'mcr_menu_adm_icons')){ $this->core->notify($this->lng["e_msg"], $this->lng["e_hack"], 2, '?mode=admin&do=menu_adm'); } + + $insert = $this->db->query("INSERT INTO `mcr_menu_adm` + (title, gid, `text`, `url`, `target`, `access`, `priority`, icon) + VALUES + ('$title', '$gid', '$text', '$url', '$target', '$permissions', '$priority', '$icon')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_adm'); } + + $this->core->notify($this->lng["e_success"], "Пункт меню успешно добавлен", 3, '?mode=admin&do=menu_adm'); + } + + $data = array( + "PAGE" => "Добавление меню", + "TITLE" => '', + "TEXT" => '', + "URL" => '', + "PERMISSIONS" => $this->core->perm_list(), + "GROUPS" => $this->groups(), + "ICONS" => $this->icons(), + "TARGET" => '', + "PRIORITY" => 1, + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_adm/menu-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, gid, `text`, `url`, `target`, `access`, `priority`, icon + FROM `mcr_menu_adm` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_adm'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Меню ПУ' => BASE_URL."?mode=admin&do=menu_adm", + 'Редактирование' => BASE_URL."?mode=admin&do=menu_adm&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $gid = intval(@$_POST['gid']); + $text = $this->db->safesql(@$_POST['text']); + $url = $this->db->safesql(@$_POST['url']); + $target = (@$_POST['target']=="_blank") ? "_blank" : "_self"; + $permissions = $this->db->safesql(@$_POST['permissions']); + $priority = intval(@$_POST['priority']); + $icon = intval(@$_POST['icon']); + + if(!$this->core->validate_perm($permissions)){ $this->core->notify($this->lng["e_msg"], "Привилегия не существует", 2, '?mode=admin&do=menu_adm'); } + + // Check exist fields in base + if(!$this->validate_element($gid, 'mcr_menu_adm_groups')){ $this->core->notify($this->lng["e_msg"], $this->lng["e_hack"], 2, '?mode=admin&do=menu_adm'); } + if(!$this->validate_element($icon, 'mcr_menu_adm_icons')){ $this->core->notify($this->lng["e_msg"], $this->lng["e_hack"], 2, '?mode=admin&do=menu_adm'); } + + $update = $this->db->query("UPDATE `mcr_menu_adm` + SET title='$title', gid='$gid', `text`='$text', `url`='$url', `target`='$target', + `access`='$permissions', `priority`='$priority', icon='$icon' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_adm&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Пункт меню успешно изменен", 3, '?mode=admin&do=menu_adm&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование меню", + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "URL" => $this->db->HSC($ar['url']), + "PERMISSIONS" => $this->core->perm_list($ar['access']), + "GROUPS" => $this->groups($ar['gid']), + "ICONS" => $this->icons($ar['icon']), + "TARGET" => ($ar['target']=='_blank') ? 'selected' : '', + "PRIORITY" => intval($ar['priority']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_adm/menu-add.html", $data); + + return ob_get_clean(); + } + + private function parents($select=0, $not=false){ + + $select = intval($select); + + $not = ($not===false) ? -1 : intval($not); + + $query = $this->db->query("SELECT id, title + FROM `mcr_menu` + WHERE id!='$not' + ORDER BY title ASC"); + + ob_start(); + + $selected = ($select===0) ? 'selected' : ''; + + echo ''; + + if(!$query || $this->db->num_rows($query)<=0){ return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + $id = intval($ar['id']); + $selected = ($id == $select) ? "selected" : ""; + + $title = $this->db->HSC($ar['title']); + + echo ""; + } + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->menu_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/menu_groups.class.php b/upload/modules/admin/menu_groups.class.php new file mode 100644 index 0000000..e66e7f6 --- /dev/null +++ b/upload/modules/admin/menu_groups.class.php @@ -0,0 +1,230 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Группы меню ПУ'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Группы меню ПУ' => BASE_URL."?mode=admin&do=menu_groups" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function group_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_menu_groups'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_menu_groups']; // Set end pagination + + $query = $this->db->query("SELECT `g`.id, `g`.title, `g`.`text`, `p`.id AS `pid`, `p`.`title` AS `perm` + FROM `mcr_menu_adm_groups` AS `g` + LEFT JOIN `mcr_permissions` AS `p` + ON `p`.`value`=`g`.`access` + ORDER BY `g`.`priority` ASC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/menu_groups/group-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "PERMISSIONS" => $this->db->HSC($ar['perm']), + "PID" => intval($ar['pid']), + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_groups/group-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function group_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_menu_adm_groups`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_menu_groups'], "?mode=admin&do=menu_groups&pid=", $ar[0]), + "GROUPS" => $this->group_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_groups/group-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=menu_groups'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=menu_groups'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_menu_adm_groups` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_groups'); } + + $count = $this->db->affected_rows(); + + $delete1 = $this->db->query("DELETE FROM `mcr_menu_adm` WHERE gid IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_groups'); } + + $count1 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: групп меню - $count, пунктов меню - $count1", 3, '?mode=admin&do=menu_groups'); + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Группы меню ПУ' => BASE_URL."?mode=admin&do=menu_groups", + 'Добавление' => BASE_URL."?mode=admin&do=menu_groups&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $permissions = $this->db->safesql(@$_POST['permissions']); + $priority = intval(@$_POST['priority']); + + if(!$this->core->validate_perm($permissions)){ $this->core->notify($this->lng["e_msg"], "Привилегия не существует", 2, '?mode=admin&do=menu'); } + + $insert = $this->db->query("INSERT INTO `mcr_menu_adm_groups` + (title, `text`, `access`, `priority`) + VALUES + ('$title', '$text', '$permissions', '$priority')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_groups'); } + + $this->core->notify($this->lng["e_success"], "Группа меню успешно добавлена", 3, '?mode=admin&do=menu_groups'); + } + + $data = array( + "PAGE" => "Добавление меню", + "TITLE" => '', + "TEXT" => '', + "PERMISSIONS" => $this->core->perm_list(), + "PRIORITY" => 1, + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_groups/group-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, `text`, `access`, `priority` + FROM `mcr_menu_adm_groups` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_groups'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Группы меню ПУ' => BASE_URL."?mode=admin&do=menu_groups", + 'Редактирование' => BASE_URL."?mode=admin&do=menu_groups&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $permissions = $this->db->safesql(@$_POST['permissions']); + $priority = intval(@$_POST['priority']); + + if(!$this->core->validate_perm($permissions)){ $this->core->notify($this->lng["e_msg"], "Привилегия не существует", 2, '?mode=admin&do=menu'); } + + $update = $this->db->query("UPDATE `mcr_menu_adm_groups` + SET title='$title', `text`='$text', `access`='$permissions', `priority`='$priority' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_groups&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Группа меню успешно изменена", 3, '?mode=admin&do=menu_groups&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование группы", + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "PERMISSIONS" => $this->core->perm_list($ar['access']), + "PRIORITY" => intval($ar['priority']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_groups/group-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->group_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/menu_icons.class.php b/upload/modules/admin/menu_icons.class.php new file mode 100644 index 0000000..198707e --- /dev/null +++ b/upload/modules/admin/menu_icons.class.php @@ -0,0 +1,210 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Иконки меню ПУ'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Иконки меню ПУ' => BASE_URL."?mode=admin&do=menu_icons" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function icon_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_menu_icons'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_menu_icons']; // Set end pagination + + $query = $this->db->query("SELECT id, title, img + FROM `mcr_menu_adm_icons` + ORDER BY id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/menu_icons/icon-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "IMG" => $this->db->HSC($ar['img']), + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_icons/icon-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function icon_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_menu_adm_icons`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_menu_icons'], "?mode=admin&do=menu_icons&pid=", $ar[0]), + "ICONS" => $this->icon_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_icons/icon-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=menu_icons'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=menu_icons'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_menu_adm_icons` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_icons'); } + + $count = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: иконок - $count", 3, '?mode=admin&do=menu_icons'); + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Иконки меню ПУ' => BASE_URL."?mode=admin&do=menu_icons", + 'Добавление' => BASE_URL."?mode=admin&do=menu_icons&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $img = @$_POST['img']; + $img = (empty($img)) ? 'default.png' : $this->db->safesql($img); + + $insert = $this->db->query("INSERT INTO `mcr_menu_adm_icons` + (title, img) + VALUES + ('$title', '$img')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_icons'); } + + $this->core->notify($this->lng["e_success"], "Иконка меню успешно добавлена", 3, '?mode=admin&do=menu_icons'); + } + + $data = array( + "PAGE" => "Добавление иконки", + "TITLE" => '', + "IMG" => 'default.png', + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_icons/icon-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, img + FROM `mcr_menu_adm_icons` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_icons'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Иконки меню ПУ' => BASE_URL."?mode=admin&do=menu_icons", + 'Редактирование' => BASE_URL."?mode=admin&do=menu_icons&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $img = @$_POST['img']; + $img = (empty($img)) ? 'default.png' : $this->db->safesql($img); + + $update = $this->db->query("UPDATE `mcr_menu_adm_icons` + SET title='$title', img='$img' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=menu_icons&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Иконка меню успешно изменена", 3, '?mode=admin&do=menu_icons&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование иконки", + "TITLE" => $this->db->HSC($ar['title']), + "IMG" => $this->db->HSC($ar['img']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/menu_icons/icon-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->icon_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/monitoring.class.php b/upload/modules/admin/monitoring.class.php new file mode 100644 index 0000000..fb76023 --- /dev/null +++ b/upload/modules/admin/monitoring.class.php @@ -0,0 +1,217 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Мониторинг серверов'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Мониторинг серверов' => BASE_URL."?mode=admin&do=monitoring" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function monitor_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_monitoring'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_monitoring']; // Set end pagination + + $query = $this->db->query("SELECT id, title, ip, `port` + FROM `mcr_monitoring` + ORDER BY id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/monitoring/monitor-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "IP" => $this->db->HSC($ar['ip']), + "PORT" => intval($ar['port']) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/monitoring/monitor-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function monitor_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_monitoring`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_monitoring'], "?mode=admin&do=monitoring&pid=", $ar[0]), + "SERVERS" => $this->monitor_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/monitoring/monitor-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=monitoring'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=monitoring'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_monitoring` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=monitoring'); } + + $count = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: серверов - $count", 3, '?mode=admin&do=monitoring'); + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Мониторинг серверов' => BASE_URL."?mode=admin&do=monitoring", + 'Добавление' => BASE_URL."?mode=admin&do=monitoring&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $ip = $this->db->safesql(@$_POST['ip']); + $port = intval(@$_POST['port']); + + $insert = $this->db->query("INSERT INTO `mcr_monitoring` + (title, `text`, ip, `port`) + VALUES + ('$title', '$text', '$ip', '$port')"); + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=monitoring'); } + + $this->core->notify($this->lng["e_success"], "Сервер успешно добавлен", 3, '?mode=admin&do=monitoring'); + } + + $data = array( + "PAGE" => "Добавление сервера", + "TITLE" => "", + "TEXT" => "", + "IP" => "localhost", + "PORT" => "25565", + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/monitoring/monitor-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, `text`, ip, `port` + FROM `mcr_monitoring` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=monitoring'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Мониторинг серверов' => BASE_URL."?mode=admin&do=monitoring", + 'Редактирование' => BASE_URL."?mode=admin&do=monitoring&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $ip = $this->db->safesql(@$_POST['ip']); + $port = intval(@$_POST['port']); + + + $update = $this->db->query("UPDATE `mcr_monitoring` + SET title='$title', `text`='$text', ip='$ip', `port`='$port' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=monitoring&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Сервер успешно изменен", 3, '?mode=admin&do=monitoring&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование сервера", + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "IP" => $this->db->HSC($ar['ip']), + "PORT" => intval($ar['port']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/monitoring/monitor-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->monitor_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/news.class.php b/upload/modules/admin/news.class.php new file mode 100644 index 0000000..c9f3dd9 --- /dev/null +++ b/upload/modules/admin/news.class.php @@ -0,0 +1,362 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Новости'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Новости' => BASE_URL."?mode=admin&do=news" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function news_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_news'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_news']; // Set end pagination + + $query = $this->db->query("SELECT `n`.id, `n`.cid, `n`.title, `c`.title AS `category` + FROM `mcr_news` AS `n` + LEFT JOIN `mcr_news_cats` AS `c` + ON `c`.id=`n`.cid + ORDER BY `n`.id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/news/new-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "CID" => intval($ar['cid']), + "TITLE" => $this->db->HSC($ar['title']), + "CATEGORY" => $this->db->HSC($ar['category']) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/news/new-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function news_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_news`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_news'], "?mode=admin&do=news&pid=", $ar[0]), + "NEWS" => $this->news_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news/new-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=news'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=news'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete1 = $this->db->query("DELETE FROM `mcr_news` WHERE id IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news'); } + + $count1 = $this->db->affected_rows(); + + $delete2 = $this->db->query("DELETE FROM `mcr_news_views` WHERE nid IN ($list)"); + + if(!$delete2){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news'); } + + $count2 = $this->db->affected_rows(); + + $delete3 = $this->db->query("DELETE FROM `mcr_news_votes` WHERE nid IN ($list)"); + + if(!$delete3){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news'); } + + $count3 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: новостей - $count1, просмотров - $count2, голосов - $count3", 3, '?mode=admin&do=news'); + + } + + private function categories($selected=1){ + $selected = intval($selected); + $query = $this->db->query("SELECT id, title FROM `mcr_news_cats` ORDER BY title ASC"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + + $data = array( + "ID" => 1, + "TITLE" => 'Без категории', + "SELECTED" => 'selected disabled' + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/news/cid-list-id.html", $data); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + $data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "SELECTED" => ($selected==intval($ar['id'])) ? 'selected' : '' + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/news/cid-list-id.html", $data); + } + + return ob_get_clean(); + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Новости' => BASE_URL."?mode=admin&do=news", + 'Добавление' => BASE_URL."?mode=admin&do=news&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $bb = $this->core->load_bb_class(); // Загрузка класса BB-кодов + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + + $cid = intval(@$_POST['cid']); + + $vote = (intval(@$_POST['vote'])===1) ? 1 : 0; + $discus = (intval(@$_POST['discus'])===1) ? 1 : 0; + $attach = (intval(@$_POST['attach'])===1) ? 1 : 0; + + // Обработка описания + + $text_bb_short = @$_POST['text_short']; + $text_bb = @$_POST['text']; + + $text_bb_trim = trim($text_bb); + $text_bb_short_trim = trim($text_bb_short); + + if(empty($text_bb_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Полное описание\"", 2, '?mode=admin&do=news&op=add'); } + if(empty($text_bb_short_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Краткое описание\"", 2, '?mode=admin&do=news&op=add'); } + + $text_bb = $this->db->HSC($text_bb); + $text_bb_short = $this->db->HSC($text_bb_short); + + $text_html = $bb->decode($text_bb); + $text_html_short = $bb->decode($text_bb_short); + + $safe_text_html = $this->db->safesql($text_html); + $safe_text_html_short = $this->db->safesql($text_html_short); + + $text_bb = $this->db->safesql($text_bb); + $text_bb_short = $this->db->safesql($text_bb_short); + + $text_html_strip = trim(strip_tags($text_html, "")); + $text_html_short_strip = trim(strip_tags($text_html_short, "")); + + if(empty($text_html_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Полное описание\"", 2, '?mode=admin&do=news&op=add'); } + if(empty($text_html_short_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Краткое описание\"", 2, '?mode=admin&do=news&op=add'); } + // Обработка описания - + + $new_data = array( + "time_create" => time(), + "time_last" => time(), + "uid_create" => $this->user->id, + "uid_last" => $this->user->id + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $insert = $this->db->query("INSERT INTO `mcr_news` + (cid, title, text_bb, text_html, text_bb_short, text_html_short, vote, discus, attach, uid, `data`) + VALUES + ('$cid', '$title', '$text_bb', '$safe_text_html', '$text_bb_short', '$safe_text_html_short', '$vote', '$discus', '$attach', '{$this->user->id}', '$new_data')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news&op=add'); } + + $this->core->notify($this->lng["e_success"], "Новость успешно добавлена", 3, '?mode=admin&do=news'); + } + + $data = array( + "PAGE" => "Добавление новости", + "CATEGORIES" => $this->categories(), + "BB_PANEL_SHORT" => $bb->bb_panel('bb-short'), + "BB_PANEL_FULL" => $bb->bb_panel('bb-full'), + "TITLE" => "", + "TEXT_SHORT" => "", + "TEXT" => "", + "VOTE" => "checked", + "DISCUS" => "checked", + "ATTACH" => "", + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news/new-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT cid, title, text_bb, text_bb_short, vote, discus, attach, `data` + FROM `mcr_news` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news'); } + + $ar = $this->db->fetch_assoc($query); + + $data = json_decode($ar['data']); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Новости' => BASE_URL."?mode=admin&do=news", + 'Редактирование' => BASE_URL."?mode=admin&do=news&op=edit&id=$id" + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $bb = $this->core->load_bb_class(); // Загрузка класса BB-кодов + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + + $cid = intval(@$_POST['cid']); + + $vote = (intval(@$_POST['vote'])===1) ? 1 : 0; + $discus = (intval(@$_POST['discus'])===1) ? 1 : 0; + $attach = (intval(@$_POST['attach'])===1) ? 1 : 0; + + // Обработка описания + + $text_bb_short = @$_POST['text_short']; + $text_bb = @$_POST['text']; + + $text_bb_trim = trim($text_bb); + $text_bb_short_trim = trim($text_bb_short); + + if(empty($text_bb_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Полное описание\"", 2, '?mode=admin&do=news&op=edit&id='.$id); } + if(empty($text_bb_short_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Краткое описание\"", 2, '?mode=admin&do=news&op=edit&id='.$id); } + + $text_bb = $this->db->HSC($text_bb); + $text_bb_short = $this->db->HSC($text_bb_short); + + $text_html = $bb->decode($text_bb); + $text_html_short = $bb->decode($text_bb_short); + + $safe_text_html = $this->db->safesql($text_html); + $safe_text_html_short = $this->db->safesql($text_html_short); + + $text_bb = $this->db->safesql($text_bb); + $text_bb_short = $this->db->safesql($text_bb_short); + + $text_html_strip = trim(strip_tags($text_html, "")); + $text_html_short_strip = trim(strip_tags($text_html_short, "")); + + if(empty($text_html_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Полное описание\"", 2, '?mode=admin&do=news&op=edit&id='.$id); } + if(empty($text_html_short_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Краткое описание\"", 2, '?mode=admin&do=news&op=edit&id='.$id); } + // Обработка описания - + + $new_data = array( + "time_create" => $data->time_create, + "time_last" => time(), + "uid_create" => $data->uid_create, + "uid_last" => $this->user->id + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $update = $this->db->query("UPDATE `mcr_news` + SET cid='$cid', title='$title', text_bb='$text_bb', text_html='$safe_text_html', + text_bb_short='$text_bb_short', text_html_short='$safe_text_html_short', + vote='$vote', discus='$discus', attach='$attach', `data`='$new_data' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Новость успешно изменена", 3, '?mode=admin&do=news'); + } + + $data = array( + "PAGE" => "Редактирование новости", + "CATEGORIES" => $this->categories($ar['cid']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT_SHORT" => $this->db->HSC($ar['text_bb_short']), + "TEXT" => $this->db->HSC($ar['text_bb']), + "VOTE" => (intval($ar['vote'])===1) ? 'checked' : '', + "DISCUS" => (intval($ar['discus'])===1) ? 'checked' : '', + "ATTACH" => (intval($ar['attach'])===1) ? 'checked' : '', + "BB_PANEL_SHORT" => $bb->bb_panel('bb-short'), + "BB_PANEL_FULL" => $bb->bb_panel('bb-full'), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news/new-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->news_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/news_cats.class.php b/upload/modules/admin/news_cats.class.php new file mode 100644 index 0000000..141c162 --- /dev/null +++ b/upload/modules/admin/news_cats.class.php @@ -0,0 +1,255 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Категории новостей'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Категории новостей' => BASE_URL."?mode=admin&do=news_cats" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function cats_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_news_cats'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_news_cats']; // Set end pagination + + $query = $this->db->query("SELECT id, title, `data` + FROM `mcr_news_cats` + ORDER BY id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/news_cats/cat-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "DATA" => json_decode($ar['data']) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_cats/cat-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function cats_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_news_cats`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_news_cats'], "?mode=admin&do=news_cats&pid=", $ar[0]), + "CATEGORIES" => $this->cats_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_cats/cat-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=news_cats'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=news_cats'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_news_cats` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats'); } + + $count = $this->db->affected_rows(); + + $query = $this->db->query("SELECT id FROM `mcr_news` WHERE id IN ($list)"); + + if(!$query || $this->db->num_rows($query)<=0){ + $this->core->notify($this->lng["e_success"], "Выбранные элементы успешно удалены ($count)", 3, '?mode=admin&do=news_cats'); + } + + $elem = array(); + + while($ar = $this->db->fetch_assoc($query)){ $elem[] = intval($ar['id']); } + + $elements = implode(", ", $elem); + + $delete2 = $this->db->query("DELETE FROM `mcr_news` WHERE id IN ($elements)"); + + if(!$delete2){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats'); } + + $count2 = $this->db->affected_rows(); + + $delete3 = $this->db->query("DELETE FROM `mcr_news_views` WHERE nid IN ($elements)"); + + if(!$delete3){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats'); } + + $count3 = $this->db->affected_rows(); + + $delete4 = $this->db->query("DELETE FROM `mcr_news_votes` WHERE nid IN ($elements)"); + + if(!$delete4){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats'); } + + $count4 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: категорий - $count, новостей - $count2, просмотров - $count3, голосов - $count4", 3, '?mode=admin&do=news_cats'); + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Категории новостей' => BASE_URL."?mode=admin&do=news_cats", + 'Добавление' => BASE_URL."?mode=admin&do=news_cats&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + + $new_data = array( + "time_create" => time(), + "time_last" => time(), + "user" => $this->user->login + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $insert = $this->db->query("INSERT INTO `mcr_news_cats` + (title, description, `data`) + VALUES + ('$title', '$text', '$new_data')"); + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats'); } + + $this->core->notify($this->lng["e_success"], "Категория успешно добавлена", 3, '?mode=admin&do=news_cats'); + } + + $data = array( + "PAGE" => "Добавление категории", + "TITLE" => "", + "TEXT" => "", + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_cats/cat-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, description, `data` + FROM `mcr_news_cats` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Категории новостей' => BASE_URL."?mode=admin&do=news_cats", + 'Редактирование' => BASE_URL."?mode=admin&do=news_cats&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $data = json_decode($ar['data']); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + + $new_data = array( + "time_create" => $data->time_create, + "time_last" => time(), + "user" => $data->user + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $update = $this->db->query("UPDATE `mcr_news_cats` + SET title='$title', description='$text', `data`='$new_data' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_cats&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Категория успешно изменена", 3, '?mode=admin&do=news_cats&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование категории", + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['description']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_cats/cat-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->cats_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/news_views.class.php b/upload/modules/admin/news_views.class.php new file mode 100644 index 0000000..1fc5f27 --- /dev/null +++ b/upload/modules/admin/news_views.class.php @@ -0,0 +1,133 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Просмотры'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Просмотры' => BASE_URL."?mode=admin&do=news_views" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function views_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_news_views'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_news_views']; // Set end pagination + + $query = $this->db->query("SELECT `v`.id, `v`.nid, `v`.uid, `v`.`time`, `n`.title, `u`.login + FROM `mcr_news_views` AS `v` + LEFT JOIN `mcr_news` AS `n` + ON `n`.id=`v`.nid + LEFT JOIN `mcr_users` AS `u` + ON `u`.id=`v`.uid + ORDER BY `v`.id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/news_views/view-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + if(empty($ar['title'])){ + $status_class = 'error'; + $new = 'Новость удалена'; + }else{ + $status_class = ''; + $new = $this->db->HSC($ar['title']); + } + + $page_data = array( + "ID" => intval($ar['id']), + "NID" => intval($ar['nid']), + "NEW" => $new, + "LOGIN" => $this->db->HSC($ar['login']), + "UID" => intval($ar['uid']), + "TIME_CREATE" => date("d.m.Y в H:i", $ar['time']), + "STATUS_CLASS" => $status_class + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_views/view-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function views_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_news_views`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_news_views'], "?mode=admin&do=news_views&pid=", $ar[0]), + "VIEWS" => $this->views_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_views/view-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=news_views'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=news_views'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete1 = $this->db->query("DELETE FROM `mcr_news_views` WHERE id IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_views'); } + + $count1 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: просмотров - $count1", 3, '?mode=admin&do=news_views'); + + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'delete': $this->delete(); break; + + default: $content = $this->views_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/news_votes.class.php b/upload/modules/admin/news_votes.class.php new file mode 100644 index 0000000..d596f17 --- /dev/null +++ b/upload/modules/admin/news_votes.class.php @@ -0,0 +1,136 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Голоса'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Голоса' => BASE_URL."?mode=admin&do=news_votes" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function votes_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_news_votes'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_news_votes']; // Set end pagination + + $query = $this->db->query("SELECT `v`.id, `v`.nid, `v`.uid, `v`.`value`, `v`.`time`, `n`.title, `u`.login + FROM `mcr_news_votes` AS `v` + LEFT JOIN `mcr_news` AS `n` + ON `n`.id=`v`.nid + LEFT JOIN `mcr_users` AS `u` + ON `u`.id=`v`.uid + ORDER BY `v`.id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/news_votes/vote-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + if(empty($ar['title'])){ + $status_class = 'error'; + $new = 'Новость удалена'; + }else{ + $status_class = ''; + $new = $this->db->HSC($ar['title']); + } + + $value = (intval($ar['value'])===1) ? 'icon-thumbs-up' : 'icon-thumbs-down'; + + $page_data = array( + "ID" => intval($ar['id']), + "NID" => intval($ar['nid']), + "NEW" => $new, + "LOGIN" => $this->db->HSC($ar['login']), + "UID" => intval($ar['uid']), + "TIME_CREATE" => date("d.m.Y в H:i", $ar['time']), + "STATUS_CLASS" => $status_class, + "VALUE" => $value + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_votes/vote-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function votes_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_news_votes`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_news_votes'], "?mode=admin&do=news_votes&pid=", $ar[0]), + "VOTES" => $this->votes_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/news_votes/vote-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=news_votes'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=news_votes'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete1 = $this->db->query("DELETE FROM `mcr_news_votes` WHERE id IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=news_votes'); } + + $count1 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: голосов - $count1", 3, '?mode=admin&do=news_votes'); + + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'delete': $this->delete(); break; + + default: $content = $this->votes_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/panel_menu.class.php b/upload/modules/admin/panel_menu.class.php new file mode 100644 index 0000000..aa1510f --- /dev/null +++ b/upload/modules/admin/panel_menu.class.php @@ -0,0 +1,163 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin']; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Главная' => BASE_URL."?mode=admin&do=main" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function get_items_array(){ + $query = $this->db->query("SELECT `m`.id, `m`.gid, `m`.title, `m`.`text`, `m`.`url`, `m`.`target`, `m`.`access`, `i`.img + FROM `mcr_menu_adm` AS `m` + LEFT JOIN `mcr_menu_adm_icons` AS `i` + ON `i`.id=`m`.icon + ORDER BY `priority` ASC"); + + if(!$query || $this->db->num_rows($query)<=0){ return array(); } + + $items = array(); + + while($ar = $this->db->fetch_assoc($query)){ + $gid = intval($ar['gid']); + + $array = array( + "id" => $ar['id'], + "gid" => $ar['gid'], + "title" => $ar['title'], + "text" => $ar['text'], + "url" => $ar['url'], + "target" => $ar['target'], + "access" => $ar['access'], + "icon" => $ar['img'] + ); + + if(!isset($items[$gid])){ + $items[$gid] = array(); + array_push($items[$gid], $array); + }else{ + array_push($items[$gid], $array); + } + } + + return $items; + } + + private function item_array($items){ + ob_start(); + + foreach($items as $key => $ar){ + + if(!$this->core->is_access($ar['access'])){ continue; } + + $data = array( + "ID" => intval($ar['id']), + "GID" => intval($ar['gid']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "URL" => $this->db->HSC($ar['url']), + "TARGET" => $this->db->HSC($ar['target']), + "ICON" => $this->db->HSC($ar['icon']), + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-items/item-id.html", $data); + } + + return ob_get_clean(); + } + + private function item_list($items=array()){ + + if(empty($items)){ return $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-items/item-none.html"); } + + $data = array( + "ITEMS" => $this->item_array($items), + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-items/item-list.html", $data); + + return ob_get_clean(); + } + + private function group_array(){ + + $items = $this->get_items_array(); + + $query = $this->db->query("SELECT id, title, `text`, `access` + FROM `mcr_menu_adm_groups` + ORDER BY `priority` ASC"); + + ob_start(); + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-groups/group-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + $id = intval($ar['id']); + + if(!$this->core->is_access($ar['access'])){ continue; } + + $list = (isset($items[$id])) ? $items[$id] : array(); + + $sid = 'ajx_spl_adm_grp_'.$id; + + $status = (isset($_SESSION[$sid]) && $_SESSION[$sid]==='true') ? "closed" : "opened"; + + $data = array( + "ID" => $id, + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "ITEMS" => $this->item_list($list), + "STATUS" => $status + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-groups/group-id.html", $data); + } + + //echo $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-groups/group-id.html", $data); + + return ob_get_clean(); + } + + private function group_list(){ + + $data = array( + "GROUPS" => $this->group_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/panel_menu/menu-groups/group-list.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + ob_start(); + + echo $this->group_list(); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/permissions.class.php b/upload/modules/admin/permissions.class.php new file mode 100644 index 0000000..f3dfa4a --- /dev/null +++ b/upload/modules/admin/permissions.class.php @@ -0,0 +1,415 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Привилегии'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Привилегии' => BASE_URL."?mode=admin&do=permissions" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function permissions_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_groups'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_groups']; // Set end pagination + + $query = $this->db->query("SELECT id, title, description, `value`, `system`, `data` + FROM `mcr_permissions` + ORDER BY `value` ASC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/permissions/perm-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $data = json_decode($ar['data'], true); + + $page_data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['description']), + "VALUE" => $this->db->HSC($ar['value']), + "SYSTEM" => (intval($ar['system'])===1) ? $this->core->sp(MCR_THEME_MOD."admin/permissions/perm-system.html") : '', + "DATA" => $data + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/permissions/perm-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function permissions_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_permissions`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_groups'], "?mode=admin&do=permissions&pid=", $ar[0]), + "PERMISSIONS" => $this->permissions_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/permissions/perm-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=permissions'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=permissions'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete = $this->db->query("DELETE FROM `mcr_permissions` WHERE id IN ($list) AND `system`='0'"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=permissions'); } + + $count = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: привилегий - $count", 3, '?mode=admin&do=permissions'); + + } + + private function switch_loop($group_perm, $perm){ + switch($perm['type']){ + case 'integer': + $new_perm[$perm['value']] = (isset($group_perm[$perm['value']])) ? intval($group_perm[$perm['value']]) : intval($perm['default']); + break; + + case 'float': + $new_perm[$perm['value']] = (isset($group_perm[$perm['value']])) ? floatval($group_perm[$perm['value']]) : floatval($perm['default']); + break; + + case 'string': + $new_perm[$perm['value']] = (isset($group_perm[$perm['value']])) ? $this->db->safesql($group_perm[$perm['value']]) : $this->db->safesql($perm['default']); + break; + + default: + if(isset($group_perm[$perm['value']])){ + $new_perm[$perm['value']] = ($group_perm[$perm['value']]=='true' || $group_perm[$perm['value']]=='false') ? $group_perm[$perm['value']] : $perm['default']; + $new_perm[$perm['value']] = ($new_perm[$perm['value']]=='true') ? true : false; + }else{ + $new_perm[$perm['value']] = ($perm['default']=='true') ? true : false; + } + break; + } + + return $new_perm[$perm['value']]; + } + + private function update_groups(){ + + $def_perm = $this->get_permissions(); + + $query = $this->db->query("SELECT id, `permissions` FROM `mcr_groups`"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"]); } + + $array = array(); + + $return = true; + + while($ar = $this->db->fetch_assoc($query)){ + + $group_perm = @json_decode($ar['permissions'], true); + + $id = intval($ar['id']); + + $new_perm = array(); + + foreach($def_perm as $key => $perm){ + $new_perm[$perm['value']] = $this->switch_loop($group_perm, $perm); + } + + $new_perm = $this->db->safesql(json_encode($new_perm)); + + $update = $this->db->obj->query("UPDATE `mcr_groups` + SET `permissions`='$new_perm' + WHERE id='$id'"); + if(!$update){ $return = false; } + } + + return $return; + } + + private function get_permissions(){ + $query = $this->db->query("SELECT `value`, `type`, `default` FROM `mcr_permissions`"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"]); } + + $array = array(); + + while($ar = $this->db->fetch_assoc($query)){ + + $array[] = array( + "type" => $ar['type'], + "value" => $ar['value'], + "default" => $ar['default'], + ); + + } + + return $array; + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Привилегии' => BASE_URL."?mode=admin&do=permissions", + 'Добавление' => BASE_URL."?mode=admin&do=permissions&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $value = $this->db->safesql(@$_POST['value']); + + $filter_type = $this->filter_type(@$_POST['type'], @$_POST['default']); + + $default = $filter_type['default']; + $type = $filter_type['type']; + + $new_data = array( + "time_create" => time(), + "time_last" => time(), + "login_create" => $this->user->login, + "login_last" => $this->user->login, + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $insert = $this->db->query("INSERT INTO `mcr_permissions` + (title, `description`, `value`, `default`, `type`, `data`) + VALUES + ('$title', '$text', '$value', '$default', '$type', '$new_data')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=permissions'); } + + if(!$this->update_groups()){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"].' #2', 2, '?mode=admin&do=permissions'); } + + $this->core->notify($this->lng["e_success"], "Привилегия успешно добавлена", 3, '?mode=admin&do=permissions'); + } + + $data = array( + "PAGE" => "Добавление привилегий", + "TITLE" => '', + "TEXT" => '', + "VALUE" => '', + "DEFAULT" => $this->get_default_value(), + "TYPES" => $this->get_types(), + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/permissions/perm-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT title, description, `value`, `system`, `default`, `type`, `data` + FROM `mcr_permissions` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=permissions'); } + + $ar = $this->db->fetch_assoc($query); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Привилегии' => BASE_URL."?mode=admin&do=permissions", + 'Редактирование' => BASE_URL."?mode=admin&do=permissions&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $data = json_decode($ar['data']); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + $text = $this->db->safesql(@$_POST['text']); + $value = $this->db->safesql(@$_POST['value']); + + $filter_type = $this->filter_type(@$_POST['type'], @$_POST['default']); + $default = $filter_type['default']; + $type = $filter_type['type']; + + if(intval($ar['system'])===1 && ($type!=$ar['type'] || $value!=$ar['value'])){ + $this->core->notify($this->lng["e_msg"], "Запрещено менять тип и значение системных привилегий", 2, '?mode=admin&do=permissions&op=edit&id='.$id); + } + + $new_data = array( + "time_create" => $data->time_create, + "time_last" => time(), + "login_create" => $data->login_create, + "login_last" => $this->user->login, + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $update = $this->db->query("UPDATE `mcr_permissions` + SET title='$title', description='$text', `value`='$value', + `default`='$default', `type`='$type', `data`='$new_data' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=permissions&op=edit&id='.$id); } + + if(!$this->update_groups()){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"].' #2', 2, '?mode=admin&do=permissions&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Привилегия успешно изменена", 3, '?mode=admin&do=permissions&op=edit&id='.$id); + } + + $data = array( + "PAGE" => "Редактирование привилегии", + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['description']), + "VALUE" => $this->db->HSC($ar['value']), + "DEFAULT" => $this->get_default_value($ar['default'], $ar['type']), + "TYPES" => $this->get_types($ar['type']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/permissions/perm-add.html", $data); + + return ob_get_clean(); + } + + private function filter_type($type='boolean', $default='false'){ + switch($type){ + case 'integer': + $default = intval($default); + break; + + case 'float': + $default = floatval($default); + break; + + case 'string': + $default = $this->db->safesql($default); + break; + + default: + $type = 'boolean'; + $default = ($default=='true') ? 'true' : 'false'; + + break; + } + + return array("type" => $type, "default" => $default); + } + + private function get_default_value($value='false', $type='boolean'){ + switch($type){ + case 'integer': + $value = intval($value); + $input = ''; + break; + + case 'float': + $value = floatval($value); + $input = ''; + break; + + case 'string': + $value = $this->db->HSC($value); + $input = ''; + break; + + default: + $select = ($value=='true') ? 'selected' : ''; + $input = ''; + break; + } + + return $input; + } + + private function get_types($selected='boolean', $check=false){ + $array = array( + "boolean" => "Булевое значение", + "integer" => "Целое число", + "float" => "Число с плавающей точкой", + "string" => "Строка", + ); + + if($check){ return (isset($array[$selected])) ? true : false; } + + ob_start(); + + foreach($array as $value => $title){ + $select = ($selected==$value) ? 'selected' : ''; + + echo ""; + } + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + $this->core->header .= ''; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->permissions_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/settings.class.php b/upload/modules/admin/settings.class.php new file mode 100644 index 0000000..ec61e55 --- /dev/null +++ b/upload/modules/admin/settings.class.php @@ -0,0 +1,392 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Настройки'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Настройки' => BASE_URL."?mode=admin&do=settings" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function themes($select=''){ + + $scan = scandir(MCR_ROOT.'themes/'); + + $compare = array("ThemeName", "Author", "AuthorUrl", "About", "Version"); + + ksort($compare); + + ob_start(); + + foreach($scan as $key => $value) { + if($value=='.' || $value=='..' || !is_dir(MCR_ROOT.'themes/'.$value)){ continue; } + + if(!file_exists(MCR_ROOT.'themes/'.$value.'/theme.php')){ continue; } + + require(MCR_ROOT.'themes/'.$value.'/theme.php'); + + $uniq = array_keys($theme); + + ksort($uniq); + + if($uniq!==$compare){ continue; } + + $selected = ($value==$select) ? 'selected' : ''; + + echo ''; + } + + return ob_get_clean(); + } + + private function captcha($select=0){ + + $select = intval($select); + + ob_start(); + + foreach($this->core->captcha as $key => $value){ + + $selected = ($key == $select) ? 'selected' : ''; + + echo ''; + } + + return ob_get_clean(); + } + + private function is_theme_exist($var){ + $scan = scandir(MCR_ROOT.'themes/'); + + $scan = array_flip($scan); + + if(isset($scan['.'])){ unset($scan['.']); } + if(isset($scan['..'])){ unset($scan['..']); } + + if(!isset($scan[$var])){ return false; } + + if(!file_exists(MCR_ROOT.'themes/'.$var.'/theme.php')){ return false; } + + include(MCR_ROOT.'themes/'.$var.'/theme.php'); + + $uniq = array_keys($theme); + + rsort($uniq); + + $compare = array("ThemeName", "Author", "AuthorUrl", "About", "Version"); + + rsort($compare); + + if($uniq!==$compare){ return false; } + + return true; + } + + private function is_captcha_exist($id=0){ + $id = intval($id); + if(!isset($this->core->captcha[$id])){ return false; } + + return true; + } + + private function main(){ + + $cfg = $this->config->main; + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $cfg['s_name'] = $this->core->safestr(@$_POST['s_name']); + + $cfg['s_about'] = $this->core->safestr(@$_POST['s_about']); + + $cfg['s_keywords'] = $this->core->safestr(@$_POST['s_keywords']); + + $cfg['s_dpage'] = $this->core->safestr(@$_POST['s_dpage']); + + $s_theme = $this->core->safestr(@$_POST['s_theme']); + if(!$this->is_theme_exist($s_theme)){ $this->core->notify($this->lng["e_msg"], "Шаблон указан некорректно", 2, '?mode=admin&do=settings'); } + $cfg['s_theme'] = $s_theme; + + $cfg['log'] = (intval(@$_POST['log']) === 1) ? true : false; + + $cfg['debug'] = (intval(@$_POST['debug']) === 1) ? true : false; + + $captcha = intval(@$_POST['captcha']); + + if(!$this->is_captcha_exist($captcha)){ $this->core->notify($this->lng["e_msg"], "Капча указана некорректно", 2, '?mode=admin&do=settings'); } + $cfg['captcha'] = $captcha; + + $cfg['rc_public'] = $this->core->safestr(@$_POST['rc_public']); + + $cfg['rc_private'] = $this->core->safestr(@$_POST['rc_private']); + + $cfg['kc_public'] = $this->core->safestr(@$_POST['kc_public']); + + $cfg['kc_private'] = $this->core->safestr(@$_POST['kc_private']); + + $cfg['mon_type'] = (intval(@$_POST['mon_type']) === 1) ? 1 : 0; + + if(!$this->core->savecfg($cfg)){ $this->core->notify($this->lng["e_msg"], "Не удалось сохранить файл конфигурации", 2, '?mode=admin&do=settings'); } + + $this->core->notify($this->lng["e_success"], "Настройки успешно сохранены", 3, '?mode=admin&do=settings'); + } + + $data = array( + "THEMES" => $this->themes($cfg['s_theme']), + "CFG" => $cfg, + "LOG" => ($cfg['log']) ? 'selected' : '', + "DEBUG" => ($cfg['debug']) ? 'selected' : '', + "REG_ACCEPT" => ($cfg['reg_accept']) ? 'selected' : '', + "MON_TYPE" => ($cfg['mon_type']==1) ? 'selected' : '', + "CAPTHA" => $this->captcha($cfg['captcha']), + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/main.html", $data); + + return ob_get_clean(); + } + + private function to_int_keys($array=array()){ + if(empty($array)){ return false; } + + $cfg = $this->config->pagin; + + foreach($array as $key => $value){ + $cfg[$key] = (intval($value)<=0) ? 1 : intval($value); + } + + return $cfg; + } + + private function pagin(){ + + $cfg = $this->config->pagin; + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $post = $_POST; + + unset($post['mcr_secure']); + unset($post['submit']); + + $cfg_keys = array_keys($cfg); + rsort($cfg_keys); + + $post_keys = array_keys($post); + rsort($post_keys); + + if($cfg_keys!==$post_keys){ $this->core->notify($this->lng["e_msg"], "Неверная хэш-сумма полей", 2, '?mode=admin&do=settings&op=pagin'); } + + $cfg = $this->to_int_keys($post); + + if(!$this->core->savecfg($cfg, 'pagin.php', 'pagin')){ $this->core->notify($this->lng["e_msg"], "Не удалось сохранить файл конфигурации", 2, '?mode=admin&do=settings&op=pagin'); } + + $this->core->notify($this->lng["e_success"], "Настройки успешно сохранены", 3, '?mode=admin&do=settings&op=pagin'); + } + + $data = array( + "CFG" => $cfg + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/pagin.html", $data); + + return ob_get_clean(); + } + + private function _mail(){ + + $cfg = $this->config->mail; + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $cfg['smtp'] = (intval(@$_POST['smtp']) === 1) ? true : false; + + $cfg['from'] = $this->core->safestr(@$_POST['from']); + + $cfg['from_name'] = $this->core->safestr(@$_POST['from_name']); + + $cfg['reply'] = $this->core->safestr(@$_POST['reply']); + + $cfg['reply_name'] = $this->core->safestr(@$_POST['reply_name']); + + $cfg['smtp_host'] = $this->core->safestr(@$_POST['smtp_host']); + + $cfg['smtp_user'] = $this->core->safestr(@$_POST['smtp_user']); + + $cfg['smtp_pass'] = $this->core->safestr(@$_POST['smtp_pass']); + + if(!$this->core->savecfg($cfg, 'mail.php', 'mail')){ $this->core->notify($this->lng["e_msg"], "Не удалось сохранить файл конфигурации", 2, '?mode=admin&do=settings&op=mail'); } + + $this->core->notify($this->lng["e_success"], "Настройки успешно сохранены", 3, '?mode=admin&do=settings&op=mail'); + } + + $data = array( + "SMTP" => ($cfg['smtp']) ? 'selected' : '', + "CFG" => $cfg, + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/mail.html", $data); + + return ob_get_clean(); + } + + private function search_items($cfg){ + + ob_start(); + + foreach($cfg as $key => $value){ + + $data = array( + "KEY" => $this->db->HSC($key), + "TITLE" => $this->db->HSC($value['title']), + "PERMISSIONS" => $this->core->perm_list($value['permissions']), + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/search-id.html", $data); + } + + return ob_get_clean(); + } + + private function search(){ + + $cfg = $this->config->search; + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + if(!isset($_POST['key']) || !isset($cfg[$_POST['key']])){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=settings&op=search'); } + + if(!$this->core->validate_perm(@$_POST['permissions'])){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=settings&op=search'); } + + $key = $_POST['key']; + + $cfg[$key] = array( + "title" => $this->core->safestr(@$_POST['title']), + "permissions" => $this->core->safestr(@$_POST['permissions']), + ); + + if(!$this->core->savecfg($cfg, 'search.php', 'search')){ $this->core->notify($this->lng["e_msg"], "Не удалось сохранить файл конфигурации", 2, '?mode=admin&do=settings&op=search'); } + + $this->core->notify($this->lng["e_success"], "Настройки успешно сохранены", 3, '?mode=admin&do=settings&op=search'); + } + + $data = array( + "ITEMS" => $this->search_items($cfg), + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/search.html", $data); + + return ob_get_clean(); + } + + private function functions(){ + + $cfg = $this->config->func; + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $cfg['advice'] = (intval(@$_POST['advice'])===1) ? true : false; + + $cfg['breadcrumbs'] = (intval(@$_POST['breadcrumbs'])===1) ? true : false; + + if(!$this->core->savecfg($cfg, 'functions.php', 'func')){ $this->core->notify($this->lng["e_msg"], "Не удалось сохранить файл конфигурации", 2, '?mode=admin&do=settings&op=functions'); } + + $this->core->notify($this->lng["e_success"], "Настройки успешно сохранены", 3, '?mode=admin&do=settings&op=functions'); + } + + $data = array( + "ADVICE" => ($cfg['advice']) ? 'selected' : '', + "BREADCRUMBS" => ($cfg['breadcrumbs']) ? 'selected' : '', + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/functions.html", $data); + + return ob_get_clean(); + } + + private function base(){ + + include(MCR_ROOT.'configs/db.php'); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $db['backend'] = $this->core->safestr(@$_POST['backend']); + + $db['host'] = $this->core->safestr(@$_POST['host']); + + $db['base'] = $this->core->safestr(@$_POST['base']); + + $db['user'] = $this->core->safestr(@$_POST['user']); + + $db['pass'] = $this->core->safestr(@$_POST['pass']); + + $db['port'] = intval(@$_POST['port']); + + if(!$this->core->savecfg($db, 'db.php', 'db')){ $this->core->notify($this->lng["e_msg"], "Не удалось сохранить файл конфигурации", 2, '?mode=admin&do=settings&op=base'); } + + $this->core->notify($this->lng["e_success"], "Настройки успешно сохранены", 3, '?mode=admin&do=settings&op=base'); + } + + $data = array( + "MYSQL" => '', + "PDO" => '', + "MYSQLI" => ($db['backend']=='mysqli') ? 'selected' : '', + "HOST" => $this->db->HSC($db['host']), + "USER" => $this->db->HSC($db['user']), + "PASS" => $this->core->safestr($db['pass']), + "BASE" => $this->db->HSC($db['base']), + "PORT" => intval($db['port']), + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/settings/base.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'pagin': $content = $this->pagin(); break; + case 'mail': $content = $this->_mail(); break; + case 'search': $content = $this->search(); break; + case 'base': $content = $this->base(); break; + case 'functions': $content = $this->functions(); break; + + default: $content = $this->main(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/statics.class.php b/upload/modules/admin/statics.class.php new file mode 100644 index 0000000..0243f27 --- /dev/null +++ b/upload/modules/admin/statics.class.php @@ -0,0 +1,290 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Статические страницы'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Статические страницы' => BASE_URL."?mode=admin&do=statics" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function static_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_statics'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_statics']; // Set end pagination + + $query = $this->db->query("SELECT `s`.id, `s`.`uniq`, `s`.title, `s`.uid, + `p`.title AS `perm` + FROM `mcr_statics` AS `s` + LEFT JOIN `mcr_permissions` AS `p` + ON `p`.`value`=`s`.`permissions` + ORDER BY `s`.id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/statics/static-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $perm = (empty($ar['perm'])) ? "ОТСУТСТВУЕТ" : $this->db->HSC($ar['perm']); + + $page_data = array( + "ID" => intval($ar['id']), + "UID" => intval($ar['uid']), + "UNIQ" => $this->db->HSC($ar['uniq']), + "TITLE" => $this->db->HSC($ar['title']), + "PERMISSIONS" => $perm + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/statics/static-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function static_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_statics`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_statics'], "?mode=admin&do=statics&pid=", $ar[0]), + "STATICS" => $this->static_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/statics/static-list.html", $data); + + return ob_get_clean(); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=statics'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=statics'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + $delete1 = $this->db->query("DELETE FROM `mcr_statics` WHERE id IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=statics'); } + + $count1 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: страниц - $count1", 3, '?mode=admin&do=statics'); + + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Статические страницы' => BASE_URL."?mode=admin&do=statics", + 'Добавление' => BASE_URL."?mode=admin&do=statics&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $bb = $this->core->load_bb_class(); // Загрузка класса BB-кодов + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + + $uniq = $this->db->safesql(@$_POST['uniq']); + + $permissions = $this->db->safesql(@$_POST['permissions']); + + // Обработка описания + + $text_bb = @$_POST['text']; + + $text_bb_trim = trim($text_bb); + + if(empty($text_bb_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Текст страницы\"", 2, '?mode=admin&do=statics&op=add'); } + + $text_bb = $this->db->HSC($text_bb); + + $text_html = $bb->decode($text_bb); + + $safe_text_html = $this->db->safesql($text_html); // in base + $text_bb = $this->db->safesql($text_bb); // in base + + $text_html_strip = trim(strip_tags($text_html, "")); + + if(empty($text_html_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Текст страницы\"", 2, '?mode=admin&do=statics&op=add'); } + // Обработка описания - + + $new_data = array( + "time_create" => time(), + "time_last" => time(), + "login_create" => $this->user->login, + "login_last" => $this->user->login + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $insert = $this->db->query("INSERT INTO `mcr_statics` + (`uniq`, title, text_bb, text_html, uid, `permissions`, `data`) + VALUES + ('$uniq', '$title', '$text_bb', '$safe_text_html', '{$this->user->id}', '$permissions', '$new_data')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=statics&op=add'); } + + $this->core->notify($this->lng["e_success"], "Статическая страница успешно добавлена", 3, '?mode=admin&do=statics'); + } + + $data = array( + "PAGE" => "Добавление статической страницы", + "TITLE" => "", + "UNIQ" => "", + "TEXT" => "", + "PERMISSIONS" => $this->core->perm_list(), + "BB_PANEL" => $bb->bb_panel('stc-field'), + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/statics/static-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT `uniq`, title, text_bb, `permissions`, `data` + FROM `mcr_statics` + WHERE id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=statics'); } + + $ar = $this->db->fetch_assoc($query); + + $data = json_decode($ar['data']); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Статические страницы' => BASE_URL."?mode=admin&do=statics", + 'Редактирование' => BASE_URL."?mode=admin&do=statics&op=edit&id=$id" + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $bb = $this->core->load_bb_class(); // Загрузка класса BB-кодов + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $title = $this->db->safesql(@$_POST['title']); + + $uniq = $this->db->safesql(@$_POST['uniq']); + + $permissions = $this->db->safesql(@$_POST['permissions']); + + // Обработка описания + + $text_bb = @$_POST['text']; + + $text_bb_trim = trim($text_bb); + + if(empty($text_bb_trim)){ $this->core->notify($this->lng["e_msg"], "Не заполнено поле \"Текст страницы\"", 2, '?mode=admin&do=statics&op=add'); } + + $text_bb = $this->db->HSC($text_bb); + + $text_html = $bb->decode($text_bb); + + $safe_text_html = $this->db->safesql($text_html); // in base + $text_bb = $this->db->safesql($text_bb); // in base + + $text_html_strip = trim(strip_tags($text_html, "")); + + if(empty($text_html_strip)){ $this->core->notify($this->lng["e_msg"], "Не верно заполнено поле \"Текст страницы\"", 2, '?mode=admin&do=statics&op=add'); } + // Обработка описания - + + $new_data = array( + "time_create" => $data->time_create, + "time_last" => time(), + "login_create" => $data->login_create, + "login_last" => $this->user->login + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $update = $this->db->query("UPDATE `mcr_statics` + SET `uniq`='$uniq', title='$title', text_bb='$text_bb', text_html='$safe_text_html', + `permissions`='$permissions', `data`='$new_data' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=statics&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Статическая страница успешно изменена", 3, '?mode=admin&do=statics'); + } + + $data = array( + "PAGE" => "Редактирование статической страницы", + "TITLE" => $this->db->HSC($ar['title']), + "UNIQ" => $this->db->HSC($ar['uniq']), + "TEXT" => $this->db->HSC($ar['text_bb']), + "PERMISSIONS" => $this->core->perm_list($ar['permissions']), + "BB_PANEL" => $bb->bb_panel('stc-field'), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/statics/static-add.html", $data); + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + + default: $content = $this->static_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/admin/users.class.php b/upload/modules/admin/users.class.php new file mode 100644 index 0000000..940db0e --- /dev/null +++ b/upload/modules/admin/users.class.php @@ -0,0 +1,404 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_admin'].' — Пользователи'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Пользователи' => BASE_URL."?mode=admin&do=users" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function user_array(){ + + $start = $this->core->pagination($this->config->pagin['adm_users'], 0, 0); // Set start pagination + $end = $this->config->pagin['adm_users']; // Set end pagination + + $query = $this->db->query("SELECT `u`.id, `u`.gid, `u`.login, `u`.email, `g`.title AS `group` + FROM `mcr_users` AS `u` + LEFT JOIN `mcr_groups` AS `g` + ON `g`.id=`u`.gid + ORDER BY `u`.login ASC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ + echo $this->core->sp(MCR_THEME_MOD."admin/users/user-none.html"); + return ob_get_clean(); + } + + while($ar = $this->db->fetch_assoc($query)){ + + $page_data = array( + "ID" => intval($ar['id']), + "GID" => intval($ar['gid']), + "LOGIN" => $this->db->HSC($ar['login']), + "EMAIL" => $this->db->HSC($ar['email']), + "GROUP" => $this->db->HSC($ar['group']) + ); + + echo $this->core->sp(MCR_THEME_MOD."admin/users/user-id.html", $page_data); + } + + return ob_get_clean(); + } + + private function user_list(){ + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_users`"); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['adm_users'], "?mode=admin&do=users&pid=", $ar[0]), + "USERS" => $this->user_array() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/users/user-list.html", $data); + + return ob_get_clean(); + } + + private function ban($list, $ban=1){ + $update = $this->db->query("UPDATE `mcr_users` SET ban_server='$ban' WHERE id IN ($list)"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $message = ($ban==1) ? "забанены" : "разбанены"; + + $this->core->notify($this->lng["e_success"], "Выбранные пользователи успешно $message", 3, '?mode=admin&do=users'); + } + + private function delete(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=users'); } + + $list = @$_POST['id']; + + if(empty($list)){ $this->core->notify($this->lng["e_msg"], "Не выбрано ни одного пункта", 2, '?mode=admin&do=users'); } + + $list = $this->core->filter_int_array($list); + + $list = array_unique($list); + + $list = $this->db->safesql(implode(", ", $list)); + + if(isset($_POST['ban'])){ + $this->ban($list); + }elseif(isset($_POST['unban'])){ + $this->ban($list, 0); + } + + if(!isset($_POST['delete'])){ $this->core->notify($this->lng["e_msg"], $this->lng['e_hack'], 2, '?mode=admin&do=users'); } + + $delete = $this->db->query("DELETE FROM `mcr_users` WHERE id IN ($list)"); + + if(!$delete){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $count = $this->db->affected_rows(); + + $delete1 = $this->db->query("DELETE FROM `mcr_news_votes` WHERE uid IN ($list)"); + + if(!$delete1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $count1 = $this->db->affected_rows(); + + $delete2 = $this->db->query("DELETE FROM `mcr_news_views` WHERE uid IN ($list)"); + + if(!$delete2){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $count2 = $this->db->affected_rows(); + + $delete3 = $this->db->query("DELETE FROM `mcr_comments` WHERE uid IN ($list)"); + + if(!$delete3){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $count3 = $this->db->affected_rows(); + + $this->core->notify($this->lng["e_success"], "Удалено элементов: пользователей - $count, комментариев - $count3, голосов - $count1, просмотров - $count2", 3, '?mode=admin&do=users'); + + } + + private function exist_group($id){ + $id = intval($id); + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_groups` WHERE id='$id'"); + if(!$query){ return false; } + $ar = $this->db->fetch_array($query); + + if($ar[0]<=0){ return false; } + + return true; + } + + private function add(){ + + $this->core->title .= ' — Добавление'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Пользователи' => BASE_URL."?mode=admin&do=users", + 'Добавление' => BASE_URL."?mode=admin&do=users&op=add", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $login = $this->db->safesql(@$_POST['login']); + + $salt = $this->db->safesql($this->core->random()); + $password = $this->core->gen_password($_POST['password'], $salt); + $password = $this->db->safesql($password); + + if(mb_strlen($_POST['password'], "UTF-8")<6){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_pass_length'], 2, '?mode=admin&do=users&op=add'); } + + $email = $this->db->safesql(@$_POST['email']); + + $gid = intval(@$_POST['gid']); + + $firstname = @$_POST['firstname']; + $lastname = @$_POST['lastname']; + $birthday = @$_POST['birthday']; + + $gender = (intval(@$_POST['gender'])==1) ? 1 : 0; + + if(!preg_match("/^[a-zа-яА-ЯёЁ]+$/iu", $firstname)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_fname'], 2, '?mode=admin&do=users&op=add'); } + if(!preg_match("/^[a-zа-яА-ЯёЁ]+$/iu", $lastname)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_lname'], 2, '?mode=admin&do=users&op=add'); } + if(!preg_match("/^(\d{2}-\d{2}-\d{4})?$/", $birthday)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_bday'], 2, '?mode=admin&do=users&op=add'); } + + $birthday = intval(strtotime($birthday)); + + if(!$this->exist_group($gid)){ $this->core->notify($this->lng['e_msg'], "Группа не существует", 1, '?mode=admin&do=users&op=add'); } + + $money = floatval(@$_POST['money']); + $realmoney = floatval(@$_POST['realmoney']); + + $new_data = array( + "time_create" => time(), + "time_last" => time(), + "firstname" => $firstname, + "lastname" => $lastname, + "gender" => $gender, + "birthday" => $birthday + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $insert = $this->db->query("INSERT INTO `mcr_users` + (gid, login, email, password, `salt`, ip_create, ip_last, `data`) + VALUES + ('$gid', '$login', '$email', '$password', '$salt', '{$this->user->ip}', '{$this->user->ip}', '$new_data')"); + + if(!$insert){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $insert1 = $this->db->query("INSERT INTO `mcr_iconomy` + (login, `money`, `realmoney`) + VALUES + ('$login', '$money', '$realmoney')"); + + if(!$insert1){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $this->core->notify($this->lng["e_success"], "Пункт меню успешно добавлен", 3, '?mode=admin&do=users'); + } + + $data = array( + "PAGE" => "Добавление пользователя", + "LOGIN" => '', + "EMAIL" => '', + "FIRSTNAME" => '', + "LASTNAME" => '', + "BIRTHDAY" => date("d-m-Y"), + "GENDER" => '', + "GROUPS" => $this->groups(), + "MONEY" => 0, + "REALMONEY" => 0, + "BUTTON" => "Добавить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/users/user-add.html", $data); + + return ob_get_clean(); + } + + private function edit(){ + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT `u`.login, `u`.gid, `u`.email, `u`.`data`, + `i`.`money`, `i`.realmoney + FROM `mcr_users` AS `u` + LEFT JOIN `mcr_iconomy` AS `i` + ON `i`.login=`u`.login + WHERE `u`.id='$id'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users'); } + + $ar = $this->db->fetch_assoc($query); + + $data = json_decode($ar['data']); + + $this->core->title .= ' — Редактирование'; + + $bc = array( + $this->lng['t_admin'] => BASE_URL."?mode=admin", + 'Пользователи' => BASE_URL."?mode=admin&do=users", + 'Редактирование' => BASE_URL."?mode=admin&do=users&op=edit&id=$id", + ); + + $this->core->bc = $this->core->gen_bc($bc); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $login = $this->db->safesql(@$_POST['login']); + + $password = "`password`"; + $salt = "`salt`"; + + if(isset($_POST['password']) && !empty($_POST['password'])){ + $salt = $this->db->safesql($this->core->random()); + $salt = "'$salt'"; + + if(mb_strlen($_POST['password'], "UTF-8")<6){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_pass_length'], 2, '?mode=admin&do=users&op=edit&id='.$id); } + + $password = $this->core->gen_password($_POST['password'], $salt); + $password = $this->db->safesql($password); + $password = "'$password'"; + } + + $email = $this->db->safesql(@$_POST['email']); + + $gid = intval(@$_POST['gid']); + + $firstname = @$_POST['firstname']; + $lastname = @$_POST['lastname']; + $birthday = @$_POST['birthday']; + + $gender = (intval(@$_POST['gender'])==1) ? 1 : 0; + + if(!preg_match("/^[a-zа-яА-ЯёЁ]+$/i", $firstname)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_fname'], 2, '?mode=admin&do=users&op=edit&id='.$id); } + if(!preg_match("/^[a-zа-яА-ЯёЁ]+$/i", $lastname)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_lname'], 2, '?mode=admin&do=users&op=edit&id='.$id); } + if(!preg_match("/^(\d{2}-\d{2}-\d{4})?$/", $birthday)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_bday'], 2, '?mode=admin&do=users&op=edit&id='.$id); } + + $birthday = intval(strtotime($birthday)); + + if(!$this->exist_group($gid)){ $this->core->notify($this->lng['e_msg'], "Группа не существует", 1, '?mode=admin&do=users&op=edit&id='.$id); } + + $money = floatval(@$_POST['money']); + $realmoney = floatval(@$_POST['realmoney']); + + $new_data = array( + "time_create" => $data->time_create, + "time_last" => $data->time_last, + "firstname" => $firstname, + "lastname" => $lastname, + "gender" => $gender, + "birthday" => $birthday + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + + $update = $this->db->query("UPDATE `mcr_users` + SET gid='$gid', login='$login', gid='$gid', email='$email', + password=$password, `salt`=$salt, `data`='$new_data' + WHERE id='$id'"); + + if(!$update){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users&op=edit&id='.$id); } + + $old_login = $this->db->safesql($ar['login']); + + $update2 = $this->db->query("UPDATE `mcr_iconomy` + SET login='$login', `money`='$money', `realmoney`='$realmoney' + WHERE login='$old_login'"); + + if(!$update2){ $this->core->notify($this->lng["e_msg"], $this->lng["e_sql_critical"], 2, '?mode=admin&do=users&op=edit&id='.$id); } + + $this->core->notify($this->lng["e_success"], "Информация о пользователе успешно изменена", 3, '?mode=admin&do=users&op=edit&id='.$id); + } + + $birthday = date("d-m-Y", $data->birthday); + $gender = (intval($data->gender)==1) ? "selected" : ""; + + $data = array( + "PAGE" => "Редактирование пользователя", + "LOGIN" => $this->db->HSC($ar['login']), + "EMAIL" => $this->db->HSC($ar['email']), + "FIRSTNAME" => $this->db->HSC($data->firstname), + "LASTNAME" => $this->db->HSC($data->lastname), + "BIRTHDAY" => $birthday, + "GENDER" => $gender, + "GROUPS" => $this->groups($ar['gid']), + "MONEY" => floatval($ar['money']), + "REALMONEY" => floatval($ar['realmoney']), + "BUTTON" => "Сохранить" + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."admin/users/user-add.html", $data); + + return ob_get_clean(); + } + + private function groups($select=1){ + + $select = intval($select); + + $query = $this->db->query("SELECT id, title + FROM `mcr_groups` + ORDER BY title ASC"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + $id = intval($ar['id']); + $selected = ($id == $select) ? "selected" : ""; + + $title = $this->db->HSC($ar['title']); + + echo ""; + } + + return ob_get_clean(); + } + + public function content(){ + + $op = (isset($_GET['op'])) ? $_GET['op'] : 'list'; + + switch($op){ + case 'add': $content = $this->add(); break; + case 'edit': $content = $this->edit(); break; + case 'delete': $this->delete(); break; + case 'ban': $this->delete(); break; + + default: $content = $this->user_list(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/ajax.php b/upload/modules/ajax.php new file mode 100644 index 0000000..34f2819 --- /dev/null +++ b/upload/modules/ajax.php @@ -0,0 +1,188 @@ +core = $core; + $this->db = $core->db; + $this->user = $core->user; + $this->config = $core->config; + $this->lng = $core->lng; + } + + private function check_login(){ + if(!isset($_POST['value'])){ exit("Hacking Attempt!"); } + + if(!preg_match("/^[\w\-]{3,}$/i", $_POST['value'])){ exit($this->lng['e_reg_login_regexp']); } + + $login = $this->db->safesql($_POST['value']); + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_users` WHERE login='$login'"); + + if(!$query){ exit($this->lng['e_sql_critical']); } + + $ar = $this->db->fetch_array($query); + + if($ar[0]>0){ exit($this->lng['e_reg_login_exist']); } + + $array = array( + "_status" => "success" + ); + + echo json_encode($array); + + exit; + } + + private function check_email(){ + if(!isset($_POST['value'])){ exit("Hacking Attempt!"); } + + if(!filter_var($_POST['value'], FILTER_VALIDATE_EMAIL)){ exit($this->lng['e_reg_email_regexp']); } + + $email = $this->db->safesql($_POST['value']); + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_users` WHERE email='$email'"); + + if(!$query){ exit($this->lng['e_sql_critical']); } + + $ar = $this->db->fetch_array($query); + + if($ar[0]>0){ exit($this->lng['e_reg_email_exist']); } + + $array = array( + "_status" => "success" + ); + + echo json_encode($array); + + exit; + } + + private function get_session(){ + if(!isset($_GET['name'])){ exit("undefined"); } + + $name = "ajx_".$_GET['name']; + + if(!isset($_SESSION[$name])){ exit("undefined"); } + + exit($_SESSION[$name].""); + } + + private function set_session(){ + if(!isset($_GET['name']) || !isset($_GET['value'])){ exit; } + + $name = "ajx_".$_GET['name']; + $value = $_GET['value']; + + $_SESSION[$name] = $value; + exit; + } + + private function remove_session(){ + if(!isset($_GET['name'])){ exit("undefined"); } + + $name = "ajx_".$_GET['name']; + + if(!isset($_SESSION[$name])){ exit("undefined"); } + + unset($_SESSION[$name]); + } + + private function session(){ + $op = (isset($_GET['op'])) ? $_GET['op'] : false; + + switch($op){ + case "get": $this->get_session(); break; + + case "set": $this->set_session(); break; + + case "remove": $this->remove_session(); break; + } + + exit("403"); + } + + private function monitor(){ + if(!$this->core->is_access("sys_monitoring")){ $this->core->js_notify('Access Denied'); } + + $query = $this->db->query("SELECT id, title, `text`, ip, `port` FROM `mcr_monitoring`"); + if(!$query || $this->db->num_rows($query)<=0){ $this->core->js_notify('Нет доступных серверов'); } + + $array = array(); + + require_once(MCR_TOOL_PATH.'monitoring.class.php'); + + $m = new monitoring($this->config->main['mon_type']); + + while($ar = $this->db->fetch_assoc($query)){ + $address = $this->db->HSC($ar['ip']); + $port = intval($ar['port']); + + $m->connect($address, $port); + + $json = json_decode($m->data); + + if($json->status=='online'){ + $status = 'progress-info'; + $stats = $json->players.' / '.$json->slots; + $progress = ceil($json->slots / 100 * $json->players); + }else{ + $status = 'progress-danger'; + $stats = 'Сервер оффлайн'; + $progress = 100; + } + + $data = array( + "ID" => intval($ar['id']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $this->db->HSC($ar['text']), + "STATUS" => $status, + "STATS" => $stats, + ); + + $array[] = array( + "id" => intval($ar['id']), + //"ip" => $address, + //"port" => $port, + "progress" => $progress, + "form" => $this->core->sp(MCR_THEME_BLOCK."monitor/monitor-id.html", $data), + ); + + } + + $this->core->js_notify('Серверы успешно получены', true, $array); + } + + public function content(){ + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $do = (isset($_POST['do'])) ? $_POST['do'] : false; + + switch($do){ + case 'check_login': $this->check_login(); break; + case 'check_email': $this->check_email(); break; + + default: exit("403"); break; + } + + }else{ + + $do = (isset($_GET['do'])) ? $_GET['do'] : false; + + switch($do){ + case 'session': $this->session(); break; + case 'monitor': $this->monitor(); break; + + default: exit("403"); break; + } + + } + } + +} + +?> \ No newline at end of file diff --git a/upload/modules/auth.php b/upload/modules/auth.php new file mode 100644 index 0000000..7801991 --- /dev/null +++ b/upload/modules/auth.php @@ -0,0 +1,81 @@ +core = $core; + $this->db = $core->db; + $this->user = $core->user; + $this->config = $core->config; + $this->lng = $core->lng; + } + + public function content(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify('Hacking Attempt!'); } + + if($this->user->is_auth){ $this->core->notify('', $this->lng["e_auth_already"], 1); } + + $login = $this->db->safesql($_POST['login']); + $remember = (isset($_POST['remember']) && intval($_POST['remember'])==1) ? true : false; + + $query = $this->db->query("SELECT `u`.id, `u`.password, `u`.`salt`, `u`.`data`, + `g`.`permissions` + FROM `mcr_users` AS `u` + INNER JOIN `mcr_groups` AS `g` + ON `g`.id=`u`.gid + WHERE `u`.login='$login' + LIMIT 1"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng["e_msg"], $this->lng['e_auth_wrong_pass']); } + + $ar = $this->db->fetch_assoc($query); + + $uid = intval($ar['id']); + + $password = $this->core->gen_password($_POST['password'], $ar['salt']); + + if($ar['password']!==$password){ $this->core->notify($this->lng["e_msg"], $this->lng['e_auth_wrong_pass']); } + + $permissions = json_decode($ar['permissions'], true); + + $data = json_decode($ar['data']); + + $new_data = array( + "time_create" => intval($data->time_create), + "time_last" => time(), + "firstname" => $this->db->safesql($data->firstname), + "lastname" => $this->db->safesql($data->lastname), + "gender" => $data->gender, + "birthday" => $data->birthday + ); + + $new_tmp = $this->db->safesql($this->core->random(16)); + $new_data = $this->db->safesql(json_encode($new_data)); + $new_ip = $this->user->ip; + + $update = $this->db->query("UPDATE `mcr_users` + SET `tmp`='$new_tmp', ip_last='$new_ip', `data`='$new_data' + WHERE login='$login' AND password='$password' + LIMIT 1"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical']); } + + if(!@$permissions['sys_auth']){ $this->core->notify("403", "Вам запрещена авторизация", 2, '?mode=403'); } + + $new_hash = $uid.$new_tmp.$new_ip.md5($this->config->main['mcr_secury']); + + $new_hash = $uid.'_'.md5($new_hash); + + $safetime = ($remember) ? 3600*24*30+time() : time()+3600; + + setcookie("mcr_user", $new_hash, $safetime, '/'); + + $this->core->notify($this->lng['e_success'], $this->lng['e_auth_success'], 3); + } + +} + +?> \ No newline at end of file diff --git a/upload/modules/logout.php b/upload/modules/logout.php new file mode 100644 index 0000000..bfec6bf --- /dev/null +++ b/upload/modules/logout.php @@ -0,0 +1,43 @@ +core = $core; + $this->db = $core->db; + $this->user = $core->user; + $this->lng = $core->lng; + } + + public function content(){ + if($_SERVER['REQUEST_METHOD']!='POST'){ $this->core->notify('Hacking Attempt!'); } + + if(!$this->user->is_auth){ $this->core->notify('403', $this->lng['e_unauth_not'], 1, '?mode=403'); } + + $new_data = array( + "time_create" => intval($this->user->data->time_create), + "time_last" => time(), + "firstname" => $this->db->safesql($this->user->data->firstname), + "lastname" => $this->db->safesql($this->user->data->lastname), + "gender" => $this->user->data->gender, + "birthday" => $this->user->data->birthday + ); + + $new_data = $this->db->safesql(json_encode($new_data)); + $new_tmp = $this->db->safesql($this->core->random(16)); + + $update = $this->db->query("UPDATE `mcr_users` SET `tmp`='$new_tmp', `data`='$new_data' WHERE id='{$this->user->id}' LIMIT 1"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical']); } + + setcookie("mcr_user", "", time()-3600, '/'); + + $this->core->notify('', $this->lng['e_unauth_yes'], 1); + } + +} + +?> \ No newline at end of file diff --git a/upload/modules/news.php b/upload/modules/news.php new file mode 100644 index 0000000..9e6f86a --- /dev/null +++ b/upload/modules/news.php @@ -0,0 +1,362 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $bc = array( + "Новости" => BASE_URL."?mode=news" + ); + + $this->core->title = "Новости"; + $this->core->bc = $this->core->gen_bc($bc); + } + + private function get_likes($vote, $id, $likes, $dislikes){ + if(intval($vote)===0){ return; } + $data = array( + "ID" => intval($id), + "LIKES" => intval($likes), + "DISLIKES" => intval($dislikes) + ); + + return $this->core->sp(MCR_THEME_MOD."news/new-like.html", $data); + } + + private function get_comments($discus, $count){ + if(intval($discus)<=0){ return; } + + $data = array( + "COMMENTS" => intval($count) + ); + + return $this->core->sp(MCR_THEME_MOD."news/new-comments.html", $data); + + } + + private function news_array($cid=false){ + + $start = $this->core->pagination($this->config->pagin['news'], 0, 0); // Set start pagination + $end = $this->config->pagin['news']; // Set end pagination + + $where = ""; + + if($cid!==false){ $where .= "WHERE `n`.cid='$cid'"; } + + $query = $this->db->query("SELECT `n`.id, `n`.cid, `n`.title, `n`.text_html_short, `n`.vote, `n`.discus, `n`.uid, `n`.`data`, `n`.`attach`, + `c`.title AS `category`, + COUNT(DISTINCT `cm`.id) AS `comments`, COUNT(DISTINCT `v`.id) AS `views`, COUNT(DISTINCT `l`.id) AS `likes`, COUNT(DISTINCT `d`.id) AS `dislikes` + FROM `mcr_news` AS `n` + LEFT JOIN `mcr_news_cats` AS `c` + ON `c`.id=`n`.cid + LEFT JOIN `mcr_comments` AS `cm` + ON `cm`.nid=`n`.id + LEFT JOIN `mcr_news_views` AS `v` + ON `v`.nid=`n`.id + LEFT JOIN `mcr_news_votes` AS `l` + ON `l`.nid=`n`.id AND `l`.`value`='1' + LEFT JOIN `mcr_news_votes` AS `d` + ON `d`.nid=`n`.id AND `d`.`value`='0' + $where + GROUP BY `n`.id + ORDER BY `n`.`attach` DESC, `n`.id DESC + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ echo $this->core->sp(MCR_THEME_MOD."news/new-none.html"); return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + + $new_data = array( + "ID" => intval($ar['id']), + "CID" => intval($ar['cid']), + "TITLE" => $this->db->HSC($ar['title']), + "CATEGORY" => $this->db->HSC($ar['category']), + "TEXT" => $ar['text_html_short'], + "UID" => intval($ar['uid']), + "COMMENTS" => $this->get_comments($ar['discus'], $ar['comments']), + "VIEWS" => intval($ar['views']), + "DATA" => json_decode($ar['data'], true), + "LIKES" => $this->get_likes($ar['vote'], $ar['id'], $ar['likes'], $ar['dislikes']) + ); + + $attached = (intval($ar['attach'])==1) ? '-attached' : ''; + + echo $this->core->sp(MCR_THEME_MOD."news/new-id".$attached.".html", $new_data); + } + + if($cid!==false){ + $bc = array( + "Новости" => BASE_URL."?mode=news", + $new_data['CATEGORY'] => BASE_URL."?mode=news&cid=$cid" + ); + $this->core->title = "Новости — ".$new_data["CATEGORY"]; + $this->core->bc = $this->core->gen_bc($bc); + } + + return ob_get_clean(); + } + + private function news_list($cid=false){ + + if(!$this->core->is_access('sys_news_list')){ $this->core->notify("403", "У вас нет доступа для просмотра списка новостей", 2, "?mode=403"); } + + $sql = "SELECT COUNT(*) FROM `mcr_news`"; + $page = "?mode=news&pid="; + + if($cid!==false){ + $cid = intval($cid); + $sql = "SELECT COUNT(*) FROM `mcr_news` WHERE cid='$cid'"; + $page = "?mode=news&cid=$cid&pid="; + } + + $query = $this->db->query($sql); + + if(!$query){ exit("SQL Error"); } + + $ar = $this->db->fetch_array($query); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['news'], $page, $ar[0]), + "NEWS" => $this->news_array($cid) + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."news/new-list.html", $data); + + return ob_get_clean(); + + } + + private function comments_array($nid=1){ + + if(!$this->core->is_access('sys_comment_list')){ + ob_start(); + echo $this->core->sp(MCR_THEME_MOD."news/comments/comment-access.html"); + return ob_get_clean(); + } + + $start = $this->core->pagination($this->config->pagin['comments'], 0, 0); // Set start pagination + $end = $this->config->pagin['comments']; // Set end pagination + + $query = $this->db->query("SELECT `c`.id, `c`.text_html, `c`.uid, `c`.`data`, `u`.login + FROM `mcr_comments` AS `c` + LEFT JOIN `mcr_users` AS `u` + ON `u`.id=`c`.uid + WHERE `c`.nid='$nid' + ORDER BY `c`.id DESC + LIMIT $start, $end"); + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ echo $this->core->sp(MCR_THEME_MOD."news/comments/comment-none.html"); return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + //$vote = intval($ar['vote']); + //$data = json_decode($ar['data'], true); + + $act_del = $act_edt = $act_get = ''; + + $id = intval($ar['id']); + + if($this->core->is_access('sys_comment_del') || $this->core->is_access('sys_comment_del_all')){ + $act_del = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-del.html", array("ID" => $id)); + } + + if($this->core->is_access('sys_comment_edt') || $this->core->is_access('sys_comment_edt_all')){ + $act_edt = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-edt.html", array("ID" => $id)); + } + + if($this->user->is_auth){ + $act_get = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-get.html", array("ID" => $id)); + } + + $com_data = array( + "ID" => $id, + "NID" => $nid, + "TEXT" => $ar['text_html'], + "UID" => intval($ar['uid']), + "DATA" => json_decode($ar['data'], true), + "LOGIN" => $this->db->HSC($ar['login']), + "ACTION_DELETE" => $act_del, + "ACTION_EDIT" => $act_edt, + "ACTION_QUOTE" => $act_get + ); + + echo $this->core->sp(MCR_THEME_MOD."news/comments/comment-id.html", $com_data); + } + + return ob_get_clean(); + + } + + private function get_comment_form(){ + + if(!$this->core->is_access('sys_comment_add')){ return; } + + $bb = $this->core->load_bb_class(); + + $data['BB_PANEL'] = $bb->bb_panel('bb-comments'); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."news/comments/comment-form.html", $data); + + return ob_get_clean(); + } + + private function comments_list($nid=1){ + + $sql = "SELECT COUNT(*) FROM `mcr_comments` WHERE nid='$nid'"; + $page = "?mode=news&id=$nid&pid="; + + $query = $this->db->query($sql); + + if(!$query){ return; } + + $ar = $this->db->fetch_array($query); + + $count = intval($ar[0]); + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['comments'], $page, $count), + "COMMENTS" => $this->comments_array($nid), + "COUNT" => $count, + "COMMENTS_FORM" => $this->get_comment_form() + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."news/comments/comment-list.html", $data); + + return ob_get_clean(); + } + + private function update_views($nid){ + $query = $this->db->query("SELECT COUNT(*) + FROM `mcr_news_views` + WHERE nid='$nid' AND (uid='{$this->user->id}' OR ip='{$this->user->ip}')"); + + if(!$query){ $this->core->notify($this->lng['e_sql_critical']); } + + $ar = $this->db->fetch_array($query); + + if(intval($ar[0])>0){ return false; } + + $time = time(); + + $uid = ($this->user->id<=0) ? -1 : $this->user->id; + + $insert = $this->db->query("INSERT INTO `mcr_news_views` + (nid, uid, ip, `time`) + VALUES + ('$nid', '$uid', '{$this->user->ip}', '$time')"); + if(!$insert){ $this->core->notify($this->lng['e_sql_critical']); } + + $_SESSION['views-new-'.$nid] = true; + + return true; + } + + private function news_full(){ + + if(!$this->core->is_access('sys_news_full')){ $this->core->notify("403", "У вас нет доступа для просмотра новостей", 2, "?mode=403"); } + + $id = intval($_GET['id']); + + $query = $this->db->query("SELECT `n`.id, `n`.cid, `n`.title, `n`.text_html, `n`.vote, `n`.discus, `n`.uid, `n`.`data`, `n`.`attach`, + `c`.title AS `category`, COUNT(DISTINCT `v`.id) AS `views`, COUNT(DISTINCT `l`.id) AS `likes`, COUNT(DISTINCT `d`.id) AS `dislikes` + FROM `mcr_news` AS `n` + LEFT JOIN `mcr_news_cats` AS `c` + ON `c`.id=`n`.cid + LEFT JOIN `mcr_news_views` AS `v` + ON `v`.nid=`n`.id + LEFT JOIN `mcr_news_votes` AS `l` + ON `l`.nid=`n`.id AND `l`.`value`='1' + LEFT JOIN `mcr_news_votes` AS `d` + ON `d`.nid=`n`.id AND `d`.`value`='0' + WHERE `n`.id='$id'"); + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify("404", $this->lng['t_404']); } + + $ar = $this->db->fetch_assoc($query); + + if(is_null($ar['id'])){ $this->core->notify("404", $this->lng['t_404']); } + + if(!isset($_SESSION['views-new-'.$id])){ + $this->update_views($id); + } + + $comments = (intval($ar['discus']) === 1) ? $this->comments_list($id) : $this->core->sp(MCR_THEME_MOD."news/comments/comment-closed.html");; + + $new_data = array( + "ID" => intval($ar['id']), + "CID" => intval($ar['cid']), + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $ar['text_html'], + "UID" => intval($ar['uid']), + "DATA" => json_decode($ar['data'], true), + "CATEGORY" => $this->db->HSC($ar['category']), + "VIEWS" => intval($ar['views']), + "COMMENTS" => $comments, + "LIKES" => $this->get_likes($ar['vote'], $id, $ar['likes'], $ar['dislikes']) + ); + + $bc = array( + "Новости" => BASE_URL."?mode=news", + $new_data["CATEGORY"] => BASE_URL."?mode=news&cid=".$new_data["CID"], + $new_data["TITLE"] => "" + ); + + $this->core->title = "Новости — ".$new_data["CATEGORY"]." — ".$new_data['TITLE']; + $this->core->bc = $this->core->gen_bc($bc); + + echo $this->core->sp(MCR_THEME_MOD."news/new-full.html", $new_data); + + return ob_get_clean(); + } + + public function content(){ + + if(isset($_GET['id'])){ + $this->core->header = $this->core->sp(MCR_THEME_MOD."news/header-full.html"); + + $content = $this->news_full(); + + }elseif(isset($_GET['cid'])){ + $this->core->header = $this->core->sp(MCR_THEME_MOD."news/header-list.html"); + + $content = $this->news_list($_GET['cid']); + + }elseif(isset($_GET['ajax'])){ + + require_once(MCR_MODE_PATH.'news/ajax.class.php'); + $ajax = new submodule($this->core); + $content = $ajax->content(); + + }else{ + $this->core->header = $this->core->sp(MCR_THEME_MOD."news/header-list.html"); + + $content = $this->news_list(); + + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/news/ajax.class.php b/upload/modules/news/ajax.class.php new file mode 100644 index 0000000..a592da3 --- /dev/null +++ b/upload/modules/news/ajax.class.php @@ -0,0 +1,355 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + } + + private function is_discus($nid=1){ + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_news` WHERE id='$nid' AND discus='1'"); + + if(!$query){ return false; } + + $ar = $this->db->fetch_array($query); + + if($ar[0]<=0){ return false; } + + return true; + } + + private function notify($message='', $status='error'){ + $return = array( + "_status" => $status, + "_content" => $message + ); + + echo json_encode($return); + + exit; + } + + private function add_comment(){ + + if(!$this->core->is_access('sys_comment_add')){ $this->notify("У вас нет доступа для добалвения комментариев"); } + + $nid = @$_POST['id']; + $nid = intval($nid); + + if(!$this->is_discus($nid)){ $this->notify("Комментарии отключены для данной новости"); } + + $message = @$_POST['message']; + + $message_trim = trim($message); + + if(empty($message_trim)){ $this->notify("Не заполнено поле \"Сообщение\""); } + + if(isset($_SESSION['add_comment'])){ + if(intval($_SESSION['add_comment'])>time()){ + $expire = intval($_SESSION['add_comment'])-time(); + $this->notify("Для повторного добовления комментария необходимо подождать $expire сек.", 'error'); + }else{ + $_SESSION['add_comment'] = time()+30; + } + }else{ + $_SESSION['add_comment'] = time()+30; + } + + $bb = $this->core->load_bb_class(); // Object + + $text_bb = $this->db->HSC($message); + $text_html = $bb->decode($text_bb); + $safe_text_html = $this->db->safesql($text_html); + + $text_bb = $this->db->safesql($text_bb); + + $message_strip = trim(strip_tags($text_html, "")); + + if(empty($message_strip)){ $this->notify("Не верно заполнено поле сообщения"); } + + $newdata = array( + "time_create" => time(), + "time_last" => time() + ); + + $safedata = $this->db->safesql(json_encode($newdata)); + + $insert = $this->db->query("INSERT INTO `mcr_comments` + (nid, text_html, text_bb, uid, `data`) + VALUES + ('$nid', '$safe_text_html', '$text_bb', '{$this->user->id}', '$safedata')"); + + if(!$insert){ $this->notify($this->lng['e_sql_critical']); } + + $id = $this->db->insert_id(); + + $act_del = $act_edt = $act_get = ''; + + if($this->core->is_access('sys_comment_del') || $this->core->is_access('sys_comment_del_all')){ + $act_del = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-del.html", array("ID" => $id)); + } + + if($this->core->is_access('sys_comment_edt') || $this->core->is_access('sys_comment_edt_all')){ + $act_edt = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-edt.html", array("ID" => $id)); + } + + if($this->user->is_auth){ + $act_get = $this->core->sp(MCR_THEME_MOD."news/comments/comment-act-get.html", array("ID" => $id)); + } + + $com_data = array( + "ID" => $id, + "NID" => $nid, + "TEXT" => $text_html, + "UID" => $this->user->id, + "DATA" => $newdata, + "LOGIN" => $this->db->HSC($this->user->login), + "ACTION_DELETE" => $act_del, + "ACTION_EDIT" => $act_edt, + "ACTION_QUOTE" => $act_get + ); + + $content = $this->core->sp(MCR_THEME_MOD."news/comments/comment-id.html", $com_data); + + $this->notify($content, 'success'); + + exit; + } + + private function del_comment(){ + + if(!$this->core->is_access('sys_comment_del') && !$this->core->is_access('sys_comment_del_all')){ $this->notify("У вас нет прав на удаление комментариев"); } + + $id = @$_POST['id']; + $id = intval($id); + + $nid = @$_POST['nid']; + $nid = intval($nid); + + $newdata = array( + "time_create" => time(), + "time_last" => time() + ); + + $sql = "DELETE FROM `mcr_comments` WHERE id='$id' AND nid='$nid' AND uid='{$this->user->id}'"; + + if($this->core->is_access('sys_comment_del_all')){ + $sql = "DELETE FROM `mcr_comments` WHERE id='$id' AND nid='$nid'"; + } + + $delete = $this->db->query($sql); + + if(!$delete){ $this->notify($this->lng['e_sql_critical']); } + + if($this->db->affected_rows()<=0){ + $this->notify("Ничего не удалено"); + } + + $this->notify("Выбранный комментарий успешно удален", 'success'); + + exit; + } + + private function get_comment(){ + + if(!$this->user->is_auth){ $this->notify("У вас нет прав на цитирование"); } + + $id = @$_POST['id']; + $id = intval($id); + + $nid = @$_POST['nid']; + $nid = intval($nid); + + $query = $this->db->query("SELECT text_bb FROM `mcr_comments` WHERE nid='$nid' AND id='$id'"); + + if(!$query){ $this->notify($this->lng['e_sql_critical']); } + + if($this->db->num_rows($query)<=0){ $this->notify($this->lng['e_hack']); } + + $ar = $this->db->fetch_assoc($query); + + $text_bb = $this->db->HSC($ar['text_bb']); + + $this->notify($text_bb, 'success'); + + exit; + } + + private function edt_comment(){ + + if(!$this->core->is_access('sys_comment_edt') && !$this->core->is_access('sys_comment_edt_all')){ $this->notify("У вас нет доступа для изменения комментариев"); } + + $id = @$_POST['id']; + $id = intval($id); + + $nid = @$_POST['nid']; + $nid = intval($nid); + + if(!$this->is_discus($nid)){ $this->notify("Комментарии отключены для данной новости"); } + + $sql_query = "SELECT `data` FROM `mcr_comments` WHERE uid='{$this->user->id}' AND id='$id' AND nid='$nid'"; + + if($this->core->is_access('sys_comment_edt_all')){ + $sql_query = "SELECT `data` FROM `mcr_comments` WHERE id='$id' AND nid='$nid'"; + } + + $query = $this->db->query($sql_query); + + if(!$query || $this->db->num_rows($query)<=0){ $this->notify($this->lng['e_hack']); } + + $ar = $this->db->fetch_assoc($query); + + $data = json_decode($ar['data']); + + $message = @$_POST['message']; + + $message_trim = trim($message); + + if(empty($message_trim)){ $this->notify("Не заполнено поле \"Сообщение\""); } + + $bb = $this->core->load_bb_class(); // Object + + $text_bb = $this->db->HSC($message); + $text_html = $bb->decode($text_bb); + $safe_text_html = $this->db->safesql($text_html); + + $text_bb = $this->db->safesql($text_bb); + + $message_strip = trim(strip_tags($text_html, "")); + + if(empty($message_strip)){ $this->notify("Не верно заполнено поле сообщения"); } + + $newdata = array( + "time_create" => $data->time_create, + "time_last" => time() + ); + + $safedata = $this->db->safesql(json_encode($newdata)); + + $sql_update = "UPDATE `mcr_comments` + SET + text_html='$safe_text_html', + text_bb='$text_bb', + `data`='$safedata' + WHERE id='$id' AND nid='$nid' AND uid='{$this->user->id}'"; + + if($this->core->is_access('sys_comment_edt_all')){ + + $sql_update = "UPDATE `mcr_comments` + SET + text_html='$safe_text_html', + text_bb='$text_bb', + `data`='$safedata' + WHERE id='$id' AND nid='$nid'"; + + } + + $update = $this->db->query($sql_update); + + if(!$update){ $this->notify($this->lng['e_sql_critical']); } + + $this->notify($text_html, 'success'); + + exit; + } + + private function like(){ + + if(!$this->core->is_access('sys_news_like')){ $this->notify("У вас нет доступа для голосования"); } + + $nid = @$_POST['nid']; + $nid = intval($nid); + + $value = @$_POST['value']; + $value = intval($value); + + if($value<0 || $value>1){ $this->notify($this->lng['e_hack']); } + + $query = $this->db->query("SELECT `n`.`vote`, COUNT(DISTINCT `l`.id) AS `likes`, COUNT(DISTINCT `d`.id) AS `dislikes`, `m`.`value` + FROM `mcr_news` AS `n` + LEFT JOIN `mcr_news_votes` AS `l` + ON `l`.nid=`n`.id AND `l`.`value`='1' + LEFT JOIN `mcr_news_votes` AS `d` + ON `d`.nid=`n`.id AND `d`.`value`='0' + LEFT JOIN `mcr_news_votes` AS `m` + ON `m`.nid=`n`.id AND (`m`.uid='{$this->user->id}' OR `m`.ip='{$this->user->ip}') + WHERE `n`.id='$nid'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->notify($this->lng['e_hack']); } + + $ar = $this->db->fetch_assoc($query); + + if(intval($ar['vote'])<=0){ $this->notify("Голосование для данной новости отключено"); } + + $likes = intval($ar['likes']); + $dislikes = intval($ar['dislikes']); + + $uid = (!$this->user->is_auth) ? -1 : $this->user->id; + $time = time(); + + $old_value = $ar['value']; + + if(is_null($old_value)){ + $insert = $this->db->query("INSERT INTO `mcr_news_votes` + (nid, uid, `value`, ip, `time`) + VALUES + ('$nid', '$uid', '$value', '{$this->user->ip}', '$time')"); + + if(!$insert){ $this->notify($this->lng['e_sql_critical']); } + + $likes = ($value===1) ? $likes+1 : $likes; + $dislikes = ($value===0) ? $dislikes+1 : $dislikes; + }else{ + $update = $this->db->query("UPDATE `mcr_news_votes` + SET uid='$uid', `value`='$value', `time`='$time' + WHERE nid='$nid' AND (uid='{$this->user->id}' OR ip='{$this->user->ip}') + LIMIT 1"); + + if(!$update){ $this->notify($this->lng['e_sql_critical']); } + + if($value===1){ + $likes = (intval($old_value)===1) ? $likes : $likes+1; + $dislikes = (intval($old_value)===1) ? $dislikes : $dislikes-1; + }else{ + $likes = (intval($old_value)===0) ? $likes : $likes-1; + $dislikes = (intval($old_value)===0) ? $dislikes : $dislikes+1; + } + } + + $content = $dislikes.'_'.$likes; + + $this->notify($content, 'success'); + + exit; + } + + public function content(){ + + if($_SERVER['REQUEST_METHOD']!='POST'){ exit($this->lang['e_hack']); } + if(!isset($_POST['act']) || empty($_POST['act'])){ exit($this->lang['e_hack']); } + + $act = $_POST['act']; + + switch($act){ + case 'add_comment': $this->add_comment(); break; + case 'del_comment': $this->del_comment(); break; + case 'get_comment': $this->get_comment(); break; + case 'edt_comment': $this->edt_comment(); break; + case 'like': $this->like(); break; + + default: exit($this->lang['e_hack']); break; + } + + exit; + } + +} + +?> \ No newline at end of file diff --git a/upload/modules/profile.php b/upload/modules/profile.php new file mode 100644 index 0000000..75c79b1 --- /dev/null +++ b/upload/modules/profile.php @@ -0,0 +1,192 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_profile']; + + $bc = array( + $this->lng['t_profile'] => BASE_URL."?mode=profile" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function delete_skin(){ + if(!$this->user->is_skin){ $this->core->notify("", "Скин не установлен", 1, '?mode=profile'); } + + unlink(MCR_SKIN_PATH.$this->user->skin.'.png'); + unlink(MCR_SKIN_PATH.'interface/'.$this->user->skin.'.png'); + unlink(MCR_SKIN_PATH.'interface/'.$this->user->skin.'_mini.png'); + + if($this->user->is_cloak){ + $cloak = array( + "tmp_name" => MCR_CLOAK_PATH.$this->user->cloak.'.png', + "size" => filesize(MCR_CLOAK_PATH.$this->user->cloak.'.png'), + "error" => 0, + "name" => $this->user->cloak.'.png' + ); + require_once(MCR_TOOL_PATH.'cloak.class.php'); + $cloak = new cloak($this->core, $cloak); + } + + $update = $this->db->query("UPDATE `mcr_users` SET is_skin='0' WHERE id='{$this->user->id}'"); + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical']); } + + $this->core->notify($this->lng['e_success'], "Ваш скин успешно удален", 3, '?mode=profile'); + + } + + private function delete_cloak(){ + + if(!$this->user->is_cloak){ $this->core->notify("", "Плащ не установлен", 1, '?mode=profile'); } + + unlink(MCR_CLOAK_PATH.$this->user->login.'.png'); + + if(!$this->user->is_skin){ + unlink(MCR_SKIN_PATH.'interface/'.$this->user->login.'.png'); + unlink(MCR_SKIN_PATH.'interface/'.$this->user->login.'_mini.png'); + }else{ + require_once(MCR_TOOL_PATH.'skin.class.php'); + + $skin = array( + "tmp_name" => MCR_SKIN_PATH.$this->user->login.'.png', + "size" => filesize(MCR_SKIN_PATH.$this->user->login.'.png'), + "error" => 0, + "name" => $this->user->login.'.png' + ); + + $skin = new skin($this->core, $skin); + } + + $update = $this->db->query("UPDATE `mcr_users` SET is_cloak='0' WHERE id='{$this->user->id}'"); + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical']); } + + $this->core->notify($this->lng['e_success'], "Ваш плащ успешно удален", 3, '?mode=profile'); + + } + + private function upload_skin(){ + require_once(MCR_TOOL_PATH.'skin.class.php'); + $skin = new skin($this->core, $_FILES['skin']); // create new skin in folder + + if($this->user->is_cloak){ + $cloak = array( + "tmp_name" => MCR_CLOAK_PATH.$this->user->login.'.png', + "size" => filesize(MCR_CLOAK_PATH.$this->user->login.'.png'), + "error" => 0, + "name" => $this->user->login.'.png' + ); + require_once(MCR_TOOL_PATH.'cloak.class.php'); + $cloak = new cloak($this->core, $cloak); + } + + $update = $this->db->query("UPDATE `mcr_users` SET is_skin='1' WHERE id='{$this->user->id}'"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical']); } + + $this->core->notify($this->lng['e_success'], "Ваш скин успешно изменен", 3, '?mode=profile'); + } + + private function upload_cloak(){ + require_once(MCR_TOOL_PATH.'cloak.class.php'); + $cloak = new cloak($this->core, $_FILES['cloak']); // create new cloak in folder + + $update = $this->db->query("UPDATE `mcr_users` SET is_cloak='1' WHERE id='{$this->user->id}'"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical']); } + + $this->core->notify($this->lng['e_success'], "Ваш плащ успешно изменен", 3, '?mode=profile'); + } + + private function settings(){ + $firstname = @$_POST['firstname']; + $lastname = @$_POST['lastname']; + $birthday = @$_POST['birthday']; + + if(!preg_match("/^[a-zа-яА-ЯёЁ]+$/iu", $firstname)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_fname'], 2, '?mode=profile'); } + if(!preg_match("/^[a-zа-яА-ЯёЁ]+$/iu", $lastname)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_lname'], 2, '?mode=profile'); } + if(!preg_match("/^(\d{2}-\d{2}-\d{4})?$/", $birthday)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_bday'], 2, '?mode=profile'); } + + $birthday = intval(strtotime($birthday)); + $newpass = $this->user->password; + $newsalt = $this->user->salt; + + if(isset($_POST['newpass']) && !empty($_POST['newpass'])){ + $old_pass = @$_POST['oldpass']; + $old_pass = $this->core->gen_password($old_pass, $this->user->salt); + + if($old_pass !== $this->user->password){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_oldpass'], 2, '?mode=profile'); } + + if($_POST['newpass'] !== @$_POST['repass']){ $this->core->notify($this->lng['e_msg'], $this->lng['e_valid_repass'], 2, '?mode=profile'); } + + $newsalt = $this->db->safesql($this->core->random()); + $newpass = $this->db->safesql($this->core->gen_password($_POST['newpass'], $salt)); + } + + $newdata = array( + "time_create" => $this->user->data->time_create, + "time_last" => time(), + "firstname" => $this->db->safesql($firstname), + "lastname" => $this->db->safesql($lastname), + "gender" => $this->user->data->gender, + "birthday" => $birthday + ); + + $newdata = $this->db->safesql(json_encode($newdata)); + + $update = $this->db->query("UPDATE `mcr_users` + SET `password`='$newpass', `salt`='$newsalt', ip_last='{$this->user->ip}', `data`='$newdata' + WHERE id='{$this->user->id}'"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical'], 2, '?mode=profile'); } + + $this->core->notify($this->lng['e_success'], "Настройки успешно сохранены", 3, '?mode=profile'); + } + + public function content(){ + + if(!$this->user->is_auth){ $this->core->notify("Доступ запрещен!", "Для доступа к профилю необходима авторизация", 1, "?mode=403"); } + + if(!$this->core->is_access('sys_profile')){ $this->core->notify("Доступ запрещен!", "Доступ к профилю ограничен администрацией", 1, "?mode=403"); } + + $this->core->header = $this->core->sp(MCR_THEME_MOD."profile/header.html"); + ob_start(); + + if($_SERVER['REQUEST_METHOD']=='POST'){ + if(isset($_POST['del-skin'])){ + if(!$this->core->is_access('sys_profile_del_skin')){ $this->core->notify("Доступ запрещен!", "Удаление скина ограничено администрацией", 1, "?mode=403"); } + $this->delete_skin(); + }elseif(isset($_POST['del-cloak'])){ + if(!$this->core->is_access('sys_profile_del_cloak')){ $this->core->notify("Доступ запрещен!", "Удаление плаща ограничено администрацией", 1, "?mode=403"); } + $this->delete_cloak(); + }elseif(isset($_FILES['skin'])){ + if(!$this->core->is_access('sys_profile_skin')){ $this->core->notify("Доступ запрещен!", "Изменение скина ограничено администрацией", 1, "?mode=403"); } + $this->upload_skin(); + }elseif(isset($_FILES['cloak'])){ + if(!$this->core->is_access('sys_profile_cloak')){ $this->core->notify("Доступ запрещен!", "Изменение плаща ограничено администрацией", 1, "?mode=403"); } + $this->upload_cloak(); + }elseif(isset($_POST['settings'])){ + if(!$this->core->is_access('sys_profile_settings')){ $this->core->notify("Доступ запрещен!", "Настройки профиля ограничены администрацией", 1, "?mode=403"); } + $this->settings(); + }else{ + $this->core->notify('', '', 3, '?mode=profile'); + } + } + + echo $this->core->sp(MCR_THEME_MOD."profile/profile.html"); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/register.php b/upload/modules/register.php new file mode 100644 index 0000000..27a8658 --- /dev/null +++ b/upload/modules/register.php @@ -0,0 +1,196 @@ +core = $core; + $this->db = $core->db; + $this->user = $core->user; + $this->config = $core->config; + $this->lng = $core->lng; + + $bc = array( + $this->lng['t_reg'] => BASE_URL."?mode=register" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function check_exist($value='', $email=false){ + + $selector = (!$email) ? "login='$value'" : "email='$value'"; + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_users` WHERE $selector"); + + if(!$query){ return true; } + + $ar = $this->db->fetch_array($query); + + if($ar[0]>0){ return true; } + + return false; + } + + private function regmain(){ + + if(!$this->core->is_access('sys_register')){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_perm'], 1, "?mode=403"); } + + if($this->user->is_auth){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_already'], 2, '?mode=403'); } + + if($_SERVER['REQUEST_METHOD']=='POST'){ + if(!$this->core->captcha_check()){ $this->core->notify('', $this->lng['e_captcha'], 2, '?mode=403'); } + if(intval($_POST['accept'])!==1){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_rules'], 1, '?mode=register'); } + + if(!preg_match("/^[\w\-]{3,}$/i", $_POST['login'])){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_login_regexp'], 1, '?mode=register'); } + + $login = $this->db->safesql($_POST['login']); + + if($this->check_exist($login)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_login_exist'], 1, '?mode=register'); } + + if(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_email_regexp'], 1, '?mode=register'); } + + $email = $this->db->safesql($_POST['email']); + + if($this->check_exist($email, true)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_email_exist'], 1, '?mode=register'); } + + if(mb_strlen($_POST['password'], "UTF-8")<6){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_pass_length'], 1, '?mode=register'); } + + $password = $_POST['password']; + + if($password !== $_POST['repassword']){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_pass_match'], 1, '?mode=register'); } + + $tmp = $this->db->safesql($this->core->random(16)); + + $salt = $this->db->safesql($this->core->random()); + + $password = $this->core->gen_password($password, $salt); + $password = $this->db->safesql($password); + + $ip = $this->user->ip; + + $gender = (intval($_POST['gender'])===1) ? 1 : 0; + + $newdata = array( + "time_create" => time(), + "time_last" => time(), + "firstname" => '', + "lastname" => '', + "gender" => $gender, + "birthday" => 0 + ); + + $newdata = $this->db->safesql(json_encode($newdata)); + + $gid = ($this->config->main['reg_accept']) ? 1 : 2; + + $notify_message = $this->lng['e_reg_success']; + + $insert = $this->db->query("INSERT INTO `mcr_users` + (gid, login, email, password, `salt`, `tmp`, ip_create, ip_last, `data`) + VALUES + ('$gid', '$login', '$email', '$password', '$salt', '$tmp', '$ip', '$ip', '$newdata')"); + if(!$insert){ $this->core->notify($this->lng['e_msg'], $this->lng['e_sql_critical'], 1, '?mode=register'); } + + $insert1 = $this->db->query("INSERT INTO `mcr_iconomy` + (login) + VALUES + ('$login')"); + if(!$insert1){ $this->core->notify($this->lng['e_msg'], $this->lng['e_sql_critical'], 1, '?mode=register'); } + + if($this->config->main['reg_accept']){ + $id = $this->db->insert_id(); + $data_mail = array( + "LINK" => $this->config->main['s_root_full'].BASE_URL.'?mode=register&op=accept&key='.$id.'_'.md5($salt), + "SITENAME" => $this->config->main['s_name'], + "SITEURL" => $this->config->main['s_root_full'].BASE_URL + ); + + $message = $this->core->sp(MCR_THEME_PATH."modules/register/body.mail.html", $data_mail); + + if(!$this->core->send_mail($email, $this->lng['reg_title'], $message)){ $this->core->notify($this->lng['e_msg'], "Обратитесь к администрации", 1, "?mode=register"); } + + $notify_message = $this->lng['e_reg_success_mail']; + } + + $this->core->notify($this->lng['e_success'], $notify_message, 3); + } + + ob_start(); + + echo $this->core->sp(MCR_THEME_PATH."modules/register/main.html"); + + return ob_get_clean(); + + } + + private function accept(){ + if(!isset($_GET['key'])){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + $key_string = $_GET['key']; + + $array = explode("_", $key_string); + + if(count($array)!==2){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + $uid = intval($array[0]); + + $key = $array[1]; + + $query = $this->db->query("SELECT `salt`, `data` FROM `mcr_users` WHERE id='$uid' AND gid='1'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical'], 1, "?mode=register"); } + + $ar = $this->db->fetch_assoc($query); + + if($key!==md5($ar['salt'])){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + $data = json_decode($ar['data']); + + $newdata = array( + "time_create" => $data->time_create, + "time_last" => time(), + "firstname" => $data->firstname, + "lastname" => $data->lastname, + "gender" => $data->gender, + "birthday" => $data->birthday + ); + + $newdata = $this->db->safesql(json_encode($newdata)); + + $update = $this->db->query("UPDATE `mcr_users` + SET gid='2', ip_last='{$this->user->ip}', `data`='$newdata' + WHERE id='$uid' AND gid='1'"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical'], 1, "?mode=register"); } + + $this->core->notify($this->lng['e_success'], $this->lng['e_reg_accept'], 3); + } + + public function content(){ + + $this->core->header = $this->core->sp(MCR_THEME_MOD."register/header.html"); + + $this->core->title = $this->lng['t_reg']; + + $op = (isset($_GET['op'])) ? $_GET['op'] : false; + + switch($op){ + + case 'accept': $content = $this->accept(); break; + + default: $content = $this->regmain(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } + +} + +?> \ No newline at end of file diff --git a/upload/modules/restore.php b/upload/modules/restore.php new file mode 100644 index 0000000..d576974 --- /dev/null +++ b/upload/modules/restore.php @@ -0,0 +1,164 @@ +core = $core; + $this->db = $core->db; + $this->user = $core->user; + $this->config = $core->config; + $this->lng = $core->lng; + + $bc = array( + $this->lng['t_restore'] => BASE_URL."?mode=restore" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + private function check_exist($value='', $email=false){ + + $selector = (!$email) ? "login='$value'" : "email='$value'"; + + $query = $this->db->query("SELECT COUNT(*) FROM `mcr_users` WHERE $selector"); + + if(!$query){ return true; } + + $ar = $this->db->fetch_array($query); + + if($ar[0]>0){ return true; } + + return false; + } + + private function send(){ + + if($_SERVER['REQUEST_METHOD']=='POST'){ + + $_SESSION['m_send_id'] = (isset($_SESSION['m_send_id'])) ? $_SESSION['m_send_id']+1 : 1; + + if($_SESSION['m_send_id']>5){ $this->core->notify($this->lng['e_msg'], $this->lng['e_rest_limit'], 1, "?mode=restore"); } + + $email = $this->db->safesql(@$_POST['email']); + + if(empty($email)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_rest_eamil'], 1, "?mode=restore"); } + + $query = $this->db->query("SELECT `id`, `tmp` FROM `mcr_users` WHERE email='$email'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng['e_msg'], $this->lng['e_rest_email'], 1, "?mode=restore"); } + + $ar = $this->db->fetch_assoc($query); + + $id = intval($ar['id']); + $tmp = md5($ar['tmp']); + + $data = array( + "LINK" => $this->config->main['s_root_full'].BASE_URL.'?mode=restore&op=accept&key='.$id.'_'.$tmp, + "SITENAME" => $this->config->main['s_name'], + "SITEURL" => $this->config->main['s_root_full'].BASE_URL + ); + + $message = $this->core->sp(MCR_THEME_PATH."modules/restore/body.mail.html", $data); + + if(!$this->core->send_mail($email, $this->lng['rest_title'], $message)){ $this->core->notify($this->lng['e_msg'], $this->lng['e_critical'], 1, "?mode=restore"); } + + $this->core->notify('', $this->lng['e_rest_success'], 3); + } + + ob_start(); + + echo $this->core->sp(MCR_THEME_PATH."modules/restore/main.html"); + + return ob_get_clean(); + } + + private function accept(){ + if(!isset($_GET['key'])){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + $key_string = $_GET['key']; + + $array = explode("_", $key_string); + + if(count($array)!==2){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + $uid = intval($array[0]); + + $key = $array[1]; + + $query = $this->db->query("SELECT `tmp`, `data` FROM `mcr_users` WHERE id='$uid'"); + + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical'], 1, "?mode=restore"); } + + $ar = $this->db->fetch_assoc($query); + + if($key!==md5($ar['tmp'])){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + if($_SERVER['REQUEST_METHOD']=='POST'){ + $newpass = @$_POST['newpass']; + + if(mb_strlen($newpass, "UTF-8")<6){ $this->core->notify($this->lng['e_msg'], $this->lng['e_reg_pass_length'], 2, '?mode=restore&op=accept&key='.$key_string); } + + $tmp = $this->db->safesql($this->core->random(16)); + + $salt = $this->db->safesql($this->core->random()); + + $password = $this->core->gen_password($newpass, $salt); + + $data = json_decode($ar['data']); + + $newdata = array( + "time_create" => $data->time_create, + "time_last" => time(), + "firstname" => $data->firstname, + "lastname" => $data->lastname, + "gender" => $data->gender, + "birthday" => $data->birthday + ); + + $newdata = $this->db->safesql(json_encode($newdata)); + + $update = $this->db->query("UPDATE `mcr_users` + SET password='$password', `salt`='$salt', `tmp`='$tmp', ip_last='{$this->user->ip}', `data`='$newdata' + WHERE id='$uid'"); + + if(!$update){ $this->core->notify($this->lng['e_attention'], $this->lng['e_sql_critical'], 1, "?mode=restore"); } + + $this->core->notify($this->lng['e_success'], $this->lng['e_rest_success2'], 3); + } + + ob_start(); + + echo $this->core->sp(MCR_THEME_PATH."modules/restore/newpass.html"); + + return ob_get_clean(); + } + + public function content(){ + + if($this->user->is_auth){ $this->core->notify($this->lng['e_msg'], $this->lng['e_403'], 2, '?mode=403'); } + + if(!$this->core->is_access('sys_restore')){ $this->core->notify($this->lng['e_msg'], $this->lng['e_rest_perm'], 1, "?mode=403"); } + + $this->core->title = $this->lng['t_restore']; + + $op = (isset($_GET['op'])) ? $_GET['op'] : false; + + switch($op){ + case 'accept': $content = $this->accept(); break; + + default: $content = $this->send(); break; + } + + ob_start(); + + echo $content; + + return ob_get_clean(); + } + +} + +?> \ No newline at end of file diff --git a/upload/modules/search.php b/upload/modules/search.php new file mode 100644 index 0000000..9bb028b --- /dev/null +++ b/upload/modules/search.php @@ -0,0 +1,43 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $bc = array( + $this->lng['t_search'] => BASE_URL."?mode=search" + ); + + $this->core->title = $this->lng['t_search']; + $this->core->bc = $this->core->gen_bc($bc); + } + + public function content(){ + + if(!$this->core->is_access('sys_search')){ $this->core->notify($this->lng['e_403'], $this->lng['e_search_perm'], 1, "?mode=403"); } + + if(!isset($_GET['type']) || !file_exists(MCR_MODE_PATH.'search/'.$_GET['type'].'.php')){ $this->core->notify(); } + + require_once(MCR_MODE_PATH.'search/'.$_GET['type'].'.php'); + + $submodule = new submodule($this->core); + + $data['CONTENT'] = $submodule->results(); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."search/main.html", $data); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/search/comments.php b/upload/modules/search/comments.php new file mode 100644 index 0000000..a2dd0b0 --- /dev/null +++ b/upload/modules/search/comments.php @@ -0,0 +1,112 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $bc = array( + "Поиск" => BASE_URL."?mode=search", + "По комментариям" => BASE_URL."?mode=search&type=comments" + ); + + $this->core->title = "Поиск — По комментариям"; + $this->core->bc = $this->core->gen_bc($bc); + } + + private function results_array($value){ + + $start = $this->core->pagination($this->config->pagin['search_comments'], 0, 0); // Set start pagination + $end = $this->config->pagin['search_comments']; // Set end pagination + + //, `n`.cid, `c`.title AS `category` + + $query = $this->db->query("SELECT `c`.id, `c`.nid, `c`.uid, `c`.text_html, `c`.`data`, `n`.title, `u`.login + FROM `mcr_comments` AS `c` + LEFT JOIN `mcr_news` AS `n` + ON `n`.id=`c`.nid + LEFT JOIN `mcr_users` AS `u` + ON `u`.id=`c`.uid + WHERE `c`.text_bb LIKE '%$value%' + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ /*echo $this->core->sp(MCR_THEME_MOD."search/comments/comment-none.html");*/ return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + + $text = trim(strip_tags($ar['text_html'])); + + $safe_value = $this->db->HSC($value); + + $text = $this->db->HSC($text); + + $text = preg_replace("/$value/iu", '$0', $text); + + $data = json_decode($ar['data']); + + $data = array( + "ID" => intval($ar['id']), + "NID" => intval($ar['nid']), + "UID" => intval($ar['uid']), + "TITLE" => $this->db->HSC($ar['title']), + "LOGIN" => $this->db->HSC($ar['login']), + "TIME_CREATE" => date("d.m.Y в H:i", $data->time_create), + //"CID" => intval($ar['cid']), + //"CATEGORY" => $this->db->HSC($ar['category']), + "TEXT" => $text + ); + + echo $this->core->sp(MCR_THEME_MOD."search/comments/comment-id.html", $data); + } + + return ob_get_clean(); + } + + public function results(){ + + if(!$this->core->is_access('sys_search_comments')){ $this->core->notify("Доступ запрещен!", "Поиск по комментариям ограничен администрацией", 1, "?mode=403"); } + + $value = (isset($_GET['value'])) ? $_GET['value'] : ''; + + $value = trim(urldecode($value)); + + if(empty($value)){ $this->core->notify("404", "Не заданы критерии поиска", 2, "?mode=403"); } + + $safe_value = $this->db->safesql($value); + $html_value = $this->db->HSC($value); + + $sql = "SELECT COUNT(*) FROM `mcr_comments` WHERE text_bb LIKE '%$safe_value%'"; + + $query = $this->db->query($sql); + + if(!$query){ $this->core->notify($this->lng['e_msg'], $this->lng['e_sql_critical'], 2); } + + $ar = $this->db->fetch_array($query); + + $page = "?mode=search&type=comments&value=$html_value&pid="; + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['search_comments'], $page, $ar[0]), + "RESULT" => $this->results_array($safe_value), + "QUERY" => $html_value, + "QUERY_COUNT" => intval($ar[0]) + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."search/comments/comment-list.html", $data); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/search/news.php b/upload/modules/search/news.php new file mode 100644 index 0000000..52009b9 --- /dev/null +++ b/upload/modules/search/news.php @@ -0,0 +1,110 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $bc = array( + "Поиск" => BASE_URL."?mode=search", + "По новостям" => BASE_URL."?mode=search&type=news" + ); + + $this->core->title = "Поиск — По новостям"; + $this->core->bc = $this->core->gen_bc($bc); + } + + private function results_array($value){ + + $start = $this->core->pagination($this->config->pagin['search_news'], 0, 0); // Set start pagination + $end = $this->config->pagin['search_news']; // Set end pagination + + //, `n`.cid, `c`.title AS `category` + + $query = $this->db->query("SELECT `n`.id, `n`.title, `n`.text_html + FROM `mcr_news` AS `n` + LEFT JOIN `mcr_news_cats` AS `c` + ON `c`.id=`n`.cid + WHERE `n`.title LIKE '%$value%' OR `n`.text_bb LIKE '%$value%' + LIMIT $start, $end"); + + ob_start(); + + if(!$query || $this->db->num_rows($query)<=0){ /*echo $this->core->sp(MCR_THEME_MOD."search/news/news-none.html");*/ return ob_get_clean(); } + + while($ar = $this->db->fetch_assoc($query)){ + + $title = $this->db->HSC($ar['title']); + $text = trim(strip_tags($ar['text_html'])); + + $safe_value = $this->db->HSC($value); + + $text = $this->db->HSC($text); + + //$text_len = mb_strlen($text, "UTF-8"); + //if($text_len > 255){ $text = mb_substr($text, 0, 255, "UTF-8").'...'; } + + $title = preg_replace("/$value/iu", '$0', $title); + + $text = preg_replace("/$value/iu", '$0', $text); + + $data = array( + "ID" => intval($ar['id']), + "TITLE" => $title, + //"CID" => intval($ar['cid']), + //"CATEGORY" => $this->db->HSC($ar['category']), + "TEXT" => $text + ); + + echo $this->core->sp(MCR_THEME_MOD."search/news/news-id.html", $data); + } + + return ob_get_clean(); + } + + public function results(){ + + if(!$this->core->is_access('sys_search_news')){ $this->core->notify("Доступ запрещен!", "Поиск по новостям ограничен администрацией", 1, "?mode=403"); } + + $value = (isset($_GET['value'])) ? $_GET['value'] : ''; + + $value = trim(urldecode($value)); + + if(empty($value)){ $this->core->notify("404", "Не заданы критерии поиска", 2, "?mode=403"); } + + $safe_value = $this->db->safesql($value); + $html_value = $this->db->HSC($value); + + $sql = "SELECT COUNT(*) FROM `mcr_news` WHERE title LIKE '%$safe_value%' OR text_bb LIKE '%$safe_value%'"; + + $query = $this->db->query($sql); + + if(!$query){ $this->core->notify($this->lng['e_msg'], $this->lng['e_sql_critical'], 2); } + + $ar = $this->db->fetch_array($query); + + $page = "?mode=search&type=news&value=$html_value&pid="; + + $data = array( + "PAGINATION" => $this->core->pagination($this->config->pagin['search_news'], $page, $ar[0]), + "RESULT" => $this->results_array($safe_value), + "QUERY" => $html_value, + "QUERY_COUNT" => intval($ar[0]) + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."search/news/news-list.html", $data); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/modules/statics.php b/upload/modules/statics.php new file mode 100644 index 0000000..e37d32c --- /dev/null +++ b/upload/modules/statics.php @@ -0,0 +1,71 @@ +core = $core; + $this->db = $core->db; + $this->config = $core->config; + $this->user = $core->user; + $this->lng = $core->lng; + + $this->core->title = $this->lng['t_static']; + + $bc = array( + $this->lng['t_static'] => BASE_URL."?mode=statics" + ); + + $this->core->bc = $this->core->gen_bc($bc); + } + + public function content(){ + + if(!isset($_GET['id']) || empty($_GET['id'])){ $this->core->notify('403', $this->lng['e_403']); } + + $uniq = $this->db->safesql(@$_GET['id']); + + $query = $this->db->query("SELECT `s`.title, `s`.text_html, `s`.uid, `s`.`permissions`, `s`.`data`, + `u`.login + FROM `mcr_statics` AS `s` + LEFT JOIN `mcr_users` AS `u` + ON `u`.id=`s`.uid + WHERE `s`.`uniq`='$uniq'"); + if(!$query || $this->db->num_rows($query)<=0){ $this->core->notify('403', $this->lng['e_403']); } + + $ar = $this->db->fetch_assoc($query); + + if(!$this->core->is_access($ar['permissions'])){ $this->core->notify('403', $this->lng['e_403']); } + + $uniq = $this->db->HSC($uniq); + $title = $this->db->HSC($ar['title']); + + $this->core->title .= " — $title"; + + $bc = array( + $this->lng['t_static'] => BASE_URL."?mode=statics&id=$uniq", + $title => BASE_URL."?mode=statics&id=$uniq" + ); + + $this->core->bc = $this->core->gen_bc($bc); + + $page_data = array( + "TITLE" => $this->db->HSC($ar['title']), + "TEXT" => $ar['text_html'], + "UID" => intval($ar['uid']), + "LOGIN" => $this->db->HSC($ar['login']), + "DATA" => json_decode($ar['data'], true), + + ); + + ob_start(); + + echo $this->core->sp(MCR_THEME_MOD."statics/static-id.html", $page_data); + + return ob_get_clean(); + } +} + +?> \ No newline at end of file diff --git a/upload/rules.txt b/upload/rules.txt new file mode 100644 index 0000000..23a546c --- /dev/null +++ b/upload/rules.txt @@ -0,0 +1,112 @@ +Основные правила + + +Любой человек, зарегистрировавшийся на проекте, автоматически соглашается с этим сводом правил и обязуется выполнять их. + +Главный администратор имеет право на редактирование данного свода правил в любое время. + +Администрация проекта имеет полное право заблокировать ваш аккаунт за нарушение того или иного пункта данного свода правил. + +Незнание правил не освобождает от ответственности. + +Любой игрок нашего проекта обязан соблюдать законы Российской Федерации. + +Любой игрок нашего проекта обязан общаться исключительно на русском языке. + +Деньги, которые были потрачены вами на пополнение счета в личном кабинете, не возвращаются вам ни при каких обстоятельствах. + +Администрация проекта не возвращает вам ресурсы, которые были потеряны в связи с откатом, вашей смертью, багом. + +Администрация имеет право корректировать данный свод правил без предварительного уведомления игроков. + + + + +Правила поведения игроков на сервере + + +Администрация не рекомендует сообщать свои личные данные посторонним лицам (как то: логин/пароль от аккаунта на сервере, паспортные данные и т.д.). + +Внимание!!! Для взаимодействия с игроками администрации достаточно знать ваш ник! + +Запрещено использование любых ошибок и недоработок игрового клиента, сервера, плагинов, админов для получения выгоды, как собственной, так и других игроков. + +При обнаружении недочётов и ошибок программного обеспечения игры, игрок обязан сообщить об этом администрации сервера в разделе игровых ошибок. + +Запрещается использовать стороннее программное обеспечение для подключения к игровым серверам. Сюда относятся как сторонние программы, так и плагины для клиента, дающие неоспоримое преимущество в игре. + +Запрещается создавать конструкции, мешающие нормальной работе сервера. + +Не допускается использование скинов и плащей, оскорбляющих других игроков и/или противоречащих законам РФ. + +Запрещено любое изменение клиента или лаунчера. + +Запрещено использование прозрачных текстурпаков. + +Если игрок заметил подозрительные предметы, события, игроков либо другие подозрительные вещи, он обязан сообщить об этом Администрации. + +Запрещено распространение информации о багах игры, в случаях обнаружения багов вам нужно связаться с администрацией. + +Запрещено устанавливать точку /home на территории, принадлежащей другому игроку, без его согласия. + +Запрещено использовать/продавать/раздавать/хранить/отдавать/применять/сажать/кидать предметы, которые были добыты нечестным путем. + +Запрещается убийство игрока на точке /home непосредственно после телепортации или возрождения после смерти, а также многократные убийства новичком рядом со спавном с целью не дать игроку выйти за пределы спавна. + +Запрещается устраивать ловушки на точке /home с целью заманивания и убийства игроков. + +Запрещен бессмысленный разлив воды или лавы. + +Запрещено использование очень сложных RedStone схем, различных генераторов, которые влекут сильную нагрузку на серверную машину. + +Запрещено возводить сооружения, не имеющие смысла, оскорбляющие других игроков и/или противоречащие законодательству РФ. + +Запрещено строить гигантские надписи, портящие внешний вид местности или оскорбляющие других игроков. + +Запрещена установка табличек, оскорбляющих других игроков и/или противоречащих законам РФ. + +Запрещается использование ненормативной лексики в чате. + +Запрещается оскорблять администрацию. + +Запрещается оскорбление других игроков, независимо от формы. + +Запрещается попрошайничество в настойчивой форме. + +Запрещается требовать у администрации, модераторов или хелперов совершения каких-либо действий. + +Запрещены провокации любого характера. + +Возбраняется публичное обсуждение действий команды сервера. + +Запрещается злоупотребление бессмысленными и/или часто повторяющимися сообщениями (от 3х повторов). + +Запрещается торговля за реальные деньги. + +Запрещается реклама сторонних ресурсов. + +Запрещается написание сообщений в мировой и локальный чат при включенном CapsLock. + +Запрещается использование в сообщениях одинаковых повторяющихся спец. символов (@ # % ! ? и т.п.) от 5-ти повторов в сообщении. + +Запрещена дискриминация и унижение других игроков по расовым, национальным, половым, религиозным и т.п. признакам (в соответствии с УК РФ и Конвенцией о правах человека). + +Запрещено использование ников, которые схожи с никами администрации. + + + + +Права и обязанности модераторов + + +Модератор обязан обеспечить комфортную игру посетителям сервера. Он следит за исполнением правил сервера. + +Игрока, нарушившего правила, Модератор имеет право наказывать любым способом по своему усмотрению в соответствии с правилами сервера. + +Модератор имеет право принимать собственные решения, не оговоренные в Правилах, в зависимости от сложившейся ситуации. + +Модератор имеет права удалять постройки, которые противоречат правилам сервера. + +Модератор не имеет права злоупотреблять своими полномочиями. + +Действия модераторов и администрации не обсуждаются. \ No newline at end of file diff --git a/upload/system.php b/upload/system.php new file mode 100644 index 0000000..4827241 --- /dev/null +++ b/upload/system.php @@ -0,0 +1,51 @@ +'.PROGNAME.' © 2013-'.date("Y").' Qexy'); +define('MCR_ROOT', dirname(__FILE__).'/'); +define('MCR_MODE_PATH', MCR_ROOT.'modules/'); +define('MCR_TOOL_PATH', MCR_ROOT.'engine/'); +define('MCR_SIDE_PATH', MCR_ROOT.'blocks/'); +define('MCR_LANG_PATH', MCR_ROOT.'language/'); +define('MCR_UPL_PATH', MCR_ROOT.'uploads/'); +define('MCR_SKIN_PATH', MCR_UPL_PATH.'skins/'); +define('MCR_CLOAK_PATH', MCR_UPL_PATH.'cloaks/'); + +// Set default charset +header('Content-Type: text/html; charset=UTF-8'); + +// Load core +require_once(MCR_TOOL_PATH.'core.class.php'); + +// Create new core object +$core = new core(); + +// Debug +ini_set("display_errors", $core->config->main['debug']); +$warn_type = ($core->config->main['debug'] && $core->user->permissions->sys_debug) ? E_ALL : 0; +error_reporting($warn_type); + +$base_url = ($core->config->main['install']) ? $core->base_url() : $core->config->main['s_root']; + +// System constants +define('MCR_LANG', $core->config->main['s_lang']); +define('MCR_THEME_PATH', MCR_ROOT.'themes/'.$core->config->main['s_theme'].'/'); +define('MCR_THEME_MOD', MCR_THEME_PATH.'modules/'); +define('MCR_THEME_BLOCK', MCR_THEME_PATH.'blocks/'); +define('BASE_URL', $base_url); +define('ADMIN_URL', BASE_URL.'?mode=admin'); +define('STYLE_URL', BASE_URL.'themes/'.$core->config->main['s_theme'].'/'); +define('UPLOAD_URL', BASE_URL.'uploads/'); + +// Csrf security validation +$core->csrf_check(); +?> \ No newline at end of file diff --git a/upload/themes/default/blocks/monitor/main.html b/upload/themes/default/blocks/monitor/main.html new file mode 100644 index 0000000..9a795cf --- /dev/null +++ b/upload/themes/default/blocks/monitor/main.html @@ -0,0 +1,11 @@ +
+ +
Мониторинг
+ +
+ +
+
Загрузка...
+
+ +
\ No newline at end of file diff --git a/upload/themes/default/blocks/monitor/monitor-id.html b/upload/themes/default/blocks/monitor/monitor-id.html new file mode 100644 index 0000000..ac32016 --- /dev/null +++ b/upload/themes/default/blocks/monitor/monitor-id.html @@ -0,0 +1,4 @@ +
+
+
+
\ No newline at end of file diff --git a/upload/themes/default/blocks/notify/alert.html b/upload/themes/default/blocks/notify/alert.html new file mode 100644 index 0000000..41f9c14 --- /dev/null +++ b/upload/themes/default/blocks/notify/alert.html @@ -0,0 +1,13 @@ +
+ +
lng['b_alert']; ?> ×
+ +
+ +
+
+ +
+
+ +
\ No newline at end of file diff --git a/upload/themes/default/blocks/profile/auth.html b/upload/themes/default/blocks/profile/auth.html new file mode 100644 index 0000000..f057c05 --- /dev/null +++ b/upload/themes/default/blocks/profile/auth.html @@ -0,0 +1,20 @@ +
+ +
lng['b_m-p']; ?>
+ +
+ +
+
+
+
    +
  • lng['m-p_login']; ?>: user->login; ?>
  • +
  • lng['m-p_group']; ?>: user->group; ?>
  • +
  • lng['m-p_balance']; ?>: user->money; ?> майн.
  • +
  • lng['m-p_settings']; ?>
  • +
  • +
+
+
+ +
\ No newline at end of file diff --git a/upload/themes/default/blocks/profile/unauth.html b/upload/themes/default/blocks/profile/unauth.html new file mode 100644 index 0000000..a178c84 --- /dev/null +++ b/upload/themes/default/blocks/profile/unauth.html @@ -0,0 +1,30 @@ +
+ +
lng['b_auth']; ?>
+ +
+ +
+
+
+ + +
+ +
+ + +
+ + + + + +
+
+ +
\ No newline at end of file diff --git a/upload/themes/default/blocks/top/main.html b/upload/themes/default/blocks/top/main.html new file mode 100644 index 0000000..7f3f67a --- /dev/null +++ b/upload/themes/default/blocks/top/main.html @@ -0,0 +1,11 @@ +
+ +
Топ серверов
+ +
+ +
+
+
+ +
\ No newline at end of file diff --git a/upload/themes/default/breadcrumbs/id-active.html b/upload/themes/default/breadcrumbs/id-active.html new file mode 100644 index 0000000..b4a0c71 --- /dev/null +++ b/upload/themes/default/breadcrumbs/id-active.html @@ -0,0 +1 @@ +
  • »
  • \ No newline at end of file diff --git a/upload/themes/default/breadcrumbs/id-inactive.html b/upload/themes/default/breadcrumbs/id-inactive.html new file mode 100644 index 0000000..a3dc519 --- /dev/null +++ b/upload/themes/default/breadcrumbs/id-inactive.html @@ -0,0 +1 @@ +
  • »
  • \ No newline at end of file diff --git a/upload/themes/default/breadcrumbs/list.html b/upload/themes/default/breadcrumbs/list.html new file mode 100644 index 0000000..4e8ec03 --- /dev/null +++ b/upload/themes/default/breadcrumbs/list.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/upload/themes/default/captcha/keycaptcha.html b/upload/themes/default/captcha/keycaptcha.html new file mode 100644 index 0000000..72c6695 --- /dev/null +++ b/upload/themes/default/captcha/keycaptcha.html @@ -0,0 +1,6 @@ +
    +
    + + +
    +
    \ No newline at end of file diff --git a/upload/themes/default/captcha/recaptcha.html b/upload/themes/default/captcha/recaptcha.html new file mode 100644 index 0000000..3ad3eb4 --- /dev/null +++ b/upload/themes/default/captcha/recaptcha.html @@ -0,0 +1,5 @@ +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/upload/themes/default/css/bootstrap-responsive.min.css b/upload/themes/default/css/bootstrap-responsive.min.css new file mode 100644 index 0000000..96a435b --- /dev/null +++ b/upload/themes/default/css/bootstrap-responsive.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/upload/themes/default/css/bootstrap.min.css b/upload/themes/default/css/bootstrap.min.css new file mode 100644 index 0000000..df96c86 --- /dev/null +++ b/upload/themes/default/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/upload/themes/default/css/docs.css b/upload/themes/default/css/docs.css new file mode 100644 index 0000000..c97213e --- /dev/null +++ b/upload/themes/default/css/docs.css @@ -0,0 +1,1191 @@ +/* Add additional stylesheets below +-------------------------------------------------- */ +/* + Bootstrap's documentation styles + Special styles for presenting Bootstrap's documentation and examples +*/ + + + +/* Body and structure +-------------------------------------------------- */ + +body { + position: relative; + padding-top: 40px; +} + +/* Code in headings */ + +h3 code { + font-size: 14px; + font-weight: normal; +} + + + +/* Tweak navbar brand link to be super sleek +-------------------------------------------------- */ + +body > .navbar { + font-size: 13px; +} + +/* Change the docs' brand */ +body > .navbar .brand { + padding-right: 0; + padding-left: 0; + margin-left: 20px; + float: right; + font-weight: bold; + color: #000; + text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125); + -webkit-transition: all .2s linear; + -moz-transition: all .2s linear; + transition: all .2s linear; +} +body > .navbar .brand:hover { + text-decoration: none; + text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.4); +} + + +/* Sections +-------------------------------------------------- */ + +/* padding for in-page bookmarks and fixed navbar */ +section { + padding-top: 30px; +} +section > .page-header, +section > .lead { + color: #5a5a5a; +} +section > ul li { + margin-bottom: 5px; +} + +/* Separators (hr) */ +.bs-docs-separator { + margin: 40px 0 39px; +} + +/* Faded out hr */ +hr.soften { + height: 1px; + margin: 70px 0; + background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + border: 0; +} + + + +/* Jumbotrons +-------------------------------------------------- */ + +/* Base class +------------------------- */ +.jumbotron { + position: relative; + padding: 4px 0; + color: #fff; + text-align: center; + text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); + background: #58D3F7; /* Old browsers */ + background: -moz-linear-gradient(45deg, #58D3F7 0%, #0B4C5F 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#0B4C5F)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(45deg, #58D3F7 0%,#0B4C5F 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(45deg, #58D3F7 0%,#0B4C5F 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(45deg, #58D3F7 0%,#0B4C5F 100%); /* IE10+ */ + background: linear-gradient(45deg, #58D3F7 0%,#0B4C5F 100%); /* W3C */ +} +.jumbotron h1 { + font-size: 80px; + font-weight: bold; + letter-spacing: -1px; + line-height: 1; +} +.jumbotron p { + font-size: 24px; + font-weight: 300; + line-height: 30px; + margin-bottom: 30px; +} + +/* Link styles (used on .masthead-links as well) */ +.jumbotron a { + color: #fff; + color: rgba(255,255,255,.5); + -webkit-transition: all .2s ease-in-out; + -moz-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.jumbotron a:hover { + color: #fff; + text-shadow: 0 0 10px rgba(255,255,255,.25); +} + +/* Download button */ +@-webkit-keyframes downloadButton { + from { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.5); } + 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 25px rgba(0,68,204,.9); } + to { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.5); } +} +@-moz-keyframes downloadButton { + from { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.5); } + 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 25px rgba(0,68,204,.9); } + to { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.5); } +} +.masthead .btn { + padding: 14px 24px; + font-size: 24px; + font-weight: 200; + color: #fff; /* redeclare to override the `.jumbotron a` */ + border: 0; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.01); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.01); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25), 0 2px 10px rgba(0,68,204,.01); + -webkit-animation-name: downloadButton; + -moz-animation-name: downloadButton; + -webkit-animation-duration: 1.5s; + -moz-animation-duration: 1.5s; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -webkit-transition: none; + -moz-transition: none; + transition: none; + +} +.masthead .btn:active { + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); +} + + +/* Pattern overlay +------------------------- */ +.jumbotron .container { + position: relative; + z-index: 2; +} +.jumbotron:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: url(../img/cacke.128.png) no-repeat center right; + +} + +/* Masthead (docs home) +------------------------- */ +.masthead { + padding: 70px 0 80px; + margin-bottom: 0; + color: #fff; +} +.masthead h1 { + font-size: 120px; + line-height: 1; + letter-spacing: -2px; +} +.masthead p { + font-size: 40px; + font-weight: 200; + line-height: 1.25; +} + +/* Textual links in masthead */ +.masthead-links { + margin: 0; + list-style: none; +} +.masthead-links li { + display: inline; + padding: 0 10px; + color: rgba(255,255,255,.25); +} + +/* Social proof buttons from GitHub & Twitter */ +.bs-docs-social { + padding: 15px 0; + text-align: center; + background-color: #f5f5f5; + border-top: 1px solid #fff; + border-bottom: 1px solid #ddd; +} + +/* Quick links on Home */ +.bs-docs-social-buttons { + margin-left: 0; + margin-bottom: 0; + padding-left: 0; + list-style: none; +} +.bs-docs-social-buttons li { + display: inline-block; + padding: 5px 8px; + line-height: 1; +} + +/* Subhead (other pages) +------------------------- */ +.subhead { + text-align: left; + border-bottom: 1px solid #ddd; +} +.subhead h1 { + font-size: 60px; +} +.subhead p { + margin-bottom: 20px; +} +.subhead .navbar { + display: none; +} + + + +/* Marketing section of Overview +-------------------------------------------------- */ + +.marketing { + text-align: center; + color: #5a5a5a; +} +.marketing h1 { + margin: 60px 0 10px; + font-size: 60px; + font-weight: 200; + line-height: 1; + letter-spacing: -1px; +} +.marketing h2 { + font-weight: 200; + margin-bottom: 5px; +} +.marketing p { + font-size: 16px; + line-height: 1.5; +} +.marketing .marketing-byline { + margin-bottom: 40px; + font-size: 20px; + font-weight: 300; + line-height: 25px; + color: #999; +} +.marketing img { + display: block; + margin: 0 auto 30px; +} + + + +/* Footer +-------------------------------------------------- */ + +.footer { + padding: 70px 0; + margin-top: 70px; + border-top: 1px solid #e5e5e5; + background-color: #f5f5f5; +} +.footer p { + margin-bottom: 0; + color: #777; +} +.footer-links { + margin: 10px 0; +} +.footer-links li { + display: inline; + margin-right: 10px; +} + + + +/* Special grid styles +-------------------------------------------------- */ + +.show-grid { + margin-top: 10px; + margin-bottom: 20px; +} +.show-grid [class*="span"] { + background-color: #eee; + text-align: center; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + min-height: 40px; + line-height: 40px; + border: 1px solid #e5e5e5; +} +.show-grid:hover [class*="span"] { + background: #ddd; +} +.show-grid .show-grid { + margin-top: 0; + margin-bottom: 0; +} +.show-grid .show-grid [class*="span"] { + background-color: #ccc; +} + + + +/* Mini layout previews +-------------------------------------------------- */ +.mini-layout { + border: 1px solid #ddd; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.075); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.075); + box-shadow: 0 1px 2px rgba(0,0,0,.075); +} +.mini-layout, +.mini-layout .mini-layout-body, +.mini-layout.fluid .mini-layout-sidebar { + height: 300px; +} +.mini-layout { + margin-bottom: 20px; + padding: 9px; +} +.mini-layout div { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.mini-layout .mini-layout-body { + background-color: #dceaf4; + margin: 0 auto; + width: 70%; +} +.mini-layout.fluid .mini-layout-sidebar, +.mini-layout.fluid .mini-layout-header, +.mini-layout.fluid .mini-layout-body { + float: left; +} +.mini-layout.fluid .mini-layout-sidebar { + background-color: #bbd8e9; + width: 20%; +} +.mini-layout.fluid .mini-layout-body { + width: 77.5%; + margin-left: 2.5%; +} + + + +/* Download page +-------------------------------------------------- */ + +.download .page-header { + margin-top: 36px; +} +.page-header .toggle-all { + margin-top: 5px; +} + +/* Space out h3s when following a section */ +.download h3 { + margin-bottom: 5px; +} +.download-builder input + h3, +.download-builder .checkbox + h3 { + margin-top: 9px; +} + +/* Fields for variables */ +.download-builder input[type=text] { + margin-bottom: 9px; + font-family: Menlo, Monaco, "Courier New", monospace; + font-size: 12px; + color: #d14; +} +.download-builder input[type=text]:focus { + background-color: #fff; +} + +/* Custom, larger checkbox labels */ +.download .checkbox { + padding: 6px 10px 6px 25px; + font-size: 13px; + line-height: 18px; + color: #555; + background-color: #f9f9f9; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + cursor: pointer; +} +.download .checkbox:hover { + color: #333; + background-color: #f5f5f5; +} +.download .checkbox small { + font-size: 12px; + color: #777; +} + +/* Variables section */ +#variables label { + margin-bottom: 0; +} + +/* Giant download button */ +.download-btn { + margin: 36px 0 108px; +} +#download p, +#download h4 { + max-width: 50%; + margin: 0 auto; + color: #999; + text-align: center; +} +#download h4 { + margin-bottom: 0; +} +#download p { + margin-bottom: 18px; +} +.download-btn .btn { + display: block; + width: auto; + padding: 19px 24px; + margin-bottom: 27px; + font-size: 30px; + line-height: 1; + text-align: center; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + + + +/* Misc +-------------------------------------------------- */ + +/* Make tables spaced out a bit more */ +h2 + table, +h3 + table, +h4 + table, +h2 + .row { + margin-top: 5px; +} + +/* Example sites showcase */ +.example-sites { + xmargin-left: 20px; +} +.example-sites img { + max-width: 100%; + margin: 0 auto; +} + +.scrollspy-example { + height: 200px; + overflow: auto; + position: relative; +} + + +/* Fake the :focus state to demo it */ +.focused { + border-color: rgba(82,168,236,.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + outline: 0; +} + +/* For input sizes, make them display block */ +.docs-input-sizes select, +.docs-input-sizes input[type=text] { + display: block; + margin-bottom: 9px; +} + +/* Icons +------------------------- */ +.the-icons { + margin-left: 0; + list-style: none; +} +.the-icons li { + float: left; + width: 25%; + line-height: 25px; +} +.the-icons i:hover { + background-color: rgba(255,0,0,.25); +} + +/* Eaxmples page +------------------------- */ +.bootstrap-examples p { + font-size: 13px; + line-height: 18px; +} +.bootstrap-examples .thumbnail { + margin-bottom: 9px; + background-color: #fff; +} + + + +/* Bootstrap code examples +-------------------------------------------------- */ + +/* Base register */ +.register { + position: relative; + margin: 15px 0; + padding: 39px 19px 1px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the register */ +.register:after { + content: "Регистрация"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Base start game */ +.start-game { + position: relative; + margin: 15px 0; + padding: 39px 19px 1px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the register */ +.start-game:after { + content: "НАЧАТЬ ИГРАТЬ"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Base register success */ +.reg-success { + position: relative; + margin: 15px 0; + padding: 39px 19px 1px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the register success*/ +.reg-success:after { + content: "Спасибо за регистрацию"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Base profil */ +.profil { + position: relative; + margin: 15px 0; + padding: 39px 19px 1px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the profil */ +.profil:after { + content: "Настройки аккаунта"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Base profil */ +.profilmine { + position: relative; + margin: 15px 0; + padding: 39px 19px 1px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the profil */ +.profilmine:after { + content: "Мини профиль"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Base Serverstats */ +.Serverstats { + position: relative; + margin: 15px 0; + padding: 39px 19px 1px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the Serverstats */ +.Serverstats:after { + content: "Cтатус сервера"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Base news */ +.news { + position: relative; + margin: 15px 0; + padding: 2px 19px 10px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the news */ +.news:after { + content: "Новости сайта"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + + +/* Remove spacing between an example and it's code */ +.bs-docs-example + .prettyprint { + margin-top: -20px; + padding-top: 15px; +} + +/* Tweak examples +------------------------- */ +.bs-docs-example > p:last-child { + margin-bottom: 0; +} +.bs-docs-example .table, +.bs-docs-example .progress, +.bs-docs-example .well, +.bs-docs-example .alert, +.bs-docs-example .hero-unit, +.bs-docs-example .pagination, +.bs-docs-example .navbar, +.bs-docs-example > .nav, +.bs-docs-example blockquote { + margin-bottom: 5px; +} +.bs-docs-example .pagination { + margin-top: 0; +} +.bs-navbar-top-example, +.bs-navbar-bottom-example { + z-index: 1; + padding: 0; + height: 90px; + overflow: hidden; /* cut the drop shadows off */ +} +.bs-navbar-top-example .navbar-fixed-top, +.bs-navbar-bottom-example .navbar-fixed-bottom { + margin-left: 0; + margin-right: 0; +} +.bs-navbar-top-example { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.bs-navbar-top-example:after { + top: auto; + bottom: -1px; + -webkit-border-radius: 0 4px 0 4px; + -moz-border-radius: 0 4px 0 4px; + border-radius: 0 4px 0 4px; +} +.bs-navbar-bottom-example { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.bs-navbar-bottom-example .navbar { + margin-bottom: 0; +} +form.bs-docs-example { + padding-bottom: 19px; +} +.bs-docs-example .lead { + font-size: 18px; + line-height: 24px; +} + +/* Images */ +.bs-docs-example-images img { + margin: 10px; + display: inline-block; +} + +/* Tooltips */ +.bs-docs-tooltip-examples { + text-align: center; + margin: 0 0 10px; + list-style: none; +} +.bs-docs-tooltip-examples li { + display: inline; + padding: 0 10px; +} + +/* Popovers */ +.bs-docs-example-popover { + padding-bottom: 24px; + background-color: #f9f9f9; +} +.bs-docs-example-popover .popover { + position: relative; + display: block; + float: left; + width: 260px; + margin: 20px; +} + + + +/* Responsive docs +-------------------------------------------------- */ + +/* Utility classes table +------------------------- */ +.responsive-utilities th small { + display: block; + font-weight: normal; + color: #999; +} +.responsive-utilities tbody th { + font-weight: normal; +} +.responsive-utilities td { + text-align: center; +} +.responsive-utilities td.is-visible { + color: #468847; + background-color: #dff0d8 !important; +} +.responsive-utilities td.is-hidden { + color: #ccc; + background-color: #f9f9f9 !important; +} + +/* Responsive tests +------------------------- */ +.responsive-utilities-test { + margin-top: 5px; + margin-left: 0; + list-style: none; + overflow: hidden; /* clear floats */ +} +.responsive-utilities-test li { + position: relative; + float: left; + width: 25%; + height: 43px; + font-size: 14px; + font-weight: bold; + line-height: 43px; + color: #999; + text-align: center; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.responsive-utilities-test li + li { + margin-left: 10px; +} +.responsive-utilities-test span { + position: absolute; + top: -1px; + left: -1px; + right: -1px; + bottom: -1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.responsive-utilities-test span { + color: #468847; + background-color: #dff0d8; + border: 1px solid #d6e9c6; +} + + + +/* Sidenav for Docs +-------------------------------------------------- */ + +/* prevent column from collapsing when affixing */ +.span3 { + min-height: 1px; +} + +.bs-docs-sidenav { + width: 228px; + margin: 30px 0 0; + padding: 0; + background-color: #fff; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065); + -moz-box-shadow: 0 1px 4px rgba(0,0,0,.065); + box-shadow: 0 1px 4px rgba(0,0,0,.065); +} +.bs-docs-sidenav > li > a { + display: block; + margin: 0 0 -1px; + padding: 8px 14px; + border: 1px solid #e5e5e5; +} +.bs-docs-sidenav > li:first-child > a { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.bs-docs-sidenav > li:last-child > a { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.bs-docs-sidenav > .active > a { + position: relative; + z-index: 2; + padding: 9px 15px; + border: 0; + text-shadow: 0 1px 0 rgba(0,0,0,.15); + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); + box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); +} +/* Chevrons */ +.bs-docs-sidenav .icon-chevron-right { + float: right; + margin-top: 2px; + margin-right: -6px; + opacity: .25; +} +.bs-docs-sidenav > li > a:hover { + background-color: #f5f5f5; +} +.bs-docs-sidenav a:hover .icon-chevron-right { + opacity: .5; +} +.bs-docs-sidenav .active .icon-chevron-right, +.bs-docs-sidenav .active a:hover .icon-chevron-right { + background-image: url(../img/icons/glyphicons-halflings-white.png); + opacity: 1; +} +.bs-docs-sidenav.affix { + top: 40px; +} +.bs-docs-sidenav.affix-bottom { + position: absolute; + top: auto; + bottom: 270px; +} + + + + +/* Responsive +-------------------------------------------------- */ + +/* Desktop large +------------------------- */ +@media (min-width: 1200px) { + .bs-docs-container { + max-width: 970px; + } + .bs-docs-sidenav { + width: 258px; + } +} + +/* Desktop +------------------------- */ +@media (max-width: 980px) { + /* Unfloat brand */ + body > .navbar-fixed-top .brand { + float: left; + margin-left: 0; + padding-left: 10px; + padding-right: 10px; + } + + /* Inline-block quick links for more spacing */ + .quick-links li { + display: inline-block; + margin: 5px; + } + + /* When affixed, space properly */ + .bs-docs-sidenav { + top: 0; + margin-top: 30px; + margin-right: 0; + } +} + +/* Tablet to desktop +------------------------- */ +@media (min-width: 768px) and (max-width: 980px) { + /* Remove any padding from the body */ + body { + padding-top: 0; + } + /* Widen masthead and social buttons to fill body padding */ + .jumbotron { + margin-top: -20px; /* Offset bottom margin on .navbar */ + } + /* Adjust sidenav width */ + .bs-docs-sidenav { + width: 166px; + margin-top: 20px; + } + .bs-docs-sidenav.affix { + top: 0; + } +} + +/* Tablet +------------------------- */ +@media (max-width: 768px) { + /* Remove any padding from the body */ + body { + padding-top: 0; + } + + /* Widen masthead and social buttons to fill body padding */ + .jumbotron { + padding: 40px 20px; + margin-top: -20px; /* Offset bottom margin on .navbar */ + margin-right: -20px; + margin-left: -20px; + } + .masthead h1 { + font-size: 90px; + } + .masthead p, + .masthead .btn { + font-size: 24px; + } + .marketing .span4 { + margin-bottom: 40px; + } + .bs-docs-social { + margin: 0 -20px; + } + + /* Space out the show-grid examples */ + .show-grid [class*="span"] { + margin-bottom: 5px; + } + + /* Sidenav */ + .bs-docs-sidenav { + width: auto; + margin-bottom: 20px; + } + .bs-docs-sidenav.affix { + position: static; + width: auto; + top: 0; + } + + /* Unfloat the back to top link in footer */ + .footer { + margin-left: -20px; + margin-right: -20px; + padding-left: 20px; + padding-right: 20px; + } + .footer p { + margin-bottom: 9px; + } +} + +/* Landscape phones +------------------------- */ +@media (max-width: 480px) { + /* Remove padding above jumbotron */ + body { + padding-top: 0; + } + + /* Change up some type stuff */ + h2 small { + display: block; + } + + /* Downsize the jumbotrons */ + .jumbotron h1 { + font-size: 40px; + } + .jumbotron p, + .jumbotron .btn { + font-size: 20px; + } + .jumbotron .btn { + display: block; + margin: 0 auto; + } + + /* center align subhead text like the masthead */ + .subhead h1, + .subhead p { + text-align: center; + } + + /* Marketing on home */ + .marketing h1 { + font-size: 40px; + } + + /* center example sites */ + .example-sites { + margin-left: 0; + } + .example-sites > li { + float: none; + display: block; + max-width: 280px; + margin: 0 auto 18px; + text-align: center; + } + .example-sites .thumbnail > img { + max-width: 270px; + } + + /* Do our best to make tables work in narrow viewports */ + table code { + white-space: normal; + word-wrap: break-word; + word-break: break-all; + } + + /* Modal example */ + .modal-example .modal { + position: relative; + top: auto; + right: auto; + bottom: auto; + left: auto; + } + + /* Unfloat the back to top in footer to prevent odd text wrapping */ + .footer .pull-right { + float: none; + } +} diff --git a/upload/themes/default/css/global.css b/upload/themes/default/css/global.css new file mode 100644 index 0000000..a7f2e5a --- /dev/null +++ b/upload/themes/default/css/global.css @@ -0,0 +1,410 @@ +@font-face { + font-family: MagistralC; + src: url("../fonts/MagistralC.otf"); +} +@font-face { + font-family: Hattori-Hanzo; + src: url("../fonts/Hattori-Hanzo.otf"); +} + + +.jumbotron { padding-top: 40px; } +.jumbotron .container .row-fluid .lead > a:hover { text-decoration: none; } +.bs-docs-social .bs-docs-social-buttons li { line-height: 12px; font-size: 12px; } +html, body{ height: 100%; padding: 0px; } + +form, ul, li { margin: 0px; padding: 0px; } +ul li { list-style: none; } + +body > .container { + margin-bottom: 50px; +} + +/* Debug + */ +.mcr-debug { position: fixed; width: 400px; max-width: 400px; word-wrap: break-word; bottom: 50px; left: -420px; background: #fcf8e3; border: 1px dotted #deb877; color: #777; border-left: 0px; padding: 5px 10px; } +.mcr-debug a, +.mcr-debug a:hover { text-decoration: none; } +.mcr-debug h4 { margin: 0px; padding: 0px; } +.mcr-debug.open { left: 0px; } +.mcr-debug span { color: #333; } +.mcr-debug .action { position: absolute; left: 420px; bottom: 50%; margin-bottom: -10px; display: inline-block; background: #fcf8e3; border: 1px dotted #deb877; padding: 3px 5px; border-left: 0px; border-radius: 0px 4px 4px 0px; } +/* Debug - */ + +.container > .container-fluid > .row-fluid > .span8 { margin-top: 10px; } +.container > .container-fluid > .row-fluid > .span8 > .breadcrumb { border: 1px solid #e5e5e5; font-family: Hattori-Hanzo; font-size: 13px; margin-bottom: 0px; } + +.navbar-fixed-top .navbar-form > .input-append { margin-bottom: 0px; } + +.form-block { + border-radius: 4px; + padding: 0 10px 10px; + margin-top: 10px; + background-color: #f5f5f5; + border: 1px solid #e5e5e5; + font-family: MagistralC; +} + +.form-block:before, +.form-block:after { + display: table; + line-height: 0; + content: ""; +} + +.form-block:after { + clear: both; +} + +.block-header { + display: block; + padding: 3px; + font-size: 12px; + font-weight: bold; + line-height: 20px; + color: #999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.block-line { + margin: 0 0 10px 0; + border: 0; + border-top: 1px solid #eee; + border-bottom: 1px solid #fff; +} + +.pagination { text-align: center; margin-bottom: 0px; } + +.form-block .block-header .btn-group { margin-right: 10px; } +.form-block .block-name { display: inline-block; vertical-align: middle; font-size: 14px; } +.form-block .block-name i { margin-right: 5px; } + +button:focus, +input[type="submit"]:focus { outline: none !important; } + +.form-block .block-content .block-auth .input-prepend { width: 100%; text-align: center; } +.form-block .block-content .block-auth .input-prepend input[type="text"], +.form-block .block-content .block-auth .input-prepend input[type="password"] { width: 60%; } +.form-block .block-content .block-auth .checkbox { width: 60%; margin: auto; } +.form-block .block-content .block-auth .buttons { text-align: center; margin-top: 8px; } + +.form-block .block-content .block-profile { text-align: center; /* border: 1px solid; */ } +.form-block .block-content .block-profile .avatar { display: inline-block; vertical-align: top; } +.form-block .block-content .block-profile .avatar img { width: 128px; height: 128px; } +.form-block .block-content .block-profile .info { text-align: left; display: inline-block; vertical-align: top; list-style: none; margin: 0px; margin-left: 20px; width: 50%; } +.form-block .block-content .block-profile .info li { margin-bottom: 6px; } + +.form-block.block-notify .block-content .alert, +.main-content .alert.ajx { margin-bottom: 0px; } +.main-content .alert.ajx { margin-top: 10px; } +.form-block.block-notify #close-notify { float: right; text-decoration: none; } +.main-content .alert.ajx .close-alert { float: right; text-decoration: none; margin-right: -20px; } + +.navbar.navbar-fixed-bottom .footer-block { margin: 10px 20px; color: #777; } +.navbar.navbar-fixed-bottom .footer-block div { display: inline-block; } +.navbar.navbar-fixed-bottom .footer-block .right-side { float: right; text-align: right; } + +.centered { text-align: center; } +.ajx-l { position: absolute; margin-top: 7px; margin-left: 10px; } + +.mcr-404, +.mcr-403 { text-align: center; } +.mcr-404 h3, +.mcr-403 h3 { font-size: 24px; margin-bottom: 20px; } + +/* News + */ + +.form-block.new-id, +.form-block.new-full, +.form-block.static-page, +.form-block.comment-id { padding-bottom: 0px; } + +.form-block.new-id .block-line, +.form-block.new-full .block-line, +.form-block.static-page .block-line, +.form-block.comment-id .block-line { margin: 0px; } + +.form-block.new-id .block-footer, +.form-block.new-full .block-footer, +.form-block.static-page .block-footer, +.form-block.comment-id .block-footer { font-family: Hattori-Hanzo; margin: 0px 5px; font-size: 12px; color: #777; } + +.form-block.new-id .block-footer a:hover, +.form-block.static-page .block-footer a:hover, +.form-block.new-full .block-footer a:hover { text-decoration: none; } + +.form-block.new-id .block-footer div, +.form-block.new-full .block-footer div, +.form-block.static-page .block-footer div, +.form-block.comment-id .block-footer div { display: inline-block; } + +.form-block.new-id .block-footer .date, +.form-block.new-full .block-footer .date, +.form-block.static-page .block-footer .date, +.form-block.comment-id .block-footer .date { border-right: 1px solid #fff; padding-right: 10px; } + +.form-block.new-id .block-footer .time, +.form-block.new-full .block-footer .time, +.form-block.static-page .block-footer .time, +.form-block.comment-id .block-footer .time, +.form-block.comment-id .block-footer .login { border-right: 1px solid #fff; border-left: 1px solid #eee; margin-left: -3px; padding: 0px 10px; } +.form-block.comment-id .block-footer .login { border-right: 0px; padding-right: 0px; } + +.form-block.comment-id .block-footer .del-btn, +.form-block.comment-id .block-footer .edt-btn, +.form-block.comment-id .block-footer .get-btn { float: right; margin-left: 3px; } + +.form-block.new-id .block-footer .category, +.form-block.new-full .block-footer .category { border-left: 1px solid #eee; padding-left: 10px; margin-left: -3px; } + +.form-block.new-id .block-footer .comments, +.form-block.new-id .block-footer .views, +.form-block.new-full .block-footer .views { float: right; border-right: 1px solid #fff; padding-right: 10px; } +.form-block.new-id .block-footer .comments i, +.form-block.new-id .block-footer .views i, +.form-block.new-full .block-footer .views i { margin-right: 5px; margin-top: 0px; } + +.form-block.new-id .block-like, +.form-block.new-full .block-like { + float: right; +} +.form-block.new-id .block-like a, +.form-block.new-full .block-like a { opacity: 0.6; } +.form-block.new-id .block-like a:hover, +.form-block.new-full .block-like a:hover { opacity: 1; } +.form-block.new-id .block-like .likes, +.form-block.new-full .block-like .likes { margin-right: 10px; } + +.form-block.new-id .block-footer .readmore, +.form-block.static-page .block-footer .readmore, +.form-block.new-full .block-footer .readmore { float: right; border-left: 1px solid #eee; padding-left: 10px; } + +.form-block.new-id .new-id-content, +.form-block.static-page .static-content, +.form-block.new-full .new-full-content, +.form-block.comment-id .comment-id-content { margin: 10px; font-size: 12px; word-wrap: break-word; } + +.form-block.comment-id .comment-id-content .edit-from { + width: 98%; + max-width: 98%; + height: 80px; +} + +.form-block.new-id.attached{ background: #fbfbe1; border: 1px solid #fbeed5; } + +.form-block.new-id.attached .block-line{ border-top: 1px solid #f6e6c9; } + +.form-block.comment-list { background: #fff; border-style: dashed; } +.form-block.comment-id, +.form-block.comment-form { margin: 10px 20px; } + +.form-block.comment-form .comment-form-content textarea { + width: 98%; + max-width: 98%; + height: 100px; +} + +/* News - */ + +.profile .profile-content #tab2 { text-align: center; overflow: hidden; } + +.skin-block .profile-skin { width: 112px; height: 224px; background-position: 0px 0px; background-repeat: no-repeat; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.skin-block .profile-skin:hover { background-position: -112px 0px; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.skin-block { border: 1px solid #ccc; display: inline-block; margin-left: 10px; padding: 10px; border-radius: 4px; vertical-align: top; } +.profile-info { display: block; width: 100%; text-align: left; margin-top: 10px; } +.profile-info .info-line { padding: 5px 10px; font-family: Hattori-Hanzo; margin: 0px 20px; border-bottom: 1px dotted #ccc; font-size: 12px; } +.profile-info .info-line b { color: #888; } +.profile-info .info-line span { float: right; } + +.uploader-forms { display: inline-block; width: 70%; margin: auto; text-align: center; vertical-align: top; } +.uploader-forms .skin-uploader, +.uploader-forms .cloak-uploader { display: inline-block; vertical-align: top; margin: 0px 10px; width: 45%; } + +.uploader-forms .skin-uploader .file-inputs, +.uploader-forms .cloak-uploader .file-inputs { background: url("../img/uploader.png") no-repeat transparent center center; border: 1px dashed #ccc; height: 224px; padding: 10px; } + +.uploader-forms .skin-uploader button, +.uploader-forms .cloak-uploader button { display: block; margin: auto; margin-top: 5px; } + +.uploader-forms .skin-uploader .file-inputs:hover, +.uploader-forms .cloak-uploader .file-inputs:hover { background-color: #f2f2f2; } + +@media (min-width: 1200px){ + .uploader-forms .skin-uploader, + .uploader-forms .cloak-uploader { width: 44%; } + +} + +@media (max-width: 1200px){ + .uploader-forms .skin-uploader, + .uploader-forms .cloak-uploader { width: 40%; } + .mcr-debug {width: 300px; max-width: 300px; bottom: 40px; left: -420px; font-size: 10px; } + .mcr-debug .action { left: 420px; bottom: 50%; } + .mcr-debug.open a { margin-left: -100px; } + +} + +@media (min-width: 768px) and (max-width: 979px){ + .skin-block { margin: 0px; } + .uploader-forms { display: inline-block; margin: 0px; width: 60%; } + .uploader-forms .skin-uploader, + .uploader-forms .cloak-uploader { margin: 0px; width: 48%; } + + /* bootstrap toolbar fix for mobile platforms */ + .btn-toolbar .btn-group{ white-space: normal; } + .btn-toolbar .btn-group .btn { border-radius: 0px; } + .btn-toolbar .btn-group .btn:first-child{ margin-left: -1px; } +} + +@media (max-width: 979px){ + + .mcr-debug {width: 240px; max-width: 240px; bottom: 40px; left: -420px; font-size: 10px; } + .mcr-debug .action { left: 420px; bottom: 50%; } + .mcr-debug.open a { margin-left: -160px; } + +} + +@media (max-width: 767px){ + body > .navbar.navbar-fixed-top, + body > .jumbotron, + body > .bs-docs-social, + body > .navbar.navbar-fixed-bottom { margin-left: 0px; margin-right: 0px; } + .uploader-forms { display: inline-block; margin: 0px; width: 70%; } + .uploader-forms .skin-uploader, + .uploader-forms .cloak-uploader { margin: 0px; width: 48%; } + .uploader-forms .skin-uploader .file-inputs span, + .uploader-forms .cloak-uploader .file-inputs span { font-size: 10px; } + .uploader-forms .skin-uploader button, + .uploader-forms .cloak-uploader button { font-size: 12px; } + + .mcr-debug {width: 630px; max-width: 630px; bottom: 40px; left: -650px; font-size: 10px; } + .mcr-debug .action { left: 650px; bottom: 50%; } + .mcr-debug.open a { margin-left: 0px; } +} + +@media (max-width: 560px){ + + /* bootstrap toolbar fix for mobile platforms */ + .btn-toolbar .btn-group{ white-space: normal; } + .btn-toolbar .btn-group .btn { border-radius: 0px; } + .btn-toolbar .btn-group .btn:first-child{ margin-left: -1px; } + + .mcr-debug {width: 500px; max-width: 500px; bottom: 10px; left: -520px; font-size: 10px; } + .mcr-debug h4 { font-size: 18px; } + .mcr-debug .action { left: 520px; bottom: 50%; } + .mcr-debug.open a { margin-left: 0px; } + +} + +@media (max-width: 480px){ + .uploader-forms { margin-top: 5px; width: 100%; } + .uploader-forms .skin-uploader .file-inputs, + .uploader-forms .cloak-uploader .file-inputs { height: 120px; } + + .mcr-debug {width: 90%; max-width: 90%; bottom: 0px; left: -95%; font-size: 8px; } + .mcr-debug h4 { font-size: 16px; } + .mcr-debug .action { left: 100%; bottom: 50%; } + .mcr-debug.open a { margin-left: 0px; } +} + +@media (max-width: 380px){ + .mcr-debug h4 { font-size: 14px; } + .mcr-debug { font-size: 8px; line-height: 12px; width: 85%; max-width: 85%; bottom: 0px; left: -91%; font-size: 8px; } +} + +@media (max-width: 300px){ + .mcr-debug h4 { font-size: 12px; } + .mcr-debug { font-size: 6px; line-height: 10px; width: 85%; max-width: 85%; bottom: 0px; left: -93%; font-size: 8px; } +} + +.admin-menu-groups .navbar { margin-bottom: 10px; } +.admin-menu-groups .spl-body { margin-bottom: 10px; } + +.admin-menu-groups .navbar .spl-btn.opened:before, +.admin-menu-groups .navbar .spl-btn.closed:before { content: ""; display: inline-block; width: 12px; height: 8px; background: url("../img/spl-arrows.png") no-repeat; vertical-align: middle; margin-right: 5px; } +.admin-menu-groups .navbar .spl-btn.closed:before { background-position: 0px -8px; } +.admin-menu-groups ul li { text-align: center; display: inline-block; width: 100px; word-wrap: break-word; vertical-align: top; margin-bottom: 5px; } +.admin-menu-groups ul li a { text-decoration: none; } +.admin-menu-groups ul li .i-icon { display: block; width: 64px; height: 64px; margin: auto; opacity: 0.8; } +.admin-menu-groups ul li .i-icon:hover { opacity: 1; } + +.form-block.actions{ + padding: 10px; + height: 30px; +} + +.form-block.actions select { + margin-bottom: 0px; +} + +.form-block.actions > .right-act { + float: right; +} + +.form-block.actions > .right-act .input-append { + margin-bottom: 0px; +} + +.form-block.actions .pagination { + margin: 0px; + display: inline-block; + margin-bottom: 0px; + line-height: normal; + height: 30px; +} + +table.table th.action, +table.table td.action { text-align: right; } + +table.table th.action input[type="checkbox"], +table.table td.action input[type="checkbox"] { margin-top: 0px; margin-left: 10px; } + +.search-block > .search-block-id .search-selected { font-weight: bold; text-decoration: underline; color: #a00; } +.search-block > .search-block-id { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ddd; } +.search-block > .search-block-id > .title { font-size: 14px; margin-bottom: 8px; } + +.search-block > .search-block-id > .subinfo { margin-top: 8px; font-size: 12px; color: #666; } + +.menu-adm-change .menu-icon { display: inline-block; text-align: center; vertical-align: top; margin-bottom: 5px; } + +.menu-adm-change .menu-icon > .icon-img { display: block; width: 64px; height: 64px; background-repeat: no-repeat; background-position: top left; } + +.panel-menu-icons .element-icon { width: 32px; height: 32px; } + +.adm-info-main .thumbnails .thumbnail h3, +.adm-info-stats .thumbnails .thumbnail h3 { margin: 0px; margin-bottom: 10px; } + +.thumbnails > li.span12 { margin-left: 0px; } + +.adm-info-main .thumbnails .thumbnail .ajx-l { margin-top: 0px; } + +.adm-info-main .thumbnails .thumbnail .icon-ok { margin-top: 0px; } +.js-monitor > .monitor-id > .progress { position: relative; } +.js-monitor > .monitor-id > .progress > .stats { position: absolute; width: 100%; text-align: center; font-size: 12px; } + +.js-monitor > .monitor-id > .progress .bar { + position: relative; +} + + +.adm-info-modules .thumbnails > .span4 { + margin-left: 5px; + margin-right: 5px; +} + +.adm-info-modules .thumbnails .read-more { + margin-bottom: 5px; +} + +.adm-info-modules .thumbnails .title { + margin: 8px 0px; +} \ No newline at end of file diff --git a/upload/themes/default/css/jquery.datetimepicker.css b/upload/themes/default/css/jquery.datetimepicker.css new file mode 100644 index 0000000..198041d --- /dev/null +++ b/upload/themes/default/css/jquery.datetimepicker.css @@ -0,0 +1,418 @@ +.xdsoft_datetimepicker{ + box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506); + background: #FFFFFF; + border-bottom: 1px solid #BBBBBB; + border-left: 1px solid #CCCCCC; + border-right: 1px solid #CCCCCC; + border-top: 1px solid #CCCCCC; + color: #333333; + font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; + padding: 8px; + padding-left: 0; + padding-top: 2px; + position: absolute; + z-index: 9999; + -moz-box-sizing: border-box; + box-sizing: border-box; + display:none; +} + +.xdsoft_datetimepicker iframe { + position: absolute; + left: 0; + top: 0; + width: 75px; + height: 210px; + background: transparent; + border:none; +} +/*For IE8 or lower*/ +.xdsoft_datetimepicker button { + border:none !important; +} + +.xdsoft_noselect{ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} +.xdsoft_noselect::selection { background: transparent; } +.xdsoft_noselect::-moz-selection { background: transparent; } +.xdsoft_datetimepicker.xdsoft_inline{ + display: inline-block; + position: static; + box-shadow: none; +} +.xdsoft_datetimepicker *{ + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; + margin: 0; +} +.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{ + display:none; +} +.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active{ + display:block; +} +.xdsoft_datetimepicker .xdsoft_datepicker{ + width: 224px; + float:left; + margin-left:8px; +} +.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{ + width: 256px; +} +.xdsoft_datetimepicker .xdsoft_timepicker{ + width: 58px; + float:left; + text-align:center; + margin-left:8px; + margin-top: 0; +} +.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{ + margin-top:8px; + margin-bottom:3px +} +.xdsoft_datetimepicker .xdsoft_mounthpicker{ + position: relative; + text-align: center; +} + +.xdsoft_datetimepicker .xdsoft_label i, +.xdsoft_datetimepicker .xdsoft_prev, +.xdsoft_datetimepicker .xdsoft_next, +.xdsoft_datetimepicker .xdsoft_today_button{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC); +} + +.xdsoft_datetimepicker .xdsoft_label i{ + opacity:0.5; + background-position:-92px -19px; + display: inline-block; + width: 9px; + height: 20px; + vertical-align: middle; +} + +.xdsoft_datetimepicker .xdsoft_prev{ + float: left; + background-position:-20px 0; +} +.xdsoft_datetimepicker .xdsoft_today_button{ + float: left; + background-position:-70px 0; + margin-left:5px; +} + +.xdsoft_datetimepicker .xdsoft_next{ + float: right; + background-position: 0 0; +} + +.xdsoft_datetimepicker .xdsoft_next, +.xdsoft_datetimepicker .xdsoft_prev , +.xdsoft_datetimepicker .xdsoft_today_button{ + background-color: transparent; + background-repeat: no-repeat; + border: 0 none currentColor; + cursor: pointer; + display: block; + height: 30px; + opacity: 0.5; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + outline: medium none currentColor; + overflow: hidden; + padding: 0; + position: relative; + text-indent: 100%; + white-space: nowrap; + width: 20px; +} +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev, +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{ + float:none; + background-position:-40px -15px; + height: 15px; + width: 30px; + display: block; + margin-left:14px; + margin-top:7px; +} +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{ + background-position:-40px 0; + margin-bottom:7px; + margin-top: 0; +} +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{ + height:151px; + overflow:hidden; + border-bottom:1px solid #DDDDDD; +} +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{ + background: #F5F5F5; + border-top:1px solid #DDDDDD; + color: #666666; + font-size: 12px; + text-align: center; + border-collapse:collapse; + cursor:pointer; + border-bottom-width: 0; + height:25px; + line-height:25px; +} + +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{ + border-top-width: 0; +} +.xdsoft_datetimepicker .xdsoft_today_button:hover, +.xdsoft_datetimepicker .xdsoft_next:hover, +.xdsoft_datetimepicker .xdsoft_prev:hover { + opacity: 1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; +} +.xdsoft_datetimepicker .xdsoft_label{ + display: inline; + position: relative; + z-index: 9999; + margin: 0; + padding: 5px 3px; + font-size: 14px; + line-height: 20px; + font-weight: bold; + background-color: #fff; + float:left; + width:182px; + text-align:center; + cursor:pointer; +} +.xdsoft_datetimepicker .xdsoft_label:hover>span{ + text-decoration:underline; +} +.xdsoft_datetimepicker .xdsoft_label:hover i{ + opacity:1.0; +} +.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{ + border:1px solid #ccc; + position:absolute; + right: 0; + top:30px; + z-index:101; + display:none; + background:#fff; + max-height:160px; + overflow-y:hidden; +} +.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;} +.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;} +.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{ + color: #fff; + background: #ff8000; +} +.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{ + padding:2px 10px 2px 5px; + text-decoration:none !important; +} +.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ + background: #33AAFF; + box-shadow: #178FE5 0 1px 3px 0 inset; + color:#fff; + font-weight: 700; +} +.xdsoft_datetimepicker .xdsoft_month{ + width:100px; + text-align:right; +} +.xdsoft_datetimepicker .xdsoft_calendar{ + clear:both; +} +.xdsoft_datetimepicker .xdsoft_year{ + width: 48px; + margin-left: 5px; +} +.xdsoft_datetimepicker .xdsoft_calendar table{ + border-collapse:collapse; + width:100%; + +} +.xdsoft_datetimepicker .xdsoft_calendar td > div{ + padding-right:5px; +} +.xdsoft_datetimepicker .xdsoft_calendar th{ + height: 25px; +} +.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{ + width:14.2857142%; + background: #F5F5F5; + border:1px solid #DDDDDD; + color: #666666; + font-size: 12px; + text-align: right; + vertical-align: middle; + padding: 0; + border-collapse:collapse; + cursor:pointer; + height: 25px; +} +.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{ + width:12.5%; +} +.xdsoft_datetimepicker .xdsoft_calendar th{ + background: #F1F1F1; +} +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{ + color:#33AAFF; +} +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default, +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current, +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ + background: #33AAFF; + box-shadow: #178FE5 0 1px 3px 0 inset; + color:#fff; + font-weight: 700; +} +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month, +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled, +.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{ + opacity:0.5; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; +} +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{ + opacity:0.2; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; +} +.xdsoft_datetimepicker .xdsoft_calendar td:hover, +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{ + color: #fff !important; + background: #ff8000 !important; + box-shadow: none !important; +} +.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover, +.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover{ + color: inherit !important; + background: inherit !important; + box-shadow: inherit !important; +} +.xdsoft_datetimepicker .xdsoft_calendar th{ + font-weight: 700; + text-align: center; + color: #999; + cursor:default; +} +.xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;} +.xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;} +.xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;} + + +.xdsoft_time_box{ + position:relative; + border:1px solid #ccc; +} +.xdsoft_scrollbar >.xdsoft_scroller{ + background:#ccc !important; + height:20px; + border-radius:3px; +} +.xdsoft_scrollbar{ + position:absolute; + width:7px; + right: 0; + top: 0; + bottom: 0; + cursor:pointer; +} +.xdsoft_scroller_box{ +position:relative; +} + + +.xdsoft_datetimepicker.xdsoft_dark{ + box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506); + background: #000000; + border-bottom: 1px solid #444444; + border-left: 1px solid #333333; + border-right: 1px solid #333333; + border-top: 1px solid #333333; + color: #cccccc; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{ + border-bottom:1px solid #222222; +} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{ + background: #0a0a0a; + border-top:1px solid #222222; + color: #999999; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{ + background-color: #000; +} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{ + border:1px solid #333; + background:#000; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{ + color: #000; + background: #007fff; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ + background: #cc5500; + box-shadow: #b03e00 0 1px 3px 0 inset; + color:#000; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==); +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ + background: #0a0a0a; + border:1px solid #222222; + color: #999999; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ + background: #0e0e0e; +} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{ + color:#cc5500; +} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ + background: #cc5500; + box-shadow: #b03e00 0 1px 3px 0 inset; + color:#000; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover, +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{ + color: #000 !important; + background: #007fff !important; +} + +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ + color: #666; +} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;} +.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;} + + +.xdsoft_dark .xdsoft_time_box{ + border:1px solid #333; +} +.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{ + background:#333 !important; +} diff --git a/upload/themes/default/debug.html b/upload/themes/default/debug.html new file mode 100644 index 0000000..c92759a --- /dev/null +++ b/upload/themes/default/debug.html @@ -0,0 +1,14 @@ +
    + > +

    Отладка

    +
    Версия PHP:
    +
    Ошибки PHP:
    +
    Время загрузки страницы: сек.
    +
    Запросов к базе:
    +
    Ошибки базы:
    +
    Использовано памяти: / кб
    +
    Адрес скрипта:
    +
    Протокол:
    +
    Метод:
    +
    OS:
    +
    \ No newline at end of file diff --git a/upload/themes/default/default_sp/403.html b/upload/themes/default/default_sp/403.html new file mode 100644 index 0000000..95184c0 --- /dev/null +++ b/upload/themes/default/default_sp/403.html @@ -0,0 +1,9 @@ +
    +
    lng['b_403']; ?>
    +
    + +
    +

    lng['e_warn']; ?>

    +

    403 - lng['b_403']; ?>

    +
    +
    \ No newline at end of file diff --git a/upload/themes/default/default_sp/404.html b/upload/themes/default/default_sp/404.html new file mode 100644 index 0000000..a1917e8 --- /dev/null +++ b/upload/themes/default/default_sp/404.html @@ -0,0 +1,9 @@ +
    +
    lng['b_404']; ?>
    +
    + +
    +

    lng['e_warn']; ?>

    +

    404 - lng['b_404']; ?>

    +
    +
    \ No newline at end of file diff --git a/upload/themes/default/default_sp/advice.html b/upload/themes/default/default_sp/advice.html new file mode 100644 index 0000000..bef4663 --- /dev/null +++ b/upload/themes/default/default_sp/advice.html @@ -0,0 +1,9 @@ +
    +
    +
      +
    • + Совет: +
    • +
    +
    +
    \ No newline at end of file diff --git a/upload/themes/default/default_sp/advice.txt b/upload/themes/default/default_sp/advice.txt new file mode 100644 index 0000000..f2652f4 --- /dev/null +++ b/upload/themes/default/default_sp/advice.txt @@ -0,0 +1,3 @@ +Вы можете поменять скин персонажа в своем личном кабинете в разделе настроек. +Все рецепты крафта можно найти здесь - MC Wiki +Хочешь загрузить плащ, купи группу VIP игрок. \ No newline at end of file diff --git a/upload/themes/default/default_sp/bb-panel.html b/upload/themes/default/default_sp/bb-panel.html new file mode 100644 index 0000000..8ed99ee --- /dev/null +++ b/upload/themes/default/default_sp/bb-panel.html @@ -0,0 +1,35 @@ +
    +
    +
    + + B + i + S + u + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    \ No newline at end of file diff --git a/upload/themes/default/default_sp/smile-id.html b/upload/themes/default/default_sp/smile-id.html new file mode 100644 index 0000000..9149068 --- /dev/null +++ b/upload/themes/default/default_sp/smile-id.html @@ -0,0 +1 @@ + <?php echo $data['NAME']; ?> \ No newline at end of file diff --git a/upload/themes/default/fonts/Hattori-Hanzo.otf b/upload/themes/default/fonts/Hattori-Hanzo.otf new file mode 100644 index 0000000..8e5eb98 --- /dev/null +++ b/upload/themes/default/fonts/Hattori-Hanzo.otf Binary files differ diff --git a/upload/themes/default/fonts/MagistralC.otf b/upload/themes/default/fonts/MagistralC.otf new file mode 100644 index 0000000..3b97f2f --- /dev/null +++ b/upload/themes/default/fonts/MagistralC.otf Binary files differ diff --git a/upload/themes/default/global.html b/upload/themes/default/global.html new file mode 100644 index 0000000..9ebe828 --- /dev/null +++ b/upload/themes/default/global.html @@ -0,0 +1,101 @@ + + + + <?php echo $data['CFG']['s_name']; ?> — <?php echo $data['TITLE']; ?> + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +

    +

    +
    + + +
    +
    +
    +
    + + + +
    +
    +
    + +
    + + + +
    + + + +
    + + + + +
    + +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/upload/themes/default/header.html b/upload/themes/default/header.html new file mode 100644 index 0000000..9bd2f5b --- /dev/null +++ b/upload/themes/default/header.html @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/upload/themes/default/img/cacke.128.png b/upload/themes/default/img/cacke.128.png new file mode 100644 index 0000000..80ffa2c --- /dev/null +++ b/upload/themes/default/img/cacke.128.png Binary files differ diff --git a/upload/themes/default/img/glyphicons-halflings-white.png b/upload/themes/default/img/glyphicons-halflings-white.png new file mode 100644 index 0000000..3bf6484 --- /dev/null +++ b/upload/themes/default/img/glyphicons-halflings-white.png Binary files differ diff --git a/upload/themes/default/img/glyphicons-halflings.png b/upload/themes/default/img/glyphicons-halflings.png new file mode 100644 index 0000000..a996999 --- /dev/null +++ b/upload/themes/default/img/glyphicons-halflings.png Binary files differ diff --git a/upload/themes/default/img/loading.gif b/upload/themes/default/img/loading.gif new file mode 100644 index 0000000..aed0ea4 --- /dev/null +++ b/upload/themes/default/img/loading.gif Binary files differ diff --git a/upload/themes/default/img/mcvote.jpg b/upload/themes/default/img/mcvote.jpg new file mode 100644 index 0000000..e450888 --- /dev/null +++ b/upload/themes/default/img/mcvote.jpg Binary files differ diff --git a/upload/themes/default/img/spl-arrows.png b/upload/themes/default/img/spl-arrows.png new file mode 100644 index 0000000..37c896e --- /dev/null +++ b/upload/themes/default/img/spl-arrows.png Binary files differ diff --git a/upload/themes/default/img/uploader.png b/upload/themes/default/img/uploader.png new file mode 100644 index 0000000..2d7ed73 --- /dev/null +++ b/upload/themes/default/img/uploader.png Binary files differ diff --git a/upload/themes/default/js/admin/info-extensions.js b/upload/themes/default/js/admin/info-extensions.js new file mode 100644 index 0000000..bad52e5 --- /dev/null +++ b/upload/themes/default/js/admin/info-extensions.js @@ -0,0 +1,40 @@ +function load_extensions(){ + + $.ajax({ + url: "http://api.webmcr.loc/?do=extensions&limit=12", + beforeSend: function(){ $(".adm-info-modules .thumbnails").html($.mcr.loader); }, + dataType: "json", + success: function(json){ + $(".adm-info-modules .thumbnails").text(''); + + if(json.type=='success'){ + var len = json.data.length; + + for(var i = 0; i < len; i++){ + + var ar = json.data[i]; + + var btn_name = (ar.pay.status) ? 'Купить ('+ar.pay.price+' р.)' : 'Скачать'; + + $(".adm-info-modules .thumbnails").append('
  • '); + } + }else{ + $(".adm-info-modules .thumbnails").text(json.message); + } + } + }); +} + +$(function(){ + + if(!navigator.onLine){ notify("Ошибка!", "Отсутствует интернет-соединение", 1); return; } + + $(".adm-info-modules .thumbnails").html("∞"); + + load_extensions(); + +}); \ No newline at end of file diff --git a/upload/themes/default/js/admin/info-main.js b/upload/themes/default/js/admin/info-main.js new file mode 100644 index 0000000..8771334 --- /dev/null +++ b/upload/themes/default/js/admin/info-main.js @@ -0,0 +1,65 @@ +function load_last_version(){ + + $.ajax({ + url: "http://api.webmcr.loc/?do=versions&limit=1", + beforeSend: function(){ $("#api-engine-version").html($.mcr.loader); }, + dataType: "json", + success: function(json){ + data = json.data[0]; + if(json.type=='success'){ + $("#api-engine-version").text(data.title+' '+data.version); + }else{ + $("#api-engine-version").text(json.message); + } + } + }); +} + +function load_last_news(){ + + $.ajax({ + url: "http://api.webmcr.loc/?do=news&limit=1", + beforeSend: function(){ $("#api-engine-news").html($.mcr.loader); }, + dataType: "json", + success: function(json){ + data = json.data[0]; + if(json.type=='success'){ + $("#api-engine-news").html('

    '+data.title+'

    '+data.text+'

    '+data.created+'

    '); + }else{ + $("#api-engine-news").text(json.message); + } + } + }); +} + +function load_git_version(){ + $.getJSON("https://api.github.com/repos/qexyorg/WebMCR/releases", function(json){ + + if($.isEmptyObject(json)){ return; } + + $('#git-engine-version').html(''+json[0]['tag_name']+''); + }); +} + + +function load_git_dev_version(){ + $.getJSON("https://api.github.com/repos/qexyorg/WebMCR/tags", function(json){ + + if($.isEmptyObject(json)){ return; } + + $('#git-dev-version').html(''+json[0]['name']+''); + }); +} + +$(function(){ + + if(!navigator.onLine){ notify("Ошибка!", "Отсутствует интернет-соединение", 1); return; } + + $("#api-engine-news, #api-engine-version, #git-engine-version, #git-dev-version").html("∞"); + + load_last_news(); + load_last_version(); + load_git_version(); + load_git_dev_version(); + +}); \ No newline at end of file diff --git a/upload/themes/default/js/admin/permissions.js b/upload/themes/default/js/admin/permissions.js new file mode 100644 index 0000000..3df7574 --- /dev/null +++ b/upload/themes/default/js/admin/permissions.js @@ -0,0 +1,24 @@ +$(function(){ + $('#perm-type').on("change", function(){ + + switch($(this).val()){ + case 'boolean': + $('#perm-default').html(''); + break; + + case 'integer': + $('#perm-default').html(''); + break; + + case 'float': + $('#perm-default').html(''); + break; + + case 'string': + $('#perm-default').html(''); + break; + + default: return false; break; + } + }); +}); \ No newline at end of file diff --git a/upload/themes/default/js/bootstrap.file-input.js b/upload/themes/default/js/bootstrap.file-input.js new file mode 100644 index 0000000..332db9a --- /dev/null +++ b/upload/themes/default/js/bootstrap.file-input.js @@ -0,0 +1,129 @@ +/* + Bootstrap - File Input + ====================== + + This is meant to convert all file input tags into a set of elements that displays consistently in all browsers. + + Converts all + + into Bootstrap buttons + Browse + +*/ +(function($) { + +$.fn.bootstrapFileInput = function() { + + this.each(function(i,elem){ + + var $elem = $(elem); + + // Maybe some fields don't need to be standardized. + if (typeof $elem.attr('data-bfi-disabled') != 'undefined') { + return; + } + + // Set the word to be displayed on the button + var buttonWord = 'Browse'; + + if (typeof $elem.attr('title') != 'undefined') { + buttonWord = $elem.attr('title'); + } + + var className = ''; + + if (!!$elem.attr('class')) { + className = ' ' + $elem.attr('class'); + } + + // Now we're going to wrap that input field with a Bootstrap button. + // The input will actually still be there, it will just be float above and transparent (done with the CSS). + $elem.wrap('').parent().prepend($('').html(buttonWord)); + }) + + // After we have found all of the file inputs let's apply a listener for tracking the mouse movement. + // This is important because the in order to give the illusion that this is a button in FF we actually need to move the button from the file input under the cursor. Ugh. + .promise().done( function(){ + + // As the cursor moves over our new Bootstrap button we need to adjust the position of the invisible file input Browse button to be under the cursor. + // This gives us the pointer cursor that FF denies us + $('.file-input-wrapper').mousemove(function(cursor) { + + var input, wrapper, + wrapperX, wrapperY, + inputWidth, inputHeight, + cursorX, cursorY; + + // This wrapper element (the button surround this file input) + wrapper = $(this); + // The invisible file input element + input = wrapper.find("input"); + // The left-most position of the wrapper + wrapperX = wrapper.offset().left; + // The top-most position of the wrapper + wrapperY = wrapper.offset().top; + // The with of the browsers input field + inputWidth= input.width(); + // The height of the browsers input field + inputHeight= input.height(); + //The position of the cursor in the wrapper + cursorX = cursor.pageX; + cursorY = cursor.pageY; + + //The positions we are to move the invisible file input + // The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle + moveInputX = cursorX - wrapperX - inputWidth + 20; + // Slides the invisible input Browse button to be positioned middle under the cursor + moveInputY = cursorY- wrapperY - (inputHeight/2); + + // Apply the positioning styles to actually move the invisible file input + input.css({ + left:moveInputX, + top:moveInputY + }); + }); + + $('body').on('change', '.file-input-wrapper input[type=file]', function(){ + + var fileName; + fileName = $(this).val(); + + // Remove any previous file names + $(this).parent().next('.file-input-name').remove(); + if (!!$(this).prop('files') && $(this).prop('files').length > 1) { + fileName = $(this)[0].files.length+' files'; + } + else { + fileName = fileName.substring(fileName.lastIndexOf('\\') + 1, fileName.length); + } + + // Don't try to show the name if there is none + if (!fileName) { + return; + } + + var selectedFileNamePlacement = $(this).data('filename-placement'); + if (selectedFileNamePlacement === 'inside') { + // Print the fileName inside + $(this).siblings('span').html(fileName); + $(this).attr('title', fileName); + } else { + // Print the fileName aside (right after the the button) + $(this).parent().after(''+fileName+''); + } + }); + + }); + +}; + +// Add the styles before the first stylesheet +// This ensures they can be easily overridden with developer styles +var cssHtml = ''; +$('link[rel=stylesheet]').eq(0).before(cssHtml); + +})(jQuery); diff --git a/upload/themes/default/js/bootstrap.min.js b/upload/themes/default/js/bootstrap.min.js new file mode 100644 index 0000000..848258d --- /dev/null +++ b/upload/themes/default/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/*! +* Bootstrap.js by @fat & @mdo +* Copyright 2013 Twitter, Inc. +* http://www.apache.org/licenses/LICENSE-2.0.txt +*/ +!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('