maj syntaxe accolades, maj jQuery, correction layout contact mtweb.0.4.3
authordj3c1t <dj3c1t@free.fr>
Sat, 8 Dec 2012 19:32:48 +0000 (20:32 +0100)
committerdj3c1t <dj3c1t@free.fr>
Sat, 8 Dec 2012 19:32:48 +0000 (20:32 +0100)
74 files changed:
readme.txt
web/app/data/impl/mw_xml.php
web/app/data/impl/xml/mw_xml_data.php
web/app/data/impl/xml/mw_xml_data_handler.php
web/app/data/modules/share/mw_data_check_instance.php
web/app/data/modules/share/mw_data_images.php
web/app/data/modules/share/mw_data_init.php
web/app/data/modules/share/mw_data_links.php
web/app/data/modules/share/mw_data_out_config.php
web/app/data/modules/share/mw_data_utils.php
web/app/data/modules/sql/mw_data_config.php
web/app/data/modules/sql/mw_data_users.php
web/app/data/modules/xml/mw_data_config.php
web/app/data/modules/xml/mw_data_users.php
web/app/data/mw_data.php
web/app/data/mw_sgbd.php
web/app/env/modules/mw_env_config.php
web/app/env/modules/mw_env_data.php
web/app/env/modules/mw_env_init.php
web/app/env/modules/mw_env_inputs.php
web/app/env/modules/mw_env_links.php
web/app/env/modules/mw_env_messages.php
web/app/env/modules/mw_env_out.php
web/app/env/modules/mw_env_plugins.php
web/app/env/modules/mw_env_run.php
web/app/env/modules/mw_env_urls.php
web/app/env/mw_env.php
web/app/init/0100_functions.php
web/app/init/0200_inputs.php
web/app/init/0300_data.php
web/app/init/0400_config.php
web/app/init/0500_users.php
web/app/init/0600_check_instance.php
web/app/init/0700_links.php
web/app/init/0800_init_plugins.php
web/app/main.php
web/app/mods/admin/config.php
web/app/mods/admin/index.php
web/app/mods/admin/plugins.php
web/app/mods/admin/users.php
web/app/mods/forms/contact.php
web/app/mods/index/index.php
web/app/mods/mw_mod.php
web/app/mods/reponses/html.php
web/app/mods/users/compte.php
web/app/mods/users/identification.php
web/app/mods/users/index.php
web/app/mods/users/infos.php
web/app/mw_plugin.php
web/config.php
web/libs/empty_class.php
web/libs/sxml.php
web/out/dist/css/actions/admin.css
web/out/dist/css/actions/admin_plugins.css
web/out/dist/css/actions/forms_contact.css
web/out/dist/css/colors.css
web/out/dist/css/footer.css
web/out/dist/css/general.css
web/out/dist/css/header.css
web/out/dist/css/main.css
web/out/dist/css/menu_top.css
web/out/dist/css/style.css
web/out/dist/css/tinymce.css
web/out/dist/functions.php
web/out/dist/js/actions/admin.js
web/out/dist/js/actions/users.js
web/out/dist/js/jquery-1.5.2.min.js [deleted file]
web/out/dist/js/jquery-1.8.3.min.js [new file with mode: 0644]
web/out/dist/js/login.js
web/out/dist/js/menu.js
web/out/dist/layouts/forms.xml
web/out/dist/views/admin/config.php
web/out/dist/views/footer.php
web/out/dist/views/head.php

index 2095e54..3966261 100644 (file)
@@ -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<version>.tar.gz contient un dossier "web"
+ - l'archive mtweb.<version>.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
index b454cdd..53fa7f1 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
-  class mw_xml
-  {
+  class mw_xml{
 
     var $host;
     var $base;
     var $data_handlers;
     var $last_data_handler;
 
-    function mw_xml($host, $base, $user, $password)
-    { $this->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;
       $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;
       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);
           }
index 628c0d2..0b6c8cd 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-  class mw_xml_data
-  {
+  class mw_xml_data{
+
     var $host;
     var $base;
 
     var $cache;
     var $buffer;
 
-    function mw_xml_data($host, $base)
-    { $this->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;
         }
       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 = "<tuple>\n";
-      foreach($data as $key => $value)
-      { if(isset($value)) $this->buffer .= "  <".$key."><![CDATA[".$value."]]></".$key.">\n";
+    function serialize_data($data){
+      $this->buffer = "<tuple>\n";
+      foreach($data as $key => $value){
+        if(isset($value)) $this->buffer .= "  <".$key."><![CDATA[".$value."]]></".$key.">\n";
       }
       $this->buffer .= "</tuple>\n";
       return $this->buffer;
index fb9e267..446a264 100644 (file)
@@ -1,93 +1,93 @@
 <?php
 
-  class mw_xml_data_handler
-  {
+  class mw_xml_data_handler{
+
     var $xml_data;
     var $data_path;
     var $data_path_handler;
     var $last_index;
 
-    function mw_xml_data_handler($xml_data, $data_path)
-    { $this->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;
           }
       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;
     }
index 772a093..b471eaa 100644 (file)
@@ -1,10 +1,9 @@
 <?php
 
-  class mw_data_check_instance extends mw_data
-  {
+  class mw_data_check_instance extends mw_data{
 
-    function check_instance()
-    { return true;
+    function check_instance(){
+      return true;
     }
 
   }
index 01c1d71..c540972 100644 (file)
@@ -1,22 +1,21 @@
 <?php
 
-  class mw_data_images extends mw_data
-  {
+  class mw_data_images extends mw_data{
 
-    function img_size($file, $max_width, $max_height)
-    { $img_infos = getimagesize($file);
+    function img_size($file, $max_width, $max_height){
+      $img_infos = getimagesize($file);
       $img_size = array();
-      if($img_infos)
-      { if($img_infos[0] > $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] 
         );
       }
index ae4df81..1a74be4 100644 (file)
@@ -1,17 +1,29 @@
 <?php
 
-  class mw_data_init extends mw_data
-  {
+  class mw_data_init extends mw_data{
+
     var $env;
     var $sgbd;
 
-    function env() { return $this->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;
+    }
 
   }
 
index 7af65db..d5f3287 100644 (file)
@@ -1,26 +1,26 @@
 <?php
 
-  class mw_data_links extends mw_data
-  {
+  class mw_data_links extends mw_data{
+
     var $links;
 
-    function init_links()
-    { $this->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;
       }
     }
 
-    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;
           }
         }
       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;
index bdd8ead..173efbe 100644 (file)
@@ -1,19 +1,18 @@
 <?php
 
-  class mw_data_out_config extends mw_data
-  {
+  class mw_data_out_config extends mw_data{
 
-    function out_config()
-    { $env = $this->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"]
             );
index 17ba22b..ab8ca17 100644 (file)
@@ -1,47 +1,22 @@
 <?php
 
-  class mw_data_utils extends mw_data
-  {
+  class mw_data_utils extends mw_data{
 
-    function eq($content) { return (isset($content) ? "'".str_replace("'", "\'", $content)."'" : "NULL"); }
-
-    /*
-      fonction pour ordonner les resultats des requetes sur
-      les donnees XML (pour faire l'equivalent d'un ORDER BY en SQL)
-    */
-    /*
-    function ordonne($list, $key)
-    { $values = array_values($list);
-      $maximum = count($values);
-      while($maximum > 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;
       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;
           }
index 280f5c1..0d6f4d2 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
-  class mw_data_config extends mw_data
-  {
+  class mw_data_config extends mw_data{
 
-    function config($key = null)
-    { $sgbd = $this->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;
     }
 
index b144ad6..cfa4fd9 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
-  class mw_data_users extends mw_data
-  {
+  class mw_data_users extends mw_data{
 
     var $users;
     var $_user;
@@ -12,8 +11,8 @@
     #                                                                                    users
     #
 
-    function users($start = 0, $alpha = null, $status = null)
-    { $sgbd = $this->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);
     }
     #                                                                                   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);
       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";
       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"
       ." 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);
     #                                                                             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"];
     }
     #                                                                                  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();
         }
       }
       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());
       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);
index 98d4607..359a16c 100644 (file)
@@ -1,28 +1,27 @@
 <?php
 
-  class mw_data_config extends mw_data
-  {
+  class mw_data_config extends mw_data{
 
-    function config($key = null)
-    { $sgbd = $this->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;
               }
             }
       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;
           }
         }
       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;
index cc84872..30e1890 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
-  class mw_data_users extends mw_data
-  {
+  class mw_data_users extends mw_data{
 
     var $users;
     var $_user;
     #                                                                                    users
     #
 
-    function users($start = 0, $alpha = null, $status = null)
-    { $sgbd = $this->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;
             }
       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;
             }
           }
         $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;
           }
         }
       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
       );
     }
 
-    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
       );
     }
 
-    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;
     #                                                                                   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;
+              }
             }
           }
         }
       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;
             }
           }
         $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;
+              }
             }
           }
         }
       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;
           }
         }
     #                                                                             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"];
     }
     #                                                                                  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();
         }
       }
       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());
       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);
index c08fbb1..76fc2be 100644 (file)
@@ -1,8 +1,6 @@
 <?php
 
-  class mw_data extends empty_class
-  {
-
+  class mw_data extends empty_class{
   }
 
 ?>
\ No newline at end of file
index 432ff33..db65b2e 100644 (file)
 <?php
 
-  class mw_sgbd
-  {
+  class mw_sgbd{
+
     var $sgbd_impl;
     var $env;
 
-    function mw_sgbd($sgbd_impl, $env)
-    { $this->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);
     }
 
   }
index 4357b06..4315e1d 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
-  class mw_env_config extends mw_env
-  {
+  class mw_env_config extends mw_env{
 
     var $config_file;
     var $PATHES;
@@ -9,55 +8,55 @@
     var $CONFIG;
     var $bdd;
 
-    function load_config($bdd, $CONFIG)
-    { if(true)
-      { $this->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"]
                   )
                 );
               }
       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;
index cc0e711..6e8caff 100644 (file)
@@ -1,13 +1,15 @@
 <?php
 
-  class mw_env_data extends mw_env
-  {
+  class mw_env_data extends mw_env{
+
     var $data;
 
-    function set_data(&$data) { $this->data = &$data; }
+    function set_data(&$data){
+      $this->data = &$data;
+    }
 
-    function data()
-    { return $this->data;
+    function data(){
+      return $this->data;
     }
 
   }
index 8987f71..6a555fa 100644 (file)
@@ -1,46 +1,44 @@
 <?php
 
-  class mw_env_init extends mw_env
-  {
+  class mw_env_init extends mw_env{
 
-    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"]
+    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;
         }
       }
       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;
         }
       }
index 526285a..0ebd042 100644 (file)
@@ -1,37 +1,38 @@
 <?php
 
-  class mw_env_inputs extends mw_env
-  {
+  class mw_env_inputs extends mw_env{
 
-    function prepare_inputs()
-    { if($_POST)
-      { require_once $this->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;
index 818ce44..b614df0 100644 (file)
@@ -1,20 +1,19 @@
 <?php
 
-  class mw_env_links extends mw_env
-  {
+  class mw_env_links extends mw_env{
 
-    function init_links()
-    { $data = $this->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);
     }
 
index 824b82f..ed7d3a5 100644 (file)
@@ -1,15 +1,14 @@
 <?php
 
-  class mw_env_messages extends mw_env
-  {
+  class mw_env_messages extends mw_env{
 
-    function erreur($message, $EXIT = false)
-    { if($EXIT)
-      { echo "[erreur] ".$message;
+    function erreur($message, $EXIT = false){
+      if($EXIT){
+        echo "[erreur] ".$message;
         exit();
       }
-      else
-      { $this->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;
       }
     }
 
-    function message($message)
-    { $messages = $this->out("messages");
+    function erreurs(){\r
+      $erreurs = $this->out("erreur");\r
+      if(isset($erreurs)) return $erreurs;\r
+      return array();\r
+    }
+
+    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();
     }
index 6571d65..f4ae9d9 100644 (file)
@@ -1,20 +1,28 @@
 <?php
 
-  class mw_env_out extends mw_env
-  {
+  class mw_env_out extends mw_env{
+
     var $out;
     var $out_config;
     var $layout;
 
-    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 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);
       }
       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;
             }
           }
         }
     #                                                                        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;
     #                                                                           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);
       }
     }
 
-    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
                       );
                     }
       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
       );
     }
index fc4925b..375e3c7 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
-  class mw_env_plugins extends mw_env
-  {
+  class mw_env_plugins extends mw_env{
 
     var $plugins_asc;
     var $plugins_desc;
 
-    function plugins($PRIORITE = "ASC")
-    { $this->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;
     #                                                                              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;
             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;
                 }
         }
         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;
       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();
             }
           }
         }
     #                                                                              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;
     }
index ba47626..69360c2 100644 (file)
@@ -1,18 +1,18 @@
 <?php
 
-  class mw_env_run extends mw_env
-  {
+  class mw_env_run extends mw_env{
+
     var $etat;
 
-    function user()
-    { $data = $this->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");
       }
       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]);
                 }
               }
             }
       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);
               }
       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();
           }
         }
       }
index 4a8c08a..d7194f8 100644 (file)
@@ -1,41 +1,41 @@
 <?php
 
-  class mw_env_urls extends mw_env
-  {
+  class mw_env_urls extends mw_env{
+
     var $additional_get_params;
 
-    function init_additional_get_params()
-    { $this->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 ? "&amp;" : "?").$key."=".$value;
       foreach($_params as $key => $value) $get_params .= ($get_params ? "&amp;" : "?").$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("&amp;", "&", $url),
+    function redirect($url, $message, $wait = 1){
+      $this->set_etat("reponses/html/redirect_javascript", false);
+      $this->set_out(
+        "redirect",
+        array(
+          "url" => str_replace("&amp;", "&", $url),
           "message" => $message,
           "wait" => $wait
         )
index 8350609..1b8aaf1 100644 (file)
@@ -1,30 +1,29 @@
 <?php
 
-  class mw_env extends empty_class
-  {
+  class mw_env extends empty_class{
 
-    function app_file_exists($file, $PRIORITE = "ASC")
-    { $app_file = $this->_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;
index 06f135d..061cef9 100644 (file)
@@ -1,7 +1,9 @@
 <?php
 
-  function debug($content)
-  { echo "<pre class=\"debug\">\n".htmlentities(print_r($content, true))."\n</pre>\n";
+  function debug($content){
+    echo PHP_SAPI == "cli" ?
+      "\n".print_r($content, true)."\n"
+    : "<pre class=\"debug\">".htmlentities(print_r($content, true), ENT_QUOTES, "UTF-8")."</pre>";
   }
 
 ?>
\ No newline at end of file
index e8759d0..265d0f9 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 
-  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;
+  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);
     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
index b4dc586..afc41cc 100644 (file)
@@ -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);
         }
index 7affb17..beeb2db 100644 (file)
@@ -1,18 +1,18 @@
 <?php
 
-  if(($config = $data->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
index 409a7fb..bf06a97 100644 (file)
@@ -1,11 +1,10 @@
 <?php
 
-  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)
-      { 
+  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);
   }
index 82f60fa..cd24e27 100644 (file)
@@ -1,10 +1,9 @@
 <?php
 
-  if(($check_instance_return = $data->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&eacute; de la base de donn&eacute;", true);
 
index 36d5537..ffc029b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-  if($this->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);
   }
index afd3247..699998e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-  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);
+  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);
       }
     }
   }
index e6bfabe..d94172e 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 
-  function __mw($config_file, $etat = "")
-  { require $config_file;
+  function __mw($config_file, $etat = ""){
+    require $config_file;
     $PATHES["app"] .= $PATHES["app"] && substr($PATHES["app"], -1) != "/" ? "/" : "";
     $PATHES["libs"] .= $PATHES["libs"] && substr($PATHES["libs"], -1) != "/" ? "/" : "";
-    if($sxml_class_file = (file_exists($PATHES["libs"]."sxml.php") ? $PATHES["libs"]."sxml.php" : ""))
-    { if($empty_class_file = (file_exists($PATHES["libs"]."empty_class.php") ? $PATHES["libs"]."empty_class.php" : ""))
-      { if($env_class_file = (file_exists($PATHES["app"]."env/mw_env.php") ? $PATHES["app"]."env/mw_env.php" : ""))
-        { require $sxml_class_file;
+    if($sxml_class_file = (file_exists($PATHES["libs"]."sxml.php") ? $PATHES["libs"]."sxml.php" : "")){
+      if($empty_class_file = (file_exists($PATHES["libs"]."empty_class.php") ? $PATHES["libs"]."empty_class.php" : "")){
+        if($env_class_file = (file_exists($PATHES["app"]."env/mw_env.php") ? $PATHES["app"]."env/mw_env.php" : "")){
+          require $sxml_class_file;
           require $empty_class_file;
           require $env_class_file;
           $env = new mw_env(true);
@@ -29,8 +29,8 @@
     return false;
   }
 
-  function __mw_display($env)
-  { if($env->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
index 953f982..feb323d 100644 (file)
@@ -1,26 +1,25 @@
 <?php
 
-  class mw_admin_config extends mw_mod
-  {
+  class mw_admin_config extends mw_mod{
 
     var $groupes;
     var $albums;
     var $status;
     var $album_status_id;
 
-    function index(&$env)
-    { $data = $env->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"]));
                   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 &eacute;t&eacute; enregistr&eacute;e"
                   );
                   else $env->erreur("Impossible d'enregistrer la configuration");
index 5ef3ed7..ae79169 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-  class mw_admin_index extends mw_mod
-  {
-    function index(&$env)
-    { $env->run("admin/config");
+  class mw_admin_index extends mw_mod{
+
+    function index(&$env){
+      $env->run("admin/config");
     }
 
   }
index fe804da..0830f2f 100644 (file)
@@ -1,45 +1,45 @@
 <?php
 
-  class mw_admin_plugins extends mw_mod
-  {
+  class mw_admin_plugins extends mw_mod{
+
     var $plugins;
 
-    function validate(&$env)
-    { if(($this->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&eacute;s des plugins doivent &ecirc;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&eacute;s des plugins doivent &ecirc;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 &agrave; jour la priorit&eacute; du plugin ".$plugin_name);
+              if(!$env->set_plugin_data($plugin_name, $plugin_data)){
+                $env->erreur("impossible de mettre &agrave; jour la priorit&eacute; 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&eacute;s des plugins ont &eacute;t&eacute; enregistr&eacute;es"
               );
             }
       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 &eacute;t&eacute; install&eacute;"
             );
           }
       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 &eacute;t&eacute; d&eacute;sinstall&eacute;"
             );
           }
       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 &eacute;t&eacute; activ&eacute;"
                 );
               }
       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 &eacute;t&eacute; d&eacute;sactiv&eacute;"
                 );
               }
index f175fdc..3559387 100644 (file)
@@ -1,69 +1,69 @@
 <?php
 
-  class mw_admin_users extends mw_mod
-  {
+  class mw_admin_users extends mw_mod{
+
     var $status;
 
-    function validate(&$env)
-    { $data = $env->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 <strong>".$_POST["login"]."</strong> a &eacute;t&eacute; ajout&eacute;"
                   );
                   else $env->erreur("Impossible d'ajouter l'utilisateur");
       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 <strong>".$login."</strong> a &eacute;t&eacute; modifi&eacute;"
               );
               else $env->erreur("Impossible de mettre &agrave; jour l'utilisateur");
       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 <strong>".$user["login"]."</strong> a &eacute;t&eacute; supprim&eacute;"
         );
         else $env->erreur("Impossible de supprimer l'utilisateur");
index d0fcc50..69f3da8 100644 (file)
@@ -1,32 +1,31 @@
 <?php
 
-  if(file_exists($this->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 &eacute;t&eacute; envoy&eacute;",
               2
             );
       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 &agrave; l'envoi du mail");
index 9894853..52ead31 100644 (file)
@@ -1,14 +1,13 @@
 <?php
 
-  class mw_index_index extends mw_mod
-  {
+  class mw_index_index extends mw_mod{
 
-    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;
+    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);
       }
index cfba689..04f8b75 100644 (file)
@@ -1,11 +1,15 @@
 <?php
 
-  class mw_mod
-  {
-    function validate(&$env) { return true; }
+  class mw_mod{
 
-    function prepare_inputs(&$env) { return true; }
-//    function prepare_inputs(&$env) { return $env->prepare_inputs(); }
+    function validate(&$env){
+      return true;
+    }
+
+    function prepare_inputs(&$env){
+      return true;
+//      return $env->prepare_inputs();
+    }
 
   }
 
index db13052..98b07d3 100644 (file)
@@ -1,17 +1,14 @@
 <?php
 
-  class mw_reponses_html extends mw_mod
-  {
-    function index(&$env)
-    {
+  class mw_reponses_html extends mw_mod{
+
+    function index(&$env){
     }
 
-    function redirect_javascript(&$env)
-    {
+    function redirect_javascript(&$env){
     }
 
-    function erreur(&$env)
-    {
+    function erreur(&$env){
     }
 
   }
index 7a6c022..20f6142 100644 (file)
@@ -1,34 +1,33 @@
 <?php
 
-  class mw_users_compte extends mw_mod
-  {
+  class mw_users_compte extends mw_mod{
 
     var $status;
     var $user;
 
     var $validation_result;
 
-    function validate(&$env)
-    { $this->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 &ecirc;tre identifier pour acc&eacute;der &agrave; 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");
       }
     }
 
index 36b6d2b..4be3001 100644 (file)
@@ -1,17 +1,16 @@
 <?php
 
-  class mw_users_identification extends mw_mod
-  {
-    function index(&$env)
-    {
+  class mw_users_identification extends mw_mod{
+
+    function index(&$env){
     }
 
-    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(),
+    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 &ecirc;tes maintenant identifi&eacute; en tant que ".$_POST['login']
           );
         }
       else $env->message("Vous &ecirc;tes d&eacute;j&agrave; identifi&eacute;");
     }
 
-    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'&ecirc;tes plus identifi&eacute; sur le site"
         );
       }
index 3cd2462..8f97880 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-  class mw_users_index extends mw_mod
-  {
-    function index(&$env)
-    { $env->run("users/infos");
+  class mw_users_index extends mw_mod{
+
+    function index(&$env){
+      $env->run("users/infos");
     }
 
   }
index 0b0e427..d3583af 100644 (file)
@@ -1,62 +1,58 @@
 <?php
 
-  class mw_users_infos extends mw_mod
-  {
+  class mw_users_infos extends mw_mod{
 
     var $users_compte_mod;
 
-    function validate(&$env)
-    { if($this->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 &eacute;t&eacute; modifi&eacute;es"
             );
             else $env->erreur("Impossible de mettre &agrave; jour l'utilisateur");
index eb91f9d..a4ec053 100644 (file)
@@ -1,38 +1,35 @@
 <?php
 
-  class mw_plugin
-  {
+  class mw_plugin{
 
-    function title()
-    { return "(sans titre)";
+    function title(){
+      return "(sans titre)";
     }
 
-    function description()
-    { return "";
+    function description(){
+      return "";
     }
 
-    function install($env)
-    { return true;
+    function install($env){
+      return true;
     }
 
-    function uninstall($env)
-    { return true;
+    function uninstall($env){
+      return true;
     }
 
-    function enable($env)
-    { return true;
+    function enable($env){
+      return true;
     }
 
-
-    function disable($env)
-    { return true;
+    function disable($env){
+      return true;
     }
 
-    function init($env)
-    { return true;
+    function init($env){
+      return true;
     }
 
   }
 
-
 ?>
\ No newline at end of file
index 4ac10a1..3fba400 100644 (file)
@@ -1,47 +1,43 @@
 <?php
 
-  # FICHIER A ADAPTER EN FONCTION DE VOTRE INSTALLATION
+  // Dans la suite, le "dossier d'execution du script"
+  // designe le dossier contenant le fichier index.php
+  // qui sert de point d'entree a toutes les requetes
 
-  # chemin web du site (dossier d'execution du script d'appel)
-  # absolu a partir de la racine du site
-
-  # installation a la racine du site :
+  // chemin web du site (dossier d'execution du script)
+  // absolu a partir de la racine HTTP du site
   $PATHES["web"] = "/";
 
-
-
-  # les chemins suivant sont des chemins internes a l'application
-
-  # dossier de l'application
-  # relatif au dossier d'execution du script
+  // dossier de l'application
+  // relatif au dossier d'execution du script
   $PATHES["app"] = "app";
 
-  # dossier des plugins
-  # relatif au dossier d'execution du script
+  // dossier des plugins
+  // relatif au dossier d'execution du script
   $PATHES["plugins"] = "plugins";
 
-  # dossier des librairies
-  # relatif au dossier d'execution du script
+  // dossier des librairies
+  // relatif au dossier d'execution du script
   $PATHES["libs"] = "libs";
 
-  # dossier des contenus editables par l'application
-  # relatif au dossier d'execution du script
+  // dossier des contenus editables par l'application
+  // relatif au dossier d'execution du script
   $PATHES["content"] = "content";
 
-  # dossier des templates
-  # relatif au dossier d'execution du script
+  // dossier des templates
+  // relatif au dossier d'execution du script
   $PATHES["out"] = "out";
 
-  # nom du dossier (sans chemin) du template par defaut
+  // nom du dossier (sans chemin) du template par defaut
   $PATHES["dist_out"] = "dist";
 
-  # --------------------------------------------------------------
-  #                                                base de donnees
-  # "mysql" ou "xml"
+  // --------------------------------------------------------------
+  //                                                base de donnees
+  //       "mysql" ou "xml"
 
-  # --------------------------- MYSQL
+  // --------------------------- MYSQL
 /*
-  # remplacez avec vos parametres de connexion
+  // remplacez avec vos parametres de connexion
   $bdd["sgbd"] = "mysql";
   $bdd["host"] = "localhost";
   $bdd["base"] = "mtweb";
   $bdd["user"] = "mysql_user";
   $bdd["password"] = "mysql_password";
 */
-  # --------------------------- XML
+  // --------------------------- XML
 
   $bdd["sgbd"] = "xml";
   $bdd["host"] = "content/data/xml";
   $bdd["base"] = "mw";
   $bdd["table_prefix"] = "mw_";
 
-  # --------------------------------------------------------------
-  #                                                  lien sourceML
-  #
-
-  $CONFIG["version"] = "<a href=\"http://mtweb.dj3c1t.com/\">mtweb</a>";
-
 ?>
\ No newline at end of file
index 72c5cd9..30814be 100644 (file)
 
 */
 
-  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);
               }
             }
           }
       }
     }
 
-    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;
         }
       }
index 78533f3..7d5bf20 100644 (file)
@@ -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
index ea51ffe..370cdea 100644 (file)
-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;
 }
-
index e899c45..9448171 100644 (file)
@@ -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;
+}
index b59c801..c749a73 100644 (file)
@@ -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
+}
index 9b50de8..b928fb6 100644 (file)
@@ -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;
 }
index d9393d4..723053a 100644 (file)
@@ -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;
 }
index dd3602e..3a16976 100644 (file)
@@ -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;
 }
index 04b1324..23e6922 100644 (file)
@@ -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;
 }
index 32abddb..35e0819 100644 (file)
@@ -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;
 }
index f751fef..a556835 100644 (file)
@@ -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;
 }
index 0eed589..bf2dbb2 100644 (file)
@@ -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;
index e892ebe..b1f5c3a 100644 (file)
@@ -1,3 +1,2 @@
-body, td, pre
-{
+body, td, pre{
 }
\ No newline at end of file
index 21ab7e9..a44889a 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+  if(!function_exists("mw_navig")) :
   function mw_navig($current, $total, $max, $base_url, $start_param, $legende = null)
   { $navig = "";
     if($max && $total > $max)
     }
     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
index a0287e1..ec41855 100644 (file)
@@ -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);
     }
   );
index 0039302..0f05d4f 100644 (file)
@@ -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 (file)
index f78f96a..0000000
+++ /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<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bR(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bQ(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bs.test(a)?e(a,f):bQ(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bQ(a+"["+f+"]",b[f],c,e)}function bP(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bJ,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bP(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bP(a,c,d,e,"*",g));return l}function bO(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bD),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bq(a,b,c){var e=b==="width"?bk:bl,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function bc(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bb(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function ba(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function _(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function $(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Q(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(L.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=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;i<t.length;i++)g=t[i],g.origType.replace(r,"")===a.type?q.push(g.selector):t.splice(i--,1);f=d(a.target).closest(q,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){f=p[j];if(c&&f.level>c)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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)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(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:D?function(a){return a==null?"":D.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?B.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){F["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),E&&(d.inArray=function(a,b){return E.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?y=function(){c.removeEventListener("DOMContentLoaded",y,!1),d.ready()}:c.attachEvent&&(y=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",y),d.ready())});return d}(),e="then done fail isResolved isRejected promise".split(" "),f=[].slice;d.extend({_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),f;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(f)return f;f=a={}}var c=e.length;while(c--)a[e[c]]=b[e[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?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<e;c++)b[c]&&d.isFunction(b[c].promise)?b[c].promise().then(i(c),h.reject):--g;g||h.resolveWith(h,b)}else h!==a&&h.resolveWith(h,e?[a]:[]);return h.promise()}}),function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";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="<input type='radio' name='radiotest' checked='checked'/>";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="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";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<j;i++)g=f[i].name,g.indexOf("data-")===0&&(g=g.substr(5),h(this[0],g,e[g]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=h(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var j=/[\n\t\r]/g,k=/\s+/,l=/\r/g,m=/^(?:href|src|style)$/,n=/^(?:button|input)$/i,o=/^(?:button|input|object|select|textarea)$/i,p=/^a(?:rea)?$/i,q=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(k);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(k);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(j," ");for(var i=0,l=c.length;i<l;i++)h=h.replace(" "+c[i]+" "," ");g.className=d.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),i=b,j=a.split(k);while(f=j[g++])i=e?i:!h.hasClass(f),h[i?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(j," ").indexOf(b)>-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<k;j++){var m=h[j];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(q.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(l,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&q.test(this.type))this.checked=d.inArray(c.val(),e)>=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<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=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<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,H(a.origType,a.selector),d.extend({},a,{handler:G,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,H(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?y:x):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=y;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y,this.stopPropagation()},isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x};var z=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},A=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?A:z,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?A:z)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&E("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&E("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var B,C=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-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;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var F={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=r.exec(h),k="",j&&(k=j[0],h=h.replace(r,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(F[h]+k),h=h+k):h=(F[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)d.event.add(n[p],"live."+H(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+H(h,m),f)}return this}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?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;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){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<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\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;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=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 b<c[3]-0},gt:function(a,b,c){return b>c[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<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=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;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",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 href='#'></a>",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="<p class='TEST'></p>";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="<div class='test e'></div><div class='test'></div>";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;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var I=/Until$/,J=/^(?:parents|prevUntil|prevAll)/,K=/,/,L=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,N=d.expr.match.POS,O={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(Q(this,a,!1),"not",a)},filter:function(a){return this.pushStack(Q(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},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<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-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<f;e++){g=this[e];while(g){if(l?l.index(g)>-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=/<tbody/i,W=/<|&#?\w+;/,X=/<(?:script|object|embed|option|style)/i,Y=/checked\s*(?:[^=]|=\s*.checked.)/i,Z={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</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></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.length?this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&Y.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?$(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,bc)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!X.test(a[0])&&(d.support.checkClone||!Y.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?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></$2>");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]==="<table>"&&!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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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("<div>").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<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",cf(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ce("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(ce("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=cf(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(ca.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=cb.exec(e),j=f.cur();if(i){var k=parseFloat(i[2]),l=i[3]||(d.cssNumber[c]?"":"px");l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=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<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(cc),cc=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var cg=/^t(?:able|d|h)$/i,ch=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=ci(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!cg.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";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 (file)
index 0000000..83589da
--- /dev/null
@@ -0,0 +1,2 @@
+/*! jQuery v1.8.3 jquery.com | jquery.org/license */\r
+(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<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").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("<!doctype html><html><body>"),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<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\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(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)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(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-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<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",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></: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="<table><tr><td></td><td>t</td></tr></table>",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="<div></div>",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;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,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.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},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<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=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<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=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<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=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<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=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<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=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<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=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;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?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<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-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(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,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(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(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(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.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="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!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="<a name='"+d+"'></a><div name='"+d+"'></div>",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<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",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="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",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;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=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<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-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=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</div>"]),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></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&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;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?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></$2>"),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]==="<table>"&&!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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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("<div>").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<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-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
index f42dde4..ca05ce5 100644 (file)
@@ -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;
 }
index 47aaba9..aca3c76 100644 (file)
@@ -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);
     }
   );
index 1899323..1ac13ca 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <layout>
 
-  <forms page="pages.php">
+  <forms page="index.php">
     <contact>
       <index content="views/forms/contact/index.php" />
     </contact>
index 93a2ca4..e2a40eb 100644 (file)
@@ -6,20 +6,20 @@
   <ul class="form">
     <li>
       <label for="site_name">nom du site</label>
-      <p>
+      <div><p>
         <input type="text" name="site_name" id="site_name" value="<?= $this->out["config"]["site_name"] ?>" />
-      </p>
+      </p></div>
     </li>
     <li>
       <label for="description">description</label>
-      <p>
+      <div><p>
         <textarea cols="50" rows="10" name="description" id="description"><?= $this->out["config"]["description"] ?></textarea>
-      </p>
+      </p></div>
     </li>
 <?php if($this->out["groupes"]["list"]) : ?>
     <li>
       <label for="start_action">Accueil du site</label>
-      <p>
+      <div><p>
         <select name="start_action" id="start_action" onchange="select_start_action(this.options[this.selectedIndex].value)">
           <option value="sources/groupe"<?= "sources/groupe" == $this->out["config"]["start_action"] ? " selected" : "" ?>>Liste des groupes</option>
           <option value="sources/groupe/view"<?= "sources/groupe/view" == $this->out["config"]["start_action"] ? " selected" : "" ?>>Un groupe</option>
         <?php endforeach; ?>
         </select>
 <?php endif; ?>
-      </p>
+      </p></div>
     </li>
 <?php endif; ?>
     <li>
       <label for="contact_form">formulaire de contact</label>
-      <p>
+      <div><p>
         <input type="checkbox" name="contact_form" id="contact_form"<?= $this->out["config"]["contact_form"] ? " checked=\"checked\"" : "" ?> />
-      </p>
+      </p></div>
     </li>
     <li id="email_li"<?= $this->out["config"]["contact_form"] ? "" : " style=\"display:none;\"" ?>>
       <label for="email">email</label>
     </li>
     <li>
       <label for="max_list">taille maximum des listes</label>
-      <p>
+      <div><p>
         <span>nombre d'&eacute;l&eacute;ments &agrave; afficher dans une liste avant de paginer :</span>
         <input type="text" name="max_list" id="max_list" value="<?= $this->out["config"]["max_list"] ?>" />
-      </p>
+      </p></div>
     </li>
   </ul>
 
@@ -81,7 +81,7 @@
   if(!$FOUND) $template = $this->path("dist_out");
 
 ?>
-      <p>
+      <div><p>
 <?php if($this->out["out_pathes"]) : ?>
         <select name="out" id="out">
 <?php foreach($this->out["out_pathes"] as $out_path) : ?>
         <strong class="warn">Aucun dossier d'affichage ! ... ?</strong>
 <?php endif; ?>
 
-      </p>
+      </p></div>
     </li>
 
 <?php foreach($this->out["out_config"] as $key => $config) : ?>
 <?php if($config["type"] == "checkbox") : ?>
     <li>
       <label for="<?= "out_".$key ?>">&nbsp;</label>
-      <p>
+      <div><p>
         <input type="checkbox" name="<?= "out_".$key ?>" id="<?= "out_".$key ?>"<?= (isset($this->out["config"]["out_".$key]) ? $this->out["config"]["out_".$key] : $config["default"]) ? " checked=\"checked\"" : "" ?> />
         <?= $config["text"] ?>
-      </p>
+      </p></div>
     </li>
 <?php endif; ?>
 <?php endforeach; ?>
index be5137e..7d951df 100644 (file)
@@ -1,4 +1,4 @@
-<p id="a_propos_links">
+<p id="contact_links">
 <?php if($this->config("contact_form")) : ?>
   <a href="<?= $this->url("forms/contact") ?>">contact</a>
 <?php endif; ?>
@@ -15,5 +15,5 @@
 <?php endif; ?>
   | <a href="<?= $this->url("users/identification/logout") ?>">deconnexion</a>
 <?php endif; ?>
-  | <?= $this->config("version") ?>
+  | <a href="http://mtweb.dj3c1t.com/">mtweb</a>
 </p>
index ff40ee6..3a29977 100644 (file)
@@ -1,16 +1,10 @@
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-    <!-- METAS -->
-
     <title><?php echo $this->config("site_name"); ?></title>
     <meta name="description" content="<?php echo $this->config("site_description"); ?>" />
-
-    <!-- SCRIPTS -->
-
     <script type="text/javascript"> site_url = "<?= $this->path("web") ?>"; </script>
     <script type="text/javascript" src="<?= $this->out_file("js/md5.js") ?>"></script>
     <script type="text/javascript" src="<?= $this->out_file("js/login.js") ?>"></script>
-    <script type="text/javascript" src="<?= $this->out_file("js/jquery-1.5.2.min.js") ?>"></script>
+    <script type="text/javascript" src="<?= $this->out_file("js/jquery-1.8.3.min.js") ?>"></script>
     <script type="text/javascript" src="<?= $this->out_file("js/jquery.colorbox-min.js") ?>"></script>
     <script type="text/javascript" src="<?= $this->out_file("js/jquery-ui-1.8.12.custom.min.js") ?>"></script>
     <script type="text/javascript" src="<?= $this->out_file("js/menu.js") ?>"></script>
@@ -23,9 +17,6 @@
 <?php if($this->out_file_exists("js/actions/".$this->etat("mod").".js")) : ?>
     <script type="text/javascript" src="<?= $this->out_file("js/actions/".$this->etat("mod").".js") ?>"></script>
 <?php endif; ?>
-
-    <!-- CSS -->
-
     <link rel="stylesheet" type="text/css" href="<?= $this->out_file("css/style.css") ?>" />
     <link rel="stylesheet" type="text/css" href="<?= $this->out_file("css/colors.css") ?>" />
     <link rel="stylesheet" type="text/css" href="<?= $this->out_file("css/colorbox.css") ?>" />