From: dj3c1t Date: Sat, 8 Dec 2012 19:32:48 +0000 (+0100) Subject: maj syntaxe accolades, maj jQuery, correction layout contact X-Git-Tag: mtweb.0.4.3 X-Git-Url: http://git.dj3c1t.com/?p=mtweb;a=commitdiff_plain;h=29b6377f43bf4477e04b57069cf779ac1b913bdb maj syntaxe accolades, maj jQuery, correction layout contact --- diff --git a/readme.txt b/readme.txt index 2095e54..3966261 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ - mtweb 0.4.2 + mtweb 0.4.3 copyright dj3c1t 2012 programme en GNU/GPLv3 @@ -20,7 +20,7 @@ ce programme utilise, dans le dossier libs : http://www.jpfox.fr/?post/2007/10/24/190-un-petit-captcha-en-php - InputFilter, une class Php pour filtrer les balises et les attributs - HTML dangereux dans les description des sources + HTML dangereux http://www.phpclasses.org/inputfilter installation : @@ -28,7 +28,7 @@ installation : installation rapide : - - l'archive mtweb.tar.gz contient un dossier "web" + - l'archive mtweb..tar.gz contient un dossier "web" - uploadez le contenu de ce dossier a la racine de votre site - assurez-vous que Php a le droit d'ecrire dans le dossier "content" (et dans ses fichiers et sous-dossiers) @@ -61,6 +61,16 @@ http://mtweb.dj3c1t.com historique des modifications : ------------------------------ +0.4.3 : +------- + +8 Dec 2012 + +maj de syntaxe des accolades +correction de bug dans le layout pour le formulaire de contact +maj jQuery avec la version 1.8.3 + + 0.4.2 : ------- @@ -90,7 +100,7 @@ les plugins restent disponibles, mais via leur propre archive. version extraite de sourceML.0.13 ajout d'un systeme de plugins -l'appli gere aussi maintenant une arborescence de liens +l'application gere aussi maintenant une arborescence de liens changement de methode pour les surcharges. le dossier "app/local" disparait et le contenu du dossier "app/core" descent dans "app/" @@ -100,16 +110,16 @@ les surcharges se font maintenant avec les plugins. 0.3.2 : ------- -Utilisation d'un cache en RAM pour les donnees gerees en XML. +utilisation d'un cache en RAM pour les donnees gerees en XML. 0.3.1 : ------- -Ajout d'un exemple d'application, pour un agenda en ligne. +ajout d'un exemple d'application, pour un agenda en ligne. 0.3 : ----- -Cette version a ete extraite de la dernier version de sourceML (sourceML.0.10) +version extraite de sourceML.0.10 marche avec Mysql ou XML diff --git a/web/app/data/impl/mw_xml.php b/web/app/data/impl/mw_xml.php index b454cdd..53fa7f1 100644 --- a/web/app/data/impl/mw_xml.php +++ b/web/app/data/impl/mw_xml.php @@ -1,7 +1,6 @@ init_xml_env($host, $base, $user, $password); + function mw_xml($host, $base, $user, $password){ + $this->init_xml_env($host, $base, $user, $password); $this->EXTENTION_OK = true; } - function extention_ok(&$env) - { if($this->EXTENTION_OK) - { if - ( file_exists($env->app_file("data/impl/xml/mw_xml_data.php")) + function extention_ok(&$env){ + if($this->EXTENTION_OK){ + if( + file_exists($env->app_file("data/impl/xml/mw_xml_data.php")) && file_exists($env->app_file("data/impl/xml/mw_xml_data_handler.php")) - ) - { require $env->app_file("data/impl/xml/mw_xml_data.php"); + ){ + require $env->app_file("data/impl/xml/mw_xml_data.php"); require $env->app_file("data/impl/xml/mw_xml_data_handler.php"); - if - ( class_exists("mw_xml_data") + if( + class_exists("mw_xml_data") && class_exists("mw_xml_data_handler") - ) - { $this->xml_data = new mw_xml_data($this->host, $this->base); + ){ + $this->xml_data = new mw_xml_data($this->host, $this->base); } else $this->EXTENTION_OK = false; } @@ -41,8 +40,8 @@ return $this->EXTENTION_OK; } - function init_xml_env($host, $base, $user, $password) - { $this->host = $host.($host && substr($host, -1) != "/" ? "/" : ""); + function init_xml_env($host, $base, $user, $password){ + $this->host = $host.($host && substr($host, -1) != "/" ? "/" : ""); $this->base = $base.($base && substr($base, -1) != "/" ? "/" : ""); $this->user = $user; $this->password = $password; @@ -50,68 +49,68 @@ $this->last_data_handler = 0; } - function connect($host, $base, $user, $password) - { if($host.$base && is_dir($host.$base) && is_writable($host.$base)) - { $this->init_xml_env($host, $base, $user, $password); + function connect($host, $base, $user, $password){ + if($host.$base && is_dir($host.$base) && is_writable($host.$base)){ + $this->init_xml_env($host, $base, $user, $password); $this->xml_data = new mw_xml_data($this->host, $this->base); return true; } return null; } - function select_db($base) - { $this->base = $base.($base && substr($base, -1) != "/" ? "/" : ""); + function select_db($base){ + $this->base = $base.($base && substr($base, -1) != "/" ? "/" : ""); return $this->connect($this->host, $this->base, $this->user, $this->password); } - function data_exists($data_path) - { return is_dir($this->host.$this->base.$data_path); + function data_exists($data_path){ + return is_dir($this->host.$this->base.$data_path); } - function create_data($data_path) - { if(!is_dir($this->host.$this->base.$data_path)) @mkdir($this->host.$this->base.$data_path); - if(is_dir($this->host.$this->base.$data_path)) - { if($dh = $this->open_data($data_path, false)) - { $this->close_data($dh); + function create_data($data_path){ + if(!is_dir($this->host.$this->base.$data_path)) @mkdir($this->host.$this->base.$data_path); + if(is_dir($this->host.$this->base.$data_path)){ + if($dh = $this->open_data($data_path, false)){ + $this->close_data($dh); return true; } } return null; } - function get_data($data_path, $data_id) - { $dh = ++$this->last_data_handler; + function get_data($data_path, $data_id){ + $dh = ++$this->last_data_handler; $this->data_handlers[$dh] = new mw_xml_data_handler($this->xml_data, $data_path); - if($this->data_handlers[$dh]->open_data(false)) - { $res = $this->data_handlers[$dh]->get_data($data_id); + if($this->data_handlers[$dh]->open_data(false)){ + $res = $this->data_handlers[$dh]->get_data($data_id); $this->close_data($dh); return $res; } return null; } - function open_data($data_path, $FETCH = true) - { $dh = ++$this->last_data_handler; + function open_data($data_path, $FETCH = true){ + $dh = ++$this->last_data_handler; $this->data_handlers[$dh] = new mw_xml_data_handler($this->xml_data, $data_path); - if($this->data_handlers[$dh]->open_data($FETCH)) - { return $dh; + if($this->data_handlers[$dh]->open_data($FETCH)){ + return $dh; } $this->close_data($dh); return null; } - function fetch_data($dh) - { if(isset($this->data_handlers[$dh])) - { return $this->data_handlers[$dh]->fetch_assoc(); + function fetch_data($dh){ + if(isset($this->data_handlers[$dh])){ + return $this->data_handlers[$dh]->fetch_assoc(); } return false; } - function add_data($data_path, $data) - { $dh = ++$this->last_data_handler; + function add_data($data_path, $data){ + $dh = ++$this->last_data_handler; $this->data_handlers[$dh] = new mw_xml_data_handler($this->xml_data, $data_path); - if($this->data_handlers[$dh]->open_data(false)) - { $res = $this->data_handlers[$dh]->add_data($data); + if($this->data_handlers[$dh]->open_data(false)){ + $res = $this->data_handlers[$dh]->add_data($data); if($res) $res = $this->last_index($dh); $this->close_data($dh); return $res; @@ -119,50 +118,50 @@ return null; } - function last_index($dh) - { if(isset($this->data_handlers[$dh])) - { return $this->data_handlers[$dh]->last_index; + function last_index($dh){ + if(isset($this->data_handlers[$dh])){ + return $this->data_handlers[$dh]->last_index; } return null; } - function set_data($data_path, $data_id, $data) - { $dh = ++$this->last_data_handler; + function set_data($data_path, $data_id, $data){ + $dh = ++$this->last_data_handler; $this->data_handlers[$dh] = new mw_xml_data_handler($this->xml_data, $data_path); - if($this->data_handlers[$dh]->open_data(false)) - { $res = $this->data_handlers[$dh]->set_data($data_id.".xml", $data); + if($this->data_handlers[$dh]->open_data(false)){ + $res = $this->data_handlers[$dh]->set_data($data_id.".xml", $data); $this->close_data($dh); return $res; } return null; } - function del_data($data_path, $data_id) - { $dh = ++$this->last_data_handler; + function del_data($data_path, $data_id){ + $dh = ++$this->last_data_handler; $this->data_handlers[$dh] = new mw_xml_data_handler($this->xml_data, $data_path); - if($this->data_handlers[$dh]->open_data(false)) - { $res = $this->data_handlers[$dh]->del_data($data_id.".xml"); + if($this->data_handlers[$dh]->open_data(false)){ + $res = $this->data_handlers[$dh]->del_data($data_id.".xml"); $this->close_data($dh); return $res; } return null; } - function close_data($dh) - { if(isset($this->data_handlers[$dh])) - { $this->data_handlers[$dh]->close_data(); + function close_data($dh){ + if(isset($this->data_handlers[$dh])){ + $this->data_handlers[$dh]->close_data(); unset($this->data_handlers[$dh]); } } - function remove_data($data_path) - { $OK = strlen($data_path) > 0; - if($OK && is_dir($this->host.$this->base.$data_path) && is_writable($this->host.$this->base.$data_path)) - { $data_path .= substr($data_path, -1) == "/" ? "" : "/"; - if($dh = opendir($this->host.$this->base.$data_path)) - { while($OK && ($file = readdir($dh)) !== false) - { if(is_dir($this->host.$this->base.$data_path.$file)) - { if($file != "." && $file != "..") $OK = $this->remove_data($data_path.$file); + function remove_data($data_path){ + $OK = strlen($data_path) > 0; + if($OK && is_dir($this->host.$this->base.$data_path) && is_writable($this->host.$this->base.$data_path)){ + $data_path .= substr($data_path, -1) == "/" ? "" : "/"; + if($dh = opendir($this->host.$this->base.$data_path)){ + while($OK && ($file = readdir($dh)) !== false){ + if(is_dir($this->host.$this->base.$data_path.$file)){ + if($file != "." && $file != "..") $OK = $this->remove_data($data_path.$file); } else $OK = @unlink($this->host.$this->base.$data_path.$file); } diff --git a/web/app/data/impl/xml/mw_xml_data.php b/web/app/data/impl/xml/mw_xml_data.php index 628c0d2..0b6c8cd 100644 --- a/web/app/data/impl/xml/mw_xml_data.php +++ b/web/app/data/impl/xml/mw_xml_data.php @@ -1,7 +1,7 @@ host = $host.(substr($host, -1) != "/" ? "/" : ""); + function mw_xml_data($host, $base){ + $this->host = $host.(substr($host, -1) != "/" ? "/" : ""); $this->base = $base.(substr($base, -1) != "/" ? "/" : ""); $this->cache = array(); } - function host() { return $this->host; } - function base() { return $this->base; } + function host(){ + return $this->host; + } + + function base(){ + return $this->base; + } - function use_cache() { return true; } + function use_cache(){ + return true; + } - function set_cache($data_name, $data, $data_id) - { if($this->use_cache()) - { $this->cache[$data_name] = $data; + function set_cache($data_name, $data, $data_id){ + if($this->use_cache()){ + $this->cache[$data_name] = $data; $this->cache[$data_name]["id"] = $data_id; } } - function get_data($data_path, $data_id) - { $data_name = $this->data_name($data_path, $data_id); + function get_data($data_path, $data_id){ + $data_name = $this->data_name($data_path, $data_id); if(isset($this->cache[$data_name])) return $this->cache[$data_name]; - if($this->buffer = @file_get_contents($data_name)) - { if(($data = $this->parse_data()) !== false) - { $this->set_cache($data_name, $data, $data_id); + if($this->buffer = @file_get_contents($data_name)){ + if(($data = $this->parse_data()) !== false){ + $this->set_cache($data_name, $data, $data_id); $data["id"] = $data_id; return $data; } @@ -41,60 +48,60 @@ return false; } - function add_data($data_path, $data_id, $data) - { return $this->_set_data($data_path, $data_id, $data); + function add_data($data_path, $data_id, $data){ + return $this->_set_data($data_path, $data_id, $data); } - function set_data($data_path, $data_id, $data) - { return $this->_set_data($data_path, $data_id, $data); + function set_data($data_path, $data_id, $data){ + return $this->_set_data($data_path, $data_id, $data); } - function _set_data($data_path, $data_id, $data) - { if($fh = @fopen($this->data_name($data_path, $data_id), "w")) - { $this->buffer = $this->serialize_data($data); - if(@fwrite($fh, $this->buffer) !== false) - { @fclose($fh); + function _set_data($data_path, $data_id, $data){ + if($fh = @fopen($this->data_name($data_path, $data_id), "w")){ + $this->buffer = $this->serialize_data($data); + if(@fwrite($fh, $this->buffer) !== false){ + @fclose($fh); $this->buffer = null; $data_name = $this->data_name($data_path, $data_id); $this->set_cache($data_name, $data, $data_id); return $data_id; } - else - { @fclose($fh); + else{ + @fclose($fh); $this->buffer = null; } } return null; } - function del_data($data_path, $data_id) - { $data_name = $this->data_name($data_path, $data_id); + function del_data($data_path, $data_id){ + $data_name = $this->data_name($data_path, $data_id); if(isset($this->cache[$data_name])) unset($this->cache[$data_name]); return @unlink($this->data_name($data_path, $data_id)); } - function data_name($data_path, $data_id) - { return $this->host.$this->base.$data_path.$data_id.".xml"; + function data_name($data_path, $data_id){ + return $this->host.$this->base.$data_path.$data_id.".xml"; } - function parse_data() - { if(!isset($this->sxml)) $this->sxml = new sxml(); + function parse_data(){ + if(!isset($this->sxml)) $this->sxml = new sxml(); $this->sxml->parse($this->buffer); - if(isset($this->sxml->data["tuple"][0])) - { $this->buffer = $this->sxml->data["tuple"][0]; + if(isset($this->sxml->data["tuple"][0])){ + $this->buffer = $this->sxml->data["tuple"][0]; $v_rst = array(); - foreach($this->buffer["subs"] as $key => $value) - { $v_rst[$key] = $value[0]["data"]; + foreach($this->buffer["subs"] as $key => $value){ + $v_rst[$key] = $value[0]["data"]; } return $v_rst; } return false; } - function serialize_data($data) - { $this->buffer = "\n"; - foreach($data as $key => $value) - { if(isset($value)) $this->buffer .= " <".$key.">\n"; + function serialize_data($data){ + $this->buffer = "\n"; + foreach($data as $key => $value){ + if(isset($value)) $this->buffer .= " <".$key.">\n"; } $this->buffer .= "\n"; return $this->buffer; diff --git a/web/app/data/impl/xml/mw_xml_data_handler.php b/web/app/data/impl/xml/mw_xml_data_handler.php index fb9e267..446a264 100644 --- a/web/app/data/impl/xml/mw_xml_data_handler.php +++ b/web/app/data/impl/xml/mw_xml_data_handler.php @@ -1,93 +1,93 @@ xml_data = $xml_data; + function mw_xml_data_handler($xml_data, $data_path){ + $this->xml_data = $xml_data; $this->data_path = $data_path.(substr($data_path, -1) != "/" ? "/" : ""); } - function get_data($data_id) - { if(file_exists($this->xml_data->host().$this->xml_data->base().$this->data_path.$data_id.".xml")) - { return $this->xml_data->get_data($this->data_path, $data_id); + function get_data($data_id){ + if(file_exists($this->xml_data->host().$this->xml_data->base().$this->data_path.$data_id.".xml")){ + return $this->xml_data->get_data($this->data_path, $data_id); } return false; } - function open_data($FETCH = true) - { clearstatcache(); + function open_data($FETCH = true){ + clearstatcache(); $INDEX_OK = false; - if($this->xml_data->host() && $this->xml_data->base() && $this->data_path) - { if(is_dir($this->xml_data->host().$this->xml_data->base().$this->data_path) && is_writable($this->xml_data->host().$this->xml_data->base().$this->data_path)) - { if(!file_exists($this->xml_data->host().$this->xml_data->base().$this->data_path.".index")) - { if($fh = @fopen($this->xml_data->host().$this->xml_data->base().$this->data_path.".index", "w+")) - { if(@fwrite($fh, "0")) - { $this->last_index = 0; + if($this->xml_data->host() && $this->xml_data->base() && $this->data_path){ + if(is_dir($this->xml_data->host().$this->xml_data->base().$this->data_path) && is_writable($this->xml_data->host().$this->xml_data->base().$this->data_path)){ + if(!file_exists($this->xml_data->host().$this->xml_data->base().$this->data_path.".index")){ + if($fh = @fopen($this->xml_data->host().$this->xml_data->base().$this->data_path.".index", "w+")){ + if(@fwrite($fh, "0")){ + $this->last_index = 0; @fclose($fh); $INDEX_OK = true; } else @fclose($fh); } } - else - { if(($this->buffer = @file_get_contents($this->xml_data->host().$this->xml_data->base().$this->data_path.".index")) !== false) - { if(preg_match("/^[0-9]+$/", $this->buffer)) - { $this->last_index = (int)$this->buffer; + else{ + if(($this->buffer = @file_get_contents($this->xml_data->host().$this->xml_data->base().$this->data_path.".index")) !== false){ + if(preg_match("/^[0-9]+$/", $this->buffer)){ + $this->last_index = (int)$this->buffer; $INDEX_OK = true; } } } } } - if($INDEX_OK) - { if($FETCH) - { if($this->data_path_handler = @opendir($this->xml_data->host().$this->xml_data->base().$this->data_path)) - { return true; + if($INDEX_OK){ + if($FETCH){ + if($this->data_path_handler = @opendir($this->xml_data->host().$this->xml_data->base().$this->data_path)){ + return true; } - else - { $this->close_data(); + else{ + $this->close_data(); return null; } } else return true; } - else - { $this->close_data(); + else{ + $this->close_data(); return null; } } - function fetch_assoc() - { if($this->data_path_handler) - { $FORMAT_OK = false; - while(!$FORMAT_OK && ($data_file = @readdir($this->data_path_handler)) !== false) - { if(substr($data_file, 0, 1) != "." && substr($data_file, -4) == ".xml") $FORMAT_OK = true; + function fetch_assoc(){ + if($this->data_path_handler){ + $FORMAT_OK = false; + while(!$FORMAT_OK && ($data_file = @readdir($this->data_path_handler)) !== false){ + if(substr($data_file, 0, 1) != "." && substr($data_file, -4) == ".xml") $FORMAT_OK = true; } if($FORMAT_OK) return $this->xml_data->get_data($this->data_path, substr($data_file, 0, -4)); } return false; } - function add_data($data) - { $index = $this->inc_index(); - if(isset($index)) - { if(is_array($data)) return $this->xml_data->add_data($this->data_path, $index, $data); + function add_data($data){ + $index = $this->inc_index(); + if(isset($index)){ + if(is_array($data)) return $this->xml_data->add_data($this->data_path, $index, $data); } return null; } - function inc_index() - { clearstatcache(); - if(isset($this->last_index)) - { $index = $this->last_index + 1; - if($fh = @fopen($this->xml_data->host().$this->xml_data->base().$this->data_path.".index", "w+")) - { if(@fwrite($fh, (string)$index)) - { $this->last_index = $index; + function inc_index(){ + clearstatcache(); + if(isset($this->last_index)){ + $index = $this->last_index + 1; + if($fh = @fopen($this->xml_data->host().$this->xml_data->base().$this->data_path.".index", "w+")){ + if(@fwrite($fh, (string)$index)){ + $this->last_index = $index; @fclose($fh); return $index; } @@ -97,28 +97,28 @@ return null; } - function set_data($data_file, $data) - { if(preg_match("/^[0-9]+\.xml$/", $data_file)) - { if(is_writable($this->xml_data->host().$this->xml_data->base().$this->data_path.$data_file)) - { if(is_array($data)) - { return $this->xml_data->set_data($this->data_path, substr($data_file, 0, -4), $data); + function set_data($data_file, $data){ + if(preg_match("/^[0-9]+\.xml$/", $data_file)){ + if(is_writable($this->xml_data->host().$this->xml_data->base().$this->data_path.$data_file)){ + if(is_array($data)){ + return $this->xml_data->set_data($this->data_path, substr($data_file, 0, -4), $data); } } } return null; } - function del_data($data_file) - { if(preg_match("/^[0-9]+\.xml$/", $data_file)) - { if(is_file($this->xml_data->host().$this->xml_data->base().$this->data_path.$data_file)) - { return $this->xml_data->del_data($this->data_path, substr($data_file, 0, -4)); + function del_data($data_file){ + if(preg_match("/^[0-9]+\.xml$/", $data_file)){ + if(is_file($this->xml_data->host().$this->xml_data->base().$this->data_path.$data_file)){ + return $this->xml_data->del_data($this->data_path, substr($data_file, 0, -4)); } } return null; } - function close_data() - { $this->data_path= null; + function close_data(){ + $this->data_path= null; if($this->data_path_handler) @closedir($this->data_path_handler); $this->last_index = null; } diff --git a/web/app/data/modules/share/mw_data_check_instance.php b/web/app/data/modules/share/mw_data_check_instance.php index 772a093..b471eaa 100644 --- a/web/app/data/modules/share/mw_data_check_instance.php +++ b/web/app/data/modules/share/mw_data_check_instance.php @@ -1,10 +1,9 @@ $max_width || $img_infos[1] > $max_height) - { $r = $max_width / $img_infos[0]; + if($img_infos){ + if($img_infos[0] > $max_width || $img_infos[1] > $max_height){ + $r = $max_width / $img_infos[0]; if($r * $img_infos[1] > $max_height) $r = $max_height / $img_infos[1]; - return array - ( "width" => floor($r * $img_infos[0]), + return array( + "width" => floor($r * $img_infos[0]), "height" => floor($r * $img_infos[1]) ); } - return array - ( "width" => $img_infos[0], + return array( + "width" => $img_infos[0], "height" => $img_infos[1] ); } diff --git a/web/app/data/modules/share/mw_data_init.php b/web/app/data/modules/share/mw_data_init.php index ae4df81..1a74be4 100644 --- a/web/app/data/modules/share/mw_data_init.php +++ b/web/app/data/modules/share/mw_data_init.php @@ -1,17 +1,29 @@ env; } - function sgbd() { return $this->sgbd; } + function env(){ + return $this->env; + } + + function sgbd(){ + return $this->sgbd; + } + + function set_env(&$env){ + $this->env = &$env; + } - function set_env(&$env) { $this->env = &$env; } - function set_sgbd(&$sgbd) { $this->sgbd = &$sgbd; } + function set_sgbd(&$sgbd){ + $this->sgbd = &$sgbd; + } - function table_prefix() { return false; } + function table_prefix(){ + return false; + } } diff --git a/web/app/data/modules/share/mw_data_links.php b/web/app/data/modules/share/mw_data_links.php index 7af65db..d5f3287 100644 --- a/web/app/data/modules/share/mw_data_links.php +++ b/web/app/data/modules/share/mw_data_links.php @@ -1,26 +1,26 @@ links = array(); + function init_links(){ + $this->links = array(); return true; } - function load_link(&$links, $v_path, $url, $intitule = "", $position = 0) - { if($path_item = array_shift($v_path)) - { if(!isset($links[$path_item])) $links[$path_item] = array - ( "nom" => $path_item, + function load_link(&$links, $v_path, $url, $intitule = "", $position = 0){ + if($path_item = array_shift($v_path)){ + if(!isset($links[$path_item])) $links[$path_item] = array( + "nom" => $path_item, "url" => $v_path ? null : $url, "intitule" => $v_path ? null : $intitule, "subs" => array(), "position" => 0 ); if($v_path) $this->load_link($links[$path_item]["subs"], $v_path, $url, $intitule, $position); - else - { $links[$path_item]["nom"] = $path_item; + else{ + $links[$path_item]["nom"] = $path_item; $links[$path_item]["url"] = $url; $links[$path_item]["intitule"] = $intitule; $links[$path_item]["position"] = $position; @@ -28,13 +28,13 @@ } } - function valid_link_path($path) - { $v_path = explode("/", $path); + function valid_link_path($path){ + $v_path = explode("/", $path); $SYNTAX_OK = true; - foreach($v_path as $i => $path_item) - { if($path_item) - { if(!preg_match("/^[a-zA-Z]+[a-zA-Z0-9\-_\.]*$/", $path_item)) - { $SYNTAX_OK = false; + foreach($v_path as $i => $path_item){ + if($path_item){ + if(!preg_match("/^[a-zA-Z]+[a-zA-Z0-9\-_\.]*$/", $path_item)){ + $SYNTAX_OK = false; break; } } @@ -43,44 +43,44 @@ return $v_path && $SYNTAX_OK ? $v_path : false; } - function get_link($path = null) - { if(!isset($this->links)) $this->init_links(); - if($this->links !== false) - { if(!isset($path)) return $this->links; - if($v_path = $this->valid_link_path($path)) - { return $this->_get_link($this->links, $v_path); + function get_link($path = null){ + if(!isset($this->links)) $this->init_links(); + if($this->links !== false){ + if(!isset($path)) return $this->links; + if($v_path = $this->valid_link_path($path)){ + return $this->_get_link($this->links, $v_path); } } return false; } - function _get_link($links, $v_path) - { if($path_item = array_shift($v_path)) - { if(isset($links[$path_item])) - { if($v_path) return $this->_get_link($links[$path_item]["subs"], $v_path); + function _get_link($links, $v_path){ + if($path_item = array_shift($v_path)){ + if(isset($links[$path_item])){ + if($v_path) return $this->_get_link($links[$path_item]["subs"], $v_path); else return $links[$path_item]; } else return false; } } - function set_link($path, $url, $intitule = "", $position = 0) - { if(!isset($this->links)) $this->init_links(); - if($v_path = $this->valid_link_path($path)) - { $this->load_link($this->links, $v_path, $url, $intitule, $position); + function set_link($path, $url, $intitule = "", $position = 0){ + if(!isset($this->links)) $this->init_links(); + if($v_path = $this->valid_link_path($path)){ + $this->load_link($this->links, $v_path, $url, $intitule, $position); $this->links = $this->ordonne_links($this->links); } } - function ordonne_links($links) - { if(!is_array($links)) return false; + function ordonne_links($links){ + if(!is_array($links)) return false; $values = array_values($links); $maximum = count($values); - while($maximum > 0) - { $maximumTemporaire = 0; - for($i = 0; $i < $maximum - 1; $i++) - { if($values[$i]["position"] > $values[$i + 1]["position"]) - { $tmp = $values[$i]; + while($maximum > 0){ + $maximumTemporaire = 0; + for($i = 0; $i < $maximum - 1; $i++){ + if($values[$i]["position"] > $values[$i + 1]["position"]){ + $tmp = $values[$i]; $values[$i] = $values[$i + 1]; $values[$i + 1] = $tmp; $maximumTemporaire = $i + 1; diff --git a/web/app/data/modules/share/mw_data_out_config.php b/web/app/data/modules/share/mw_data_out_config.php index bdd8ead..173efbe 100644 --- a/web/app/data/modules/share/mw_data_out_config.php +++ b/web/app/data/modules/share/mw_data_out_config.php @@ -1,19 +1,18 @@ env(); + function out_config(){ + $env = $this->env(); $config = array(); - if($env->out_file_exists("config.xml")) - { if($this->buffer = file_get_contents($env->out_file("config.xml"))) - { if(!isset($this->sxml)) $this->sxml = new sxml(); + if($env->out_file_exists("config.xml")){ + if($this->buffer = file_get_contents($env->out_file("config.xml"))){ + if(!isset($this->sxml)) $this->sxml = new sxml(); $this->sxml->parse($this->buffer); $this->buffer = $this->sxml->data["config"][0]; - if($this->buffer["subs"]) foreach($this->buffer["subs"] as $key => $value) - { $config[$key] = array - ( "type" => $value[0]["attrs"]["type"], + if($this->buffer["subs"]) foreach($this->buffer["subs"] as $key => $value){ + $config[$key] = array( + "type" => $value[0]["attrs"]["type"], "default" => $value[0]["attrs"]["default"], "text" => $value[0]["data"] ); diff --git a/web/app/data/modules/share/mw_data_utils.php b/web/app/data/modules/share/mw_data_utils.php index 17ba22b..ab8ca17 100644 --- a/web/app/data/modules/share/mw_data_utils.php +++ b/web/app/data/modules/share/mw_data_utils.php @@ -1,47 +1,22 @@ 0) - { $maximumTemporaire = 0; - for($i = 0; $i < $maximum; $i++) - { if($values[$i][$key] > $values[$i + 1][$key]) - { $tmp = $values[$i]; - $values[$i] = $values[$i + 1]; - $values[$i + 1] = $tmp; - $maximumTemporaire = $i + 1; - } - } - $maximum = $maximumTemporaire; - } - $res = array(); - foreach($values as $value) if($value["id"]) $res[$value["id"]] = $value; - return $res; + function eq($content){ + return isset($content) ? "'".str_replace("'", "\'", $content)."'" : "NULL"; } - */ - function ordonne($list, $key, $order = "ASC") - { $values = array_values($list); + function ordonne($list, $key, $order = "ASC"){ + $values = array_values($list); $maximum = count($values); - while($maximum > 0) - { $maximumTemporaire = 0; - for($i = 0; $i < $maximum; $i++) - { if - ( ($order == "ASC" && $values[$i][$key] > $values[$i + 1][$key]) + while($maximum > 0){ + $maximumTemporaire = 0; + for($i = 0; $i < $maximum; $i++){ + if( + ($order == "ASC" && $values[$i][$key] > $values[$i + 1][$key]) || ($order == "DESC" && $values[$i][$key] < $values[$i + 1][$key]) - ) - { $tmp = $values[$i]; + ){ + $tmp = $values[$i]; $values[$i] = $values[$i + 1]; $values[$i + 1] = $tmp; $maximumTemporaire = $i + 1; @@ -54,14 +29,14 @@ return $res; } - function upload($image, $upload_dir) - { $file = ""; + function upload($image, $upload_dir){ + $file = ""; $upload_dir .= $upload_dir && (substr($upload_dir, -1) != "/") ? "/" : ""; - if($_FILES) - { if(isset($_FILES[$image])) - { if($_FILES[$image]["error"] == UPLOAD_ERR_OK) - { if(move_uploaded_file($_FILES[$image]["tmp_name"], $upload_dir.$_FILES[$image]["name"])) - { $file = $_FILES[$image]["name"]; + if($_FILES){ + if(isset($_FILES[$image])){ + if($_FILES[$image]["error"] == UPLOAD_ERR_OK){ + if(move_uploaded_file($_FILES[$image]["tmp_name"], $upload_dir.$_FILES[$image]["name"])){ + $file = $_FILES[$image]["name"]; } else $file = false; } diff --git a/web/app/data/modules/sql/mw_data_config.php b/web/app/data/modules/sql/mw_data_config.php index 280f5c1..0d6f4d2 100644 --- a/web/app/data/modules/sql/mw_data_config.php +++ b/web/app/data/modules/sql/mw_data_config.php @@ -1,13 +1,12 @@ sgbd(); + function config($key = null){ + $sgbd = $this->sgbd(); $value = false; - if(isset($key)) - { $sql = + if(isset($key)){ + $sql = "SELECT `value` FROM #--config" ." WHERE `key`=".$this->eq($key); $rst = $sgbd->query($sql); @@ -16,8 +15,8 @@ else $value = ""; $sgbd->free_result($rst); } - else - { $value = array(); + else{ + $value = array(); $sql = "SELECT * FROM #--config"; $rst = $sgbd->query($sql); @@ -28,8 +27,8 @@ return $value; } - function config_exists($key) - { $sgbd = $this->sgbd(); + function config_exists($key){ + $sgbd = $this->sgbd(); $exists = false; $sql = "SELECT count(*) as n FROM #--config" ." WHERE `key`=".$this->eq($key); @@ -40,8 +39,8 @@ return $exists; } - function set_config($key, $value) - { $sgbd = $this->sgbd(); + function set_config($key, $value){ + $sgbd = $this->sgbd(); if($this->config_exists($key)) $sql = "UPDATE #--config" ." SET `value`=".$this->eq($value) @@ -54,8 +53,8 @@ return true; } - function del_config($key) - { $sgbd = $this->sgbd(); + function del_config($key){ + $sgbd = $this->sgbd(); return $sgbd->query("DELETE FROM #--config WHERE `key`=".$this->eq($key)) ? true : false; } diff --git a/web/app/data/modules/sql/mw_data_users.php b/web/app/data/modules/sql/mw_data_users.php index b144ad6..cfa4fd9 100644 --- a/web/app/data/modules/sql/mw_data_users.php +++ b/web/app/data/modules/sql/mw_data_users.php @@ -1,7 +1,6 @@ sgbd(); + function users($start = 0, $alpha = null, $status = null){ + $sgbd = $this->sgbd(); $env = $this->env(); $users = array("list" => array(), "total" => 0); $SELECT = "SELECT *"; @@ -27,8 +26,8 @@ if(!isset($rst)) return false; if($v_rst = $sgbd->fetch_assoc($rst)) $users["total"] = $v_rst["n"]; $sgbd->free_result($rst); - if($users["total"] > 0) - { $sql = "SELECT * FROM(".$SELECT.$FROM.$WHERE.$LIMIT.") res"; + if($users["total"] > 0){ + $sql = "SELECT * FROM(".$SELECT.$FROM.$WHERE.$LIMIT.") res"; $rst = $sgbd->query($sql); if(!isset($rst)) return false; while($v_rst = $sgbd->fetch_assoc($rst)) $users["list"][$v_rst["id"]] = $v_rst; @@ -37,8 +36,8 @@ return $users; } - function user_by_id($id) - { $sgbd = $this->sgbd(); + function user_by_id($id){ + $sgbd = $this->sgbd(); $user = array(); $sql = "SELECT * from #--users WHERE id=".$this->eq($id); $rst = $sgbd->query($sql); @@ -48,8 +47,8 @@ return $user; } - function user($login) - { $sgbd = $this->sgbd(); + function user($login){ + $sgbd = $this->sgbd(); $user = array(); $sql = "SELECT * from #--users WHERE login=".$this->eq($login); $rst = $sgbd->query($sql); @@ -59,8 +58,8 @@ return $user; } - function user_exists($login) - { $sgbd = $this->sgbd(); + function user_exists($login){ + $sgbd = $this->sgbd(); $EXISTS = 0; $sql = "SELECT count(*) as n from #--users WHERE login=".$this->eq($login); $rst = $sgbd->query($sql); @@ -70,8 +69,8 @@ return $EXISTS; } - function add_user($login, $password, $email, $status) - { $sgbd = $this->sgbd(); + function add_user($login, $password, $email, $status){ + $sgbd = $this->sgbd(); $sql = "INSERT INTO #--users(login, password, email, status) VALUES" ."( ".$this->eq($login) @@ -82,8 +81,8 @@ return $sgbd->query($sql); } - function set_user($id, $login, $password, $email, $status) - { $sgbd = $this->sgbd(); + function set_user($id, $login, $password, $email, $status){ + $sgbd = $this->sgbd(); $sql = "UPDATE #--users SET" ." login=".$this->eq($login) @@ -94,8 +93,8 @@ return $sgbd->query($sql); } - function del_user($login) - { $sgbd = $this->sgbd(); + function del_user($login){ + $sgbd = $this->sgbd(); $sql = "DELETE FROM #--users WHERE login=".$this->eq($login); return $sgbd->query($sql); } @@ -104,13 +103,13 @@ # status # - function status() - { if(!isset($this->user_status)) return false; + function status(){ + if(!isset($this->user_status)) return false; return $this->user_status; } - function init_user_status($status = array()) - { $sgbd = $this->sgbd(); + function init_user_status($status = array()){ + $sgbd = $this->sgbd(); $this->user_status = array(); $sql = "SELECT * FROM #--user_status"; $rst = $sgbd->query($sql); @@ -120,8 +119,8 @@ return $this->user_status; } - function init_action_status($status = array()) - { if(!isset($this->user_status)) return false; + function init_action_status($status = array()){ + if(!isset($this->user_status)) return false; $sgbd = $this->sgbd(); $this->action_status = array(); $sql = "SELECT * FROM #--action_status"; @@ -132,14 +131,14 @@ return $this->action_status; } - function get_user_status() - { $user = $this->get_session_user(); + function get_user_status(){ + $user = $this->get_session_user(); if($user && isset($user["status"])) return $user["status"]; return 0; } - function get_action_status($mod, $controller = "index", $action = "index", $set_status = array()) - { $sgbd = $this->sgbd(); + function get_action_status($mod, $controller = "index", $action = "index", $set_status = array()){ + $sgbd = $this->sgbd(); $status = array(); $sql = "SELECT action, id_status" @@ -149,16 +148,16 @@ ." OR action=".$this->eq($mod."/".$controller."/".$action); $rst = $sgbd->query($sql); if(!isset($rst)) return false; - while($v_rst = $sgbd->fetch_assoc($rst)) - { if(!isset($status[$v_rst["action"]])) $status[$v_rst["action"]] = array(); + while($v_rst = $sgbd->fetch_assoc($rst)){ + if(!isset($status[$v_rst["action"]])) $status[$v_rst["action"]] = array(); $status[$v_rst["action"]][$v_rst["id_status"]] = true; } $sgbd->free_result($rst); return $status; } - function creation_default_status() - { $sgbd = $this->sgbd(); + function creation_default_status(){ + $sgbd = $this->sgbd(); $default_status = 0; $sql = "SELECT id FROM #--user_status WHERE creation_default=1 LIMIT 0,1"; $rst = $sgbd->query($sql); @@ -172,31 +171,31 @@ # log in / out # - function login($login, $password) - { if(($user = $this->user($login)) !== false) - { if($this->password_ok($user, $password)) - { if(!$this->set_session($user)) $user = false; + function login($login, $password){ + if(($user = $this->user($login)) !== false){ + if($this->password_ok($user, $password)){ + if(!$this->set_session($user)) $user = false; } - else - { $this->clear_session(); + else{ + $this->clear_session(); $user = array(); } } return $user; } - function logout() - { return $this->clear_session(); + function logout(){ + return $this->clear_session(); } - function user_ok($user) - { return + function user_ok($user){ + return strcmp(md5($user["password"].$_SESSION["id"]), $_SESSION["pass"]) == 0 && $_SESSION["ip"] == $_SERVER["REMOTE_ADDR"]; } - function password_ok($user, $password) - { return + function password_ok($user, $password){ + return strcmp(md5($user["password"].$_SESSION["id"]), $password) == 0 && $_SESSION["ip"] == $_SERVER["REMOTE_ADDR"]; } @@ -205,19 +204,19 @@ # session # - function load_session() - { session_start(); + function load_session(){ + session_start(); if(!isset($_SESSION["id"])) $this->clear_session(); - if - ( $user = - ( isset($_COOKIE["user"]) || isset($_SESSION["user"]) ? + if( + $user = ( + isset($_COOKIE["user"]) || isset($_SESSION["user"]) ? $this->user(isset($_COOKIE["user"]) ? $_COOKIE["user"] : $_SESSION["user"]) : array() ) - ) - { if(isset($_COOKIE["user"])) $this->set_session($user); - if(!$this->user_ok($user)) - { $this->clear_session(); + ){ + if(isset($_COOKIE["user"])) $this->set_session($user); + if(!$this->user_ok($user)){ + $this->clear_session(); $user = array(); } } @@ -225,15 +224,15 @@ return $user; } - function set_session($user) - { $_SESSION["user"] = $user["login"]; + function set_session($user){ + $_SESSION["user"] = $user["login"]; $_SESSION["pass"] = md5($user["password"].$_SESSION["id"]); $env = $this->env(); return setcookie("user", $user["login"], time() + (60 * 60 * 24 * 7), $env->path("web")); } - function clear_session() - { unset($_SESSION["user"]); + function clear_session(){ + unset($_SESSION["user"]); unset($_SESSION["pass"]); $_SESSION["ip"] = $_SERVER["REMOTE_ADDR"]; $_SESSION["id"] = md5(rand()); @@ -241,14 +240,16 @@ return setcookie("user", "", 0, $env->path("web")); } - function get_session_user() { return $this->_user; } + function get_session_user(){ + return $this->_user; + } # ---------------------------------------------------------------------------------------- # uploads # - function check_user_uploads_dir($user = null) - { $env = $this->env(); + function check_user_uploads_dir($user = null){ + $env = $this->env(); $user_dir = $env->path("content")."uploads/".(isset($user) ? $user : $this->_user["id"]); if(!file_exists($user_dir)) @mkdir($user_dir); return file_exists($user_dir); diff --git a/web/app/data/modules/xml/mw_data_config.php b/web/app/data/modules/xml/mw_data_config.php index 98d4607..359a16c 100644 --- a/web/app/data/modules/xml/mw_data_config.php +++ b/web/app/data/modules/xml/mw_data_config.php @@ -1,28 +1,27 @@ sgbd(); + function config($key = null){ + $sgbd = $this->sgbd(); $value = false; - if($rst = $sgbd->open_data("config")) - { if(isset($key)) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if($v_rst["key"] == $key) - { $value = $v_rst["value"]; + if($rst = $sgbd->open_data("config")){ + if(isset($key)){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if($v_rst["key"] == $key){ + $value = $v_rst["value"]; } } else $value = null; } } - else - { $value = array(); - while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(is_array($v_rst)) foreach($v_rst as $key => $_value) - { $value[$key] = $_value; + else{ + $value = array(); + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(is_array($v_rst)) foreach($v_rst as $key => $_value){ + $value[$key] = $_value; break; } } @@ -35,16 +34,16 @@ return $value; } - function config_exists($key) - { $sgbd = $this->sgbd(); + function config_exists($key){ + $sgbd = $this->sgbd(); $exists = 0; - if($rst = $sgbd->open_data("config")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(isset($v_rst[$key])) $exists++; + if($rst = $sgbd->open_data("config")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(isset($v_rst[$key])) $exists++; } - else - { $exists = false; + else{ + $exists = false; break; } } @@ -54,42 +53,42 @@ return $exists; } - function set_config($key, $value) - { $sgbd = $this->sgbd(); + function set_config($key, $value){ + $sgbd = $this->sgbd(); $FOUND = false; - if($rst = $sgbd->open_data("config")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(array_key_exists($key, $v_rst)) - { $FOUND = $sgbd->set_data("config", $v_rst["id"], array($key => $value)); + if($rst = $sgbd->open_data("config")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(array_key_exists($key, $v_rst)){ + $FOUND = $sgbd->set_data("config", $v_rst["id"], array($key => $value)); break; } } - else - { $FOUND = null; + else{ + $FOUND = null; break; } } $sgbd->close_data($rst); } else $FOUND = null; - if(isset($FOUND)) - { if($FOUND) return true; - else - { if($sgbd->add_data("config", array($key => $value))) return true; + if(isset($FOUND)){ + if($FOUND) return true; + else{ + if($sgbd->add_data("config", array($key => $value))) return true; } } return false; } - function del_config($key) - { $ids = array(); + function del_config($key){ + $ids = array(); $sgbd = $this->sgbd(); - if($rst = $sgbd->open_data("config")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(isset($v_rst[$key]) && isset($v_rst["id"])) - { $ids[] = $v_rst["id"]; + if($rst = $sgbd->open_data("config")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(isset($v_rst[$key]) && isset($v_rst["id"])){ + $ids[] = $v_rst["id"]; } } else $ids = false; diff --git a/web/app/data/modules/xml/mw_data_users.php b/web/app/data/modules/xml/mw_data_users.php index cc84872..30e1890 100644 --- a/web/app/data/modules/xml/mw_data_users.php +++ b/web/app/data/modules/xml/mw_data_users.php @@ -1,7 +1,6 @@ sgbd(); + function users($start = 0, $alpha = null, $status = null){ + $sgbd = $this->sgbd(); $env = $this->env(); $users = array("list" => array(), "total" => 0); $res = array(); - if($rst = $sgbd->open_data("users")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(!isset($alpha) || (isset($v_rst["login"]) && strtolower(substr($v_rst["login"], 0, 1)) == strtolower($alpha))) - { if(!isset($status) || (isset($v_rst["status"]) && $v_rst["status"] == $status)) - { $res[$v_rst["id"]] = $v_rst; + if($rst = $sgbd->open_data("users")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(!isset($alpha) || (isset($v_rst["login"]) && strtolower(substr($v_rst["login"], 0, 1)) == strtolower($alpha))){ + if(!isset($status) || (isset($v_rst["status"]) && $v_rst["status"] == $status)){ + $res[$v_rst["id"]] = $v_rst; $users["total"]++; } } } - else - { $res = false; + else{ + $res = false; break; } } $sgbd->close_data($rst); - if($res !== false) - { $n = 0; - foreach($res as $id_user => $user) - { $n++; - if(!$env->config("max_list") || ($n > $start && $n <= ($start + $env->config("max_list")))) - { $users["list"][$user["id"]] = $user; + if($res !== false){ + $n = 0; + foreach($res as $id_user => $user){ + $n++; + if(!$env->config("max_list") || ($n > $start && $n <= ($start + $env->config("max_list")))){ + $users["list"][$user["id"]] = $user; if(!isset($this->users)) $this->users = array(); $this->users[$user["id"]] = $user; } @@ -50,24 +49,24 @@ return $users; } - function user_by_id($id) - { if(!isset($this->users)) $this->users = array(); + function user_by_id($id){ + if(!isset($this->users)) $this->users = array(); if(isset($this->users[$id])) return $this->users[$id]; $sgbd = $this->sgbd(); - if(($user = $sgbd->get_data("users", $id)) !== false) - { $this->users[$id] = $user; + if(($user = $sgbd->get_data("users", $id)) !== false){ + $this->users[$id] = $user; } return $user; } - function user($login) - { $sgbd = $this->sgbd(); + function user($login){ + $sgbd = $this->sgbd(); $user = array(); - if($rst = $sgbd->open_data("users")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(isset($v_rst["login"]) && $v_rst["login"] == $login) - { $user = $v_rst; + if($rst = $sgbd->open_data("users")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(isset($v_rst["login"]) && $v_rst["login"] == $login){ + $user = $v_rst; break; } } @@ -76,25 +75,25 @@ $sgbd->close_data($rst); } else $user = false; - if($user !== false) - { if(!isset($this->users)) $this->users = array(); + if($user !== false){ + if(!isset($this->users)) $this->users = array(); $this->users[$user["id"]] = $user; } return $user; } - function user_exists($login) - { $sgbd = $this->sgbd(); + function user_exists($login){ + $sgbd = $this->sgbd(); $EXISTS = 0; - if($rst = $sgbd->open_data("users")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(isset($v_rst["login"]) && $v_rst["login"] == $login) - { $EXISTS++; + if($rst = $sgbd->open_data("users")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(isset($v_rst["login"]) && $v_rst["login"] == $login){ + $EXISTS++; } } - else - { $EXISTS = false; + else{ + $EXISTS = false; break; } } @@ -104,12 +103,12 @@ return $EXISTS; } - function add_user($login, $password, $email, $status) - { $sgbd = $this->sgbd(); - return $sgbd->add_data - ( "users", - array - ( "login" => $login, + function add_user($login, $password, $email, $status){ + $sgbd = $this->sgbd(); + return $sgbd->add_data( + "users", + array( + "login" => $login, "password" => $password, "email" => $email, "status" => $status @@ -117,13 +116,13 @@ ); } - function set_user($id, $login, $password, $email, $status) - { $sgbd = $this->sgbd(); - return $sgbd->set_data - ( "users", + function set_user($id, $login, $password, $email, $status){ + $sgbd = $this->sgbd(); + return $sgbd->set_data( + "users", $id, - array - ( "login" => $login, + array( + "login" => $login, "password" => $password, "email" => $email, "status" => $status @@ -131,9 +130,9 @@ ); } - function del_user($login) - { if(($user = $this->user($login)) !== false) - { $sgbd = $this->sgbd(); + function del_user($login){ + if(($user = $this->user($login)) !== false){ + $sgbd = $this->sgbd(); return $sgbd->del_data("users", $user["id"]); } return false; @@ -143,114 +142,128 @@ # status # - function status() - { if(!isset($this->user_status)) return false; + function status(){ + if(!isset($this->user_status)) return false; return $this->user_status; } - function init_user_status($status = array()) - { $sgbd = $this->sgbd(); + function init_user_status($status = array()){ + $sgbd = $this->sgbd(); $this->user_status = array(); - if($rst = $sgbd->open_data("user_status")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { $this->user_status[$v_rst["id"]] = $v_rst; + if($rst = $sgbd->open_data("user_status")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + $this->user_status[$v_rst["id"]] = $v_rst; } - else - { $this->user_status = false; + else{ + $this->user_status = false; break; } } $sgbd->close_data($rst); } else $this->user_status = false; - if($status && $this->user_status !== false) - { foreach($status as $new_user_status) - { $id_status = false; - foreach($this->user_status as $user_status) if($new_user_status["nom"] == $user_status["nom"]) - { $id_status = $user_status["id"]; + if($status && $this->user_status !== false){ + foreach($status as $new_user_status){ + $id_status = false; + foreach($this->user_status as $user_status) if($new_user_status["nom"] == $user_status["nom"]){ + $id_status = $user_status["id"]; break; } - if($id_status) - { $SAME = true; - foreach($new_user_status as $status_key => $status_value) - { if(!isset($this->user_status[$id_status][$status_key]) || $this->user_status[$id_status][$status_key] != $status_value) - { $SAME = false; break; + if($id_status){ + $SAME = true; + foreach($new_user_status as $status_key => $status_value){ + if(!isset($this->user_status[$id_status][$status_key]) || $this->user_status[$id_status][$status_key] != $status_value){ + $SAME = false; + break; } } - if(!$SAME) - { if($sgbd->set_data("user_status", $id_status, $new_user_status)) $this->user_status[$id_status] = $new_user_status; - else { $this->user_status = false; break; } + if(!$SAME){ + if($sgbd->set_data("user_status", $id_status, $new_user_status)) $this->user_status[$id_status] = $new_user_status; + else{ + $this->user_status = false; + break; + } } } - else - { if($id_status = $sgbd->add_data("user_status", $new_user_status)) $this->user_status[$id_status] = $new_user_status; - else { $this->user_status = false; break; } + else{ + if($id_status = $sgbd->add_data("user_status", $new_user_status)) $this->user_status[$id_status] = $new_user_status; + else{ + $this->user_status = false; + break; + } } } } return $this->user_status; } - function init_action_status($status = array()) - { if(!isset($this->user_status)) return false; + function init_action_status($status = array()){ + if(!isset($this->user_status)) return false; $sgbd = $this->sgbd(); $this->action_status = array(); - if($rst = $sgbd->open_data("action_status")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { $this->action_status[$v_rst["id"]] = $v_rst; + if($rst = $sgbd->open_data("action_status")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + $this->action_status[$v_rst["id"]] = $v_rst; } - else - { $this->action_status = false; + else{ + $this->action_status = false; break; } } $sgbd->close_data($rst); } else $this->action_status = false; - if($status && $this->action_status !== false) - { $STATUS_OK = true; - foreach($status as $id_new_action_status => $new_action_status) - { $FOUND = $new_action_status["id_status"] == "0"; - if(!$FOUND) foreach($this->user_status as $user_status) - { if($new_action_status["id_status"] == $user_status["nom"]) - { $FOUND = true; + if($status && $this->action_status !== false){ + $STATUS_OK = true; + foreach($status as $id_new_action_status => $new_action_status){ + $FOUND = $new_action_status["id_status"] == "0"; + if(!$FOUND) foreach($this->user_status as $user_status){ + if($new_action_status["id_status"] == $user_status["nom"]){ + $FOUND = true; $status[$id_new_action_status]["id_status"] = $user_status["id"]; } } - if(!$FOUND) - { $STATUS_OK = false; + if(!$FOUND){ + $STATUS_OK = false; break; } } - if($STATUS_OK) - { foreach($status as $new_action_status) - { $id_status = false; - foreach($this->action_status as $action_status) - { if - ( $new_action_status["action"] == $action_status["action"] + if($STATUS_OK){ + foreach($status as $new_action_status){ + $id_status = false; + foreach($this->action_status as $action_status){ + if( + $new_action_status["action"] == $action_status["action"] && $new_action_status["id_status"] == $action_status["id_status"] - ) - { $id_status = $action_status["id"]; + ){ + $id_status = $action_status["id"]; break; } } - if($id_status) - { $SAME = true; - foreach($new_action_status as $status_key => $status_value) - { if(!isset($this->action_status[$id_status][$status_key]) || $this->action_status[$id_status][$status_key] != $status_value) - { $SAME = false; break; + if($id_status){ + $SAME = true; + foreach($new_action_status as $status_key => $status_value){ + if(!isset($this->action_status[$id_status][$status_key]) || $this->action_status[$id_status][$status_key] != $status_value){ + $SAME = false; + break; } } - if(!$SAME) - { if($id_status = $sgbd->add_data("action_status", $new_action_status)) $this->action_status[$id_status] = $new_action_status; - else { $this->action_status = false; break; } + if(!$SAME){ + if($id_status = $sgbd->add_data("action_status", $new_action_status)) $this->action_status[$id_status] = $new_action_status; + else{ + $this->action_status = false; + break; + } } } - else - { if($id_status = $sgbd->add_data("action_status", $new_action_status)) $this->action_status[$id_status] = $new_action_status; - else { $this->action_status = false; break; } + else{ + if($id_status = $sgbd->add_data("action_status", $new_action_status)) $this->action_status[$id_status] = $new_action_status; + else{ + $this->action_status = false; + break; + } } } } @@ -259,23 +272,23 @@ return $this->action_status; } - function get_user_status() - { $user = $this->get_session_user(); + function get_user_status(){ + $user = $this->get_session_user(); if($user && isset($user["status"])) return $user["status"]; return 0; } - function get_action_status($mod, $controller = "index", $action = "index", $set_status = array()) - { $sgbd = $this->sgbd(); - if($rst = $sgbd->open_data("action_status")) - { while($status !==false && $v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst) && isset($v_rst["action"]) && isset($v_rst["id_status"])) - { if - ( $v_rst["action"] == $mod + function get_action_status($mod, $controller = "index", $action = "index", $set_status = array()){ + $sgbd = $this->sgbd(); + if($rst = $sgbd->open_data("action_status")){ + while($status !==false && $v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst) && isset($v_rst["action"]) && isset($v_rst["id_status"])){ + if( + $v_rst["action"] == $mod || $v_rst["action"] == $mod."/".$controller || $v_rst["action"] == $mod."/".$controller."/".$action - ) - { if(!isset($status[$v_rst["action"]])) $status[$v_rst["action"]] = array(); + ){ + if(!isset($status[$v_rst["action"]])) $status[$v_rst["action"]] = array(); $status[$v_rst["action"]][$v_rst["id_status"]] = true; } } @@ -284,29 +297,36 @@ $sgbd->close_data($rst); } else $status = false; - if($status !== false) - { if($set_status) - { foreach($set_status as $new_action_status) - { $id_status = false; - foreach($status as $user_status) if($new_user_status["nom"] == $user_status["nom"]) - { $id_status = $user_status["id"]; + if($status !== false){ + if($set_status){ + foreach($set_status as $new_action_status){ + $id_status = false; + foreach($status as $user_status) if($new_user_status["nom"] == $user_status["nom"]){ + $id_status = $user_status["id"]; break; } - if($id_status) - { $SAME = true; - foreach($new_user_status as $status_key => $status_value) - { if(!isset($status[$id_status][$status_key]) || $status[$id_status][$status_key] != $status_value) - { $SAME = false; break; + if($id_status){ + $SAME = true; + foreach($new_user_status as $status_key => $status_value){ + if(!isset($status[$id_status][$status_key]) || $status[$id_status][$status_key] != $status_value){ + $SAME = false; + break; } } - if(!$SAME) - { if($sgbd->set_data("user_status", $id_status, $new_user_status)) $status[$id_status] = $new_user_status; - else { $status = false; break; } + if(!$SAME){ + if($sgbd->set_data("user_status", $id_status, $new_user_status)) $status[$id_status] = $new_user_status; + else{ + $status = false; + break; + } } } - else - { if($id_status = $sgbd->add_data("user_status", $new_user_status)) $status[$id_status] = $new_user_status; - else { $status = false; break; } + else{ + if($id_status = $sgbd->add_data("user_status", $new_user_status)) $status[$id_status] = $new_user_status; + else{ + $status = false; + break; + } } } } @@ -314,19 +334,19 @@ return $status; } - function creation_default_status() - { $sgbd = $this->sgbd(); + function creation_default_status(){ + $sgbd = $this->sgbd(); $default_status = 0; - if($rst = $sgbd->open_data("user_status")) - { while($v_rst = $sgbd->fetch_data($rst)) - { if(isset($v_rst)) - { if(isset($v_rst["creation_default"]) && $v_rst["creation_default"] == 1) - { $default_status = $v_rst["id"]; + if($rst = $sgbd->open_data("user_status")){ + while($v_rst = $sgbd->fetch_data($rst)){ + if(isset($v_rst)){ + if(isset($v_rst["creation_default"]) && $v_rst["creation_default"] == 1){ + $default_status = $v_rst["id"]; break; } } - else - { $default_status = false; + else{ + $default_status = false; break; } } @@ -340,31 +360,31 @@ # log in / out # - function login($login, $password) - { if(($user = $this->user($login)) !== false) - { if($this->password_ok($user, $password)) - { if(!$this->set_session($user)) $user = false; + function login($login, $password){ + if(($user = $this->user($login)) !== false){ + if($this->password_ok($user, $password)){ + if(!$this->set_session($user)) $user = false; } - else - { $this->clear_session(); + else{ + $this->clear_session(); $user = array(); } } return $user; } - function logout() - { return $this->clear_session(); + function logout(){ + return $this->clear_session(); } - function user_ok($user) - { return + function user_ok($user){ + return strcmp(md5($user["password"].$_SESSION["id"]), $_SESSION["pass"]) == 0 && $_SESSION["ip"] == $_SERVER["REMOTE_ADDR"]; } - function password_ok($user, $password) - { return + function password_ok($user, $password){ + return strcmp(md5($user["password"].$_SESSION["id"]), $password) == 0 && $_SESSION["ip"] == $_SERVER["REMOTE_ADDR"]; } @@ -373,19 +393,19 @@ # session # - function load_session() - { session_start(); + function load_session(){ + session_start(); if(!isset($_SESSION["id"])) $this->clear_session(); - if - ( $user = - ( isset($_COOKIE["user"]) || isset($_SESSION["user"]) ? + if( + $user = ( + isset($_COOKIE["user"]) || isset($_SESSION["user"]) ? $this->user(isset($_COOKIE["user"]) ? $_COOKIE["user"] : $_SESSION["user"]) : array() ) - ) - { if(isset($_COOKIE["user"])) $this->set_session($user); - if(!$this->user_ok($user)) - { $this->clear_session(); + ){ + if(isset($_COOKIE["user"])) $this->set_session($user); + if(!$this->user_ok($user)){ + $this->clear_session(); $user = array(); } } @@ -393,15 +413,15 @@ return $user; } - function set_session($user) - { $_SESSION["user"] = $user["login"]; + function set_session($user){ + $_SESSION["user"] = $user["login"]; $_SESSION["pass"] = md5($user["password"].$_SESSION["id"]); $env = $this->env(); return setcookie("user", $user["login"], time() + (60 * 60 * 24 * 7), $env->path("web")); } - function clear_session() - { unset($_SESSION["user"]); + function clear_session(){ + unset($_SESSION["user"]); unset($_SESSION["pass"]); $_SESSION["ip"] = $_SERVER["REMOTE_ADDR"]; $_SESSION["id"] = md5(rand()); @@ -409,14 +429,16 @@ return setcookie("user", "", 0, $env->path("web")); } - function get_session_user() { return $this->_user; } + function get_session_user(){ + return $this->_user; + } # ---------------------------------------------------------------------------------------- # uploads # - function check_user_uploads_dir($user = null) - { $env = $this->env(); + function check_user_uploads_dir($user = null){ + $env = $this->env(); $user_dir = $env->path("content")."uploads/".(isset($user) ? $user : $this->_user["id"]); if(!file_exists($user_dir)) @mkdir($user_dir); return file_exists($user_dir); diff --git a/web/app/data/mw_data.php b/web/app/data/mw_data.php index c08fbb1..76fc2be 100644 --- a/web/app/data/mw_data.php +++ b/web/app/data/mw_data.php @@ -1,8 +1,6 @@ \ No newline at end of file diff --git a/web/app/data/mw_sgbd.php b/web/app/data/mw_sgbd.php index 432ff33..db65b2e 100644 --- a/web/app/data/mw_sgbd.php +++ b/web/app/data/mw_sgbd.php @@ -1,107 +1,109 @@ sgbd_impl = $sgbd_impl; + function mw_sgbd($sgbd_impl, $env){ + $this->sgbd_impl = $sgbd_impl; $this->env = $env; } - function extention_ok() { return $this->sgbd_impl->extention_ok($this->env); } + function extention_ok(){ + return $this->sgbd_impl->extention_ok($this->env); + } - function connect($host, $base, $user, $password) - { return $this->sgbd_impl->connect($host, $base, $user, $password); + function connect($host, $base, $user, $password){ + return $this->sgbd_impl->connect($host, $base, $user, $password); } - function select_db($db_name) - { return $this->sgbd_impl->select_db($db_name); + function select_db($db_name){ + return $this->sgbd_impl->select_db($db_name); } # --------------------------------------------------------------------------------- # SQL # - function table_exists($table_name) - { return $this->sgbd_impl->table_exists - ( ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? + function table_exists($table_name){ + return $this->sgbd_impl->table_exists( + ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $table_name) : $table_name ); } - function query($sql) - { return $this->sgbd_impl->query - ( ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? + function query($sql){ + return $this->sgbd_impl->query( + ($prefix_codes = array_keys($this->env->bdd("table_prefix"))) ? str_replace($prefix_codes, array_values($this->env->bdd("table_prefix")), $sql) : $sql ); } - function insert_id() - { return $this->sgbd_impl->insert_id(); + function insert_id(){ + return $this->sgbd_impl->insert_id(); } - function fetch_assoc($rst) - { return $this->sgbd_impl->fetch_assoc($rst); + function fetch_assoc($rst){ + return $this->sgbd_impl->fetch_assoc($rst); } - function free_result($rst) - { return $this->sgbd_impl->free_result($rst); + function free_result($rst){ + return $this->sgbd_impl->free_result($rst); } - function close() - { return $this->sgbd_impl->close(); + function close(){ + return $this->sgbd_impl->close(); } # --------------------------------------------------------------------------------- # XML # - function data_exists($data_path) - { return $this->sgbd_impl->data_exists($data_path); + function data_exists($data_path){ + return $this->sgbd_impl->data_exists($data_path); } - function create_data($data_path) - { return $this->sgbd_impl->create_data($data_path); + function create_data($data_path){ + return $this->sgbd_impl->create_data($data_path); } - function get_data($data_path, $data_id) - { return $this->sgbd_impl->get_data($data_path, $data_id); + function get_data($data_path, $data_id){ + return $this->sgbd_impl->get_data($data_path, $data_id); } - function open_data($data_path, $FETCH = true) - { return $this->sgbd_impl->open_data($data_path, $FETCH); + function open_data($data_path, $FETCH = true){ + return $this->sgbd_impl->open_data($data_path, $FETCH); } - function fetch_data($dh) - { return $this->sgbd_impl->fetch_data($dh); + function fetch_data($dh){ + return $this->sgbd_impl->fetch_data($dh); } - function add_data($data_path, $data) - { return $this->sgbd_impl->add_data($data_path, $data); + function add_data($data_path, $data){ + return $this->sgbd_impl->add_data($data_path, $data); } - function last_index($dh) - { return $this->sgbd_impl->last_index($dh); + function last_index($dh){ + return $this->sgbd_impl->last_index($dh); } - function set_data($data_path, $data_id, $data) - { return $this->sgbd_impl->set_data($data_path, $data_id, $data); + function set_data($data_path, $data_id, $data){ + return $this->sgbd_impl->set_data($data_path, $data_id, $data); } - function del_data($data_path, $data_id) - { return $this->sgbd_impl->del_data($data_path, $data_id); + function del_data($data_path, $data_id){ + return $this->sgbd_impl->del_data($data_path, $data_id); } - function close_data($dh) - { return $this->sgbd_impl->close_data($dh); + function close_data($dh){ + return $this->sgbd_impl->close_data($dh); } - function remove_data($data_path) - { return $this->sgbd_impl->remove_data($data_path); + function remove_data($data_path){ + return $this->sgbd_impl->remove_data($data_path); } } diff --git a/web/app/env/modules/mw_env_config.php b/web/app/env/modules/mw_env_config.php index 4357b06..4315e1d 100644 --- a/web/app/env/modules/mw_env_config.php +++ b/web/app/env/modules/mw_env_config.php @@ -1,7 +1,6 @@ bdd = $bdd; + function load_config($bdd, $CONFIG){ + if(true){ + $this->bdd = $bdd; $this->bdd["table_prefix"] = array(); $this->CONFIG = isset($CONFIG) ? $CONFIG : array(); $this->PARAMS = array(); $xml_parser = new sxml(); $app_config_file = $this->path("app")."config.xml"; - if(file_exists($app_config_file)) - { $xml_parser->parse(file_get_contents($app_config_file)); + if(file_exists($app_config_file)){ + $xml_parser->parse(file_get_contents($app_config_file)); $app_config = $xml_parser->data["config"][0]; - if(isset($app_config["subs"]["params"])) - { foreach($app_config["subs"]["params"][0]["subs"] as $param_key => $param_elt) - { $this->PARAMS[$param_key] = $param_elt[0]["data"]; + if(isset($app_config["subs"]["params"])){ + foreach($app_config["subs"]["params"][0]["subs"] as $param_key => $param_elt){ + $this->PARAMS[$param_key] = $param_elt[0]["data"]; } } - if(isset($app_config["subs"]["config"])) - { foreach($app_config["subs"]["config"][0]["subs"] as $config_key => $config_elt) - { $this->CONFIG[$config_key] = $config_elt[0]["data"]; + if(isset($app_config["subs"]["config"])){ + foreach($app_config["subs"]["config"][0]["subs"] as $config_key => $config_elt){ + $this->CONFIG[$config_key] = $config_elt[0]["data"]; } } - if(isset($app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"])) - { $this->add_table_prefix - ( array - ( $app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"][0]["data"] => $bdd["table_prefix"] + if(isset($app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"])){ + $this->add_table_prefix( + array( + $app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"][0]["data"] => $bdd["table_prefix"] ) ); } } - if(($plugins = $this->plugins("ASC")) !== false) - { foreach($plugins as $plugin_name => $plugin) - { $app_config_file = $this->path("plugins").$plugin_name."/app/config.xml"; - if(file_exists($app_config_file) && $plugin["installed"] && $plugin["enabled"]) - { $xml_parser->parse(file_get_contents($app_config_file)); + if(($plugins = $this->plugins("ASC")) !== false){ + foreach($plugins as $plugin_name => $plugin){ + $app_config_file = $this->path("plugins").$plugin_name."/app/config.xml"; + if(file_exists($app_config_file) && $plugin["installed"] && $plugin["enabled"]){ + $xml_parser->parse(file_get_contents($app_config_file)); $app_config = $xml_parser->data["config"][0]; - if(isset($app_config["subs"]["params"])) - { foreach($app_config["subs"]["params"][0]["subs"] as $param_key => $param_elt) - { $this->PARAMS[$param_key] = $param_elt[0]["data"]; + if(isset($app_config["subs"]["params"])){ + foreach($app_config["subs"]["params"][0]["subs"] as $param_key => $param_elt){ + $this->PARAMS[$param_key] = $param_elt[0]["data"]; } } - if(isset($app_config["subs"]["config"])) - { foreach($app_config["subs"]["config"][0]["subs"] as $config_key => $config_elt) - { $this->CONFIG[$config_key] = $config_elt[0]["data"]; + if(isset($app_config["subs"]["config"])){ + foreach($app_config["subs"]["config"][0]["subs"] as $config_key => $config_elt){ + $this->CONFIG[$config_key] = $config_elt[0]["data"]; } } - if(isset($app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"])) - { $this->add_table_prefix - ( array - ( $app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"][0]["data"] => $bdd["table_prefix"] + if(isset($app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"])){ + $this->add_table_prefix( + array( + $app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"][0]["data"] => $bdd["table_prefix"] ) ); } @@ -70,40 +69,69 @@ else $this->erreur("impossible de trouver le fichier de configuration pour l'installation", true); } - function get_config_file() { return $this->config_file; } - function set_config_file($config_file) { $this->config_file = $config_file; } + function get_config_file(){ + return $this->config_file; + } + + function set_config_file($config_file){ + $this->config_file = $config_file; + } + + function get_PATHES(){ + return $this->PATHES; + } - function get_PATHES() { return $this->PATHES; } - function path($name) - { if(isset($this->PATHES[$name])) return $this->PATHES[$name]; + function path($name){ + if(isset($this->PATHES[$name])) return $this->PATHES[$name]; return ""; } - function set_PATHES($PATHES) - { foreach($PATHES as $path_name => $path_value) - { if($path_value && substr($path_value, -1) != "/") $PATHES[$path_name] .= "/"; + + function set_PATHES($PATHES){ + foreach($PATHES as $path_name => $path_value){ + if($path_value && substr($path_value, -1) != "/") $PATHES[$path_name] .= "/"; } $this->PATHES = $PATHES; } - function get_PARAMS() { return $this->PARAMS; } - function param($name) { return $this->PARAMS[$name]; } + function get_PARAMS(){ + return $this->PARAMS; + } - function get_CONFIG() { return $this->CONFIG; } - function config($name) { return $this->CONFIG[$name]; } - function set_config($config) - { if(is_array($config)) - { foreach($config as $key => $value) $this->CONFIG[$key] = $value; + function param($name){ + return $this->PARAMS[$name]; + } + + function get_CONFIG(){ + return $this->CONFIG; + } + + function config($name){ + return $this->CONFIG[$name]; + } + + function set_config($config){ + if(is_array($config)){ + foreach($config as $key => $value) $this->CONFIG[$key] = $value; return true; } return false; } - function get_bdd() { return $this->bdd; } - function bdd($name) { return $this->bdd[$name]; } - function set_bdd($key, $value) { $this->bdd[$key] = $value; } - function add_table_prefix($table_prefix) - { if(is_array($table_prefix)) - { foreach($table_prefix as $prefix_code => $prefix) $this->bdd["table_prefix"][$prefix_code] = $prefix; + function get_bdd(){ + return $this->bdd; + } + + function bdd($name){ + return $this->bdd[$name]; + } + + function set_bdd($key, $value){ + $this->bdd[$key] = $value; + } + + function add_table_prefix($table_prefix){ + if(is_array($table_prefix)){ + foreach($table_prefix as $prefix_code => $prefix) $this->bdd["table_prefix"][$prefix_code] = $prefix; return true; } return false; diff --git a/web/app/env/modules/mw_env_data.php b/web/app/env/modules/mw_env_data.php index cc0e711..6e8caff 100644 --- a/web/app/env/modules/mw_env_data.php +++ b/web/app/env/modules/mw_env_data.php @@ -1,13 +1,15 @@ data = &$data; } + function set_data(&$data){ + $this->data = &$data; + } - function data() - { return $this->data; + function data(){ + return $this->data; } } diff --git a/web/app/env/modules/mw_env_init.php b/web/app/env/modules/mw_env_init.php index 8987f71..6a555fa 100644 --- a/web/app/env/modules/mw_env_init.php +++ b/web/app/env/modules/mw_env_init.php @@ -1,46 +1,44 @@ plugins()) !== false) - { foreach($plugins as $plugin_name => $plugin) - { $init_path = $this->path("plugins").$plugin_name."/app/init/"; - if - ( $plugin["installed"] + function init(){ + $init_files = array(); + if(($plugins = $this->plugins()) !== false){ + foreach($plugins as $plugin_name => $plugin){ + $init_path = $this->path("plugins").$plugin_name."/app/init/"; + if( + $plugin["installed"] && $plugin["enabled"] && file_exists($init_path) && is_dir($init_path) - ) - { if($dh = opendir($init_path)) - { $files = array(); - while(($file = readdir($dh)) !== false) - { if - ( substr($file, 0, 1) != "." + ){ + if($dh = opendir($init_path)){ + $files = array(); + while(($file = readdir($dh)) !== false){ + if( + substr($file, 0, 1) != "." && !is_dir($init_path.$file) && strcmp(substr($file, -4), ".php") == 0 && !isset($init_files[$file]) ) $init_files[$file] = $init_path; } closedir($dh); - } else $this->erreur("impossible d'ouvrir le dossier init du plugin ".$plugin_name, true); } if($this->check_stop()) return; } $init_path = $this->path("app")."init/"; - if - ( file_exists($init_path) + if( + file_exists($init_path) && is_dir($init_path) - ) - { if($dh = opendir($init_path)) - { $files = array(); - while(($file = readdir($dh)) !== false) - { if - ( substr($file, 0, 1) != "." + ){ + if($dh = opendir($init_path)){ + $files = array(); + while(($file = readdir($dh)) !== false){ + if( + substr($file, 0, 1) != "." && !is_dir($init_path.$file) && strcmp(substr($file, -4), ".php") == 0 ) $init_files[$file] = $init_path; @@ -51,10 +49,10 @@ } } if($this->check_stop()) return; - if($init_files) - { ksort($init_files); - foreach($init_files as $file => $init_path) - { require $init_path.$file; + if($init_files){ + ksort($init_files); + foreach($init_files as $file => $init_path){ + require $init_path.$file; if($this->check_stop()) return; } } diff --git a/web/app/env/modules/mw_env_inputs.php b/web/app/env/modules/mw_env_inputs.php index 526285a..0ebd042 100644 --- a/web/app/env/modules/mw_env_inputs.php +++ b/web/app/env/modules/mw_env_inputs.php @@ -1,37 +1,38 @@ path("libs")."inputfilter.php"; - $allowed_tags = array - ( "p", "span", "pre", "blockquote", "address", "hr", "br", + function prepare_inputs(){ + if($_POST){ + require_once $this->path("libs")."inputfilter.php"; + $allowed_tags = array( + "p", "span", "pre", "blockquote", "address", "hr", "br", "img", "strong", "em", "u", "i", "b", "s", "a", "ul", "ol", "li", "h1", "h2", "h3", "h4", "h5", "h6" ); - $allowed_attrs = array - ( "style", + $allowed_attrs = array( + "style", "src", "alt", "width", "height", "href", "title" ); $input_filter = new InputFilter($allowed_tags, $allowed_attrs); $_POST = $input_filter->process($_POST); } - if($_FILES) - { foreach($_FILES as $file_key => $file_infos) - { $v_name = explode(".", $file_infos["name"]); + if($_FILES){ + foreach($_FILES as $file_key => $file_infos){ + $v_name = explode(".", $file_infos["name"]); $ext = strtolower($v_name[count($v_name) - 1]); - if - ( $ext != "png" + if( + $ext != "png" && $ext != "jpg" && $ext != "jpeg" && $ext != "gif" - ) unset($_FILES[$file_key]); + ){ + unset($_FILES[$file_key]); + } } } return true; diff --git a/web/app/env/modules/mw_env_links.php b/web/app/env/modules/mw_env_links.php index 818ce44..b614df0 100644 --- a/web/app/env/modules/mw_env_links.php +++ b/web/app/env/modules/mw_env_links.php @@ -1,20 +1,19 @@ data(); + function init_links(){ + $data = $this->data(); return $data->init_links(); } - function get_link($path = null) - { $data = $this->data(); + function get_link($path = null){ + $data = $this->data(); return $data->get_link($path); } - function set_link($path, $url, $intitule = "", $position = 0) - { $data = $this->data(); + function set_link($path, $url, $intitule = "", $position = 0){ + $data = $this->data(); return $data->set_link($path, $url, $intitule, $position); } diff --git a/web/app/env/modules/mw_env_messages.php b/web/app/env/modules/mw_env_messages.php index 824b82f..ed7d3a5 100644 --- a/web/app/env/modules/mw_env_messages.php +++ b/web/app/env/modules/mw_env_messages.php @@ -1,15 +1,14 @@ set_etat("reponses/html/erreur", false); + else{ + $this->set_etat("reponses/html/erreur", false); $erreur = $this->out("erreur"); if(!isset($erreur)) $erreur = array("messages" => array()); $erreur["messages"][] = $message; @@ -17,15 +16,21 @@ } } - function message($message) - { $messages = $this->out("messages"); + function erreurs(){ + $erreurs = $this->out("erreur"); + if(isset($erreurs)) return $erreurs; + return array(); + } + + function message($message){ + $messages = $this->out("messages"); if(!isset($messages)) $messages = array(); $messages[] = $message; $this->set_out("messages", $messages); } - function messages() - { $messages = $this->out("messages"); + function messages(){ + $messages = $this->out("messages"); if(isset($messages)) return $messages; return array(); } diff --git a/web/app/env/modules/mw_env_out.php b/web/app/env/modules/mw_env_out.php index 6571d65..f4ae9d9 100644 --- a/web/app/env/modules/mw_env_out.php +++ b/web/app/env/modules/mw_env_out.php @@ -1,20 +1,28 @@ out[$key] = $value; return $value; } - function get_out() { return $this->out; } - function out($key) { return $this->out[$key]; } + function set_out($key, $value){ + $this->out[$key] = $value; return $value; + } + + function get_out(){ + return $this->out; + } + + function out($key){ + return $this->out[$key]; + } - function out_pathes() - { $pathes = array(); - if($dh = opendir($this->path("out"))) - { while(($file = readdir($dh)) !== false) - { if(is_dir($this->path("out").$file) && substr($file, 0 ,1) != ".") $pathes[] = $file; + function out_pathes(){ + $pathes = array(); + if($dh = opendir($this->path("out"))){ + while(($file = readdir($dh)) !== false){ + if(is_dir($this->path("out").$file) && substr($file, 0 ,1) != ".") $pathes[] = $file; } closedir($dh); } @@ -22,55 +30,55 @@ return $pathes; } - function out_file_exists($file, $PRIORITE = "DESC") - { $out_file = $this->_out_file($file, $PRIORITE); + function out_file_exists($file, $PRIORITE = "DESC"){ + $out_file = $this->_out_file($file, $PRIORITE); return $out_file ? true : false; } - function out_file($file, $PRIORITE = "DESC") - { $out_file = $this->_out_file($file, $PRIORITE); + function out_file($file, $PRIORITE = "DESC"){ + $out_file = $this->_out_file($file, $PRIORITE); return $out_file ? $out_file : $file; } - function _out_file($file, $PRIORITE = "DESC") - { $out_file = false; - if($PRIORITE == "ASC") - { $tmp_out_file = $this->path("out").$this->config("out").$file; - if($file && file_exists($tmp_out_file)) - { $out_file = $tmp_out_file; + function _out_file($file, $PRIORITE = "DESC"){ + $out_file = false; + if($PRIORITE == "ASC"){ + $tmp_out_file = $this->path("out").$this->config("out").$file; + if($file && file_exists($tmp_out_file)){ + $out_file = $tmp_out_file; } - if(!$out_file) - { $tmp_out_file = $this->path("out").$this->path("dist_out").$file; - if($file && file_exists($tmp_out_file)) - { $out_file = $tmp_out_file; + if(!$out_file){ + $tmp_out_file = $this->path("out").$this->path("dist_out").$file; + if($file && file_exists($tmp_out_file)){ + $out_file = $tmp_out_file; } } } if($out_file) return $out_file; - if(($plugins = $this->plugins($PRIORITE)) !== false) - { foreach($plugins as $plugin_name => $plugin) - { $tmp_out_file = $this->path("plugins").$plugin_name."/out/".$this->config("out").$file; - if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($tmp_out_file)) - { $out_file = $tmp_out_file; + if(($plugins = $this->plugins($PRIORITE)) !== false){ + foreach($plugins as $plugin_name => $plugin){ + $tmp_out_file = $this->path("plugins").$plugin_name."/out/".$this->config("out").$file; + if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($tmp_out_file)){ + $out_file = $tmp_out_file; break; } - if(!$out_file) - { $tmp_out_file = $this->path("plugins").$plugin_name."/out/".$this->path("dist_out").$file; - if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($tmp_out_file)) - { $out_file = $tmp_out_file; + if(!$out_file){ + $tmp_out_file = $this->path("plugins").$plugin_name."/out/".$this->path("dist_out").$file; + if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($tmp_out_file)){ + $out_file = $tmp_out_file; break; } } } - if($PRIORITE == "DESC" && !$out_file) - { $tmp_out_file = $this->path("out").$this->config("out").$file; - if($file && file_exists($tmp_out_file)) - { $out_file = $tmp_out_file; + if($PRIORITE == "DESC" && !$out_file){ + $tmp_out_file = $this->path("out").$this->config("out").$file; + if($file && file_exists($tmp_out_file)){ + $out_file = $tmp_out_file; } - if(!$out_file) - { $tmp_out_file = $this->path("out").$this->path("dist_out").$file; - if($file && file_exists($tmp_out_file)) - { $out_file = $tmp_out_file; + if(!$out_file){ + $tmp_out_file = $this->path("out").$this->path("dist_out").$file; + if($file && file_exists($tmp_out_file)){ + $out_file = $tmp_out_file; } } } @@ -82,16 +90,18 @@ # out config # - function set_out_config($out_config) - { $this->out_config = $out_config; + function set_out_config($out_config){ + $this->out_config = $out_config; return $this->out_config; } - function get_out_config() { return isset($this->out_config) ? $this->out_config : array(); } + function get_out_config(){ + return isset($this->out_config) ? $this->out_config : array(); + } - function out_config($name) - { if(isset($this->out_config)) - { $CONFIG = $this->get_CONFIG(); + function out_config($name){ + if(isset($this->out_config)){ + $CONFIG = $this->get_CONFIG(); return isset($CONFIG["out_".$name]) ? $CONFIG["out_".$name] : $this->out_config[$name]["default"]; } return null; @@ -101,72 +111,74 @@ # layouts # - function layout() { return $this->layout; } + function layout(){ + return $this->layout; + } - function render_layout($layout = null) - { if(!isset($layout)) $layout = $this->init_layout(); - if(($plugins = $this->plugins("ASC")) !== false) - { foreach($plugins as $plugin_name => $plugin) - { if($plugin["installed"] && $plugin["enabled"]) - { $FOUND = false; + function render_layout($layout = null){ + if(!isset($layout)) $layout = $this->init_layout(); + if(($plugins = $this->plugins("ASC")) !== false){ + foreach($plugins as $plugin_name => $plugin){ + if($plugin["installed"] && $plugin["enabled"]){ + $FOUND = false; $functions_file = $this->path("plugins").$plugin_name."/out/".$this->config("out")."functions.php"; - if(file_exists($functions_file)) - { $FOUND = true; + if(file_exists($functions_file)){ + $FOUND = true; require $functions_file; } - if(!$FOUND) - { $functions_file = $this->path("plugins").$plugin_name."/out/".$this->path("dist_out")."functions.php"; - if($plugin["installed"] && $plugin["enabled"] && file_exists($functions_file)) - { require $functions_file; + if(!$FOUND){ + $functions_file = $this->path("plugins").$plugin_name."/out/".$this->path("dist_out")."functions.php"; + if($plugin["installed"] && $plugin["enabled"] && file_exists($functions_file)){ + require $functions_file; } } } } $FOUND = false; $functions_file = $this->path("out").$this->config("out")."functions.php"; - if(file_exists($functions_file)) - { $FOUND = true; + if(file_exists($functions_file)){ + $FOUND = true; require $functions_file; } - if(!$FOUND) - { $functions_file = $this->path("out").$this->path("dist_out")."functions.php"; - if(file_exists($functions_file)) - { require $functions_file; + if(!$FOUND){ + $functions_file = $this->path("out").$this->path("dist_out")."functions.php"; + if(file_exists($functions_file)){ + require $functions_file; } } - if($layout["page"]) - { if($this->out_file_exists($layout["page"])) require $this->out_file($layout["page"]); + if($layout["page"]){ + if($this->out_file_exists($layout["page"])) require $this->out_file($layout["page"]); } - elseif($layout["content"]) - { if($this->out_file_exists($layout["content"])) require $this->out_file($layout["content"]); + elseif($layout["content"]){ + if($this->out_file_exists($layout["content"])) require $this->out_file($layout["content"]); } } } - function init_layout() - { $this->layout = array(); + function init_layout(){ + $this->layout = array(); $this->_init_layout("index"); if(($mod = $this->etat("mod")) != "index") $this->_init_layout($mod); return $this->get_layout(); } - function _init_layout($mod) - { if(($plugins = $this->plugins("ASC")) !== false) - { $layout_file = false; + function _init_layout($mod){ + if(($plugins = $this->plugins("ASC")) !== false){ + $layout_file = false; $tmp_layout_file = $this->path("out").$this->config("out")."layouts/".$mod.".xml"; if(file_exists($tmp_layout_file)) $layout_file = $tmp_layout_file; - if(!$layout_file) - { $tmp_layout_file = $this->path("out").$this->path("dist_out")."layouts/".$mod.".xml"; + if(!$layout_file){ + $tmp_layout_file = $this->path("out").$this->path("dist_out")."layouts/".$mod.".xml"; if(file_exists($tmp_layout_file)) $layout_file = $tmp_layout_file; } if($layout_file) $this->load_layout($layout_file); - foreach($plugins as $plugin_name => $plugin) - { if($plugin["installed"] && $plugin["enabled"]) - { $layout_file = false; + foreach($plugins as $plugin_name => $plugin){ + if($plugin["installed"] && $plugin["enabled"]){ + $layout_file = false; $tmp_layout_file = $this->path("plugins").$plugin_name."/out/".$this->config("out")."layouts/".$mod.".xml"; if(file_exists($tmp_layout_file)) $layout_file = $tmp_layout_file; - if(!$layout_file) - { $tmp_layout_file = $this->path("plugins").$plugin_name."/out/".$this->path("dist_out")."layouts/".$mod.".xml"; + if(!$layout_file){ + $tmp_layout_file = $this->path("plugins").$plugin_name."/out/".$this->path("dist_out")."layouts/".$mod.".xml"; if(file_exists($tmp_layout_file)) $layout_file = $tmp_layout_file; } if($layout_file) $this->load_layout($layout_file); @@ -175,38 +187,38 @@ } } - function load_layout($layout_file) - { if(file_exists($layout_file)) - { $xml_parser = new sxml(); + function load_layout($layout_file){ + if(file_exists($layout_file)){ + $xml_parser = new sxml(); $xml_parser->parse(file_get_contents($layout_file)); $layout = $xml_parser->data; - if(isset($layout["layout"][0]["subs"])) - { foreach($layout["layout"][0]["subs"] as $mod => $mod_node) - { if(!isset($this->layout[$mod])) - { $this->layout[$mod] = array - ( "page" => null, + if(isset($layout["layout"][0]["subs"])){ + foreach($layout["layout"][0]["subs"] as $mod => $mod_node){ + if(!isset($this->layout[$mod])){ + $this->layout[$mod] = array( + "page" => null, "content" => null, "controllers" => array() ); } if(isset($mod_node[0]["attrs"]["page"])) $this->layout[$mod]["page"] = $mod_node[0]["attrs"]["page"]; if(isset($mod_node[0]["attrs"]["content"])) $this->layout[$mod]["content"] = $mod_node[0]["attrs"]["content"]; - if(isset($mod_node[0]["subs"])) - { foreach($mod_node[0]["subs"] as $controller => $controller_node) - { if(!isset($this->layout[$mod]["controllers"][$controller])) - { $this->layout[$mod]["controllers"][$controller] = array - ( "page" => null, + if(isset($mod_node[0]["subs"])){ + foreach($mod_node[0]["subs"] as $controller => $controller_node){ + if(!isset($this->layout[$mod]["controllers"][$controller])){ + $this->layout[$mod]["controllers"][$controller] = array( + "page" => null, "content" => null, "actions" => array() ); } if(isset($controller_node[0]["attrs"]["page"])) $this->layout[$mod]["controllers"][$controller]["page"] = $controller_node[0]["attrs"]["page"]; if(isset($controller_node[0]["attrs"]["content"])) $this->layout[$mod]["controllers"][$controller]["content"] = $controller_node[0]["attrs"]["content"]; - if(isset($controller_node[0]["subs"])) - { foreach($controller_node[0]["subs"] as $action => $action_node) - { if(!isset($this->layout[$mod]["controllers"][$controller]["actions"][$action])) - { $this->layout[$mod]["controllers"][$controller]["actions"][$action] = array - ( "page" => null, + if(isset($controller_node[0]["subs"])){ + foreach($controller_node[0]["subs"] as $action => $action_node){ + if(!isset($this->layout[$mod]["controllers"][$controller]["actions"][$action])){ + $this->layout[$mod]["controllers"][$controller]["actions"][$action] = array( + "page" => null, "content" => null ); } @@ -222,50 +234,50 @@ return false; } - function get_layout() - { $mod = $this->etat("mod"); + function get_layout(){ + $mod = $this->etat("mod"); $controller = $this->etat("controller"); $action = $this->etat("action"); $content = ""; - if(isset($this->layout[$mod]["controllers"][$controller]["actions"][$action]["content"])) - { $content = $this->layout[$mod]["controllers"][$controller]["actions"][$action]["content"]; + if(isset($this->layout[$mod]["controllers"][$controller]["actions"][$action]["content"])){ + $content = $this->layout[$mod]["controllers"][$controller]["actions"][$action]["content"]; } - else - { if(isset($this->layout[$mod]["controllers"][$controller]["content"])) - { $content = $this->layout[$mod]["controllers"][$controller]["content"]; + else{ + if(isset($this->layout[$mod]["controllers"][$controller]["content"])){ + $content = $this->layout[$mod]["controllers"][$controller]["content"]; } - else - { if(isset($this->layout[$mod]["content"])) - { $content = $this->layout[$mod]["content"]; + else{ + if(isset($this->layout[$mod]["content"])){ + $content = $this->layout[$mod]["content"]; } - else - { if(isset($this->layout["index"]["content"])) - { $content = $this->layout["index"]["content"]; + else{ + if(isset($this->layout["index"]["content"])){ + $content = $this->layout["index"]["content"]; } } } } $page = ""; - if(isset($this->layout[$mod]["controllers"][$controller]["actions"][$action]["page"])) - { $page = $this->layout[$mod]["controllers"][$controller]["actions"][$action]["page"]; + if(isset($this->layout[$mod]["controllers"][$controller]["actions"][$action]["page"])){ + $page = $this->layout[$mod]["controllers"][$controller]["actions"][$action]["page"]; } - else - { if(isset($this->layout[$mod]["controllers"][$controller]["page"])) - { $page = $this->layout[$mod]["controllers"][$controller]["page"]; + else{ + if(isset($this->layout[$mod]["controllers"][$controller]["page"])){ + $page = $this->layout[$mod]["controllers"][$controller]["page"]; } - else - { if(isset($this->layout[$mod]["page"])) - { $page = $this->layout[$mod]["page"]; + else{ + if(isset($this->layout[$mod]["page"])){ + $page = $this->layout[$mod]["page"]; } - else - { if(isset($this->layout["index"]["page"])) - { $page = $this->layout["index"]["page"]; + else{ + if(isset($this->layout["index"]["page"])){ + $page = $this->layout["index"]["page"]; } } } } - return array - ( "page" => $page, + return array( + "page" => $page, "content" => $content ); } diff --git a/web/app/env/modules/mw_env_plugins.php b/web/app/env/modules/mw_env_plugins.php index fc4925b..375e3c7 100644 --- a/web/app/env/modules/mw_env_plugins.php +++ b/web/app/env/modules/mw_env_plugins.php @@ -1,13 +1,12 @@ init_plugins($PRIORITE); + function plugins($PRIORITE = "ASC"){ + $this->init_plugins($PRIORITE); if($PRIORITE == "ASC") return $this->plugins_asc; if($PRIORITE == "DESC") return $this->plugins_desc; return false; @@ -17,43 +16,46 @@ # init # - function init_plugins($PRIORITE = "ASC") - { if(isset($this->plugins_asc) || isset($this->plugins_desc)) - { if($PRIORITE == "ASC") - { if(!isset($this->plugins_asc)) $this->plugins_asc = $this->ordonne_plugins($this->plugins_desc, $PRIORITE); + function init_plugins($PRIORITE = "ASC"){ + if(isset($this->plugins_asc) || isset($this->plugins_desc)){ + if($PRIORITE == "ASC"){ + if(!isset($this->plugins_asc)) $this->plugins_asc = $this->ordonne_plugins($this->plugins_desc, $PRIORITE); } - elseif($PRIORITE == "DESC") - { if(!isset($this->plugins_desc)) $this->plugins_desc = $this->ordonne_plugins($this->plugins_asc, $PRIORITE); + elseif($PRIORITE == "DESC"){ + if(!isset($this->plugins_desc)) $this->plugins_desc = $this->ordonne_plugins($this->plugins_asc, $PRIORITE); } return; } $plugins = array(); - if(!class_exists("mw_plugin")) - { require $this->path("app")."mw_plugin.php"; - if(!class_exists("mw_plugin")) - { $plugins = false; + if(!class_exists("mw_plugin")){ + require $this->path("app")."mw_plugin.php"; + if(!class_exists("mw_plugin")){ + $plugins = false; return; } } - if(file_exists($this->path("plugins"))) - { if($dh = opendir($this->path("plugins"))) - { $OK = true; - while($OK && ($plugin_name = readdir($dh)) !== false) - { if(substr($plugin_name, 0 ,1) !== "." && is_dir($this->path("plugins").$plugin_name)) - { if(!isset($plugins[$plugin_name])) - { if(($plugin = $this->plugin_data($plugin_name)) !== false) - { $MAJ = false; - if(!isset($plugin["installed"]) || !isset($plugin["enabled"])) - { $plugin["installed"] = false; + if(file_exists($this->path("plugins"))){ + if($dh = opendir($this->path("plugins"))){ + $OK = true; + while($OK && ($plugin_name = readdir($dh)) !== false){ + if(substr($plugin_name, 0 ,1) !== "." && is_dir($this->path("plugins").$plugin_name)){ + if(!isset($plugins[$plugin_name])){ + if(($plugin = $this->plugin_data($plugin_name)) !== false){ + $MAJ = false; + if(!isset($plugin["installed"]) || !isset($plugin["enabled"])){ + $plugin["installed"] = false; $plugin["enabled"] = false; $plugin["priorite"] = 0; $MAJ = true; } - if(!$plugin["installed"] && $plugin["enabled"]) { $plugin["enabled"] = false; $MAJ = true; } + if(!$plugin["installed"] && $plugin["enabled"]){ + $plugin["enabled"] = false; + $MAJ = true; + } if($MAJ) $OK = $this->set_plugin_data($plugin_name, $plugin); - if($OK) - { if(($plugin["impl"] = $this->plugin_impl($plugin_name)) !== false) - { $plugin["title"] = ($plugin_title = $this->plugin_call($plugin["impl"], "title")) ? $plugin_title : ""; + if($OK){ + if(($plugin["impl"] = $this->plugin_impl($plugin_name)) !== false){ + $plugin["title"] = ($plugin_title = $this->plugin_call($plugin["impl"], "title")) ? $plugin_title : ""; $plugin["description"] = ($plugin_description = $this->plugin_call($plugin["impl"], "description")) ? $plugin_description : ""; $plugin["name"] = $plugin_name; $plugins[$plugin_name] = $plugin; @@ -66,14 +68,14 @@ if(!$OK) $plugins = false; } closedir($dh); - if($plugins !== false) - { if(file_exists($this->plugins_data_dir()) && is_dir($this->plugins_data_dir())) - { if($dh = opendir($this->plugins_data_dir())) - { $plugins_data_files = array(); + if($plugins !== false){ + if(file_exists($this->plugins_data_dir()) && is_dir($this->plugins_data_dir())){ + if($dh = opendir($this->plugins_data_dir())){ + $plugins_data_files = array(); $OK = true; - while($OK && ($plugin_name = readdir($dh)) !== false) - { if(substr($plugin_name, 0 ,1) != "." && !is_dir($this->plugin_data_file($plugin_name))) - { if(!$plugins[$plugin_name]) $this->del_plugin_data($plugin_name); + while($OK && ($plugin_name = readdir($dh)) !== false){ + if(substr($plugin_name, 0 ,1) != "." && !is_dir($this->plugin_data_file($plugin_name))){ + if(!$plugins[$plugin_name]) $this->del_plugin_data($plugin_name); } if(!$OK) $plugins = false; } @@ -84,27 +86,27 @@ } else $plugins = false; } - if($plugins !== false) - { if($PRIORITE == "ASC") $this->plugins_asc = $this->ordonne_plugins($plugins, $PRIORITE); + if($plugins !== false){ + if($PRIORITE == "ASC") $this->plugins_asc = $this->ordonne_plugins($plugins, $PRIORITE); elseif($PRIORITE == "DESC") $this->plugins_desc = $this->ordonne_plugins($plugins, $PRIORITE); } - else - { $this->plugins_asc = false; + else{ + $this->plugins_asc = false; $this->plugins_desc = false; } } - function ordonne_plugins($plugins, $PRIORITE = "ASC") - { $values = array_values($plugins); + function ordonne_plugins($plugins, $PRIORITE = "ASC"){ + $values = array_values($plugins); $maximum = count($values); - while($maximum > 0) - { $maximumTemporaire = 0; - for($i = 0; $i < $maximum - 1; $i++) - { if - ( ($PRIORITE == "ASC" && $values[$i]["priorite"] > $values[$i + 1]["priorite"]) + while($maximum > 0){ + $maximumTemporaire = 0; + for($i = 0; $i < $maximum - 1; $i++){ + if( + ($PRIORITE == "ASC" && $values[$i]["priorite"] > $values[$i + 1]["priorite"]) || ($PRIORITE == "DESC" && $values[$i]["priorite"] < $values[$i + 1]["priorite"]) - ) - { $tmp = $values[$i]; + ){ + $tmp = $values[$i]; $values[$i] = $values[$i + 1]; $values[$i + 1] = $tmp; $maximumTemporaire = $i + 1; @@ -117,20 +119,22 @@ return $res; } - function plugin_call($impl, $method) { if(method_exists($impl, $method)) return $impl->$method($this); } + function plugin_call($impl, $method){ + if(method_exists($impl, $method)) return $impl->$method($this); + } # --------------------------------------------------------------------------------- # impl # - function plugin_impl($plugin_name) - { $plugin = false; - if(file_exists($this->path("plugins"))) - { if(substr($plugin_name, 0 ,1) !== "." && is_dir($this->path("plugins").$plugin_name)) - { if(file_exists($this->path("plugins").$plugin_name."/".$plugin_name.".php")) - { require $this->path("plugins").$plugin_name."/".$plugin_name.".php"; - if(class_exists($plugin_name)) - { $plugin = new $plugin_name(); + function plugin_impl($plugin_name){ + $plugin = false; + if(file_exists($this->path("plugins"))){ + if(substr($plugin_name, 0 ,1) !== "." && is_dir($this->path("plugins").$plugin_name)){ + if(file_exists($this->path("plugins").$plugin_name."/".$plugin_name.".php")){ + require $this->path("plugins").$plugin_name."/".$plugin_name.".php"; + if(class_exists($plugin_name)){ + $plugin = new $plugin_name(); } } } @@ -142,40 +146,40 @@ # data # - function plugins_data_dir() - { return $this->path("content")."data/plugins/"; + function plugins_data_dir(){ + return $this->path("content")."data/plugins/"; } - function plugin_data_file($plugin_name) - { return $this->plugins_data_dir().$plugin_name; + function plugin_data_file($plugin_name){ + return $this->plugins_data_dir().$plugin_name; } - function plugin_data($plugin_name) - { $data_file = $this->plugin_data_file($plugin_name); + function plugin_data($plugin_name){ + $data_file = $this->plugin_data_file($plugin_name); $data = array(); - if(file_exists($data_file)) - { if($content = file_get_contents($data_file)) - { $data = unserialize($content); + if(file_exists($data_file)){ + if($content = file_get_contents($data_file)){ + $data = unserialize($content); } } return $data; } - function set_plugin_data($plugin_name, $data) - { $data_file = $this->plugin_data_file($plugin_name); + function set_plugin_data($plugin_name, $data){ + $data_file = $this->plugin_data_file($plugin_name); $content = serialize($data); $OK = false; - if($fh = fopen($data_file, "w")) - { if(fwrite($fh, $content) !== false) - { $OK = true; + if($fh = fopen($data_file, "w")){ + if(fwrite($fh, $content) !== false){ + $OK = true; } fclose($fh); } return $OK; } - function del_plugin_data($plugin_name) - { $data_file = $this->plugin_data_file($plugin_name); + function del_plugin_data($plugin_name){ + $data_file = $this->plugin_data_file($plugin_name); if(file_exists($data_file)) return @unlink($data_file); return true; } diff --git a/web/app/env/modules/mw_env_run.php b/web/app/env/modules/mw_env_run.php index ba47626..69360c2 100644 --- a/web/app/env/modules/mw_env_run.php +++ b/web/app/env/modules/mw_env_run.php @@ -1,18 +1,18 @@ data(); + function user(){ + $data = $this->data(); return $data->get_session_user(); } - function set_etat($etat, $valid_status = true) - { if(($this->etat = $this->valid_etat($etat)) !== false) - { if(!$valid_status || $this->status_ok($this->etat, false)) - { return $this->etat; + function set_etat($etat, $valid_status = true){ + if(($this->etat = $this->valid_etat($etat)) !== false){ + if(!$valid_status || $this->status_ok($this->etat, false)){ + return $this->etat; } else $this->erreur("Vous n'avez pas le statut requis pour effectuer cette action"); } @@ -20,86 +20,89 @@ return false; } - function valid_etat($etat) - { $_etat = array(); + function valid_etat($etat){ + $_etat = array(); $_etat["mod"] = ""; $_etat["controller"] = ""; $_etat["action"] = ""; - if(is_array($etat)) - { $_etat["mod"] = isset($etat["mod"]) ? $etat["mod"] : ""; + if(is_array($etat)){ + $_etat["mod"] = isset($etat["mod"]) ? $etat["mod"] : ""; $_etat["controller"] = isset($etat["controller"]) ? $etat["controller"] : ""; $_etat["action"] = isset($etat["action"]) ? $etat["action"] : ""; } - else - { $etat = explode("/", $etat); - foreach($etat as $etat_item) - { if($etat_item) - { if(!$_etat["mod"]) $_etat["mod"] = $etat_item; - else - { if(!$_etat["controller"]) $_etat["controller"] = $etat_item; - else - { if(!$_etat["action"]) $_etat["action"] = $etat_item; + else{ + $etat = explode("/", $etat); + foreach($etat as $etat_item){ + if($etat_item){ + if(!$_etat["mod"]) $_etat["mod"] = $etat_item; + else{ + if(!$_etat["controller"]) $_etat["controller"] = $etat_item; + else{ + if(!$_etat["action"]) $_etat["action"] = $etat_item; break; } } } } } - if(!$_etat["mod"]) - { $_etat["mod"] = "index"; + if(!$_etat["mod"]){ + $_etat["mod"] = "index"; $_etat["controller"] = "index"; $_etat["action"] = "index"; } - else - { if(!$_etat["controller"]) - { $_etat["controller"] = "index"; + else{ + if(!$_etat["controller"]){ + $_etat["controller"] = "index"; $_etat["action"] = "index"; } - else - { if(!$_etat["action"]) $_etat["action"] = "index"; + else{ + if(!$_etat["action"]) $_etat["action"] = "index"; } } - if - ( is_array($_etat) + if( + is_array($_etat) && count($_etat) == 3 && isset($_etat["mod"]) && preg_match("/^[a-zA-Z0-9_]+$/", $_etat["mod"]) && isset($_etat["controller"]) && preg_match("/^[a-zA-Z0-9_]+$/", $_etat["controller"]) && isset($_etat["action"]) && preg_match("/^[a-zA-Z0-9_]+$/", $_etat["action"]) - ) return $_etat; + ){ + return $_etat; + } return false; } - function etat_is_valid() - { return $this->valid_etat($this->etat); + function etat_is_valid(){ + return $this->valid_etat($this->etat); } - function status_ok($etat, $CHECK_FORMAT = true) - { $OK = $this->config("default_allow"); + function status_ok($etat, $CHECK_FORMAT = true){ + $OK = $this->config("default_allow"); $data = $this->data(); if($CHECK_FORMAT) $etat = $this->valid_etat($etat); - if($etat !== false) - { if(($user_status = $data->get_user_status()) !== false) - { if - ( ( $action_status = $data->get_action_status - ( $etat["mod"], + if($etat !== false){ + if(($user_status = $data->get_user_status()) !== false){ + if( + ( + $action_status = $data->get_action_status( + $etat["mod"], $etat["controller"], $etat["action"] ) ) !== false - ) - { $action = $etat["mod"]."/".$etat["controller"]."/".$etat["action"]; - if(isset($action_status[$action])) - { $OK = $action_status[$action][0] || (isset($action_status[$action][$user_status]) && $action_status[$action][$user_status]); + ){ + $action = $etat["mod"]."/".$etat["controller"]."/".$etat["action"]; + if(isset($action_status[$action])){ + $OK = $action_status[$action][0] || (isset($action_status[$action][$user_status]) && $action_status[$action][$user_status]); } - else - { $action = $etat["mod"]."/".$etat["controller"]; - if(isset($action_status[$action])) - { $OK = $action_status[$action][0] || (isset($action_status[$action][$user_status]) && $action_status[$action][$user_status]); + else{ + $action = $etat["mod"]."/".$etat["controller"]; + if(isset($action_status[$action])){ + $OK = $action_status[$action][0] || (isset($action_status[$action][$user_status]) && $action_status[$action][$user_status]); } - else - { $action = $etat["mod"]; - if(isset($action_status[$action])) - { $OK = $action_status[$action][0] || (isset($action_status[$action][$user_status]) && $action_status[$action][$user_status]); + else{ + $action = $etat["mod"]; + if(isset($action_status[$action])){ + $OK = $action_status[$action][0] || (isset($action_status[$action][$user_status]) && $action_status[$action][$user_status]); } } } @@ -112,28 +115,28 @@ return $OK; } - function run($etat, $valid_status = true, $params = array(), $method = "GET") - { if($this->set_etat($etat, $valid_status)) - { $controller_file = "mods/".$this->etat("mod")."/".$this->etat("controller").".php"; - if($this->app_file_exists($controller_file = "mods/".$this->etat("mod")."/".$this->etat("controller").".php", "DESC")) - { if(!class_exists("mw_mod")) require $this->app_file("mods/mw_mod.php"); - if(!class_exists($controller_class = "mw_".$this->etat("mod")."_".$this->etat("controller"))) - { require $this->app_file($controller_file, "DESC"); + function run($etat, $valid_status = true, $params = array(), $method = "GET"){ + if($this->set_etat($etat, $valid_status)){ + $controller_file = "mods/".$this->etat("mod")."/".$this->etat("controller").".php"; + if($this->app_file_exists($controller_file = "mods/".$this->etat("mod")."/".$this->etat("controller").".php", "DESC")){ + if(!class_exists("mw_mod")) require $this->app_file("mods/mw_mod.php"); + if(!class_exists($controller_class = "mw_".$this->etat("mod")."_".$this->etat("controller"))){ + require $this->app_file($controller_file, "DESC"); } - if(class_exists($controller_class)) - { $controller = new $controller_class(); + if(class_exists($controller_class)){ + $controller = new $controller_class(); $action_method = $this->etat("action"); - if(method_exists($controller, $action_method)) - { foreach($params as $key => $value) - { switch(strtolower($method)) - { case "get": $_GET[$this->param($key)] = $value; break; + if(method_exists($controller, $action_method)){ + foreach($params as $key => $value){ + switch(strtolower($method)){ + case "get": $_GET[$this->param($key)] = $value; break; case "post": $_POST[$key] = $value; break; default: break; } } - if(($controller_validate = $controller->validate($this)) === true) - { if(($controller_prepare_inputs = $controller->prepare_inputs($this)) === true) - { $controller->$action_method($this); + if(($controller_validate = $controller->validate($this)) === true){ + if(($controller_prepare_inputs = $controller->prepare_inputs($this)) === true){ + $controller->$action_method($this); } else $this->erreur($controller_prepare_inputs); } @@ -148,21 +151,23 @@ else $this->erreur("Impossible d'effectuer cette action"); } - function etat($name) { return $this->etat[$name]; } + function etat($name){ + return $this->etat[$name]; + } - function check_stop() - { return $this->etat("mod") == "reponses"; + function check_stop(){ + return $this->etat("mod") == "reponses"; } - function get_mod($mod_name) - { if($etat = $this->valid_etat($mod_name)) - { if($this->app_file_exists($controller_file = "mods/".$etat["mod"]."/".$etat["controller"].".php")) - { if(!class_exists("mw_mod")) require $this->app_file("mods/mw_mod.php"); - if(!class_exists($controller_class = "mw_".$etat["mod"]."_".$etat["controller"])) - { require $this->app_file($controller_file); + function get_mod($mod_name){ + if($etat = $this->valid_etat($mod_name)){ + if($this->app_file_exists($controller_file = "mods/".$etat["mod"]."/".$etat["controller"].".php")){ + if(!class_exists("mw_mod")) require $this->app_file("mods/mw_mod.php"); + if(!class_exists($controller_class = "mw_".$etat["mod"]."_".$etat["controller"])){ + require $this->app_file($controller_file); } - if(class_exists($controller_class)) - { return new $controller_class(); + if(class_exists($controller_class)){ + return new $controller_class(); } } } diff --git a/web/app/env/modules/mw_env_urls.php b/web/app/env/modules/mw_env_urls.php index 4a8c08a..d7194f8 100644 --- a/web/app/env/modules/mw_env_urls.php +++ b/web/app/env/modules/mw_env_urls.php @@ -1,41 +1,41 @@ additional_get_params = array(); + function init_additional_get_params(){ + $this->additional_get_params = array(); $_params = $_SERVER["QUERY_STRING"]; $v_params = explode("&", $_params); - foreach($v_params as $param) - { if($param) - { $key = strpos($param, "=") === false ? $param : substr($param, 0, strpos($param, "=")); + foreach($v_params as $param){ + if($param){ + $key = strpos($param, "=") === false ? $param : substr($param, 0, strpos($param, "=")); $value = strpos($param, "=") === false ? "" : substr($param, strpos($param, "=") + 1); if(!$this->is_a_param($key)) $this->additional_get_params[$key] = $value; } } } - function is_a_param($key) - { foreach($this->get_PARAMS() as $_key => $_value) if(strcmp($key, $_value) == 0) return true; + function is_a_param($key){ + foreach($this->get_PARAMS() as $_key => $_value) if(strcmp($key, $_value) == 0) return true; return false; } - function url($action = "", $_params = array(), $script_name = "index.php") - { if($action) $_params["e"] = $action; + function url($action = "", $_params = array(), $script_name = "index.php"){ + if($action) $_params["e"] = $action; $get_params = ""; if(isset($this->additional_get_params)) foreach($this->additional_get_params as $key => $value) $get_params .= ($get_params ? "&" : "?").$key."=".$value; foreach($_params as $key => $value) $get_params .= ($get_params ? "&" : "?").$this->param($key)."=".$value; return $this->path("web").$script_name.$get_params; } - function redirect($url, $message, $wait = 1) - { $this->set_etat("reponses/html/redirect_javascript", false); - $this->set_out - ( "redirect", - array - ( "url" => str_replace("&", "&", $url), + function redirect($url, $message, $wait = 1){ + $this->set_etat("reponses/html/redirect_javascript", false); + $this->set_out( + "redirect", + array( + "url" => str_replace("&", "&", $url), "message" => $message, "wait" => $wait ) diff --git a/web/app/env/mw_env.php b/web/app/env/mw_env.php index 8350609..1b8aaf1 100644 --- a/web/app/env/mw_env.php +++ b/web/app/env/mw_env.php @@ -1,30 +1,29 @@ _app_file($file, $PRIORITE); + function app_file_exists($file, $PRIORITE = "ASC"){ + $app_file = $this->_app_file($file, $PRIORITE); return $app_file ? true : false; } - function app_file($file, $PRIORITE = "ASC") - { $app_file = $this->_app_file($file, $PRIORITE); + function app_file($file, $PRIORITE = "ASC"){ + $app_file = $this->_app_file($file, $PRIORITE); return $app_file ? $app_file : $file; } - function _app_file($file, $PRIORITE = "ASC") - { $app_file = false; + function _app_file($file, $PRIORITE = "ASC"){ + $app_file = false; if($PRIORITE == "ASC" && file_exists($this->path("app").$file)) return $this->path("app").$file; - if(($plugins = $this->plugins($PRIORITE)) !== false) - { foreach($plugins as $plugin_name => $plugin) - { if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($this->path("plugins").$plugin_name."/app/".$file)) - { $app_file = $this->path("plugins").$plugin_name."/app/".$file; + if(($plugins = $this->plugins($PRIORITE)) !== false){ + foreach($plugins as $plugin_name => $plugin){ + if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($this->path("plugins").$plugin_name."/app/".$file)){ + $app_file = $this->path("plugins").$plugin_name."/app/".$file; break; } } - if($PRIORITE == "DESC" && !$app_file) - { if(file_exists($this->path("app").$file)) $app_file = $this->path("app").$file; + if($PRIORITE == "DESC" && !$app_file){ + if(file_exists($this->path("app").$file)) $app_file = $this->path("app").$file; } } return $app_file; diff --git a/web/app/init/0100_functions.php b/web/app/init/0100_functions.php index 06f135d..061cef9 100644 --- a/web/app/init/0100_functions.php +++ b/web/app/init/0100_functions.php @@ -1,7 +1,9 @@ \n".htmlentities(print_r($content, true))."\n\n"; + function debug($content){ + echo PHP_SAPI == "cli" ? + "\n".print_r($content, true)."\n" + : "
".htmlentities(print_r($content, true), ENT_QUOTES, "UTF-8")."
"; } ?> \ No newline at end of file diff --git a/web/app/init/0200_inputs.php b/web/app/init/0200_inputs.php index e8759d0..265d0f9 100644 --- a/web/app/init/0200_inputs.php +++ b/web/app/init/0200_inputs.php @@ -1,12 +1,12 @@ $v) - { unset($process[$key][$k]); - if(is_array($v)) - { $process[$key][stripslashes($k)] = $v; + if(get_magic_quotes_gpc()){ + $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); + while(list($key, $val) = each($process)){ + foreach($val as $k => $v){ + unset($process[$key][$k]); + if(is_array($v)){ + $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else $process[$key][stripslashes($k)] = stripslashes($v); @@ -15,46 +15,4 @@ unset($process); } - - - /* - * - * decommentez la fin du fichier pour activer le filtrage - * des inputs (ici POST et FILES) - * - - if($_POST) - { require $this->path("libs")."inputfilter.php"; - $allowed_tags = array - ( "p", "span", "pre", "blockquote", "address", "hr", "br", - "img", - "strong", "em", "u", "i", "b", "s", - "a", - "ul", "ol", "li", - "h1", "h2", "h3", "h4", "h5", "h6" - ); - $allowed_attrs = array - ( "style", - "src", "alt", "width", "height", - "href", "title" - ); - $input_filter = new InputFilter($allowed_tags, $allowed_attrs); - $_POST = $input_filter->process($_POST); - } - - if($_FILES) - { foreach($_FILES as $file_key => $file_infos) - { $v_name = explode(".", $file_infos["name"]); - $ext = strtolower($v_name[count($v_name) - 1]); - if - ( $ext != "png" - && $ext != "jpg" - && $ext != "jpeg" - && $ext != "gif" - ) unset($_FILES[$file_key]); - } - } - - */ - ?> \ No newline at end of file diff --git a/web/app/init/0300_data.php b/web/app/init/0300_data.php index b4dc586..afc41cc 100644 --- a/web/app/init/0300_data.php +++ b/web/app/init/0300_data.php @@ -2,30 +2,30 @@ require $this->app_file("data/mw_sgbd.php"); require $this->app_file("data/mw_data.php"); - if($this->app_file_exists("data/impl/mw_".$this->bdd("sgbd").".php")) - { require $this->app_file("data/impl/mw_".$this->bdd("sgbd").".php"); - if(class_exists($sgbd_impl = "mw_".$this->bdd("sgbd"))) - { if(($plugins = $this->plugins("DESC")) !== false) - { $data = new mw_data(true); - foreach($plugins as $plugin_name => $plugin) - { if($plugin["installed"] && $plugin["enabled"]) - { $data->load_modules($this->path("plugins").$plugin_name."/app/", "data/modules/share/"); + if($this->app_file_exists("data/impl/mw_".$this->bdd("sgbd").".php")){ + require $this->app_file("data/impl/mw_".$this->bdd("sgbd").".php"); + if(class_exists($sgbd_impl = "mw_".$this->bdd("sgbd"))){ + if(($plugins = $this->plugins("DESC")) !== false){ + $data = new mw_data(true); + foreach($plugins as $plugin_name => $plugin){ + if($plugin["installed"] && $plugin["enabled"]){ + $data->load_modules($this->path("plugins").$plugin_name."/app/", "data/modules/share/"); $data->load_modules($this->path("plugins").$plugin_name."/app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/"); } } $data->load_modules($this->path("app"), "data/modules/share/"); $data->load_modules($this->path("app"), "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/"); - $sgbd = new mw_sgbd - ( new $sgbd_impl - ( $this->bdd("host"), + $sgbd = new mw_sgbd( + new $sgbd_impl( + $this->bdd("host"), $this->bdd("base"), $this->bdd("user"), $this->bdd("password") ), $this ); - if($sgbd->extention_ok()) - { $data->set_sgbd($sgbd); + if($sgbd->extention_ok()){ + $data->set_sgbd($sgbd); $data->set_env($this); $this->set_data($data); } diff --git a/web/app/init/0400_config.php b/web/app/init/0400_config.php index 7affb17..beeb2db 100644 --- a/web/app/init/0400_config.php +++ b/web/app/init/0400_config.php @@ -1,18 +1,18 @@ config()) !== false) - { $this->set_config($config); + if(($config = $data->config()) !== false){ + $this->set_config($config); $start_action_params_config = $this->config("start_action_params") ? @unserialize($this->config("start_action_params")) : array(); $out_config = $this->config("out"); $out_config .= $out_config && substr($out_config, -1) != "/" ? "/" : ""; - $this->set_config - ( array - ( "out" => $out_config, + $this->set_config( + array( + "out" => $out_config, "start_action_params" => $start_action_params_config ) ); if($this->set_out_config($data->out_config()) === false) $this->erreur("Impossible de lire la configuration du template"); } - else $this->erreur("Impossible de lire la configuration", true); + else $this->erreur("Impossible de lire la configuration en base", true); ?> \ No newline at end of file diff --git a/web/app/init/0500_users.php b/web/app/init/0500_users.php index 409a7fb..bf06a97 100644 --- a/web/app/init/0500_users.php +++ b/web/app/init/0500_users.php @@ -1,11 +1,10 @@ load_session() !== false) - { if($data->init_user_status($this->config("user_status")) !== false) - { if($data->init_action_status($this->config("action_status")) !== false) - { + if($data->load_session() !== false){ + if($data->init_user_status($this->config("user_status")) !== false){ + if($data->init_action_status($this->config("action_status")) === false){ + $this->erreur("Impossible de charger les statuts des actions", true); } - else $this->erreur("Impossible de charger les statuts des actions", true); } else $this->erreur("Impossible de charger les statuts des utilisateurs", true); } diff --git a/web/app/init/0600_check_instance.php b/web/app/init/0600_check_instance.php index 82f60fa..cd24e27 100644 --- a/web/app/init/0600_check_instance.php +++ b/web/app/init/0600_check_instance.php @@ -1,10 +1,9 @@ check_instance()) !== false) - { if($check_instance_return === true) - { + if(($check_instance_return = $data->check_instance()) !== false){ + if($check_instance_return !== true){ + $this->erreur($check_instance_return, true); } - else $this->erreur($check_instance_return, true); } else $this->erreur("Impossible de verifier l'integrité de la base de donné", true); diff --git a/web/app/init/0700_links.php b/web/app/init/0700_links.php index 36d5537..ffc029b 100644 --- a/web/app/init/0700_links.php +++ b/web/app/init/0700_links.php @@ -1,7 +1,7 @@ init_links()) - { $this->set_link("admin/config", $this->url("admin/config"), "Configuration", 10); + if($this->init_links()){ + $this->set_link("admin/config", $this->url("admin/config"), "Configuration", 10); $this->set_link("admin/users", $this->url("admin/users"), "Utilisateurs", 20); $this->set_link("admin/plugins", $this->url("admin/plugins"), "Plugins", 30); } diff --git a/web/app/init/0800_init_plugins.php b/web/app/init/0800_init_plugins.php index afd3247..699998e 100644 --- a/web/app/init/0800_init_plugins.php +++ b/web/app/init/0800_init_plugins.php @@ -1,9 +1,9 @@ plugins("DESC")) !== false) - { foreach($plugins as $plugin_name => $plugin) - { if($plugin["installed"] && $plugin["enabled"]) - { if(!$plugin["impl"]->init($this)) $this->erreur("erreur lors de l'initialisation du plugin ".$plugin_name, true); + if(($plugins = $this->plugins("DESC")) !== false){ + foreach($plugins as $plugin_name => $plugin){ + if($plugin["installed"] && $plugin["enabled"]){ + if(!$plugin["impl"]->init($this)) $this->erreur("erreur lors de l'initialisation du plugin ".$plugin_name, true); } } } diff --git a/web/app/main.php b/web/app/main.php index e6bfabe..d94172e 100644 --- a/web/app/main.php +++ b/web/app/main.php @@ -1,13 +1,13 @@ etat_is_valid()) $env->render_layout($env->init_layout()); + function __mw_display($env){ + if($env->etat_is_valid()) $env->render_layout($env->init_layout()); } ?> \ No newline at end of file diff --git a/web/app/mods/admin/config.php b/web/app/mods/admin/config.php index 953f982..feb323d 100644 --- a/web/app/mods/admin/config.php +++ b/web/app/mods/admin/config.php @@ -1,26 +1,25 @@ data(); - if(($CONFIG = $env->get_CONFIG()) !== false) - { if(!$CONFIG["out"]) $CONFIG["out"] = "dist"; + function index(&$env){ + $data = $env->data(); + if(($CONFIG = $env->get_CONFIG()) !== false){ + if(!$CONFIG["out"]) $CONFIG["out"] = "dist"; $env->set_out("config", $CONFIG); - if(($out_config = $env->get_out_config()) !== false) - { $env->set_out("out_config", $out_config); - if($env->set_out("out_pathes", $env->out_pathes()) !== false) - { if($_POST) - { $env->set_out("config", $_POST); - if(preg_match("/^[0-9]+$/", $_POST["max_list"])) - { if(!$_POST["contact_form"] || trim($_POST["email"])) - { $CONTINUE = true; + if(($out_config = $env->get_out_config()) !== false){ + $env->set_out("out_config", $out_config); + if($env->set_out("out_pathes", $env->out_pathes()) !== false){ + if($_POST){ + $env->set_out("config", $_POST); + if(preg_match("/^[0-9]+$/", $_POST["max_list"])){ + if(!$_POST["contact_form"] || trim($_POST["email"])){ + $CONTINUE = true; if($CONTINUE && $data->set_config("site_name", $_POST["site_name"])); else $CONTINUE = false; if($CONTINUE && $data->set_config("description", $_POST["description"])); @@ -35,16 +34,16 @@ else $CONTINUE = false; if($CONTINUE && $data->set_config("out", $_POST["out"])); else $CONTINUE = false; - if($CONTINUE) - { foreach($out_config as $key => $values) - { if($data->set_config("out_".$key, isset($_POST["out_".$key]) ? $_POST["out_".$key] : "") === false) - { $CONTINUE = false; + if($CONTINUE){ + foreach($out_config as $key => $values){ + if($data->set_config("out_".$key, isset($_POST["out_".$key]) ? $_POST["out_".$key] : "") === false){ + $CONTINUE = false; break; } } } - if($CONTINUE) $env->redirect - ( $env->url("admin/config"), + if($CONTINUE) $env->redirect( + $env->url("admin/config"), "la configuration a été enregistrée" ); else $env->erreur("Impossible d'enregistrer la configuration"); diff --git a/web/app/mods/admin/index.php b/web/app/mods/admin/index.php index 5ef3ed7..ae79169 100644 --- a/web/app/mods/admin/index.php +++ b/web/app/mods/admin/index.php @@ -1,9 +1,9 @@ run("admin/config"); + class mw_admin_index extends mw_mod{ + + function index(&$env){ + $env->run("admin/config"); } } diff --git a/web/app/mods/admin/plugins.php b/web/app/mods/admin/plugins.php index fe804da..0830f2f 100644 --- a/web/app/mods/admin/plugins.php +++ b/web/app/mods/admin/plugins.php @@ -1,45 +1,45 @@ plugins = $env->plugins("DESC")) === false) return "impossible de lire la liste des plugins"; + function validate(&$env){ + if(($this->plugins = $env->plugins("DESC")) === false) return "impossible de lire la liste des plugins"; return true; } - function index(&$env) - { if($this->plugins !== false) - { if($_POST) - { $OK = true; - foreach($this->plugins as $plugin_name => $plugin) - { if(isset($_POST["priorite_".$plugin_name])) - { $this->plugins[$plugin_name]["priorite"] = $_POST["priorite_".$plugin_name]; - if(!preg_match("/^[0-9]+(\.[0-9]+)?$/", $_POST["priorite_".$plugin_name])) - { $env->message("les priorités des plugins doivent être des nombres"); + function index(&$env){ + if($this->plugins !== false){ + if($_POST){ + $OK = true; + foreach($this->plugins as $plugin_name => $plugin){ + if(isset($_POST["priorite_".$plugin_name])){ + $this->plugins[$plugin_name]["priorite"] = $_POST["priorite_".$plugin_name]; + if(!preg_match("/^[0-9]+(\.[0-9]+)?$/", $_POST["priorite_".$plugin_name])){ + $env->message("les priorités des plugins doivent être des nombres"); $OK = false; break; } } else $this->plugins[$plugin_name]["priorite"] = 0; } - if($OK) - { foreach($this->plugins as $plugin_name => $plugin) - { $plugin_data = array - ( "installed" => $this->plugins[$plugin_name]["installed"], + if($OK){ + foreach($this->plugins as $plugin_name => $plugin){ + $plugin_data = array( + "installed" => $this->plugins[$plugin_name]["installed"], "enabled" => $this->plugins[$plugin_name]["enabled"], "priorite" => $this->plugins[$plugin_name]["priorite"] ); - if(!$env->set_plugin_data($plugin_name, $plugin_data)) - { $env->erreur("impossible de mettre à jour la priorité du plugin ".$plugin_name); + if(!$env->set_plugin_data($plugin_name, $plugin_data)){ + $env->erreur("impossible de mettre à jour la priorité du plugin ".$plugin_name); $OK = false; break; } } - if($OK) - { $env->redirect - ( $env->url("admin/plugins/index"), + if($OK){ + $env->redirect( + $env->url("admin/plugins/index"), "les priorités des plugins ont été enregistrées" ); } @@ -50,20 +50,20 @@ else $env->erreur("impossible de lire la liste des plugins"); } - function install(&$env) - { $plugin_name = $_GET[$env->param("id")]; - if(isset($this->plugins[$plugin_name])) - { $impl = $this->plugins[$plugin_name]["impl"]; + function install(&$env){ + $plugin_name = $_GET[$env->param("id")]; + if(isset($this->plugins[$plugin_name])){ + $impl = $this->plugins[$plugin_name]["impl"]; $res = $impl->install($env); - if($res === true) - { $plugin_data = array - ( "installed" => true, + if($res === true){ + $plugin_data = array( + "installed" => true, "enabled" => false, "priorite" => isset($this->plugins[$plugin_name]["priorite"]) ? $this->plugins[$plugin_name]["priorite"] : 0 ); - if($env->set_plugin_data($plugin_name, $plugin_data)) - { $env->redirect - ( $env->url("admin/plugins/index"), + if($env->set_plugin_data($plugin_name, $plugin_data)){ + $env->redirect( + $env->url("admin/plugins/index"), "le plugin a été installé" ); } @@ -74,20 +74,20 @@ else $env->erreur("impossible de trouver le plugin ".$plugin_name); } - function uninstall(&$env) - { $plugin_name = $_GET[$env->param("id")]; - if(isset($this->plugins[$plugin_name])) - { $impl = $this->plugins[$plugin_name]["impl"]; + function uninstall(&$env){ + $plugin_name = $_GET[$env->param("id")]; + if(isset($this->plugins[$plugin_name])){ + $impl = $this->plugins[$plugin_name]["impl"]; $res= $impl->uninstall($env); - if($res === true) - { $plugin_data = array - ( "installed" => false, + if($res === true){ + $plugin_data = array( + "installed" => false, "enabled" => false, "priorite" => isset($this->plugins[$plugin_name]["priorite"]) ? $this->plugins[$plugin_name]["priorite"] : 0 ); - if($env->set_plugin_data($plugin_name, $plugin_data)) - { $env->redirect - ( $env->url("admin/plugins/index"), + if($env->set_plugin_data($plugin_name, $plugin_data)){ + $env->redirect( + $env->url("admin/plugins/index"), "le plugin a été désinstallé" ); } @@ -98,22 +98,22 @@ else $env->erreur("impossible de trouver le plugin ".$plugin_name); } - function enable(&$env) - { $plugin_name = $_GET[$env->param("id")]; - if(isset($this->plugins[$plugin_name])) - { if($this->plugins[$plugin_name]["installed"]) - { if(!$this->plugins[$plugin_name]["enabled"]) - { $impl = $this->plugins[$plugin_name]["impl"]; + function enable(&$env){ + $plugin_name = $_GET[$env->param("id")]; + if(isset($this->plugins[$plugin_name])){ + if($this->plugins[$plugin_name]["installed"]){ + if(!$this->plugins[$plugin_name]["enabled"]){ + $impl = $this->plugins[$plugin_name]["impl"]; $res = $impl->enable($env); - if($res === true) - { $plugin_data = array - ( "installed" => true, + if($res === true){ + $plugin_data = array( + "installed" => true, "enabled" => true, "priorite" => isset($this->plugins[$plugin_name]["priorite"]) ? $this->plugins[$plugin_name]["priorite"] : 0 ); - if($env->set_plugin_data($plugin_name, $plugin_data)) - { $env->redirect - ( $env->url("admin/plugins/index"), + if($env->set_plugin_data($plugin_name, $plugin_data)){ + $env->redirect( + $env->url("admin/plugins/index"), "le plugin a été activé" ); } @@ -128,22 +128,22 @@ else $env->erreur("impossible de trouver le plugin ".$plugin_name); } - function disable(&$env) - { $plugin_name = $_GET[$env->param("id")]; - if(isset($this->plugins[$plugin_name])) - { if($this->plugins[$plugin_name]["installed"]) - { if($this->plugins[$plugin_name]["enabled"]) - { $impl = $this->plugins[$plugin_name]["impl"]; + function disable(&$env){ + $plugin_name = $_GET[$env->param("id")]; + if(isset($this->plugins[$plugin_name])){ + if($this->plugins[$plugin_name]["installed"]){ + if($this->plugins[$plugin_name]["enabled"]){ + $impl = $this->plugins[$plugin_name]["impl"]; $res = $impl->disable($env); - if($res === true) - { $plugin_data = array - ( "installed" => true, + if($res === true){ + $plugin_data = array( + "installed" => true, "enabled" => false, "priorite" => isset($this->plugins[$plugin_name]["priorite"]) ? $this->plugins[$plugin_name]["priorite"] : 0 ); - if($env->set_plugin_data($plugin_name, $plugin_data)) - { $env->redirect - ( $env->url("admin/plugins/index"), + if($env->set_plugin_data($plugin_name, $plugin_data)){ + $env->redirect( + $env->url("admin/plugins/index"), "le plugin a été désactivé" ); } diff --git a/web/app/mods/admin/users.php b/web/app/mods/admin/users.php index f175fdc..3559387 100644 --- a/web/app/mods/admin/users.php +++ b/web/app/mods/admin/users.php @@ -1,69 +1,69 @@ data(); + function validate(&$env){ + $data = $env->data(); if(($this->status = $data->status()) === false) return "impossible de lire la liste des statuts"; return true; } - function index(&$env) - { $data = $env->data(); - if - ( $env->set_out - ( "users", - $data->users - ( $_GET[$env->param("start")] ? $_GET[$env->param("start")] : 0, + function index(&$env){ + $data = $env->data(); + if( + $env->set_out( + "users", + $data->users( + $_GET[$env->param("start")] ? $_GET[$env->param("start")] : 0, $_GET[$env->param("alpha")], $_GET[$env->param("status")] ) ) !== false - ) - { if($this->status) - { $env->set_out("status", $this->status); + ){ + if($this->status){ + $env->set_out("status", $this->status); } else $env->erreur("impossible de lire la liste des status"); } else $env->erreur("impossible de lire la liste des utilisateurs"); } - function add(&$env) - { $data = $env->data(); - if($this->status) - { $env->set_out("status", $this->status); + function add(&$env){ + $data = $env->data(); + if($this->status){ + $env->set_out("status", $this->status); $env->set_out("user", array("status" => $data->creation_default_status())); - if($_POST) - { $env->set_out("user", $_POST); - if($_POST["login"]) - { if(($exists = $data->user($_POST["login"])) !== false) - { if(!$exists) - { $VALID = true; - if(!$_POST["email"]) - { $env->message("merci de preciser un email"); + if($_POST){ + $env->set_out("user", $_POST); + if($_POST["login"]){ + if(($exists = $data->user($_POST["login"])) !== false){ + if(!$exists){ + $VALID = true; + if(!$_POST["email"]){ + $env->message("merci de preciser un email"); $VALID = false; } - if(!$_POST["password"]) - { $env->message("merci de preciser un mot de passe"); + if(!$_POST["password"]){ + $env->message("merci de preciser un mot de passe"); $VALID = false; } - if($_POST["password"] != $_POST["password_confirm"]) - { $env->message("la confirmation du mot de passe est incorrecte"); + if($_POST["password"] != $_POST["password_confirm"]){ + $env->message("la confirmation du mot de passe est incorrecte"); $VALID = false; } - if($VALID) - { if - ( $data->add_user - ( $_POST["login"], + if($VALID){ + if( + $data->add_user( + $_POST["login"], md5($_POST["password"]), $_POST["email"], $_POST["status"] ) ) - $env->redirect - ( $env->url("admin/users"), + $env->redirect( + $env->url("admin/users"), "l'utilisateur ".$_POST["login"]." a été ajouté" ); else $env->erreur("Impossible d'ajouter l'utilisateur"); @@ -79,45 +79,45 @@ else $env->erreur("impossible de lire la liste des status"); } - function edit(&$env) - { $data = $env->data(); - if($this->status) - { $env->set_out("status", $this->status); - if($env->set_out("user", $data->user($_GET[$env->param("id")]))) - { if($_POST) - { $user = $env->out("user"); + function edit(&$env){ + $data = $env->data(); + if($this->status){ + $env->set_out("status", $this->status); + if($env->set_out("user", $data->user($_GET[$env->param("id")]))){ + if($_POST){ + $user = $env->out("user"); $id = $user["id"]; $login = $user["login"]; $password = $user["password"]; $_POST["login"] = $login; $env->set_out("user", $_POST); $VALID = true; - if(!$_POST["email"]) - { $env->message("merci de preciser un email"); + if(!$_POST["email"]){ + $env->message("merci de preciser un email"); $VALID = false; } - if(isset($_POST["change_password"]) && $_POST["change_password"]) - { if(!$_POST["password"]) - { $env->message("merci de preciser un mot de passe"); + if(isset($_POST["change_password"]) && $_POST["change_password"]){ + if(!$_POST["password"]){ + $env->message("merci de preciser un mot de passe"); $VALID = false; } - if($_POST["password"] != $_POST["password_confirm"]) - { $env->message("la confirmation du mot de passe est incorrecte"); + if($_POST["password"] != $_POST["password_confirm"]){ + $env->message("la confirmation du mot de passe est incorrecte"); $VALID = false; } } - if($VALID) - { if - ( $data->set_user - ( $id, + if($VALID){ + if( + $data->set_user( + $id, $login, isset($_POST["change_password"]) && $_POST["change_password"] ? md5($_POST["password"]) : $password, $_POST["email"], $_POST["status"] ) ) - $env->redirect - ( $env->url("admin/users"), + $env->redirect( + $env->url("admin/users"), "l'utilisateur ".$login." a été modifié" ); else $env->erreur("Impossible de mettre à jour l'utilisateur"); @@ -129,12 +129,12 @@ else $env->erreur("impossible de lire la liste des status"); } - function del(&$env) - { $data = $env->data(); - if($env->set_out("user", $data->user($_GET[$env->param("id")]))) - { $user = $env->out("user"); - if($data->del_user($_GET[$env->param("id")])) $env->redirect - ( $env->url("admin/users"), + function del(&$env){ + $data = $env->data(); + if($env->set_out("user", $data->user($_GET[$env->param("id")]))){ + $user = $env->out("user"); + if($data->del_user($_GET[$env->param("id")])) $env->redirect( + $env->url("admin/users"), "l'utilisateur ".$user["login"]." a été supprimé" ); else $env->erreur("Impossible de supprimer l'utilisateur"); diff --git a/web/app/mods/forms/contact.php b/web/app/mods/forms/contact.php index d0fcc50..69f3da8 100644 --- a/web/app/mods/forms/contact.php +++ b/web/app/mods/forms/contact.php @@ -1,32 +1,31 @@ path("libs")."ptitcaptcha.php")) require $this->path("libs")."ptitcaptcha.php"; + class mw_forms_contact extends mw_mod{ - class mw_forms_contact extends mw_mod - { - - function validate(&$env) - { if($pages_view_mod = $env->get_mod("pages/view")) - { return $pages_view_mod->validate(&$env); - } - return true; - } - - function index(&$env) - { if($env->config("contact_form") && $env->config("email")) - { if($_POST) - { if - ( $this->send - ( $env, + function index(&$env){ + if($env->config("contact_form") && $env->config("email")){ + if($env->config("captcha")){ + if(file_exists($env->path("libs")."ptitcaptcha.php")){ + require $env->path("libs")."ptitcaptcha.php"; + } + else{ + $env->erreur("fichier du captcha introuvable"); + return; + } + } + if($_POST){ + if( + $this->__send_form( + $env, $_POST["email"], "[".$env->config("site_name")."] nouveau message", $_POST["message"], $env->config("email"), $env->config("captcha") ) - ) - { $env->redirect - ( $env->url("index"), + ){ + $env->redirect( + $env->url("index"), "Le message a été envoyé", 2 ); @@ -36,25 +35,21 @@ else $env->run("index"); } - function send(&$env, $from, $titre, $message, $dest, $captcha) - { $env->set_out("ENVOYE", false); - if($captcha && !file_exists($env->path("libs")."ptitcaptcha.php")) - { $env->erreur("fichier du captcha introuvable"); - return false; - } - if(!$captcha || PtitCaptchaHelper::checkCaptcha()) - { if($from) - { if($dest) - { if - ( mail - ( $dest, + function __send_form(&$env, $from, $titre, $message, $dest, $captcha){ + $env->set_out("ENVOYE", false); + if(!$captcha || PtitCaptchaHelper::checkCaptcha()){ + if($from){ + if($dest){ + if( + @mail( + $dest, $titre, $message, "From: ".$from."\r\n" ."Reply-To: ".$from."\r\n" ) - ) - { $env->set_out("ENVOYE", true); + ){ + $env->set_out("ENVOYE", true); return true; } else $env->erreur("Erreur à l'envoi du mail"); diff --git a/web/app/mods/index/index.php b/web/app/mods/index/index.php index 9894853..52ead31 100644 --- a/web/app/mods/index/index.php +++ b/web/app/mods/index/index.php @@ -1,14 +1,13 @@ config("start_action"); - if($start_action) - { $start_action_params = $env->config("start_action_params"); - if($start_action_params && is_array($start_action_params)) - { foreach($start_action_params as $key => $value) $_GET[$key] = $value; + function index(&$env){ + $start_action = $env->config("start_action"); + if($start_action){ + $start_action_params = $env->config("start_action_params"); + if($start_action_params && is_array($start_action_params)){ + foreach($start_action_params as $key => $value) $_GET[$key] = $value; } $env->run($start_action); } diff --git a/web/app/mods/mw_mod.php b/web/app/mods/mw_mod.php index cfba689..04f8b75 100644 --- a/web/app/mods/mw_mod.php +++ b/web/app/mods/mw_mod.php @@ -1,11 +1,15 @@ prepare_inputs(); } + function validate(&$env){ + return true; + } + + function prepare_inputs(&$env){ + return true; +// return $env->prepare_inputs(); + } } diff --git a/web/app/mods/reponses/html.php b/web/app/mods/reponses/html.php index db13052..98b07d3 100644 --- a/web/app/mods/reponses/html.php +++ b/web/app/mods/reponses/html.php @@ -1,17 +1,14 @@ validation_result = true; + function validate(&$env){ + $this->validation_result = true; $this->validate_status($env); $this->validate_user($env); - return true; + return $this->validation_result; } - function validate_status(&$env) - { $data = $env->data(); + function validate_status(&$env){ + $data = $env->data(); if(($this->status = $data->status()) !== false) $this->validation_result = true; else $this->validation_result = "impossible de lire la liste des statuts"; } - function validate_user(&$env) - { if($this->user = $env->user()) $this->validation_result = true; + function validate_user(&$env){ + if($this->user = $env->user()) $this->validation_result = true; else $this->validation_result = "Vous devez être identifier pour accéder à cette page"; } - function index(&$env) - { if($this->validation_result === true) - { $env->run("users/infos"); + function index(&$env){ + if($this->validation_result === true){ + $env->run("users/infos"); } } diff --git a/web/app/mods/users/identification.php b/web/app/mods/users/identification.php index 36b6d2b..4be3001 100644 --- a/web/app/mods/users/identification.php +++ b/web/app/mods/users/identification.php @@ -1,17 +1,16 @@ user()) - { $data = $env->data(); - if($data->login(trim($_POST['login']), trim($_POST['pass']))) - { $env->redirect - ( isset($_POST["from"]) ? urldecode($_POST["from"]) : $this->env->url(), + function login(&$env){ + if(!$env->user()){ + $data = $env->data(); + if($data->login(trim($_POST['login']), trim($_POST['pass']))){ + $env->redirect( + isset($_POST["from"]) ? urldecode($_POST["from"]) : $this->env->url(), "Vous êtes maintenant identifié en tant que ".$_POST['login'] ); } @@ -20,11 +19,11 @@ else $env->message("Vous êtes déjà identifié"); } - function logout(&$env) - { $data = $env->data(); - if($data->logout()) - { $env->redirect - ( $env->url(), + function logout(&$env){ + $data = $env->data(); + if($data->logout()){ + $env->redirect( + $env->url(), "Vous n'êtes plus identifié sur le site" ); } diff --git a/web/app/mods/users/index.php b/web/app/mods/users/index.php index 3cd2462..8f97880 100644 --- a/web/app/mods/users/index.php +++ b/web/app/mods/users/index.php @@ -1,9 +1,9 @@ run("users/infos"); + class mw_users_index extends mw_mod{ + + function index(&$env){ + $env->run("users/infos"); } } diff --git a/web/app/mods/users/infos.php b/web/app/mods/users/infos.php index 0b0e427..d3583af 100644 --- a/web/app/mods/users/infos.php +++ b/web/app/mods/users/infos.php @@ -1,62 +1,58 @@ users_compte_mod = $env->get_mod("users/compte")) - { $this->users_compte_mod->validation_result = true; - $this->users_compte_mod->validate_status($env); - $this->users_compte_mod->validate_user($env); - return $this->users_compte_mod->validation_result; + function validate(&$env){ + if($this->users_compte_mod = $env->get_mod("users/compte")){ + return $this->users_compte_mod->validate($env); } return "impossible de trouver le module users/compte"; } - function index(&$env) - { $env->run("users/infos/edit"); + function index(&$env){ + $env->run("users/infos/edit"); } - function edit(&$env) - { if(isset($this->users_compte_mod->user) && $this->users_compte_mod->user !== false) - { $user = $this->users_compte_mod->user; - if($_POST) - { $data = $env->data(); + function edit(&$env){ + if(isset($this->users_compte_mod->user) && $this->users_compte_mod->user !== false){ + $user = $this->users_compte_mod->user; + if($_POST){ + $data = $env->data(); $VALID = true; if($_POST["email"]) $user["email"] = $_POST["email"]; - else - { $env->message("merci de preciser un email"); + else{ + $env->message("merci de preciser un email"); $VALID = false; } - if($VALID && isset($_POST["change_password"]) && $_POST["change_password"]) - { if($_POST["password"]) - { if($_POST["password"] == $_POST["password_confirm"]) - { $user["password"] = md5($_POST["password"]); + if($VALID && isset($_POST["change_password"]) && $_POST["change_password"]){ + if($_POST["password"]){ + if($_POST["password"] == $_POST["password_confirm"]){ + $user["password"] = md5($_POST["password"]); } - else - { $env->message("la confirmation du mot de passe est incorrecte"); + else{ + $env->message("la confirmation du mot de passe est incorrecte"); $VALID = false; } } - else - { $env->message("merci de preciser un mot de passe"); + else{ + $env->message("merci de preciser un mot de passe"); $VALID = false; } } - if($VALID) - { if - ( $data->set_user - ( $user["id"], + if($VALID){ + if( + $data->set_user( + $user["id"], $user["login"], $user["password"], $user["email"], $user["status"] ) ) - $env->redirect - ( $env->url("users/infos"), + $env->redirect( + $env->url("users/infos"), "vos informations ont été modifiées" ); else $env->erreur("Impossible de mettre à jour l'utilisateur"); diff --git a/web/app/mw_plugin.php b/web/app/mw_plugin.php index eb91f9d..a4ec053 100644 --- a/web/app/mw_plugin.php +++ b/web/app/mw_plugin.php @@ -1,38 +1,35 @@ \ No newline at end of file diff --git a/web/config.php b/web/config.php index 4ac10a1..3fba400 100644 --- a/web/config.php +++ b/web/config.php @@ -1,47 +1,43 @@ mtweb"; - ?> \ No newline at end of file diff --git a/web/libs/empty_class.php b/web/libs/empty_class.php index 72c5cd9..30814be 100644 --- a/web/libs/empty_class.php +++ b/web/libs/empty_class.php @@ -31,56 +31,55 @@ */ - class empty_class - { + class empty_class{ var $root_inst; var $modules; - function empty_class($root_inst) - { if($root_inst === true) $this->root_inst = $this; + function empty_class($root_inst){ + if($root_inst === true) $this->root_inst = $this; else $this->root_inst = $root_inst; } - function load_modules($modules_path, $current_modules, $core_modules = null) - { $this->_load_modules($modules_path, $current_modules, $this->root_inst, true); - if(isset($core_modules) && $current_modules != $core_modules) - { $this->_load_modules($modules_path, $core_modules, $this->root_inst, true); + function load_modules($modules_path, $current_modules, $core_modules = null){ + $this->_load_modules($modules_path, $current_modules, $this->root_inst, true); + if(isset($core_modules) && $current_modules != $core_modules){ + $this->_load_modules($modules_path, $core_modules, $this->root_inst, true); } } - function _load_modules($modules_path, $modules_path_suffixe, $root_inst, $recursif = false) - { if(file_exists($modules_path.$modules_path_suffixe) && $dh = opendir($modules_path.$modules_path_suffixe)) - { while(($file = readdir($dh)) !== false) - { if(is_dir($modules_path.$modules_path_suffixe.$file)) - { if($recursif && substr($file, 0, 1) != ".") - { $this->_load_modules($modules_path, $modules_path_suffixe.$file."/", $root_inst, $recursif); + function _load_modules($modules_path, $modules_path_suffixe, $root_inst, $recursif = false){ + if(file_exists($modules_path.$modules_path_suffixe) && $dh = opendir($modules_path.$modules_path_suffixe)){ + while(($file = readdir($dh)) !== false){ + if(is_dir($modules_path.$modules_path_suffixe.$file)){ + if($recursif && substr($file, 0, 1) != "."){ + $this->_load_modules($modules_path, $modules_path_suffixe.$file."/", $root_inst, $recursif); } } - elseif(strcasecmp(substr($file, -4), ".php") == 0) - { $this->load($modules_path.$modules_path_suffixe.$file, $root_inst); + elseif(strcasecmp(substr($file, -4), ".php") == 0){ + $this->load($modules_path.$modules_path_suffixe.$file, $root_inst); } } closedir($dh); } } - function load($module_file, $root_inst) - { if($module_file && file_exists($module_file)) - { $v_path = explode("/", $module_file); + function load($module_file, $root_inst){ + if($module_file && file_exists($module_file)){ + $v_path = explode("/", $module_file); $file = $v_path[count($v_path) - 1]; - if(strcasecmp(substr($file, -4), ".php") == 0) - { $class_name = substr($file, 0, -4); - if(!class_exists($class_name)) - { require_once $module_file; - if(version_compare(PHP_VERSION, '5.0.0', '>=')) - { if(class_exists($class_name) && !isset($this->modules[$class_name])) - { $this->modules[$class_name] = new $class_name($root_inst); + if(strcasecmp(substr($file, -4), ".php") == 0){ + $class_name = substr($file, 0, -4); + if(!class_exists($class_name)){ + require_once $module_file; + if(version_compare(PHP_VERSION, '5.0.0', '>=')){ + if(class_exists($class_name) && !isset($this->modules[$class_name])){ + $this->modules[$class_name] = new $class_name($root_inst); } } - else - { if(class_exists($class_name)) - { aggregate($this, $class_name); + else{ + if(class_exists($class_name)){ + aggregate($this, $class_name); } } } @@ -88,21 +87,21 @@ } } - function __call($method_name, $arguments) - { return $this->empty_class_call($this->root_inst, $method_name, $arguments); + function __call($method_name, $arguments){ + return $this->empty_class_call($this->root_inst, $method_name, $arguments); } - function empty_class_call($inst, $method_name, $arguments) - { $r = false; + function empty_class_call($inst, $method_name, $arguments){ + $r = false; $args = ""; foreach($arguments as $i => $arg) $args .= ($args ? ", " : "")."\$arguments[".$i."]"; - if(isset($inst->modules)) foreach($inst->modules as $module_name => $module) - { if(method_exists($module, $method_name)) - { eval("\$r = \$module->".$method_name."(".$args.");"); + if(isset($inst->modules)) foreach($inst->modules as $module_name => $module){ + if(method_exists($module, $method_name)){ + eval("\$r = \$module->".$method_name."(".$args.");"); break; } - else - { $r = $this->empty_class_call($module, $method_name, $arguments); + else{ + $r = $this->empty_class_call($module, $method_name, $arguments); if($r !== false) break; } } diff --git a/web/libs/sxml.php b/web/libs/sxml.php index 78533f3..7d5bf20 100644 --- a/web/libs/sxml.php +++ b/web/libs/sxml.php @@ -16,8 +16,8 @@ */ -class sxml -{ + class sxml{ + var $parser; var $error_code; var $error_string; @@ -25,50 +25,45 @@ class sxml var $current_column; var $data; var $datas; - function parse($data) - { -// $this->parser = xml_parser_create('UTF-8'); + + function parse($data){ + // $this->parser = xml_parser_create('UTF-8'); + $this->data = array(); + $this->datas = array(); + $this->parser = xml_parser_create(); + xml_set_object($this->parser, $this); + xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_set_element_handler($this->parser, 'tag_open', 'tag_close'); + xml_set_character_data_handler($this->parser, 'cdata'); + if (!xml_parse($this->parser, $data)){ $this->data = array(); - $this->datas = array(); - $this->parser = xml_parser_create(); - xml_set_object($this->parser, $this); - xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1); - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); - xml_set_element_handler($this->parser, 'tag_open', 'tag_close'); - xml_set_character_data_handler($this->parser, 'cdata'); - if (!xml_parse($this->parser, $data)) - { - $this->data = array(); - $this->error_code = xml_get_error_code($this->parser); - $this->error_string = xml_error_string($this->error_code); - $this->current_line = xml_get_current_line_number($this->parser); - $this->current_column = xml_get_current_column_number($this->parser); - } - else - { - $this->data = $this->data['subs']; - } - xml_parser_free($this->parser); + $this->error_code = xml_get_error_code($this->parser); + $this->error_string = xml_error_string($this->error_code); + $this->current_line = xml_get_current_line_number($this->parser); + $this->current_column = xml_get_current_column_number($this->parser); + } + else{ + $this->data = $this->data['subs']; + } + xml_parser_free($this->parser); } - - function tag_open($parser, $tag, $attribs) - { - $this->datas[] = &$this->data; - $this->data = &$this->data['subs'][$tag][]; - if($attribs) $this->data['attrs'] = $attribs; - + + function tag_open($parser, $tag, $attribs){ + $this->datas[] = &$this->data; + $this->data = &$this->data['subs'][$tag][]; + if($attribs) $this->data['attrs'] = $attribs; } - - function cdata($parser, $cdata) - { - @$this->data['data'] .= $cdata; + + function cdata($parser, $cdata){ + @$this->data['data'] .= $cdata; } - - function tag_close($parser, $tag) - { - $this->data =& $this->datas[count($this->datas)-1]; - array_pop($this->datas); + + function tag_close($parser, $tag){ + $this->data =& $this->datas[count($this->datas)-1]; + array_pop($this->datas); } -} + + } ?> \ No newline at end of file diff --git a/web/out/dist/css/actions/admin.css b/web/out/dist/css/actions/admin.css index ea51ffe..370cdea 100644 --- a/web/out/dist/css/actions/admin.css +++ b/web/out/dist/css/actions/admin.css @@ -1,199 +1,199 @@ -table.admin -{ width: 100%; +table.admin{ + width: 100%; } -table.admin tr.hl td -{ padding: 3px; +table.admin tr.hl td{ + padding: 3px; } -table.admin td.action -{ text-align: center; +table.admin td.action{ + text-align: center; width: 50px; } -ul.admin -{ list-style-type: none; +ul.admin{ + list-style-type: none; margin: 10px 10px 20px 10px; text-align: right; padding-bottom: 10px; } -ul.admin li -{ display: inline; +ul.admin li{ + display: inline; } -ul.admin li a -{ padding: 3px 7px 3px 7px; +ul.admin li a{ + padding: 3px 7px 3px 7px; } -ul li a.add -{ padding: 3px 7px 3px 18px; +ul li a.add{ + padding: 3px 7px 3px 18px; } -ul.admin li.admin_form_title -{ display: block; +ul.admin li.admin_form_title{ + display: block; float: left; padding: 0px 7px 3px 7px; } -ul.form -{ clear: both; +ul.form{ + clear: both; list-style-type: none; } -ul.form li -{ clear: both; +ul.form li{ + clear: both; padding: 5px; } -ul.form li label -{ float: left; +ul.form li label{ + float: left; display: block; width: 100px; text-align: right; padding: 0 15px 0 15px; } -ul.form li div p -{ float: left; +ul.form li div p{ + float: left; display: block; width: 350px; text-align: left; padding: 0 0px 15px 0px; + margin: 0; } -ul.form li p span -{ display: block; - padding: 5px; +ul.form li p span{ + display: block; + padding: 0 0 5px 0; font-size: 0.9em; } -ul.admin_form_head -{ clear: both; +ul.admin_form_head{ + clear: both; list-style-type: none; margin: 10px 0px 0px 0px; } -ul.admin_form_head li -{ clear: both; +ul.admin_form_head li{ + clear: both; padding: 5px; text-align: right; line-height: 20px; } -ul.admin_form_head li input -{ margin: 0px 10px 0px 10px; +ul.admin_form_head li input{ + margin: 0px 10px 0px 10px; } -ul.admin_form_content -{ list-style-type: none; +ul.admin_form_content{ + list-style-type: none; margin: 0px 0px 0px 0px; padding: 10px 0px 10px 0px; } -ul.admin_form_content ul.admin -{ list-style-type: none; +ul.admin_form_content ul.admin{ + list-style-type: none; margin: 10px 10px 20px 10px; text-align: right; padding-bottom: 10px; } -ul.admin_form_content ul.admin li -{ display: inline; +ul.admin_form_content ul.admin li{ + display: inline; } -ul.admin_form_content ul.admin li a -{ padding: 3px 7px 3px 7px; +ul.admin_form_content ul.admin li a{ + padding: 3px 7px 3px 7px; } -ul.admin_form_content ul li a.add -{ padding: 3px 7px 3px 18px; +ul.admin_form_content ul li a.add{ + padding: 3px 7px 3px 18px; } -ul.admin_form_content ul.admin li.admin_form_title -{ display: block; +ul.admin_form_content ul.admin li.admin_form_title{ + display: block; float: left; padding: 0px 7px 3px 7px; } -.admin_source_infos -{ margin: 0px 10px 10px 20px; +.admin_source_infos{ + margin: 0px 10px 10px 20px; } -.admin_source_infos ul.admin_source_head -{ list-style-type: none; +.admin_source_infos ul.admin_source_head{ + list-style-type: none; margin: 0px 0px 0px 0px; text-align: right; padding-bottom: 10px; padding-top: 5px; } -ul.admin_source_head li -{ display: inline; +ul.admin_source_head li{ + display: inline; } -ul.admin_source_head li a -{ padding: 3px 7px 3px 7px; +ul.admin_source_head li a{ + padding: 3px 7px 3px 7px; } -ul.admin_source_head li.admin_form_title -{ display: block; +ul.admin_source_head li.admin_form_title{ + display: block; float: left; padding: 0px 7px 3px 7px; font-size: 1.2em; } -.admin_source_url -{ margin: 10px 0px 0px 20px; +.admin_source_url{ + margin: 10px 0px 0px 20px; } -input[type=text], input[type=file], input[type=password], textarea, select -{ padding: 3px; +input[type=text], input[type=file], input[type=password], textarea, select{ + padding: 3px; } -input[type=submit], a.button -{ padding: 3px 7px 3px 7px; +input[type=submit], a.button{ + padding: 3px 7px 3px 7px; cursor: pointer; } -ul.form li.buttons -{ text-align: center; +ul.form li.buttons{ + text-align: center; } -.tinymce -{ width: 500px; +.tinymce{ + width: 500px; height: 400px; } -.document -{ margin: 5px; +.document{ + margin: 5px; padding: 5px; } -.document .delete -{ float: right; +.document .delete{ + float: right; } -.document .clear -{ height: 5px; +.document .clear{ + height: 5px; } -.xml_edit_content -{ display: block; +.xml_edit_content{ + display: block; margin: 5px 10px 30px 0px; text-align: right; } -.xml_edit_content textarea -{ width: 97%; +.xml_edit_content textarea{ + width: 97%; } -ul.xml_infos -{ margin: 10px 10px 0px 20px; +ul.xml_infos{ + margin: 10px 10px 0px 20px; } -ul.xml_infos li -{ padding: 5px; +ul.xml_infos li{ + padding: 5px; margin: 0px 0px 0px 20px; } - diff --git a/web/out/dist/css/actions/admin_plugins.css b/web/out/dist/css/actions/admin_plugins.css index e899c45..9448171 100644 --- a/web/out/dist/css/actions/admin_plugins.css +++ b/web/out/dist/css/actions/admin_plugins.css @@ -1,32 +1,39 @@ -ul.plugins -{ list-style-type: none; +ul.plugins{ + list-style-type: none; margin: 20px 10px; } -ul.plugins li -{ padding: 5px 10px; +ul.plugins li{ + padding: 5px 10px; margin: 10px; + border-radius: 3px; } -ul.plugins p.folder -{ float: right; +ul.plugins h3{ + margin: 0 0 10px 0; + border-bottom: none; +} + +ul.plugins p.folder{ + float: right; font-size: 0.9em; + margin: 2px 0 0 0; } -ul.plugins li ul.plugin_links -{ text-align: right; +ul.plugins li ul.plugin_links{ + text-align: right; } -ul.plugins li ul.plugin_links li -{ display: inline; +ul.plugins li ul.plugin_links li{ + display: inline; padding: 1px 7px; margin: 0; } -ul.plugins li ul.plugin_links li input -{ width: 2em; +ul.plugins li ul.plugin_links li input{ + width: 2em; } -ul.plugins li.buttons -{ text-align: right; -} \ No newline at end of file +ul.plugins li.buttons{ + text-align: right; +} diff --git a/web/out/dist/css/actions/forms_contact.css b/web/out/dist/css/actions/forms_contact.css index b59c801..c749a73 100644 --- a/web/out/dist/css/actions/forms_contact.css +++ b/web/out/dist/css/actions/forms_contact.css @@ -1,32 +1,32 @@ @import url("admin.css"); -#contact form -{ margin: 20px 0px 10px 0px; +#contact form{ + margin: 20px 0px 10px 0px; } -#contact form .ptitcaptcha img -{ float: left; +#contact form .ptitcaptcha img{ + float: left; margin: 0px 10px 0px 0px; } -#contact ul.form li label -{ float: left; +#contact ul.form li label{ + float: left; display: block; width: 50px; text-align: right; padding: 0 15px 0 15px; } -#contact ul.form li p -{ float: left; +#contact ul.form li p{ + float: left; display: block; width: 380px; text-align: left; padding: 0 15px 5px 15px; } -#contact ul.form li p span -{ display: block; +#contact ul.form li p span{ + display: block; padding: 5px; font-size: 0.9em; -} \ No newline at end of file +} diff --git a/web/out/dist/css/colors.css b/web/out/dist/css/colors.css index 9b50de8..b928fb6 100644 --- a/web/out/dist/css/colors.css +++ b/web/out/dist/css/colors.css @@ -1,88 +1,88 @@ -body -{ background-color: #ffffff; +body{ + background-color: #ffffff; color: #333333; } -a -{ text-decoration: none; +a{ + text-decoration: none; color: #000066; } -a img -{ border: none; +a img{ + border: none; } -a:hover -{ color: #c0c0c0; +a:hover{ + color: #c0c0c0; } -.navig -{ color: #333333; +.navig{ + color: #333333; border: solid 1px #c0c0c0; background-color: #ffffff; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -.loading -{ background-image: url("../icons/ajax-loader.gif"); +.loading{ + background-image: url("../icons/ajax-loader.gif"); background-repeat: no-repeat; background-position: 5px 5px; } /* ------------------------- messages --------------- */ -.messages -{ border: solid 1px #c0c0c0; +.messages{ + border: solid 1px #c0c0c0; } -.erreur -{ border: solid 1px #c0c0c0; +.erreur{ + border: solid 1px #c0c0c0; } -.redirect_message div -{ border: solid 1px #c0c0c0; +.redirect_message div{ + border: solid 1px #c0c0c0; } /* ------------------------- blocs generaux --------- */ -#header -{ padding-top: 10px; +#header{ + padding-top: 10px; } -#header .content -{ border-bottom: solid 1px #d9d9d9; +#header .content{ + border-bottom: solid 1px #d9d9d9; } -#colonne -{ /*border-right: dashed 1px #555555; */ +#colonne{ + /*border-right: dashed 1px #555555; */ } -#footer .content -{ border-top: solid 1px #e9e9e9; +#footer .content{ + border-top: solid 1px #e9e9e9; } -#footer .content p -{ color: #777777; +#footer .content p{ + color: #777777; } /* ----------------------------------- menu top ----- */ -#menu_top ul.menu li a -{ border: solid 1px #e9e9e9; +#menu_top ul.menu li a{ + border: solid 1px #e9e9e9; background-color: #ffffff; } -#menu_top ul.menu li ul li a -{ border-top: none; +#menu_top ul.menu li ul li a{ + border-top: none; border-right: solid 1px #333333; border-bottom: none; border-left: solid 1px #333333; background-color: #050505; } -#menu_top ul.menu li ul li.last a -{ border-top: none; +#menu_top ul.menu li ul li.last a{ + border-top: none; border-right: solid 1px #333333; border-bottom: solid 1px #333333; border-left: solid 1px #333333; @@ -91,124 +91,124 @@ a:hover /* ----------------------------------- admin --------- */ -table.admin tr.hl td -{ border: solid 1px #d1d1d1; +table.admin tr.hl td{ + border: solid 1px #d1d1d1; } -table.admin tr.hl:hover -{ background-color: #f9f9f9; +table.admin tr.hl:hover{ + background-color: #f9f9f9; } -input[type=text], input[type=file], input[type=password], textarea, select -{ border: solid 1px #999999; +input[type=text], input[type=file], input[type=password], textarea, select{ + border: solid 1px #999999; color: #333333; } -input[type=submit], a.button -{ border: solid 1px #d1d1d1; +input[type=submit], a.button{ + border: solid 1px #d1d1d1; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -input[type=submit]:hover, a.button:hover -{ border: solid 1px #d1d1d1; +input[type=submit]:hover, a.button:hover{ + border: solid 1px #d1d1d1; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -ul.admin -{ border-bottom: dashed 1px #c0c0c0; +ul.admin{ + border-bottom: dashed 1px #c0c0c0; } -ul.admin_form_head -{ border: solid 1px #c0c0c0; +ul.admin_form_head{ + border: solid 1px #c0c0c0; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -ul.admin_form_content ul.admin -{ border-bottom: none; +ul.admin_form_content ul.admin{ + border-bottom: none; } -ul.admin li a -{ border: solid 1px #d1d1d1; +ul.admin li a{ + border: solid 1px #d1d1d1; } -.admin_source_infos ul.admin li a -{ border: none; +.admin_source_infos ul.admin li a{ + border: none; background-color: #101010; color: #c0c0c0; } -ul.admin li a.add -{ background-image: url("../icons/add.gif"); +ul.admin li a.add{ + background-image: url("../icons/add.gif"); background-repeat: no-repeat; background-position: 3px 6px; border: solid 1px #d1d1d1; } -ul.admin li a:hover -{ +ul.admin li a:hover{ + } -.admin_source_infos -{ border: solid 1px #c0c0c0; +.admin_source_infos{ + border: solid 1px #c0c0c0; /* background-color: #0a0a0a;*/ border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -.admin_source_infos ul.admin li a:hover -{ border: none; +.admin_source_infos ul.admin li a:hover{ + border: none; background-color: #333333; color: #c0c0c0; } -#documents .document -{ border: solid 1px #c0c0c0; +#documents .document{ + border: solid 1px #c0c0c0; } /* ------------------------------- plugins ----------- */ -ul.plugins li -{ border: solid 1px #c0c0c0; +ul.plugins li{ + border: solid 1px #c0c0c0; } -ul.plugins li.enabled -{ background-color: #ffffff; +ul.plugins li.enabled{ + background-color: #ffffff; } -ul.plugins li.disabled -{ background-color: #f7f7f7; +ul.plugins li.disabled{ + background-color: #f7f7f7; } -ul.plugins li.uninstalled -{ background-color: #e5e5e5; +ul.plugins li.uninstalled{ + background-color: #e5e5e5; } -ul.plugins li ul.plugin_links li -{ border-top: none; +ul.plugins li ul.plugin_links li{ + border-top: none; border-right: none; border-bottom: none; border-left: solid 1px #c0c0c0; } -ul.plugins li ul.plugin_links li input -{ border: solid 1px #c0c0c0; +ul.plugins li ul.plugin_links li input{ + border: solid 1px #c0c0c0; } /* ------------------------------- liste groupes ----------- */ -ul.groupes li h4 a -{ border: solid 1px #d9d9d9; +ul.groupes li h4 a{ + border: solid 1px #d9d9d9; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } /* ------------------------------- page album ----------- */ -p#play_all a -{ border: solid 1px #c0c0c0; +p#play_all a{ + border: solid 1px #c0c0c0; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; background-image: url("../icons/ecouter.png"); @@ -219,86 +219,86 @@ p#play_all a /* ----------------------------------- sources --------- */ -ul.albums li a -{ border: solid 1px #555555; +ul.albums li a{ + border: solid 1px #555555; } -.logo_groupe -{ /*border: solid 1px #e9e9e9;*/ +.logo_groupe{ + /*border: solid 1px #e9e9e9;*/ background-color: #ffffff; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -ul#lien_contact li a -{ border-bottom: solid 1px #d9d9d9; +ul#lien_contact li a{ + border-bottom: solid 1px #d9d9d9; } -#colonne ul#album_links -{ /*border-bottom: solid 1px #333333;*/ +#colonne ul#album_links{ + /*border-bottom: solid 1px #333333;*/ } -#colonne ul#album_links li -{ +#colonne ul#album_links li{ + } -#colonne ul.menu_albums li -{ border: solid 1px #d9d9d9; +#colonne ul.menu_albums li{ + border: solid 1px #d9d9d9; background-color: #ffffff; } -#center ul.menu_albums li -{ border: solid 1px #d9d9d9; +#center ul.menu_albums li{ + border: solid 1px #d9d9d9; float: left; } -.track -{ border: solid 1px #ffffff; +.track{ + border: solid 1px #ffffff; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -.track h5 -{ background-color: #ffffff; +.track h5{ + background-color: #ffffff; border-radius: 3px 3px 0px 0px; -moz-border-radius: 3px 3px 0px 0px; } -.playing_track -{ border: solid 1px #dedede; +.playing_track{ + border: solid 1px #dedede; background-color: #ffffff; border-radius: 3px 3px 3px 3px; -moz-border-radius: 3px 3px 3px 3px; } -.player_progress -{ background-color: #ececec; +.player_progress{ + background-color: #ececec; } -.player_progress .loaded -{ background-color: #dedede; +.player_progress .loaded{ + background-color: #dedede; } -.player_progress .position -{ background-color: #999999; +.player_progress .position{ + background-color: #999999; } -.player_controls a img -{ border: none; +.player_controls a img{ + border: none; } -.source_arbo ul.menu_source -{ float: right; +.source_arbo ul.menu_source{ + float: right; margin: 0px 10px 1px 0px; } -.source_arbo ul.menu_source li -{ float: right; +.source_arbo ul.menu_source li{ + float: right; padding: 1px; } -.source_arbo ul.menu_source li a -{ display: block; +.source_arbo ul.menu_source li a{ + display: block; text-align: center; background-color: #151515; border-radius: 3px 3px 0px 0px; @@ -306,19 +306,19 @@ ul#lien_contact li a padding: 2px 5px 2px 5px; } -.source_arbo ul.menu_source li a:hover -{ +.source_arbo ul.menu_source li a:hover{ + } -.source_arbo ul.menu_source li.icon a -{ border: none; +.source_arbo ul.menu_source li.icon a{ + border: none; padding: 2px 2px 2px 2px; } -.pistes -{ border-left: none; +.pistes{ + border-left: none; } -.derivation -{ border-left: none; +.derivation{ + border-left: none; } diff --git a/web/out/dist/css/footer.css b/web/out/dist/css/footer.css index d9393d4..723053a 100644 --- a/web/out/dist/css/footer.css +++ b/web/out/dist/css/footer.css @@ -1,12 +1,12 @@ -#footer .content -{ height: 100px; +#footer .content{ + height: 100px; } -#footer .content p -{ text-align: right; +#footer .content p{ + text-align: right; } -#footer .content p#a_propos_links -{ text-align: left; +#footer .content p#contact_links{ + text-align: left; float: left; } diff --git a/web/out/dist/css/general.css b/web/out/dist/css/general.css index dd3602e..3a16976 100644 --- a/web/out/dist/css/general.css +++ b/web/out/dist/css/general.css @@ -1,70 +1,76 @@ -body -{ font: normal 12px Verdana, Helvetica, Arial, sans-serif; +body{ + font: normal 12px Verdana, Helvetica, Arial, sans-serif; } -ul -{ margin: 5px 5px 5px 15px; +ul{ + margin: 5px 5px 5px 15px; } -h1 -{ margin: 5px +h1{ + margin: 5px } -h2 -{ margin: 5px +h2{ + margin: 5px 0px; } -h2 span -{ font-weight: normal; +h2 span{ + font-weight: normal; font-size: 0.8em; } -h3 -{ margin: 5px +h3{ + margin: 20px 0px 10px 0px; + border-bottom: solid 1px #eeeeee; } -p -{ margin: 5px +h4{ + margin: 20px 0px 10px 0px; +} + +p{ + margin: 10px 5px; text-align: justify; + line-height: 1.4em; } -.messages -{ margin: 10px; +.messages{ + margin: 10px; padding: 10px; } -.erreur -{ margin: 50px 100px 50px 100px; +.erreur{ + margin: 50px 100px 50px 100px; padding: 20px; } -.redirect_message div -{ margin: 50px 100px 50px 100px; +.redirect_message div{ + margin: 50px 100px 50px 100px; padding: 20px; } -ul.list -{ margin: 5px 10px 10px 15px; +ul.list{ + margin: 5px 10px 10px 15px; } -ul.list li -{ margin: 5px 5px 5px 15px; +ul.list li{ + margin: 5px 5px 5px 15px; padding: 5px; } -.navig -{ text-align: right; +.navig{ + text-align: right; padding: 3px; margin: 10px; } -.loading -{ margin: 5px 0px 10px 15px; +.loading{ + margin: 5px 0px 10px 15px; padding: 0px; height: 40px; width: 40px; } -.loading span -{ display: none; +.loading span{ + display: none; } diff --git a/web/out/dist/css/header.css b/web/out/dist/css/header.css index 04b1324..23e6922 100644 --- a/web/out/dist/css/header.css +++ b/web/out/dist/css/header.css @@ -1,11 +1,11 @@ -#header h1 -{ padding-top: 5px; +#header h1{ + padding-top: 5px; padding: 5px 0px 0px 0px; margin: 0px; } -#header h1 a -{ text-decoration: none; +#header h1 a{ + text-decoration: none; display: block; padding: 10px; } diff --git a/web/out/dist/css/main.css b/web/out/dist/css/main.css index 32abddb..35e0819 100644 --- a/web/out/dist/css/main.css +++ b/web/out/dist/css/main.css @@ -1,32 +1,32 @@ -#main .content -{ padding: 10px 0px 10px 0px; +#main .content{ + padding: 10px 0px 10px 0px; width: 800px; } -#colonne -{ float: left; +#colonne{ + float: left; width: 240px; padding: 0px 0px 50px 0px; } -#center -{ float: left; +#center{ + float: left; width: 540px; padding: 10px; } -#center.no_colonne -{ width: 800px; +#center.no_colonne{ + width: 800px; } -#colonne ul.menu -{ margin-left: 15px; +#colonne ul.menu{ + margin-left: 15px; } -#colonne ul.menu li -{ margin-left: 15px; +#colonne ul.menu li{ + margin-left: 15px; } -#colonne ul.navig_menu -{ margin-top: 20px; +#colonne ul.navig_menu{ + margin-top: 20px; } diff --git a/web/out/dist/css/menu_top.css b/web/out/dist/css/menu_top.css index f751fef..a556835 100644 --- a/web/out/dist/css/menu_top.css +++ b/web/out/dist/css/menu_top.css @@ -1,31 +1,31 @@ -#menu_top ul.menu -{ margin: 5px 0px 0px 0px; +#menu_top ul.menu{ + margin: 5px 0px 0px 0px; float: right; position: relative; } -#menu_top ul.menu li -{ list-style-type: none; +#menu_top ul.menu li{ + list-style-type: none; margin-left: 15px; float: left; } -#menu_top ul.menu li a -{ display: block; +#menu_top ul.menu li a{ + display: block; padding: 5px 10px 5px 10px; } -#menu_top ul.menu li ul -{ position: absolute; +#menu_top ul.menu li ul{ + position: absolute; margin: 0px 0px 0px -15px; z-index: 1; display: none; } -#menu_top ul.menu li ul li -{ float: none; +#menu_top ul.menu li ul li{ + float: none; } -#menu_top ul.menu li ul li a -{ padding: 5px 10px 5px 10px; +#menu_top ul.menu li ul li a{ + padding: 5px 10px 5px 10px; } diff --git a/web/out/dist/css/style.css b/web/out/dist/css/style.css index 0eed589..bf2dbb2 100644 --- a/web/out/dist/css/style.css +++ b/web/out/dist/css/style.css @@ -4,30 +4,30 @@ @import url("main.css"); @import url("footer.css"); -* -{ margin: 0; +*{ + margin: 0; padding: 0; } -html -{ height: 100%; +html{ + height: 100%; } -body -{ text-align: center; +body{ + text-align: center; height: 100%; } pre, div { text-align: left; } -.content -{ margin-left: auto; +.content{ + margin-left: auto; margin-right: auto; width: 800px; } -.clear -{ clear: both; +.clear{ + clear: both; font-size: 0px; line-height: 0px; height: 0px; diff --git a/web/out/dist/css/tinymce.css b/web/out/dist/css/tinymce.css index e892ebe..b1f5c3a 100644 --- a/web/out/dist/css/tinymce.css +++ b/web/out/dist/css/tinymce.css @@ -1,3 +1,2 @@ -body, td, pre -{ +body, td, pre{ } \ No newline at end of file diff --git a/web/out/dist/functions.php b/web/out/dist/functions.php index 21ab7e9..a44889a 100644 --- a/web/out/dist/functions.php +++ b/web/out/dist/functions.php @@ -1,5 +1,6 @@ $max) @@ -50,31 +51,6 @@ } return $navig; } - - function aff_date($date) - { if(preg_match("/([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})/", $date, $regs)) - { $date = $regs[3]." ".mois($regs[2])." ".$regs[1]; - } - return $date; - } - - function mois($n) - { switch($n) - { case 1: $mois = "jan"; break; - case 2: $mois = "fev"; break; - case 3: $mois = "mars"; break; - case 4: $mois = "avr"; break; - case 5: $mois = "mai"; break; - case 6: $mois = "juin"; break; - case 7: $mois = "juil"; break; - case 8: $mois = "aout"; break; - case 9: $mois = "sept"; break; - case 10: $mois = "oct"; break; - case 11: $mois = "nov"; break; - case 12: $mois = "dec"; break; - default: $mois = $n; - } - return $mois; - } + endif; ?> \ No newline at end of file diff --git a/web/out/dist/js/actions/admin.js b/web/out/dist/js/actions/admin.js index a0287e1..ec41855 100644 --- a/web/out/dist/js/actions/admin.js +++ b/web/out/dist/js/actions/admin.js @@ -1,13 +1,13 @@ -$(document).ready -( function() - { init_contact_form_ckeckbox(); +$(document).ready( + function(){ + init_contact_form_ckeckbox(); } ); -function init_contact_form_ckeckbox() -{ $("#contact_form").click - ( function() - { if($(this).get(0).checked) $("#email_li").slideDown(200); +function init_contact_form_ckeckbox(){ + $("#contact_form").click( + function(){ + if($(this).get(0).checked) $("#email_li").slideDown(200); else $("#email_li").slideUp(200); } ); diff --git a/web/out/dist/js/actions/users.js b/web/out/dist/js/actions/users.js index 0039302..0f05d4f 100644 --- a/web/out/dist/js/actions/users.js +++ b/web/out/dist/js/actions/users.js @@ -1,14 +1,13 @@ -$(document).ready -( function() - { init_tinymce(); +$(document).ready( + function(){ + init_tinymce(); } ); -function init_tinymce() -{ $(".tinymce").each - ( function() - { tinyMCE.execCommand("mceAddControl", true, $(this).attr("id")); +function init_tinymce(){ + $(".tinymce").each( + function(){ + tinyMCE.execCommand("mceAddControl", true, $(this).attr("id")); } ); } - diff --git a/web/out/dist/js/jquery-1.5.2.min.js b/web/out/dist/js/jquery-1.5.2.min.js deleted file mode 100644 index f78f96a..0000000 --- a/web/out/dist/js/jquery-1.5.2.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Mar 31 15:28:23 2011 -0400 - */ -(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;c
a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div
","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/)<[^<]*)*<\/script>/gi,bC=/^(?:select|textarea)/i,bD=/\s+/,bE=/([?&])_=[^&]*/,bF=/(^|\-)([a-z])/g,bG=function(a,b,c){return b+c.toUpperCase()},bH=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bI=d.fn.load,bJ={},bK={},bL,bM;try{bL=c.location.href}catch(bN){bL=c.createElement("a"),bL.href="",bL=bL.href}bM=bH.exec(bL.toLowerCase())||[],d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bI)return bI.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("
").append(c.replace(bB,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bC.test(this.nodeName)||bw.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bt,"\r\n")}}):{name:b.name,value:c.replace(bt,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bL,isLocal:bx.test(bM[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bO(bJ),ajaxTransport:bO(bK),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bR(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bS(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bF,bG)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bv.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bu,"").replace(bz,bM[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bD),e.crossDomain==null&&(q=bH.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bM[1]||q[2]!=bM[2]||(q[3]||(q[1]==="http:"?80:443))!=(bM[3]||(bM[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bP(bJ,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!by.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(bA.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bE,"$1_="+w);e.url=x+(x===e.url?(bA.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bP(bK,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bQ(g,a[g],c,f);return e.join("&").replace(br,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bT=d.now(),bU=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bT++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bU.test(b.url)||f&&bU.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bU,l),b.url===j&&(f&&(k=k.replace(bU,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bV=d.now(),bW,bX;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bZ()||b$()}:bZ,bX=d.ajaxSettings.xhr(),d.support.ajax=!!bX,d.support.cors=bX&&"withCredentials"in bX,bX=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bW[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bW||(bW={},bY()),h=bV++,g.onreadystatechange=bW[h]=c):c()},abort:function(){c&&c(0,1)}}}});var b_={},ca=/^(?:toggle|show|hide)$/,cb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cc,cd=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(ce("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:ce("show",1),slideUp:ce("hide",1),slideToggle:ce("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!cc&&(cc=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=(e==="absolute"||e==="fixed")&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=ch.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!ch.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=ci(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=ci(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window); \ No newline at end of file diff --git a/web/out/dist/js/jquery-1.8.3.min.js b/web/out/dist/js/jquery-1.8.3.min.js new file mode 100644 index 0000000..83589da --- /dev/null +++ b/web/out/dist/js/jquery-1.8.3.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/web/out/dist/js/login.js b/web/out/dist/js/login.js index f42dde4..ca05ce5 100644 --- a/web/out/dist/js/login.js +++ b/web/out/dist/js/login.js @@ -1,5 +1,5 @@ -function prepare_password(session_id) -{ document.forms["login_form"].pass.value = MD5(MD5(document.forms["login_form"].password.value) + session_id); +function prepare_password(session_id){ + document.forms["login_form"].pass.value = MD5(MD5(document.forms["login_form"].password.value) + session_id); document.forms['login_form'].password.value = ""; return true; } diff --git a/web/out/dist/js/menu.js b/web/out/dist/js/menu.js index 47aaba9..aca3c76 100644 --- a/web/out/dist/js/menu.js +++ b/web/out/dist/js/menu.js @@ -1,6 +1,6 @@ -$(document).ready -( function () - { init_menu_links(); +$(document).ready( + function (){ + init_menu_links(); } ); @@ -8,21 +8,21 @@ $(document).ready var menu = null; -function checkHover() -{ if(menu) menu.find('ul').fadeOut('fast'); +function checkHover(){ + if(menu) menu.find('ul').fadeOut('fast'); } -function init_menu_links() -{ $('.menu li').hover - ( function() - { if(menu) - { menu.find('ul').fadeOut('fast'); +function init_menu_links(){ + $('.menu li').hover( + function(){ + if(menu){ + menu.find('ul').fadeOut('fast'); menu = null; } $(this).find('ul').fadeIn('fast'); }, - function() - { menu = $(this); + function(){ + menu = $(this); setTimeout("checkHover()", 80); } ); diff --git a/web/out/dist/layouts/forms.xml b/web/out/dist/layouts/forms.xml index 1899323..1ac13ca 100644 --- a/web/out/dist/layouts/forms.xml +++ b/web/out/dist/layouts/forms.xml @@ -1,7 +1,7 @@ - + diff --git a/web/out/dist/views/admin/config.php b/web/out/dist/views/admin/config.php index 93a2ca4..e2a40eb 100644 --- a/web/out/dist/views/admin/config.php +++ b/web/out/dist/views/admin/config.php @@ -6,20 +6,20 @@
  • -

    +

    " /> -

    +

  • -

    +

    -

    +

  • out["groupes"]["list"]) : ?>
  • -

    +

    -

    +

  • -

    +

    out["config"]["contact_form"] ? " checked=\"checked\"" : "" ?> /> -

    +

  • out["config"]["contact_form"] ? "" : " style=\"display:none;\"" ?>> @@ -59,10 +59,10 @@
  • -

    +

    nombre d'éléments à afficher dans une liste avant de paginer : " /> -

    +

@@ -81,7 +81,7 @@ if(!$FOUND) $template = $this->path("dist_out"); ?> -

+

out["out_pathes"]) : ?> " id=""out["config"]["out_".$key]) ? $this->out["config"]["out_".$key] : $config["default"]) ? " checked=\"checked\"" : "" ?> /> -

+

diff --git a/web/out/dist/views/footer.php b/web/out/dist/views/footer.php index be5137e..7d951df 100644 --- a/web/out/dist/views/footer.php +++ b/web/out/dist/views/footer.php @@ -1,4 +1,4 @@ - diff --git a/web/out/dist/views/head.php b/web/out/dist/views/head.php index ff40ee6..3a29977 100644 --- a/web/out/dist/views/head.php +++ b/web/out/dist/views/head.php @@ -1,16 +1,10 @@ - - - <?php echo $this->config("site_name"); ?> " /> - - - - + @@ -23,9 +17,6 @@ out_file_exists("js/actions/".$this->etat("mod").".js")) : ?> - - - " /> " /> " />