You can subscribe to this list here.
2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <be...@us...> - 2015-02-14 10:36:58
|
Revision: 12977 http://sourceforge.net/p/xoops/svn/12977 Author: beckmi Date: 2015-02-14 10:36:50 +0000 (Sat, 14 Feb 2015) Log Message: ----------- fix "setExtra" in moduleadmin.php, Admin buttons can now use "onClick" assignments (mamba) Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php Modified: XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-02-13 22:47:42 UTC (rev 12976) +++ XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-02-14 10:36:50 UTC (rev 12977) @@ -5,7 +5,7 @@ =============================== - replaced "dirname(__FILE__)" with "__DIR__" since the min. PHP is now 5.3.7, and __DIR__ is faster (mamba) - updating some copyright notices (mamba) -- Fix issues when protector 'id_forceintval' preference is enabled, that manifests as an error when deleting private messages. (rgriffith) +- fix issues when protector 'id_forceintval' preference is enabled, that manifests as an error when deleting private messages. (rgriffith) - fix for Update setting Template import date to 0 (timgno/mamba) - Adding language constants for Protector's Prefix Manager (slider84/mamba) - allowing for "https" URL in YouTube links in Textsanitizer (mamba) @@ -17,6 +17,7 @@ - fixing a bug in xmlrpc.php (wppd/rgriffith) - remove addrFormat override in XoopsMultiMailer (rgriffith) - patch from Xoops 2.5.6 XoopsFormSelectUser is not compatible with some old modules like xNews (luciorota) +- fix "setExtra" in moduleadmin.php, Admin buttons can now use "onClick" assignments (mamba) Security fixes Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2015-02-13 22:47:42 UTC (rev 12976) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2015-02-14 10:36:50 UTC (rev 12977) @@ -178,8 +178,8 @@ } $ret .= "<div class=\"xo-buttons\">\n"; foreach (array_keys( $this -> _itemButton) as $i) { - $ret .= "<a class='ui-corner-all tooltip' href='" . $this -> _itemButton[$i]['link'] . "' title='" . $this -> _itemButton[$i]['title'] . "'>"; - $ret .= "<img src='" . $path . $this -> _itemButton[$i]['icon'] . "' title='" . $this -> _itemButton[$i]['title'] . "' />" . $this -> _itemButton[$i]['title'] . ' ' . $this -> _itemButton[$i]['extra']; + $ret .= "<a class='ui-corner-all tooltip' href='" . $this -> _itemButton[$i]['link'] . "' title='" . $this -> _itemButton[$i]['title'] . "' " . $this -> _itemButton[$i]['extra']. ">"; + $ret .= "<img src='" . $path . $this -> _itemButton[$i]['icon'] . "' title='" . $this -> _itemButton[$i]['title'] . "' alt='" . $this -> _itemButton[$i]['title'] . "' />" . $this -> _itemButton[$i]['title'] ; $ret .= "</a>\n"; $ret .= $delimeter; } |
From: <luc...@us...> - 2015-02-13 22:47:44
|
Revision: 12976 http://sourceforge.net/p/xoops/svn/12976 Author: luciorota Date: 2015-02-13 22:47:42 +0000 (Fri, 13 Feb 2015) Log Message: ----------- added: sort downloads by weight Modified Paths: -------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/modification.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/changelog.txt XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/main.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/sql/mysql.sql XoopsModules/wfdownloads/branches/luciorota/wfdownloads/submit.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_categorieslist.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_downloadslist.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -346,6 +346,7 @@ $downloadObj->setVar('version', $version); $downloadObj->setVar('url', $url); $downloadObj->setVar('cid', $cid); + $downloadObj->setVar('weight', $_POST['weight']); $downloadObj->setVar('title', $title); $downloadObj->setVar('status', $status); $downloadObj->setVar('size', $size); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -115,6 +115,7 @@ switch ($key) { case 'title': case 'url': + case 'weight': // NOP break; case 'size': Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -95,6 +95,7 @@ $this->initVar('doxcode', XOBJ_DTYPE_INT, true); // boolean $this->initVar('doimage', XOBJ_DTYPE_INT, true); // boolean $this->initVar('dobr', XOBJ_DTYPE_INT, true); // boolean + $this->initVar('weight', XOBJ_DTYPE_INT, 0); if (isset($id)) { $item = $this->wfdownloads->getHandler('item')->get($id); @@ -133,6 +134,8 @@ { xoops_load('XoopsUserUtility'); + $download = $this->toArray(); // as array + $download['id'] = $this->getVar('lid'); $download['cid'] = $this->getVar('cid'); @@ -456,14 +459,14 @@ $userfile_file = new XoopsFormFile(_MD_WFDOWNLOADS_UPLOAD_FILEC, 'userfile', 0); // get max file size (setup and php.ini) $phpiniMaxFileSize = (min((int)(ini_get('upload_max_filesize')), (int)(ini_get('post_max_size')), (int)(ini_get('memory_limit')))) * 1024 * 1024; // bytes - $maxFileSize = wfdownloads_bytesToSize1024(min($this->wfdownloads->getConfig('maxfilesize'), $phpiniMaxFileSize)); + $maxFileSize = wfdownloads_bytesToSize1024(min($this->wfdownloads->getConfig('maxfilesize'), $phpiniMaxFileSize)); // get allowed mimetypes if (wfdownloads_userIsAdmin()) { - $criteria = new Criteria('mime_admin', true); + $mimetypeCriteria = new Criteria('mime_admin', true); } else { - $criteria = new Criteria('mime_user', true); + $mimetypeCriteria = new Criteria('mime_user', true); } - $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria); + $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($mimetypeCriteria); $allowedExtensions = implode(' | ', $mimetypes); $userfile_file->setDescription( sprintf( @@ -490,6 +493,8 @@ $categoryObjsTree = new XoopsObjectTree($categoryObjs, 'cid', 'pid'); $sform->addElement(new XoopsFormLabel(_MD_WFDOWNLOADS_CATEGORYC, $categoryObjsTree->makeSelBox('cid', 'title', '-', $this->getVar('cid', 'e')))); } + // download: weight + $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_WEIGHT, 'weight', 50, 255, $this->getVar('weight', 'e')), false); if (count($customArray) == 0) { // download: homepagetitle @@ -641,7 +646,6 @@ $sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot4', 0), false); // IN PROGRESS } } - // download: notifypub $option_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_OPTIONS, '<br />'); $notify_checkbox = new XoopsFormCheckBox('', 'notifypub'); @@ -707,11 +711,7 @@ // download: submitter if (!$this->isNew()) { $userCount = $member_handler->getUserCount(); -// IN PROGRESS -// IN PROGRESS -// IN PROGRESS if ($userCount > 200) { - //$sform -> addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_SUBMITTERID, 'submitter', 10, 10, $this->getVar('submitter', 'e')), true); $submitter_select = new XoopsFormSelectUser ( _AM_WFDOWNLOADS_FILE_SUBMITTER, 'submitter', false, $this->getVar( 'submitter', @@ -742,10 +742,10 @@ $userfile_file = new XoopsFormFile(_MD_WFDOWNLOADS_UPLOAD_FILEC, 'userfile', 0); // get max file size (setup and php.ini) $phpiniMaxFileSize = min((int)(ini_get('upload_max_filesize')), (int)(ini_get('post_max_size')), (int)(ini_get('memory_limit'))) * 1024 * 1024; // bytes - $maxFileSize = wfdownloads_bytesToSize1024(min($this->wfdownloads->getConfig('maxfilesize'), $phpiniMaxFileSize)); + $maxFileSize = wfdownloads_bytesToSize1024(min($this->wfdownloads->getConfig('maxfilesize'), $phpiniMaxFileSize)); // get allowed mimetypes - $criteria = new Criteria('mime_admin', true); - $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria); + $mimetypeCriteria = new Criteria('mime_admin', true); + $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($mimetypeCriteria); $allowedExtensions = implode(' | ', $mimetypes); $userfile_file->setDescription( sprintf( @@ -759,11 +759,13 @@ ); $sform->addElement($userfile_file, false); // download: cid - $categoryObjs = $this->wfdownloads->getHandler('category')->getObjects(); + $categoryObjs = $this->wfdownloads->getHandler('category')->getObjects(); $categoryObjsTree = new XoopsObjectTree($categoryObjs, 'cid', 'pid'); $sform->addElement( new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_CATEGORY, $categoryObjsTree->makeSelBox('cid', 'title', '-', $this->getVar('cid', 'e'))) ); + // download: weight + $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_WEIGHT, 'weight', 50, 255, $this->getVar('weight', 'e')), false); // Formulize module support (2006/03/06, 2006/03/08) jpc - start if (count($customArray) == 0) { // download: homepagetitle @@ -1222,17 +1224,17 @@ * * @return array */ - public function getActiveDownloads($crit = null) + public function getActiveDownloads($criteria = null) { - if (is_object($crit)) { - $criteria = $crit; + if (is_object($criteria)) { + $downloadsCriteria = $criteria; } else { - $criteria = new CriteriaCompo(); + $downloadsCriteria = new CriteriaCompo(); } - $active_crit = $this->getActiveCriteria(); - $criteria->add($active_crit); + $activeDownloadsCriteria = $this->getActiveCriteria(); + $downloadsCriteria->add($activeDownloadsCriteria); - return $this->getObjects($criteria); + return $this->getObjects($downloadsCriteria); } /** @@ -1242,14 +1244,14 @@ * * @return array/int */ - public function getActiveCount($crit = null) + public function getActiveCount($criteria = null) { - $criteria = $this->getActiveCriteria(); - if (is_object($crit)) { - $criteria->add($crit); + $activeDownloadsCriteria = $this->getActiveCriteria(); + if (is_object($criteria)) { + $activeDownloadsCriteria->add($criteria); } - return $this->getCount($criteria); + return $this->getCount($activeDownloadsCriteria); } /** @@ -1272,24 +1274,24 @@ * * @return bool */ - public function delete($download, $force = false) + public function delete($downloadsObj, $force = false) { - if (parent::delete($download, $force)) { - $criteria = new Criteria('lid', (int)$download->getVar('lid')); - $this->wfdownloads->getHandler('rating')->deleteAll($criteria); - $this->wfdownloads->getHandler('mirror')->deleteAll($criteria); - $this->wfdownloads->getHandler('review')->deleteAll($criteria); - $this->wfdownloads->getHandler('report')->deleteAll($criteria); + if (parent::delete($downloadsObj, $force)) { + $downloadsCriteria = new Criteria('lid', (int)$download->getVar('lid')); + $this->wfdownloads->getHandler('rating')->deleteAll($downloadsCriteria); + $this->wfdownloads->getHandler('mirror')->deleteAll($downloadsCriteria); + $this->wfdownloads->getHandler('review')->deleteAll($downloadsCriteria); + $this->wfdownloads->getHandler('report')->deleteAll($downloadsCriteria); // delete comments - xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$download->getVar('lid')); + xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$downloadsObj->getVar('lid')); // Formulize module support (2006/05/04) jpc - start if (wfdownloads_checkModule('formulize')) { - if (file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') && $download->getVar('formulize_idreq') > 0) { + if (file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') && $downloadsObj->getVar('formulize_idreq') > 0) { include_once XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php'; //deleteFormEntries(array($download->getVar('formulize_idreq'))); - $category = $this->wfdownloads->getHandler('category')->get($download->getVar('cid')); - deleteFormEntries(array($download->getVar('formulize_idreq')), $category->getVar('formulize_fid')); + $categoryObj = $this->wfdownloads->getHandler('category')->get($downloadsObj->getVar('cid')); + deleteFormEntries(array($downloadsObj->getVar('formulize_idreq')), $categoryObj->getVar('formulize_fid')); } } // Formulize module support (2006/05/04) jpc - end Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/modification.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/modification.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/modification.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -87,6 +87,7 @@ $this->initVar('doxcode', XOBJ_DTYPE_INT, true); // boolean $this->initVar('doimage', XOBJ_DTYPE_INT, true); // boolean $this->initVar('dobr', XOBJ_DTYPE_INT, true); // boolean + $this->initVar('weight', XOBJ_DTYPE_INT, 0); //Obsolete unset($this->vars['ipaddress']); @@ -163,7 +164,8 @@ d.dosmiley = m.dosmiley, d.doxcode = m.doxcode, d.doimage = m.doimage, - d.dobr = m.dobr"; + d.dobr = m.dobr, + d.weight = m.weight"; $sql .= " WHERE d.lid = m.lid AND m.requestid='{$requestid}'"; if ($this->db->query($sql)) { return $this->deleteAll(new Criteria('requestid', (int)$requestid)); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/changelog.txt =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/changelog.txt 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/changelog.txt 2015-02-13 22:47:42 UTC (rev 12976) @@ -1,4 +1,4 @@ -<b><u>=> Version 3.23 RC5 (2015-02-02)</u></b> +<b><u>=> Version 3.23 RC5 (2015-02-13)</u></b> - fixed: use DateTime object instead of strtotime function (luciorota) - fixed: source code for HTML5/CSS3 (mamba) - fixed: jQuery bug in templates (luciorota) @@ -14,6 +14,7 @@ - fixed: deprecated XoopsTree (mamba) - fixed: English translations (mamba) - fixed: small changes based on testing tool feedback (mamba) +- added: sort downloads by weight (luciorota) - added: directories check (luciorota) - added: no size limit for uploads by Admin (mamba) - added: preview for images, audio, video, pdf files (luciorota) Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -30,11 +30,13 @@ xoops_loadLanguage('common', WFDOWNLOADS_DIRNAME); xoops_load('XoopsFormLoader'); -//include_once XOOPS_ROOT_PATH . '/class/tree.php'; xoops_load('XoopsObjectTree'); xoops_load('XoopsPageNav'); +xoops_load('XoopsUserUtility'); +xoops_load('XoopsLocal'); +xoops_load('XoopsRequest'); -include_once WFDOWNLOADS_ROOT_PATH . '/class/wfdownloads.php'; // WfdownloadsWfdownloads class +xoops_load('Wfdownloads', WFDOWNLOADS_DIRNAME); // WfdownloadsWfdownloads class include_once WFDOWNLOADS_ROOT_PATH . '/include/functions.php'; include_once WFDOWNLOADS_ROOT_PATH . '/include/constants.php'; include_once WFDOWNLOADS_ROOT_PATH . '/class/common/session.php'; // WfdownloadsSession class @@ -44,9 +46,6 @@ include_once WFDOWNLOADS_ROOT_PATH . '/class/common/xoopstree.php'; // WfdownloadsXoopsTree class include_once WFDOWNLOADS_ROOT_PATH . '/class/multicolumnsthemeform.php'; // WfdownloadsMulticolumnsThemeForm class -xoops_load('XoopsUserUtility'); -xoops_load('XoopsLocal'); -xoops_load('XoopsRequest'); // MyTextSanitizer object $myts = MyTextSanitizer::getInstance(); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -781,139 +781,146 @@ return $icons; } -if (!function_exists('convertorderbyin')) { - // Reusable Link Sorting Functions - /** - * convertorderbyin() - * - * @param $orderby - * - * @return string - */ - function convertorderbyin($orderby) - { - switch (trim($orderby)) { - case 'titleA': - $orderby = 'title ASC'; - break; - case 'titleD': - $orderby = 'title DESC'; - break; - case 'dateA': - $orderby = 'published ASC'; - break; - case 'dateD': - $orderby = 'published DESC'; - break; - case 'hitsA': - $orderby = 'hits ASC'; - break; - case 'hitsD': - $orderby = 'hits DESC'; - break; - case 'ratingA': - $orderby = 'rating ASC'; - break; - case 'ratingD': - $orderby = 'rating DESC'; - break; - case 'sizeD': - $orderby = 'size DESC'; - break; - case 'sizeA': - $orderby = 'size ASC'; - break; - default: - $orderby = 'published DESC'; - break; - } +/** + * wfdownloads_convertorderbyin() + * + * @param $orderby + * + * @return string + */ +function wfdownloads_convertorderbyin($orderby) +{ + switch (trim($orderby)) { + case 'titleA': + $orderby = 'title ASC'; + break; + case 'titleD': + $orderby = 'title DESC'; + break; + case 'dateA': + $orderby = 'published ASC'; + break; + case 'dateD': + $orderby = 'published DESC'; + break; + case 'hitsA': + $orderby = 'hits ASC'; + break; + case 'hitsD': + $orderby = 'hits DESC'; + break; + case 'ratingA': + $orderby = 'rating ASC'; + break; + case 'ratingD': + $orderby = 'rating DESC'; + break; + case 'sizeD': + $orderby = 'size DESC'; + break; + case 'sizeA': + $orderby = 'size ASC'; + break; + case 'weightD': + $orderby = 'weight DESC'; + break; + case 'weightA': + $orderby = 'weight ASC'; + break; + default: + $orderby = 'published DESC'; + break; + } - return $orderby; - } + return $orderby; } -if (!function_exists('convertorderbytrans')) { - /** - * @param $orderby - * - * @return string - */ - function convertorderbytrans($orderby) - { - if ($orderby == 'title ASC') { - $orderbyTrans = _MD_WFDOWNLOADS_TITLEATOZ; - } - if ($orderby == 'title DESC') { - $orderbyTrans = _MD_WFDOWNLOADS_TITLEZTOA; - } - if ($orderby == 'published ASC') { - $orderbyTrans = _MD_WFDOWNLOADS_DATEOLD; - } - if ($orderby == 'published DESC') { - $orderbyTrans = _MD_WFDOWNLOADS_DATENEW; - } - if ($orderby == 'hits ASC') { - $orderbyTrans = _MD_WFDOWNLOADS_POPULARITYLTOM; - } - if ($orderby == 'hits DESC') { - $orderbyTrans = _MD_WFDOWNLOADS_POPULARITYMTOL; - } - if ($orderby == 'rating ASC') { - $orderbyTrans = _MD_WFDOWNLOADS_RATINGLTOH; - } - if ($orderby == 'rating DESC') { - $orderbyTrans = _MD_WFDOWNLOADS_RATINGHTOL; - } - if ($orderby == 'size ASC') { - $orderbyTrans = _MD_WFDOWNLOADS_SIZELTOH; - } - if ($orderby == 'size DESC') { - $orderbyTrans = _MD_WFDOWNLOADS_SIZEHTOL; - } - return $orderbyTrans; +/** + * @param $orderby + * + * @return string + */ +function wfdownloads_convertorderbytrans($orderby) +{ + if ($orderby == 'title ASC') { + $orderbyTrans = _MD_WFDOWNLOADS_TITLEATOZ; } + if ($orderby == 'title DESC') { + $orderbyTrans = _MD_WFDOWNLOADS_TITLEZTOA; + } + if ($orderby == 'published ASC') { + $orderbyTrans = _MD_WFDOWNLOADS_DATEOLD; + } + if ($orderby == 'published DESC') { + $orderbyTrans = _MD_WFDOWNLOADS_DATENEW; + } + if ($orderby == 'hits ASC') { + $orderbyTrans = _MD_WFDOWNLOADS_POPULARITYLTOM; + } + if ($orderby == 'hits DESC') { + $orderbyTrans = _MD_WFDOWNLOADS_POPULARITYMTOL; + } + if ($orderby == 'rating ASC') { + $orderbyTrans = _MD_WFDOWNLOADS_RATINGLTOH; + } + if ($orderby == 'rating DESC') { + $orderbyTrans = _MD_WFDOWNLOADS_RATINGHTOL; + } + if ($orderby == 'size ASC') { + $orderbyTrans = _MD_WFDOWNLOADS_SIZELTOH; + } + if ($orderby == 'size DESC') { + $orderbyTrans = _MD_WFDOWNLOADS_SIZEHTOL; + } + if ($orderby == 'weight ASC') { + $orderbyTrans = _MD_WFDOWNLOADS_WEIGHTLTOH; + } + if ($orderby == 'weight DESC') { + $orderbyTrans = _MD_WFDOWNLOADS_WEIGHTHTOL; + } + + return $orderbyTrans; } -if (!function_exists('convertorderbyout')) { - /** - * @param $orderby - * - * @return string - */ - function convertorderbyout($orderby) - { - if ($orderby == 'title ASC') { - $orderby = 'titleA'; - } - if ($orderby == 'title DESC') { - $orderby = 'titleD'; - } - if ($orderby == 'published ASC') { - $orderby = 'dateA'; - } - if ($orderby == 'published DESC') { - $orderby = 'dateD'; - } - if ($orderby == 'hits ASC') { - $orderby = 'hitsA'; - } - if ($orderby == 'hits DESC') { - $orderby = 'hitsD'; - } - if ($orderby == 'rating ASC') { - $orderby = 'ratingA'; - } - if ($orderby == 'rating DESC') { - $orderby = 'ratingD'; - } - if ($orderby == 'size ASC') { - $orderby = 'sizeA'; - } - if ($orderby == 'size DESC') { - $orderby = 'sizeD'; - } - return $orderby; +function wfdownloads_convertorderbyout($orderby) +{ + if ($orderby == 'title ASC') { + $orderby = 'titleA'; } + if ($orderby == 'title DESC') { + $orderby = 'titleD'; + } + if ($orderby == 'published ASC') { + $orderby = 'dateA'; + } + if ($orderby == 'published DESC') { + $orderby = 'dateD'; + } + if ($orderby == 'hits ASC') { + $orderby = 'hitsA'; + } + if ($orderby == 'hits DESC') { + $orderby = 'hitsD'; + } + if ($orderby == 'rating ASC') { + $orderby = 'ratingA'; + } + if ($orderby == 'rating DESC') { + $orderby = 'ratingD'; + } + if ($orderby == 'size ASC') { + $orderby = 'sizeA'; + } + if ($orderby == 'size DESC') { + $orderby = 'sizeD'; + } + if ($orderby == 'weight ASC') { + $orderby = 'weightA'; + } + if ($orderby == 'weight DESC') { + $orderby = 'weightD'; + } + return $orderby; } /** Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -113,7 +113,8 @@ "dosmiley" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), "doxcode" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), "doimage" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), - "dobr" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true) + "dobr" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), + "weight" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true) ); //$renamed_fields = array( // "old_name" => "new_name" @@ -197,7 +198,8 @@ "dosmiley" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), "doxcode" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), "doimage" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), - "dobr" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true) + "dobr" => array("Type" => "tinyint(1) NOT NULL default '1'", "Default" => true), + "weight" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true) ); //$renamed_fields = array( // "old_name" => "new_name" Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/main.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/main.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/main.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -372,3 +372,8 @@ define('_MD_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS', "Warning: contact the administrator, the upload directory does not exist"); define('_MD_WFDOWNLOADS_FFS_SUBMIT1ST_STEP', "1st step: choose category"); + +// class/download.php +define('_MD_WFDOWNLOADS_WEIGHT', "Weight"); +define('_MD_WFDOWNLOADS_WEIGHTLTOH', "Weight (lowest to highest value)"); +define('_MD_WFDOWNLOADS_WEIGHTHTOL', "Weight (highest to lowest value)"); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/sql/mysql.sql =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/sql/mysql.sql 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/sql/mysql.sql 2015-02-13 22:47:42 UTC (rev 12976) @@ -107,6 +107,7 @@ doxcode tinyint(1) NOT NULL default '1', doimage tinyint(1) NOT NULL default '1', dobr tinyint(1) NOT NULL default '1', + weight int(11) NOT NULL default '0', PRIMARY KEY (lid), KEY cid (cid), KEY status (status), @@ -350,6 +351,7 @@ doxcode tinyint(1) NOT NULL default '1', doimage tinyint(1) NOT NULL default '1', dobr tinyint(1) NOT NULL default '1', + weight int(11) NOT NULL default '0', PRIMARY KEY (requestid) ) ENGINE=MyISAM; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/submit.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/submit.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/submit.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -381,6 +381,7 @@ $downloadObj->setVar('title', $title); $downloadObj->setVar('url', $url); $downloadObj->setVar('cid', (int)$cid); + $downloadObj->setVar('weight', (int)$weight); $downloadObj->setVar('filename', $filename); $downloadObj->setVar('filetype', $filetype); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_categorieslist.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_categorieslist.tpl 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_categorieslist.tpl 2015-02-13 22:47:42 UTC (rev 12976) @@ -17,7 +17,6 @@ <a href='../viewcat.php?cid=<{$sorted_category.category.cid}>'><{$sorted_category.category.title}></a> </td> <td> - <label for="new_weights[<{$sorted_category.category.cid}>]">Category:</label> <input type="text" name="new_weights[<{$sorted_category.category.cid}>]" id="new_weights[<{$sorted_category.category.cid}>]" size="11" maxlength="11" value="<{$sorted_category.category.weight}>"/> </td> Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_downloadslist.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_downloadslist.tpl 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_downloadslist.tpl 2015-02-13 22:47:42 UTC (rev 12976) @@ -10,6 +10,7 @@ <th><{$smarty.const._AM_WFDOWNLOADS_MINDEX_ID}></th> <th><{$smarty.const._AM_WFDOWNLOADS_MINDEX_TITLE}></th> <th><{$smarty.const._AM_WFDOWNLOADS_FCATEGORY_TITLE}></th> + <th><{$smarty.const._MD_WFDOWNLOADS_WEIGHT}></th> <th><{$smarty.const._AM_WFDOWNLOADS_MINDEX_POSTER}></th> <th><{$smarty.const._AM_WFDOWNLOADS_MINDEX_SUBMITTED}></th> <th><{$smarty.const._AM_WFDOWNLOADS_MINDEX_ONLINESTATUS}></th> @@ -35,6 +36,7 @@ </select> <input id='filter_category_title' type='text' value='<{$filter_category_title}>' maxlength='100' size='15' title='' name='filter_category_title'> </td> + <td> </td> <td><{$filter_submitter_select}></td> <td> <{* @@ -68,6 +70,7 @@ <td> <a href='../viewcat.php?cid=<{$download.cid}>'><{$download.category_title}></a> </td> + <td><{$download.weight}></td> <td><{$download.submitter_uname}></td> <td><{$download.published_formatted}></td> <td align='center'> Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.tpl 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.tpl 2015-02-13 22:47:42 UTC (rev 12976) @@ -245,6 +245,23 @@ title="<{$smarty.const._MD_WFDOWNLOADS_SIZEHTOL}>"><{$smarty.const._MD_WFDOWNLOADS_SIZE}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></a> <{/if}> + | + <{if ($orderby == "weightA")}> + <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_WEIGHTLTOH}>"><{$smarty.const._MD_WFDOWNLOADS_WEIGHT}> <img + src="<{xoModuleIcons16 up.gif}>" alt="↑"></span> + <{else}> + <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=weightA" + title="<{$smarty.const._MD_WFDOWNLOADS_WEIGHTLTOH}>"><{$smarty.const._MD_WFDOWNLOADS_WEIGHT}> <img + src="<{xoModuleIcons16 up.gif}>" alt="↑"></a> + <{/if}> + <{if ($orderby == "weightD")}> + <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_WEIGHTHTOL}>"><{$smarty.const._MD_WFDOWNLOADS_WEIGHT}> <img + src="<{xoModuleIcons16 down.gif}>" alt="↓"></span> + <{else}> + <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=weightD" + title="<{$smarty.const._MD_WFDOWNLOADS_WEIGHTHTOL}>"><{$smarty.const._MD_WFDOWNLOADS_WEIGHT}> <img + src="<{xoModuleIcons16 down.gif}>" alt="↓"></a> + <{/if}> </div> </div> <{/if}> Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -25,7 +25,7 @@ $start = XoopsRequest::getInt('start', 0); //$list = XoopsRequest::getString('list', null); //$orderby = XoopsRequest::getString('orderby', null); -$orderby = isset($_GET['orderby']) ? convertorderbyin($_GET['orderby']) : $wfdownloads->getConfig('filexorder'); +$orderby = isset($_GET['orderby']) ? wfdownloads_convertorderbyin($_GET['orderby']) : $wfdownloads->getConfig('filexorder'); $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); @@ -297,10 +297,10 @@ $xoopsTpl->assign('show_links', false); if ($downloads_count > 1 && $cid != 0) { $xoopsTpl->assign('show_links', true); - $orderbyTrans = convertorderbytrans($orderby); - $xoopsTpl->assign('orderby', convertorderbyout($orderby)); - $xoopsTpl->assign('lang_cursortedby', sprintf(_MD_WFDOWNLOADS_CURSORTBY, convertorderbytrans($orderby))); - $orderby = convertorderbyout($orderby); + $orderbyTrans = wfdownloads_convertorderbytrans($orderby); + $xoopsTpl->assign('orderby', wfdownloads_convertorderbyout($orderby)); + $xoopsTpl->assign('lang_cursortedby', sprintf(_MD_WFDOWNLOADS_CURSORTBY, wfdownloads_convertorderbytrans($orderby))); + $orderby = wfdownloads_convertorderbyout($orderby); } // Screenshots display $xoopsTpl->assign('show_screenshot', false); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php 2015-02-11 21:44:09 UTC (rev 12975) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php 2015-02-13 22:47:42 UTC (rev 12976) @@ -42,8 +42,8 @@ $modversion['onUpdate'] = 'include/onupdate.php'; $modversion['onUninstall'] = 'include/onuninstall.php'; -$modversion['date'] = '2015-02-03'; -$modversion['release_date'] = '2015-02-03'; +$modversion['date'] = '2015-02-13'; +$modversion['release_date'] = '2015-02-13'; $modversion['status'] = 'RC5'; $modversion['teammembers'] = 'Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff'; @@ -902,7 +902,9 @@ _MI_WFDOWNLOADS_RATING . $qa => 'rating ASC', _MI_WFDOWNLOADS_RATING . $qd => 'rating DESC', _MI_WFDOWNLOADS_POPULARITY . $qa => 'hits ASC', - _MI_WFDOWNLOADS_POPULARITY . $qd => 'hits DESC' + _MI_WFDOWNLOADS_POPULARITY . $qd => 'hits DESC', + _MI_WFDOWNLOADS_WEIGHT . $qa => 'weight ASC', + _MI_WFDOWNLOADS_WEIGHT . $qd => 'weight DESC' ), 'default' => 'title ASC' ); |
From: <zy...@us...> - 2015-02-11 21:44:19
|
Revision: 12975 http://sourceforge.net/p/xoops/svn/12975 Author: zyspec Date: 2015-02-11 21:44:09 +0000 (Wed, 11 Feb 2015) Log Message: ----------- changed method of loading XoopsObjectTree in category blocks Modified Paths: -------------- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php Modified: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php 2015-02-11 01:03:15 UTC (rev 12974) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php 2015-02-11 21:44:09 UTC (rev 12975) @@ -75,7 +75,7 @@ } } } - xoops_load('xoopsobjectree'); + require_once XOOPS_ROOT_PATH . "/class/tree.php"; $mytree = new XoopsObjectTree($catObjArray, 'cat_cid', 'cat_pid'); $block['select'] = $mytree->makeSelBox('categories', 'cat_title', '-', '', true, 0, "' onchange=\"window.location='" . XOOPS_URL . "/modules/TDMDownloads/viewcat.php?cid=' + this.value;\""); } Modified: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php 2015-02-11 01:03:15 UTC (rev 12974) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php 2015-02-11 21:44:09 UTC (rev 12975) @@ -89,7 +89,7 @@ $subcatCount = (is_array($subcatObjArray)) ? count($subcatObjArray) : 0; $allCatObjArray = $tlaCatObjArray + $subcatObjArray; - xoops_load('xoopsobjectree'); + require_once XOOPS_ROOT_PATH . "/class/tree.php"; $mytree = new XoopsObjectTree($allCatObjArray, 'cat_cid', 'cat_pid'); } foreach ($tlaCatObjArray as $tlaCatObj) { |
From: <zy...@us...> - 2015-02-11 01:03:20
|
Revision: 12974 http://sourceforge.net/p/xoops/svn/12974 Author: zyspec Date: 2015-02-11 01:03:15 +0000 (Wed, 11 Feb 2015) Log Message: ----------- create 2 category blocks Modified Paths: -------------- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/docs/changelog.txt XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/blocks.php XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/modinfo.php XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/xoops_version.php Added Paths: ----------- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_cat_selbox.html XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_categories.html Added: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php (rev 0) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_cat_selbox.php 2015-02-11 01:03:15 UTC (rev 12974) @@ -0,0 +1,107 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +/** + * TDMDownloads Block cat_selbox.php + * + * Xoops TDMDownloads - a multicategory downloads module + * + * @copyright:: {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: tdmdownloads + * @subpackage:: blocks + * @since:: 2.00 + * @author:: zyspec <owners@zyspec> + * @version:: $Id: $ + */ + +defined('XOOPS_ROOT_PATH') || exit('Restricted access'); + +/** + * + * Display categories in a block + * @param array $options + * 0 - sort order, weight|title + * 1 - show subcats in block + * 2 - number of subcats to show + * 3 - number of chars in cat title to display + */ +function b_tdmdownloads_cat_selbox_show($options) +{ +// $myts =& MyTextSanitizer::getInstance(); + + $block = ''; + + $sSort = $options[0]; + $dispSubcats = (int) $options[1] ? true : false; + $numChars = (int) $options[2]; + + $moduleHandler =& xoops_gethandler('module'); + $module =& $moduleHandler->getByDirname(basename(dirname(dirname(__FILE__)))); + $config_handler =& xoops_gethandler('config'); + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + + $groups = ($GLOBALS['xoopsUser'] instanceof XoopsUser) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS; + $gperm_handler =& xoops_gethandler('groupperm'); + $allowed_cats = $gperm_handler->getItemIds("tdmdownloads_view", $groups, $module->getVar('mid')); + $catIds = implode(',', $allowed_cats); + + $catHandler =& xoops_getModuleHandler('tdmdownloads_cat', 'TDMDownloads'); + + // get TLA categories user has permission to see + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('cat_cid', "({$catIds})", "IN")); + if (!$dispSubcats) { // only display TLA cats + $criteria->add(new Criteria('cat_pid', 0)); + } + $criteria->setSort($sSort); + $criteria->setOrder('ASC'); + $catObjArray = $catHandler->getAll($criteria); + $catCount = count($catObjArray); + + if ($catCount) { // if there are TLA categories user can see + if ($numChars > 0) { + foreach($catObjArray as &$catObj) { + $catTitle = $catObj->getVar('cat_title'); + if (mb_strlen($catTitle) > $numChars) { + $catObj->setVar('cat_title', xoops_substr($catTitle, 0, $numChars)); + } + } + } + xoops_load('xoopsobjectree'); + $mytree = new XoopsObjectTree($catObjArray, 'cat_cid', 'cat_pid'); + $block['select'] = $mytree->makeSelBox('categories', 'cat_title', '-', '', true, 0, "' onchange=\"window.location='" . XOOPS_URL . "/modules/TDMDownloads/viewcat.php?cid=' + this.value;\""); + } + + return $block; +} + +function b_tdmdownloads_cat_selbox_edit($options) +{ + $form = "<script type='text/javascript'>\n" + . " function updateTextInput(val) {\n" + . " document.getElementById('textInput').value=val;\n" + . " }\n" + . "</script>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_ORDER . "<select name='options[]' class='pad5 marg5'>\n" + . "<option value='cat_weight' " . (('cat_weight' == $options[0]) ? " selected='selected'" : "") . ">" . _MB_TDMDOWNLOADS_WEIGHT . "</option>\n" + . "<option value='cat_title' " . (('cat_title' == $options[0]) ? " selected='selected'" : "") . ">" . _MB_TDMDOWNLOADS_TITLE . "</option>\n" + . "</select></label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_SHOW_SUBS . "<select name='options[]' class='pad5 marg5'>\n" + . "<option value='0' " . (($options[1]) ? "" : " selected='selected'") . ">" . _NO . "</option>\n" + . "<option value='1' " . (($options[1]) ? " selected='selected'" : "") . ">" . _YES . "</option>\n" + . "</select></label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_DISP . "\n" + . "<input type='number' class='txtcenter solidsilver pad5 marg5' name='options[]' value='{$options[2]}' min='0' />" . _MB_TDMDOWNLOADS_NUM_CHARS . " (<i>" . _MB_TDMDOWNLOADS_NOLIMIT . "</i>)</label>\n"; + + return $form; +} Added: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php (rev 0) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/blocks/tdmdownloads_categories.php 2015-02-11 01:03:15 UTC (rev 12974) @@ -0,0 +1,170 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +/** + * TDMDownloads Block categories.php + * + * Xoops TDMDownloads - a multicategory downloads module + * + * @copyright:: {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package:: tdmdownloads + * @subpackage:: blocks + * @since:: 2.00 + * @author:: zyspec <owners@zyspec> + * @version:: $Id: $ + */ + +defined('XOOPS_ROOT_PATH') || exit('Restricted access'); + +/** + * + * Display categories in a block + * @param array $options + * 0 - sort order, weight|title + * 1 - display xx TLA categories + * 2 - show subcats in block + * 3 - number of subcats to show + * 4 - number of columns to display + * 5 - number of chars in cat title to display + */ +function b_tdmdownloads_cat_show($options) +{ +// $myts =& MyTextSanitizer::getInstance(); + + $block = ''; + + $sSort = $options[0]; + $numCatsToShow = (int) $options[1]; + $dispSubcats = (int) $options[2] ? true : false; + $numSubcatsToShow = (int) $options[3]; + $numCols = (int) $options[4]; + $numChars = (int) $options[5]; + + $moduleHandler =& xoops_gethandler('module'); + $module =& $moduleHandler->getByDirname(basename(dirname(dirname(__FILE__)))); + $config_handler =& xoops_gethandler('config'); + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + + $groups = ($GLOBALS['xoopsUser'] instanceof XoopsUser) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS; + $gperm_handler =& xoops_gethandler('groupperm'); + $allowed_cats = $gperm_handler->getItemIds("tdmdownloads_view", $groups, $module->getVar('mid')); + $catIds = implode(',', $allowed_cats); + + $catHandler =& xoops_getModuleHandler('tdmdownloads_cat', 'TDMDownloads'); + + // get TLA categories user has permission to see + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('cat_cid', "({$catIds})", "IN")); + $criteria->add(new Criteria('cat_pid', 0)); + $criteria->setSort($sSort); + $criteria->setOrder('ASC'); + if (!empty($numCatsToShow)) { + $criteria->setLimit($numCatsToShow); + } + $tlaCatObjArray = $catHandler->getAll($criteria); + $tlaCatCount = count($tlaCatObjArray); + + if ($tlaCatCount) { // if there are TLA categories user can see + $block['nb_catcol'] = $numCols; + + if ($dispSubcats) { // want to show subcats so get them from the dB + // setup the category tree + $tlaCatIdArray = array_keys($tlaCatObjArray); + $tlaCatIds = implode(',', $tlaCatIdArray); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('cat_cid', "({$catIds})", "IN")); + $criteria->add(new Criteria('cat_pid', "({$tlaCatIds})", "IN")); + $criteria->setSort($sSort); + $criteria->setOrder('ASC'); + + $subcatObjArray = $catHandler->getAll($criteria); + $subcatCount = (is_array($subcatObjArray)) ? count($subcatObjArray) : 0; + $allCatObjArray = $tlaCatObjArray + $subcatObjArray; + + xoops_load('xoopsobjectree'); + $mytree = new XoopsObjectTree($allCatObjArray, 'cat_cid', 'cat_pid'); + } + foreach ($tlaCatObjArray as $tlaCatObj) { + $chcount = 0; + $subcategories = array(); + if ($dispSubcats) { // and want subcats + $childTreeObjs = $mytree->getFirstChild($tlaCatObj->getVar('cat_cid')); + + foreach ($childTreeObjs as $subcatObj) { + if (($numSubcatsToShow > 0) && ($chcount >= $numSubcatsToShow)){ +// $subcategories = "<li>[<a href='" . XOOPS_URL . "/modules/TDMDownloads/viewcat.php?cid=" . $tlaCatObj->getVar('cat_cid') . "'>+</a>]</li>"; + $subcategories[] = array('id' => $tlaCatObj->getVar('cat_cid'), + 'title' => '+'); + break; + } + if (($numChars > 0) && (mb_strlen($subcatObj->getVar('cat_title')) > $numChars)) { + $subcatTitle = xoops_substr($subcatObj->getVar('cat_title'), 0, $numChars); + } else { + $subcatTitle = $subcatObj->getVar('cat_title'); + } +// $subcategories .= "<li><a href='" . XOOPS_URL . "/modules/TDMDownloads/viewcat.php?cid=" . $subcatObj->getVar('cat_cid') . "'>{$subcatTitle}</a></li>"; + $subcategories[] = array('id' => $subcatObj->getVar('cat_cid'), + 'title' => $subcatTitle); + ++$chcount; + } + } + if (($numChars > 0) && (mb_strlen($tlaCatObj->getVar('cat_title')) > $numChars)) { + $catTitle = xoops_substr($tlaCatObj->getVar('cat_title'), 0, $numChars); + } else { + $catTitle = $tlaCatObj->getVar('cat_title'); + } + $block['categories'][] = array('id' => $tlaCatObj->getVar('cat_cid'), + 'pid' => $tlaCatObj->getVar('cat_pid'), + 'title' => $catTitle, + 'subcategories' => $subcategories, + /* not currently used + 'description_main' => $tlaCatObj->getVar('cat_description_main'), + 'image' => $uploadurl . $tlaCatObj->getVar('cat_imgurl'), + */ + ); + + } + } + + return $block; +} + +function b_tdmdownloads_cat_edit($options) +{ + $form = "<script type='text/javascript'>\n" + . " function updateTextInput(val) {\n" + . " document.getElementById('textInput').value=val;\n" + . " }\n" + . "</script>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_ORDER . "<select name='options[]' class='pad5 marg5'>\n" + . "<option value='cat_weight' " . (('cat_weight' == $options[0]) ? " selected='selected'" : "") . ">" . _MB_TDMDOWNLOADS_WEIGHT . "</option>\n" + . "<option value='cat_title' " . (('cat_title' == $options[0]) ? " selected='selected'" : "") . ">" . _MB_TDMDOWNLOADS_TITLE . "</option>\n" + . "</select></label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_DISP . "\n" + . "<input type='number' name='options[]' class='txtcenter solidsilver pad5 marg5' value='{$options[1]}' min='0' step='5' />" . _MB_TDMDOWNLOADS_CATS . " (<i>" . _MB_TDMDOWNLOADS_NOLIMIT . "</i>)</label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_SHOW_SUBS . "<select name='options[]' class='pad5 marg5'>\n" + . "<option value='0' " . (($options[2]) ? "" : " selected='selected'") . ">" . _NO . "</option>\n" + . "<option value='1' " . (($options[2]) ? " selected='selected'" : "") . ">" . _YES . "</option>\n" + . "</select></label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_DISP . "\n" + . "<input type='number' class='txtcenter solidsilver pad5 marg5' name='options[]' value='{$options[3]}' min='0' step='5' />" . _MB_TDMDOWNLOADS_NUM_SUBS . " (<i>" . _MB_TDMDOWNLOADS_NOLIMIT . "</i>)</label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_DISP . "\n" + . "<input type='range' name='options[]' value='{$options[4]}' min='1' max='2' onchange='updateTextInput(this.value);' /> <input type='text' class='pad5 marg5 txtcenter' id='textInput' value='{$options[4]}' size='3' disabled />" . _MB_TDMDOWNLOADS_NUM_COLS . "</label>\n" + . "<br/>\n" + . "<label class='alignmiddle'>" . _MB_TDMDOWNLOADS_DISP . "\n" + . "<input type='number' class='txtcenter solidsilver pad5 marg5' name='options[]' value='{$options[5]}' min='0' />" . _MB_TDMDOWNLOADS_NUM_CHARS . " (<i>" . _MB_TDMDOWNLOADS_NOLIMIT . "</i>)</label>\n"; + + return $form; +} Modified: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/docs/changelog.txt =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/docs/changelog.txt 2015-02-10 14:07:17 UTC (rev 12973) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/docs/changelog.txt 2015-02-11 01:03:15 UTC (rev 12974) @@ -1,4 +1,9 @@ ------------------------------------------------- +Version: 1.63 Beta 2 + ZySpec +Date: 2015/02/10 +------------------------------------------------- +- added: 2 new category blocks +------------------------------------------------- Version: 1.63 Beta 2 Date: 2013/08/24 ------------------------------------------------- @@ -68,7 +73,7 @@ Informations - - See the file "lang_diff.txt" for changes in language. + - See the file "lang_diff.txt" for changes in language. Installation: @@ -117,7 +122,7 @@ Informations: - Adding the suffix "cat_" in all fields of the table "tdmdownloads_cat. - - See the file "lang_diff.txt" for changes in language. + - See the file "lang_diff.txt" for changes in language. ------------------------------------------------- Version: 1.10 Modified: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/blocks.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/blocks.php 2015-02-10 14:07:17 UTC (rev 12973) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/blocks.php 2015-02-11 01:03:15 UTC (rev 12974) @@ -9,9 +9,11 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * @package tdmdownloads * @copyright Gregory Mage (Aka Mage) * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Gregory Mage (Aka Mage) + * @author Zyspec Inc (Aka zyspec) */ define('_MB_TDMDOWNLOADS_ALLCAT', "All Categories"); define('_MB_TDMDOWNLOADS_CATTODISPLAY', "Select Displayed Categories"); @@ -29,4 +31,14 @@ define('_MB_TDMDOWNLOADS_FLOAT', "Image float: "); define('_MB_TDMDOWNLOADS_FLOAT_LEFT', "Left"); define('_MB_TDMDOWNLOADS_FLOAT_RIGHT', "Right"); -define('_MB_TDMDOWNLOADS_WHITE', "Image white"); \ No newline at end of file +define('_MB_TDMDOWNLOADS_WHITE', "Image white"); +define('_MB_TDMDOWNLOADS_ORDER', 'Order'); +define('_MB_TDMDOWNLOADS_WEIGHT', "Weight"); +define('_MB_TDMDOWNLOADS_TITLE', "Title"); +define('_MB_TDMDOWNLOADS_DISPLAY', "Display"); +define('_MB_TDMDOWNLOADS_CATS', "categories"); +define('_MB_TDMDOWNLOADS_SHOW_SUBS', "Show subcategories in block"); +define('_MB_TDMDOWNLOADS_NUM_SUBS', "subcategories"); +define('_MB_TDMDOWNLOADS_NUM_COLS', "columns in block"); +define('_MB_TDMDOWNLOADS_NUM_CHARS', "chars in title"); +define('_MB_TDMDOWNLOADS_NOLIMIT', "Set to 0 for unlimited"); Modified: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/modinfo.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/modinfo.php 2015-02-10 14:07:17 UTC (rev 12973) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/language/english/modinfo.php 2015-02-11 01:03:15 UTC (rev 12974) @@ -28,6 +28,10 @@ define('_MI_TDMDOWNLOADS_BNAMEDSC4', "Display downloaded files randomly"); define('_MI_TDMDOWNLOADS_BNAME5', "Search Downloads"); define('_MI_TDMDOWNLOADS_BNAMEDSC5', "Search form Download"); +define('_MI_TDMDOWNLOADS_BNAME6', "Download Categories"); +define('_MI_TDMDOWNLOADS_BNAMEDSC6', "Display categories of downloads"); +define('_MI_TDMDOWNLOADS_BNAME7', "Download Categories in dropdown box"); +define('_MI_TDMDOWNLOADS_BNAMEDSC7', "Display categories in HTML select element"); // Sous menu define('_MI_TDMDOWNLOADS_SMNAME1', "Suggest"); define('_MI_TDMDOWNLOADS_SMNAME2', "Files List"); @@ -162,4 +166,4 @@ define('_MI_TDMDOWNLOADS_FILE_APPROVE_NOTIFYSBJ', "[{X_SITENAME}] {X_MODULE} auto-notify: File Approved"); //1.62 define('_MI_TDMDOWNLOADS_SHOW_LATEST_FILES', "Show Latest Files"); -define('_MI_TDMDOWNLOADS_SHOW_LATEST_FILES_DSC', "This will show latest files on the user side"); \ No newline at end of file +define('_MI_TDMDOWNLOADS_SHOW_LATEST_FILES_DSC', "This will show latest files on the user side"); Added: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_cat_selbox.html =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_cat_selbox.html (rev 0) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_cat_selbox.html 2015-02-11 01:03:15 UTC (rev 12974) @@ -0,0 +1,4 @@ + +<div class="tdmcategory-block"> + <{$block.select}> +</div> Added: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_categories.html =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_categories.html (rev 0) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/templates/blocks/tdmdownloads_block_categories.html 2015-02-11 01:03:15 UTC (rev 12974) @@ -0,0 +1,23 @@ +<div class="tdmcategory-block"> + <{foreachq item=category from=$block.categories}> + <div class="item tdmcategory-blockitem<{if ($block.nb_catcol > 1)}> width50 <{cycle values='floatleft,floatright'}><{/if}>"> + <div class="itemHead"> + <span class="itemTitle"> + <a title="<{$category.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$category.id}>" rel="directory" ><{$category.title}></a> + </span> + </div> + <{if !empty($category.subcategories)}> + <div class="itemInfo"> + <ul> + <{foreachq item=subcategory from=$category.subcategories}> + <span class="itemTitle"> + <li><a title="<{$subcategory.title}>" href="<{$xoops_url}>/modules/TDMDownloads/viewcat.php?cid=<{$subcategory.id}>" rel="directory" ><{$subcategory.title}></a></li> + </span> + <{/foreach}> + </ul> + </div> + <div class="endline"></div> + <{/if}> + </div> + <{/foreach}> +</div> Modified: XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/xoops_version.php =================================================================== --- XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/xoops_version.php 2015-02-10 14:07:17 UTC (rev 12973) +++ XoopsModules/TDMDownloads/branches/zyspec/TDMDownloads/xoops_version.php 2015-02-11 01:03:15 UTC (rev 12974) @@ -31,8 +31,8 @@ $modversion['official'] = 1; $modversion['image'] = 'images/tdmdownloads_logo.png'; $modversion['dirname'] = 'TDMDownloads'; -$modversion['module_status'] = 'Beta 2'; -$modversion['release_date'] = '2013/08/24'; +$modversion['module_status'] = 'BETA 2 + ZySpec'; +$modversion['release_date'] = '2015/02/10'; $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['onInstall'] = 'include/install.php'; $modversion['onUpdate'] = 'include/update.php'; @@ -103,6 +103,22 @@ $modversion['blocks'][5]['options'] = ''; $modversion['blocks'][5]['template'] = 'tdmdownloads_block_search.html'; +$modversion['blocks'][6]['file'] = "tdmdownloads_categories.php"; +$modversion['blocks'][6]['name'] = _MI_TDMDOWNLOADS_BNAME6; +$modversion['blocks'][6]['description'] = _MI_TDMDOWNLOADS_BNAMEDSC6; +$modversion['blocks'][6]['show_func'] = "b_tdmdownloads_cat_show"; +$modversion['blocks'][6]['edit_func'] = "b_tdmdownloads_cat_edit"; +$modversion['blocks'][6]['options'] = "cat_weight|0|1|5|1|0"; +$modversion['blocks'][6]['template'] = 'tdmdownloads_block_categories.html'; + +$modversion['blocks'][7]['file'] = "tdmdownloads_cat_selbox.php"; +$modversion['blocks'][7]['name'] = _MI_TDMDOWNLOADS_BNAME7; +$modversion['blocks'][7]['description'] = _MI_TDMDOWNLOADS_BNAMEDSC7; +$modversion['blocks'][7]['show_func'] = "b_tdmdownloads_cat_selbox_show"; +$modversion['blocks'][7]['edit_func'] = "b_tdmdownloads_cat_selbox_edit"; +$modversion['blocks'][7]['options'] = "cat_weight|1|0"; +$modversion['blocks'][7]['template'] = 'tdmdownloads_block_cat_selbox.html'; + // Menu $modversion['hasMain'] = 1; $modversion['sub'][1]['name'] = _MI_TDMDOWNLOADS_SMNAME1; |
From: <txm...@us...> - 2015-02-10 14:07:31
|
Revision: 12973 http://sourceforge.net/p/xoops/svn/12973 Author: txmodxoops Date: 2015-02-10 14:07:17 +0000 (Tue, 10 Feb 2015) Log Message: ----------- Updated jquery ui libraries to version 1.10.4 Minimized For compatibility to bootstrap 3.3.1 Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/jquery.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/plugins/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/plugins/jquery-ui.min.js Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/jquery.min.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/jquery.min.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/jquery.min.js 2015-02-10 14:07:17 UTC (rev 12973) @@ -0,0 +1,4 @@ +/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];... [truncated message content] |
From: <be...@us...> - 2015-02-10 09:44:15
|
Revision: 12972 http://sourceforge.net/p/xoops/svn/12972 Author: beckmi Date: 2015-02-10 09:44:08 +0000 (Tue, 10 Feb 2015) Log Message: ----------- Updating changelog Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt Modified: XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-02-10 00:36:11 UTC (rev 12971) +++ XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-02-10 09:44:08 UTC (rev 12972) @@ -14,12 +14,20 @@ - updated xBootstrap to Bootstrap 3.3.1 (Angelo Rocha) - Some code cleanup for private messages (Dingjie (Daniel) Yang/rgriffith) - Adding Footer blocks (timgno/mamba) +- fixing a bug in xmlrpc.php (wppd/rgriffith) +- remove addrFormat override in XoopsMultiMailer (rgriffith) +- patch from Xoops 2.5.6 XoopsFormSelectUser is not compatible with some old modules like xNews (luciorota) + Security fixes - ID: 1295 Added X-Frame-Options header to prevent clickjacking in modern browsers, reported by Narendra Bhati. By default set to 'sameorigin', but can be overridden by setting desired value in 'xFrameOptions' key in xoopsconfig. (rgriffith) +Updated: + - TinyMCE to 3.5.11 (mamba) + - PHPMailer to 5.2.9 (rgriffith) + =============================== 2014-06-20: Version 2.5.7 Final (Patch 1) =============================== |
From: <be...@us...> - 2015-02-10 00:36:26
|
Revision: 12971 http://sourceforge.net/p/xoops/svn/12971 Author: beckmi Date: 2015-02-10 00:36:11 +0000 (Tue, 10 Feb 2015) Log Message: ----------- reverting Timgno's jQuery updates Removed Paths: ------------- XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.min.js XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery-ui.min.js Deleted: XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js 2015-02-08 11:00:10 UTC (rev 12970) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js 2015-02-10 00:36:11 UTC (rev 12971) @@ -1,10346 +0,0 @@ -/*! - * jQuery JavaScript Library v1.11.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-12-17T15:27Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper window is present, - // execute the factory and get jQuery - // For environments that do not inherently posses a window with a document - // (such as Node.js), expose a jQuery-making factory as module.exports - // This accentuates the need for the creation of a real window - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -// - -var deletedIds = []; - -var slice = deletedIds.slice; - -var concat = deletedIds.concat; - -var push = deletedIds.push; - -var indexOf = deletedIds.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "1.11.2", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1, IE<9 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: deletedIds.sort, - splice: deletedIds.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( support.ownLast ) { - for ( key in obj ) { - return hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1, IE<9 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( indexOf ) { - return indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - while ( j < len ) { - first[ i++ ] = second[ j++ ]; - } - - // Support: IE<9 - // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) - if ( len !== len ) { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: function() { - return +( new Date() ); - }, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.0-pre - * http://sizzlejs.com/ - * - * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-12-16 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - nodeType = context.nodeType; - - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - if ( !seed && documentIsHTML ) { - - // Try to shortcut find operations when possible (e.g., not under DocumentFragment) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType !== 1 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - parent = doc.defaultView; - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Support tests - ---------------------------------------------------------------------- */ - documentIsHTML = !isXML( doc ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + - "<select id='" + expando + "-\f]' msallowcapture=''>" + - "<option selected=''></option></select>"; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, th... [truncated message content] |
From: <txm...@us...> - 2015-02-08 11:00:13
|
Revision: 12970 http://sourceforge.net/p/xoops/svn/12970 Author: txmodxoops Date: 2015-02-08 11:00:10 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Updated jquery ui libraries to version 1.10.4 Minimized Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery-ui.min.js Added: XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery-ui.min.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery-ui.min.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery-ui.min.js 2015-02-08 11:00:10 UTC (rev 12970) @@ -0,0 +1,12 @@ +/*! jQuery UI - v1.10.4 - 2014-01-17 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ +(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept; +this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,h=a+t.helperProportions.width,l=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return a>=c&&d>=h&&r>=u&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&d>h-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||l>=u&&p>=l||u>r&&l>p)&&(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=Math.abs(a.parentData.left)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(p-l>0?(e.size.height=p,e.position.top=o.top-u):(e.size.height=l,e.position.top=o.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=o.left-c):(e.size.width=h,e.position.left=o.left+n.width-h))}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,o... [truncated message content] |
From: <txm...@us...> - 2015-02-08 10:50:09
|
Revision: 12969 http://sourceforge.net/p/xoops/svn/12969 Author: txmodxoops Date: 2015-02-08 10:49:54 +0000 (Sun, 08 Feb 2015) Log Message: ----------- Updated jquery libraries to version 1.11.2 For developement and compressed Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.min.js Added: XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8/htdocs/xoops_lib/Frameworks/jquery/jquery-1.11.2.js 2015-02-08 10:49:54 UTC (rev 12969) @@ -0,0 +1,10346 @@ +/*! + * jQuery JavaScript Library v1.11.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-12-17T15:27Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper window is present, + // execute the factory and get jQuery + // For environments that do not inherently posses a window with a document + // (such as Node.js), expose a jQuery-making factory as module.exports + // This accentuates the need for the creation of a real window + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var deletedIds = []; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.11.2", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + // adding 1 corrects loss of precision from parseFloat (#15100) + return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( support.ownLast ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.0-pre + * http://sizzlejs.com/ + * + * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-12-16 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + nodeType = context.nodeType; + + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + if ( !seed && documentIsHTML ) { + + // Try to shortcut find operations when possible (e.g., not under DocumentFragment) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType !== 1 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + parent = doc.defaultView; + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* Support tests + ---------------------------------------------------------------------- */ + documentIsHTML = !isXML( doc ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + + "<select id='" + expando + "-\f]' msallowcapture=''>" + + "<option selected=''></option></select>"; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.... [truncated message content] |
From: <zy...@us...> - 2015-02-07 13:33:11
|
Revision: 12968 http://sourceforge.net/p/xoops/svn/12968 Author: zyspec Date: 2015-02-07 13:32:58 +0000 (Sat, 07 Feb 2015) Log Message: ----------- branch copy of current trunk to create categories block Added Paths: ----------- XoopsModules/TDMDownloads/branches/zyspec/ |
From: <txm...@us...> - 2015-02-07 12:31:06
|
Revision: 12967 http://sourceforge.net/p/xoops/svn/12967 Author: txmodxoops Date: 2015-02-07 12:31:05 +0000 (Sat, 07 Feb 2015) Log Message: ----------- Added side footer blocks template files for customization Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/ XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_c.html XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_l.html XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_r.html Added: XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_c.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_c.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_c.html 2015-02-07 12:31:05 UTC (rev 12967) @@ -0,0 +1,4 @@ +<div id="<{$block.module}>" class="xo-block"> + <{if $block.title}><div class="xo-title"><h4><{$block.title}></h4></div><{/if}> + <div class="xo-content"><{$block.content}></div> +</div> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_l.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_l.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_l.html 2015-02-07 12:31:05 UTC (rev 12967) @@ -0,0 +1,4 @@ +<div id="<{$block.module}>" class="xo-block"> + <{if $block.title}><div class="xo-title"><h4><{$block.title}></h4></div><{/if}> + <div class="xo-content"><{$block.content}></div> +</div> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_r.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_r.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0_timgno/htdocs/themes/default/xotpl/block_footer_r.html 2015-02-07 12:31:05 UTC (rev 12967) @@ -0,0 +1,4 @@ +<div id="<{$block.module}>" class="xo-block"> + <{if $block.title}><div class="xo-title"><h4><{$block.title}></h4></div><{/if}> + <div class="xo-content"><{$block.content}></div> +</div> \ No newline at end of file |
From: <txm...@us...> - 2015-02-04 10:26:08
|
Revision: 12966 http://sourceforge.net/p/xoops/svn/12966 Author: txmodxoops Date: 2015-02-04 10:26:04 +0000 (Wed, 04 Feb 2015) Log Message: ----------- Addes assets folder path Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/theme.php Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/theme.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/theme.php 2015-02-04 10:26:04 UTC (rev 12966) @@ -0,0 +1,822 @@ +<?php +/** + * xos_opal_Theme component class file + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org) + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Skalpa Keo <sk...@xo...> + * @author Taiwen Jiang <ph...@us...> + * @since 2.3.0 + * @package kernel + * @subpackage xos_opal_Theme + * @version $Id: theme.php 12666 2014-06-30 10:02:07Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') || die('Restricted access'); + +/** + * xos_opal_ThemeFactory + * + * @author Skalpa Keo + * @package xos_opal + * @subpackage xos_opal_Theme + * @since 2.3.0 + */ +class xos_opal_ThemeFactory +{ + var $xoBundleIdentifier = 'xos_opal_ThemeFactory'; + /** + * Currently enabled themes (if empty, all the themes in themes/ are allowed) + * + * @var array + */ + var $allowedThemes = array(); + /** + * Default theme to instanciate if none specified + * + * @var string + */ + var $defaultTheme = 'default'; + /** + * If users are allowed to choose a custom theme + * + * @var bool + */ + var $allowUserSelection = true; + + /** + * Instanciate the specified theme + */ + function &createInstance($options = array(), $initArgs = array()) + { + // Grab the theme folder from request vars if present + if (empty($options['folderName'])) { + if (($req = @$_REQUEST['xoops_theme_select']) && $this->isThemeAllowed($req)) { + $options['folderName'] = $req; + if (isset($_SESSION) && $this->allowUserSelection) { + $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req; + } + } else if (isset($_SESSION[$this->xoBundleIdentifier]['defaultTheme'])) { + $options['folderName'] = $_SESSION[$this->xoBundleIdentifier]['defaultTheme']; + } else if (empty($options['folderName']) || ! $this->isThemeAllowed($options['folderName'])) { + $options['folderName'] = $this->defaultTheme; + } + $GLOBALS['xoopsConfig']['theme_set'] = $options['folderName']; + } + $options['path'] = XOOPS_THEME_PATH . '/' . $options['folderName']; + $inst = null; + $inst = new xos_opal_Theme(); + foreach ($options as $k => $v) { + $inst->$k = $v; + } + $inst->xoInit(); + + return $inst; + } + + /** + * Checks if the specified theme is enabled or not + * + * @param string $name + * @return bool + */ + function isThemeAllowed($name) + { + return (empty($this->allowedThemes) || in_array($name, $this->allowedThemes)); + } +} + +/** + * xos_opal_AdminThemeFactory + * + * @author Andricq Nicolas (AKA MusS) + * @author trabis + * @package xos_opal + * @subpackage xos_opal_Theme + * @since 2.4.0 + */ +class xos_opal_AdminThemeFactory extends xos_opal_ThemeFactory +{ + /** + * @param array $options + * @param array $initArgs + * + * @return null|xos_opal_Theme + */ + function &createInstance($options = array(), $initArgs = array()) + { + $options["plugins"] = array(); + $options['renderBanner'] = false; + $inst =& parent::createInstance($options, $initArgs); + $inst->path = XOOPS_ADMINTHEME_PATH . '/' . $inst->folderName; + $inst->url = XOOPS_ADMINTHEME_URL . '/' . $inst->folderName; + $inst->template->assign(array( + 'theme_path' => $inst->path, + 'theme_tpl' => $inst->path.'/xotpl', + 'theme_url' => $inst->url, + 'theme_img' => $inst->url.'/assets/img', + 'theme_icons' => $inst->url.'/assets/icons', + 'theme_css' => $inst->url.'/assets/css', + 'theme_js' => $inst->url.'/assets/js', + 'theme_lang' => $inst->url.'/language', + )); + + return $inst; + } +} + +/** + * Class xos_opal_Theme + */ +class xos_opal_Theme +{ + /** + * Should we render banner? Not for redirect pages or admin side + * + * @var bool + */ + var $renderBanner = true; + /** + * The name of this theme + * + * @var string + */ + var $folderName = ''; + /** + * Physical path of this theme folder + * + * @var string + */ + var $path = ''; + var $url = ''; + + /** + * Whether or not the theme engine should include the output generated by php + * + * @var string + */ + var $bufferOutput = true; + /** + * Canvas-level template to use + * + * @var string + */ + var $canvasTemplate = 'theme.html'; + + /** + * Theme folder path + * + * @var string + */ + var $themesPath = 'themes'; + + /** + * Content-level template to use + * + * @var string + */ + var $contentTemplate = ''; + + var $contentCacheLifetime = 0; + var $contentCacheId = null; + + /** + * Text content to display right after the contentTemplate output + * + * @var string + */ + var $content = ''; + /** + * Page construction plug-ins to use + * + * @var array + * @access public + */ + var $plugins = array( + 'xos_logos_PageBuilder'); + var $renderCount = 0; + /** + * Pointer to the theme template engine + * + * @var XoopsTpl + */ + var $template = false; + + /** + * Array containing the document meta-information + * + * @var array + */ + var $metas = array( + //'http' => array( + // 'Content-Script-Type' => 'text/javascript' , + // 'Content-Style-Type' => 'text/css') , + 'meta' => array() , + 'link' => array() , + 'script' => array()); + + /** + * Array of strings to be inserted in the head tag of HTML documents + * + * @var array + */ + var $htmlHeadStrings = array(); + /** + * Custom variables that will always be assigned to the template + * + * @var array + */ + var $templateVars = array(); + + /** + * User extra information for cache id, like language, user groups + * + * @var boolean + */ + var $use_extra_cache_id = true; + + /** + * *#@- + */ + + /** + * *#@+ + * + * @tasktype 10 Initialization + */ + /** + * Initializes this theme + * + * Upon initialization, the theme creates its template engine and instanciates the + * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not + * display redirection messages, the HTTP redirections system is disabled to ensure users will + * see the redirection screen. + * + * @param array $options + * @return bool + */ + function xoInit($options = array()) + { + $this->path = XOOPS_THEME_PATH . '/' . $this->folderName; + $this->url = XOOPS_THEME_URL . '/' . $this->folderName; + $this->template = null; + $this->template = new XoopsTpl(); + $this->template->currentTheme =& $this; + $this->template->assign_by_ref('xoTheme', $this); + $this->template->assign(array( + 'xoops_theme' => $GLOBALS['xoopsConfig']['theme_set'] , + 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $GLOBALS['xoopsConfig']['theme_set'] . '/', + 'xoops_themecss' => xoops_getcss($GLOBALS['xoopsConfig']['theme_set']), + 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($GLOBALS['xoopsConfig']['slogan'], ENT_QUOTES), + 'xoops_dirname' => isset($GLOBALS['xoopsModule'])&& is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('dirname') : 'system', + 'xoops_banner' => ($GLOBALS['xoopsConfig']['banners'] && $this->renderBanner) ? xoops_getbanner() : ' ', + 'xoops_pagetitle' => isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('name') : htmlspecialchars($GLOBALS['xoopsConfig']['slogan'], ENT_QUOTES))); + + if (isset($GLOBALS['xoopsUser']) && is_object($GLOBALS['xoopsUser'])) { + $this->template->assign(array( + 'xoops_isuser' => true, + 'xoops_avatar' => XOOPS_UPLOAD_URL . "/" . $GLOBALS['xoopsUser']->getVar('user_avatar'), + 'xoops_userid' => $GLOBALS['xoopsUser']->getVar('uid'), + 'xoops_uname' => $GLOBALS['xoopsUser']->getVar('uname'), + 'xoops_name' => $GLOBALS['xoopsUser']->getVar('name'), + 'xoops_isadmin' => $GLOBALS['xoopsUserIsAdmin'], + 'xoops_usergroups' => $GLOBALS['xoopsUser']->getGroups())); + } else { + $this->template->assign(array( + 'xoops_isuser' => false, + 'xoops_isadmin' => false, + 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS))); + } + + // Meta tags + $config_handler =& xoops_gethandler('config'); + $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); + $config = $config_handler->getConfigs($criteria, true); + foreach (array_keys($config) as $i) { + $name = $config[$i]->getVar('conf_name', 'n'); + $value = $config[$i]->getVar('conf_value', 'n'); + if (substr($name, 0, 5) == 'meta_') { + $this->addMeta('meta', substr($name, 5), $value); + } else { + // prefix each tag with 'xoops_' + $this->template->assign("xoops_$name", $value); + } + } + // Load global javascript + $this->addScript('include/xoops.js'); + $this->loadLocalization(); + + if ($this->bufferOutput) { + ob_start(); + } + $GLOBALS['xoTheme'] =& $this; + $GLOBALS['xoopsTpl'] =& $this->template; + // Instanciate and initialize all the theme plugins + foreach ($this->plugins as $k => $bundleId) { + if (!is_object($bundleId)) { + $this->plugins[$bundleId] = null; + $this->plugins[$bundleId] = new $bundleId(); + $this->plugins[$bundleId]->theme =& $this; + $this->plugins[$bundleId]->xoInit(); + unset($this->plugins[$k]); + } + } + + return true; + } + + /** + * Generate cache id based on extra information of language and user groups + * + * User groups other than anonymous should be detected to avoid disclosing group sensitive contents + * + * @param string $cache_id raw cache id + * @param string $extraString extra string + * @return string complete cache id + */ + function generateCacheId($cache_id, $extraString = '') + { + static $extra_string; + if (!$this->use_extra_cache_id) { + return $cache_id; + } + + if (empty($extraString)) { + if (empty($extra_string)) { + // Generate language section + $extra_string = $GLOBALS['xoopsConfig']['language']; + // Generate group section + if (!isset($GLOBALS['xoopsUser']) || !is_object($GLOBALS['xoopsUser'])) { + $extra_string .= '-' . XOOPS_GROUP_ANONYMOUS; + } else { + $groups = $GLOBALS['xoopsUser']->getGroups(); + sort($groups); + // Generate group string for non-anonymous groups, + // XOOPS_DB_PASS and XOOPS_DB_NAME (before we find better variables) are used to protect group sensitive contents + $extra_string .= '-' . substr(md5(implode('-', $groups)), 0, 8) . '-' . substr(md5(XOOPS_DB_PASS . XOOPS_DB_NAME . XOOPS_DB_USER), 0, 8); + } + } + $extraString = $extra_string; + } + $cache_id .= '-' . $extraString; + + return $cache_id; + } + + /** + * xos_opal_Theme::checkCache() + * + * @return bool + */ + function checkCache() + { + if ($_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime) { + $template = $this->contentTemplate ? $this->contentTemplate : 'db:system_dummy.html'; + $this->template->caching = 2; + $this->template->cache_lifetime = $this->contentCacheLifetime; + $uri = str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']); + // Clean uri by removing session id + if (defined('SID') && SID && strpos($uri, SID)) { + $uri = preg_replace("/([\?&])(" . SID . "$|" . SID . "&)/", "\\1", $uri); + } + $this->contentCacheId = $this->generateCacheId('page_' . substr(md5($uri), 0, 8)); + if ($this->template->is_cached($template, $this->contentCacheId)) { + $xoopsLogger =& XoopsLogger::getInstance(); + $xoopsLogger->addExtra($template, sprintf('Cached (regenerates every %d seconds)', $this->contentCacheLifetime)); + $this->render(null, null, $template); + + return true; + } + } + + return false; + } + + /** + * Render the page + * + * The theme engine builds pages from 2 templates: canvas and content. + * + * A module can call this method directly and specify what templates the theme engine must use. + * If render() hasn't been called before, the theme defaults will be used for the canvas and + * page template (and xoopsOption['template_main'] for the content). + * + * @param string $canvasTpl The canvas template, if different from the theme default + * @param string $pageTpl The page template, if different from the theme default (unsupported, 2.3+ only) + * @param string $contentTpl The content template + * @param array $vars Template variables to send to the template engine + * + * @return bool + */ + function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array()) + { + if ($this->renderCount) { + return false; + } + $xoopsLogger =& XoopsLogger::getInstance(); + $xoopsLogger->startTime('Page rendering'); + + xoops_load('xoopscache'); + $cache =& XoopsCache::getInstance(); + + //Get meta information for cached pages + if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId)) { + //we need to merge metas set by blocks ) with the module cached meta + $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']); + foreach ($content['metas'] as $type => $value) { + $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]); + } + $GLOBALS['xoopsOption']['xoops_pagetitle'] = $content['xoops_pagetitle']; + $GLOBALS['xoopsOption']['xoops_module_header'] = $content['header']; + } + + if (!empty($GLOBALS['xoopsOption']['xoops_pagetitle'])) { + $this->template->assign('xoops_pagetitle', $GLOBALS['xoopsOption']['xoops_pagetitle']); + } + $header = empty($GLOBALS['xoopsOption']['xoops_module_header']) ? $this->template->get_template_vars('xoops_module_header') : $GLOBALS['xoopsOption']['xoops_module_header']; + + //save meta information of cached pages + if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) { + $content['htmlHeadStrings'] = $this->htmlHeadStrings; + $content['metas'] = $this->metas; + $content['xoops_pagetitle'] = $this->template->get_template_vars('xoops_pagetitle'); + $content['header'] = $header; + $cache->write($this->contentCacheId, $content); + } + + // @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice + $old = array( + 'robots', + 'keywords', + 'description', + 'rating', + 'author', + 'copyright'); + foreach ($this->metas['meta'] as $name => $value) { + if (in_array($name, $old)) { + $this->template->assign("xoops_meta_$name", htmlspecialchars($value, ENT_QUOTES)); + unset($this->metas['meta'][$name]); + } + } + + // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and $this->template->get_template_vars( 'xoops_module_header' ) ? + $this->template->assign('xoops_module_header', $this->renderMetas(null, true) . "\n" . $header); + + if ($canvasTpl) { + $this->canvasTemplate = $canvasTpl; + } + if ($contentTpl) { + $this->contentTemplate = $contentTpl; + } + if (!empty($vars)) { + $this->template->assign($vars); + } + if ($this->contentTemplate) { + $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId); + } + if ($this->bufferOutput) { + $this->content .= ob_get_contents(); + ob_end_clean(); + } + + $this->template->assign_by_ref('xoops_contents', $this->content); + + // Do not cache the main (theme.html) template output + $this->template->caching = 0; + $this->template->display($this->path . '/' . $this->canvasTemplate); + $this->renderCount++; + $xoopsLogger->stopTime('Page rendering'); + + return true; + } + + /** + * Load localization information + * + * Folder structure for localization: + * <ul>themes/themefolder/english + * <li>main.php - language definitions</li> + * <li>style.css - localization stylesheet</li> + * <li>script.js - localization script</li> + * </ul> + */ + function loadLocalization($type = "main") + { + $language = $GLOBALS['xoopsConfig']['language']; + // Load global localization stylesheet if available + if (file_exists($GLOBALS['xoops']->path('language/' . $language . '/style.css'))) { + $this->addStylesheet($GLOBALS['xoops']->url('language/' . $language . '/style.css')); + } + $this->addLanguage($type, $language); + // Load theme localization stylesheet and scripts if available + if (file_exists($this->path . '/language/' . $language . '/script.js')) { + $this->addScript($this->url . '/language/' . $language . '/script.js'); + } + if (file_exists($this->path . '/language/' . $language . '/style.css')) { + $this->addStylesheet($this->url . '/language/' . $language . '/style.css'); + } + + return true; + } + + /** + * Load theme specific language constants + * + * @param string $type language type, like 'main', 'admin'; Needs to be declared in theme xo-info.php + * @param string $language specific language + * + * @return bool|mixed + */ + function addLanguage($type = "main", $language = null) + { + $language = is_null($language) ? $GLOBALS["xoopsConfig"]["language"] : $language; + if (!file_exists($fileinc = $this->path . "/language/{$language}/{$type}.php")) { + if (!file_exists($fileinc = $this->path . "/language/english/{$type}.php")) { + return false; + } + } + $ret = include_once $fileinc; + + return $ret; + } + + /** + * *#@+ + * + * @tasktype 20 Manipulating page meta-information + */ + /** + * Adds script code to the document head + * + * This methods allows the insertion of an external script file (if $src is provided), or + * of a script snippet. The file URI is parsed to take benefit of the theme resource + * overloading system. + * + * The $attributes parameter allows you to specify the attributes that will be added to the + * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to + * 'text/javascript'. + * + * <code> + * // Add an external script using a physical path + * $theme->addScript( 'www/script.js', null, '' ); + * $theme->addScript( 'modules/newbb/script.js', null, '' ); + * // Specify attributes for the <script> tag + * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '', 'mod_xoops_Sitemanager' ); + * // Insert a code snippet + * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");', 'hello' ); + * </code> + * + * @param string $src path to an external script file + * @param array $attributes hash of attributes to add to the <script> tag + * @param string $content Code snippet to output within the <script> tag + * @param string $name Element Name in array scripts are stored in. + * @return void + */ + function addScript($src = '', $attributes = array(), $content = '', $name = '') + { + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($src)) { + $src = $GLOBALS['xoops']->url($this->resourcePath($src)); + $attributes['src'] = $src; + } + if (!empty($content)) { + $attributes['_'] = $content; + } + if (!isset($attributes['type'])) { + $attributes['type'] = 'text/javascript'; + } + if (empty($name)) { + $name = md5(serialize($attributes)); + } + $this->addMeta('script', $name, $attributes); + } + + /** + * Add StyleSheet or CSS code to the document head + * + * @param string $src path to .css file + * @param array $attributes name => value paired array of attributes such as title + * @param string $content CSS code to output between the <style> tags (in case $src is empty) + * @param string $name Element Name in array stylesheets are stored in. + * @return void + */ + function addStylesheet($src = '', $attributes = array(), $content = '', $name = '') + { + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($src)) { + $src = $GLOBALS['xoops']->url($this->resourcePath($src)); + $attributes['href'] = $src; + } + if (!isset($attributes['type'])) { + $attributes['type'] = 'text/css'; + } + if (!empty($content)) { + $attributes['_'] = $content; + } + if (empty($name)) { + $name = md5(serialize($attributes)); + } + $this->addMeta('stylesheet', $name, $attributes); + } + + /** + * Add a <link> to the header + * + * @param string $rel Relationship from the current doc to the anchored one + * @param string $href URI of the anchored document + * @param array $attributes Additional attributes to add to the <link> element + * @param string $name Element Name in array links are stored in. + */ + function addLink($rel, $href = '', $attributes = array(), $name = '') + { + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($href)) { + $attributes['href'] = $href; + } + $attributes['rel'] = $rel; + if (empty($name)) { + $name = md5(serialize($attributes)); + } + $this->addMeta('link', $name, $attributes); + } + + /** + * Set a meta http-equiv value + */ + function addHttpMeta($name, $value = null) + { + if (isset($value)) { + return $this->addMeta('http', $name, $value); + } + unset($this->metas['http'][$name]); + } + + /** + * Change output page meta-information + */ + function addMeta($type = 'meta', $name = '', $value = '') + { + if (!isset($this->metas[$type])) { + $this->metas[$type] = array(); + } + if (!empty($name)) { + $this->metas[$type][$name] = $value; + } else { + $this->metas[$type][md5(serialize(array($value)))] = $value; + } + + return $value; + } + + /** + * xos_opal_Theme::headContent() + * + * @param mixed $params + * @param mixed $content + * @param mixed $smarty + * @param mixed $repeat + * + * @return void + */ + function headContent($params, $content, &$smarty, &$repeat) + { + if (!$repeat) { + $this->htmlHeadStrings[] = $content; + } + } + + /** + * xos_opal_Theme::renderMetas() + * + * @param mixed $type + * @param mixed $return + * @return bool|string + */ + function renderMetas($type = null, $return = false) + { + $str = ''; + if (!isset($type)) { + foreach (array_keys($this->metas) as $type) { + $str .= $this->renderMetas($type, true); + } + $str .= implode("\n", $this->htmlHeadStrings); + } else { + switch ($type) { + case 'script': + foreach ($this->metas[$type] as $attrs) { + $str .= "<script" . $this->renderAttributes($attrs) . ">"; + if (@$attrs['_']) { + $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>"; + } + $str .= "</script>\n"; + } + break; + case 'link': + foreach ($this->metas[$type] as $attrs) { + $rel = $attrs['rel']; + unset($attrs['rel']); + $str .= '<link rel="' . $rel . '"' . $this->renderAttributes($attrs) . " />\n"; + } + break; + case 'stylesheet': + foreach ($this->metas[$type] as $attrs) { + if (@$attrs['_']) { + $str .= '<style' . $this->renderAttributes($attrs) . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>"; + } else { + $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n"; + } + } + break; + case 'http': + foreach ($this->metas[$type] as $name => $content) { + $str .= '<meta http-equiv="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; + } + break; + default: + foreach ($this->metas[$type] as $name => $content) { + $str .= '<meta name="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; + } + break; + } + } + if ($return) { + return $str; + } + echo $str; + + return true; + } + + /** + * Generates a unique element ID + * + * @param string $tagName + * @return string + */ + function genElementId($tagName = 'xos') + { + static $cache = array(); + if (!isset($cache[$tagName])) { + $cache[$tagName] = 1; + } + + return $tagName . '-' . $cache[$tagName] ++; + } + + /** + * Transform an attributes collection to an XML string + * + * @param array $coll + * @return string + */ + function renderAttributes($coll) + { + $str = ''; + foreach ($coll as $name => $val) { + if ($name != '_') { + $str .= ' ' . $name . '="' . htmlspecialchars($val, ENT_QUOTES) . '"'; + } + } + + return $str; + } + + /** + * Return a themable file resource path + * + * @param string $path + * @return string + */ + function resourcePath($path) + { + if (substr($path, 0, 1) == '/') { + $path = substr($path, 1); + } + + if (file_exists(XOOPS_ROOT_PATH . "/{$this->themesPath}/{$this->folderName}/{$path}")) { + return "{$this->themesPath}/{$this->folderName}/{$path}"; + } + + if (file_exists(XOOPS_ROOT_PATH . "/themes/{$this->folderName}/{$path}")) { + return "themes/{$this->folderName}/{$path}"; + } + + return $path; + } +} |
From: <luc...@us...> - 2015-02-03 22:32:22
|
Revision: 12965 http://sourceforge.net/p/xoops/svn/12965 Author: luciorota Date: 2015-02-03 22:32:13 +0000 (Tue, 03 Feb 2015) Log Message: ----------- xoosp 2.5.7.1 compatible change directory structure improved subscr form standardize code code cleanup Modified Paths: -------------- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/subscr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/catsubscr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/subscr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/common.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/xoops_version.php Added Paths: ----------- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.tpl XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/session.php Removed Paths: ------------- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/session.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/templates/xNewsletter_common_breadcrumb.tpl Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/subscr.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/subscr.php 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/subscr.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -172,6 +172,7 @@ } $GLOBALS['xoopsTpl']->assign('subscrs_pagenav', $pagenav); // + xoops_load('XoopsFormLoader'); $filter_subscr_criteria_select = new XoopsFormSelect(_AM_XNEWSLETTER_LETTER_TITLE, 'filter_subscr_criteria', $filter_subscr_criteria, 1, false); $filter_subscr_criteria_select->addOption('CONTAINS', _CONTAINS); $filter_subscr_criteria_select->addOption('MATCHES', _MATCHES); @@ -260,7 +261,7 @@ echo $subscrAdmin->renderButton(); // $subscrObj = $xnewsletter->getHandler('subscr')->create(); - $form = $subscrObj->getFormAdmin(); + $form = $subscrObj->getFormAdmin(); $form->display(); include_once __DIR__ . '/admin_footer.php'; break; @@ -283,16 +284,70 @@ $subscrObj->setVar('subscr_actkey', $_REQUEST['subscr_actkey']); $subscrObj->setVar('subscr_activated', XoopsRequest::getInt('subscr_activated', 0)); // - if ($xnewsletter->getHandler('subscr')->insert($subscrObj)) { - redirect_header('?op=list_subscrs', 3, _AM_XNEWSLETTER_FORMOK); + if (!$xnewsletter->getHandler('subscr')->insert($subscrObj)) { + // render start here + xoops_cp_header(); + // render form + echo $subscrObj->getHtmlErrors(); + $form = $subscrObj->getFormAdmin(); + $form->display(); + include_once __DIR__ . '/admin_footer.php'; + exit(); } - // render start here - xoops_cp_header(); - // render form - echo $subscrObj->getHtmlErrors(); - $form = $subscrObj->getFormAdmin(); - $form->display(); - include_once __DIR__ . '/admin_footer.php'; + // + $cat_ids = XoopsRequest::getArray('cat_ids', array()); + $subscr_id = $subscrObj->getVar('subscr_id'); + $catObjs = $xnewsletter->getHandler('cat')->getAll(); + foreach ($catObjs as $cat_id => $catObj) { + $catsubscrCriteria = new CriteriaCompo(); + $catsubscrCriteria->add(new Criteria('catsubscr_catid', $cat_id)); + $catsubscrCriteria->add(new Criteria('catsubscr_subscrid', $subscr_id)); + $catsubscrCount = $xnewsletter->getHandler('catsubscr')->getCount($catsubscrCriteria); + if (in_array($cat_id, $cat_ids)) { + // checked + switch($catsubscrCount) { + case 0: + // create catsubscr + $catsubscrObj = $xnewsletter->getHandler('catsubscr')->create(); + $catsubscrObj->setVar('catsubscr_catid', $cat_id); + $catsubscrObj->setVar('catsubscr_subscrid', $subscr_id); + $catsubscrObj->setVar('catsubscr_submitter', $_REQUEST['subscr_uid']); + $catsubscrObj->setVar('catsubscr_created', $_REQUEST['subscr_created']); + $xnewsletter->getHandler('catsubscr')->insert($catsubscrObj); + break; + case 1: + // NOP + break; + default: + // delete all catsubscrs + $xnewsletter->getHandler('catsubscr')->deleteAll($catsubscrCriteria); + // create catsubscr + $catsubscrObj = $xnewsletter->getHandler('catsubscr')->create(); + $catsubscrObj->setVar('catsubscr_catid', $cat_id); + $catsubscrObj->setVar('catsubscr_subscrid', $subscr_id); + $catsubscrObj->setVar('catsubscr_submitter', $_REQUEST['subscr_uid']); + $catsubscrObj->setVar('catsubscr_created', $_REQUEST['subscr_created']); + $xnewsletter->getHandler('catsubscr')->insert($catsubscrObj); + break; + } + } else { + // not checked + switch($catsubscrCount) { + case 0: + // NOP + break; + case 1: + // delete catsubscr + $xnewsletter->getHandler('catsubscr')->deleteAll($catsubscrCriteria); + break; + default: + // delete all catsubscrs + $xnewsletter->getHandler('catsubscr')->deleteAll($catsubscrCriteria); + break; + } + } + } + redirect_header('?op=list_subscrs', 3, _AM_XNEWSLETTER_FORMOK); break; case 'edit_subscr': Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/catsubscr.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/catsubscr.php 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/catsubscr.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -74,6 +74,13 @@ // $form = new XoopsThemeForm($title, 'form', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); + // catsubsr: catsubscr_subscrid + $subscrCriteria = new CriteriaCompo(); + $subscrCriteria->setSort('subscr_email '); + $subscrCriteria->setOrder('ASC'); + $subscr_select = new XoopsFormSelect(_AM_XNEWSLETTER_CATSUBSCR_SUBSCRID, 'catsubscr_subscrid', $this->getVar('catsubscr_subscrid')); + $subscr_select->addOptionArray($this->xnewsletter->getHandler('subscr')->getList($subscrCriteria)); + $form->addElement($subscr_select, true); // catsubsr: catsubscr_catid $criteria = new CriteriaCompo(); $criteria->setSort('cat_id ASC, cat_name'); @@ -81,16 +88,8 @@ $cat_select = new XoopsFormSelect(_AM_XNEWSLETTER_CATSUBSCR_CATID, 'catsubscr_catid', $this->getVar('catsubscr_catid')); $cat_select->addOptionArray($this->xnewsletter->getHandler('cat')->getList()); $form->addElement($cat_select, true); - // catsubsr: catsubscr_subscrid - $subscrCriteria = new CriteriaCompo(); - $subscrCriteria->setSort('subscr_email '); - $subscrCriteria->setOrder('ASC'); - $subscr_select = new XoopsFormSelect(_AM_XNEWSLETTER_CATSUBSCR_SUBSCRID, 'catsubscr_subscrid', $this->getVar('catsubscr_subscrid')); - $subscr_select->addOptionArray($this->xnewsletter->getHandler('subscr')->getList($subscrCriteria)); - $form->addElement($subscr_select, true); - // + // form: catsubscr_quit_now $quited_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CATSUBSCR_QUITED, ' '); - // $quit_now = new XoopsFormRadio('', 'catsubscr_quit_now', _XNEWSLETTER_CATSUBSCR_QUIT_NO_VAL_NONE); $quit_now->addOptionArray( array( Added: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.php (rev 0) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -0,0 +1,86 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * XnewsletterBreadcrumb Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author lucio <luc...@gm...> + * @package Xnewsletter + * @since 1.00 + * @version $Id:$ + * + * Example: + * $breadcrumb = new XnewsletterBreadcrumb(); + * $breadcrumb->addLink( 'bread 1', 'index1.php' ); + * $breadcrumb->addLink( 'bread 2', '' ); + * $breadcrumb->addLink( 'bread 3', 'index3.php' ); + * echo $breadcrumb->render(); + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +/** + * Class XnewsletterBreadcrumb + */ +class XnewsletterBreadcrumb +{ + private $dirname; + private $_bread = array(); + + /** + * + */ + public function __construct() + { + $this->dirname = basename(dirname(dirname(__DIR__))); + } + + /** + * Add link to breadcrumb + * + * @param string $title + * @param string $link + */ + public function addLink( $title='', $link='' ) + { + $this->_bread[] = array( + 'link' => $link, + 'title' => $title + ); + } + + /** + * Render Xnewsletter BreadCrumb + * + */ + public function render() + { + $ret = ''; + + if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { + include_once $GLOBALS['xoops']->path('/class/theme.php'); + $GLOBALS['xoTheme'] = new xos_opal_Theme(); + } + require_once $GLOBALS['xoops']->path('/class/template.php'); + $breadcrumbTpl = new XoopsTpl(); + $breadcrumbTpl->assign('breadcrumb', $this->_bread); +// IN PROGRESS +// IN PROGRESS +// IN PROGRESS + //$ret .= $breadcrumbTpl->fetch(__DIR__ . '_breadcrumb.tpl'); + $tplSource = file_get_contents(__DIR__ . '/breadcrumb.tpl'); +// $ret .= $choiceByLetterTpl->fetchFromData($tplSource, false, null); + $ret .= $breadcrumbTpl->fetchFromData($tplSource, false, null); + unset($breadcrumbTpl); + + return $ret; + } +} Added: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.tpl =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.tpl (rev 0) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/breadcrumb.tpl 2015-02-03 22:32:13 UTC (rev 12965) @@ -0,0 +1,16 @@ +<div class="module_skeleton_headertable"> + <div class="module_skeleton_breadcrumb"> + <{foreach item=bread from=$breadcrumb name=bcloop}> + <span class="bread"> + <{if ($bread.link)}> + <a href="<{$bread.link}>" title="<{$bread.title}>"><{$bread.title}></a> + <{else}> + <{$bread.title}> + <{/if}> + </span> + <{if !$smarty.foreach.bcloop.last}> + <span class="delimiter">></span> + <{/if}> + <{/foreach}> + </div> +</div> Added: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/session.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/session.php (rev 0) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/common/session.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -0,0 +1,110 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * XnewsletterSession class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package xnewsletter + * @since 1.3 + * @author trabis <lus...@gm...> + * @author Harry Fuecks (PHP Anthology Volume II) + * @version svn:$id$ + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +include_once dirname(dirname(__DIR__)) . '/include/common.php'; + +/** + * Class XnewsletterSession + */ +class XnewsletterSession +{ + /** + * Session constructor<br /> + * Starts the session with session_start() + * <strong>Note:</strong> that if the session has already started, + * session_start() does nothing + */ + protected function __construct() + { + @session_start(); + } + + /** + * Sets a session variable + * + * @param string $name name of variable + * @param mixed $value value of variable + * + * @return void + * @access public + */ + public function set($name, $value) + { + $_SESSION[$name] = $value; + } + + /** + * Fetches a session variable + * + * @param string $name name of variable + * + * @return mixed value of session variable + * @access public + */ + public function get($name) + { + if (isset($_SESSION[$name])) { + return $_SESSION[$name]; + } else { + return false; + } + } + + /** + * Deletes a session variable + * + * @param string $name name of variable + * + * @return void + * @access public + */ + public function del($name) + { + unset($_SESSION[$name]); + } + + /** + * Destroys the whole session + * + * @return void + * @access public + */ + public function destroy() + { + $_SESSION = array(); + session_destroy(); + } + + /** + * @return XnewsletterSession + */ + public static function &getInstance() + { + static $_sess; + if (!isset($_sess)) { + $_sess = new XnewsletterSession(); + } + + return $_sess; + } +} Deleted: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/session.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/session.php 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/session.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -1,109 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -/** - * XnewsletterSession class - * - * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package xnewsletter - * @since 1.3 - * @author trabis <lus...@gm...> - * @author Harry Fuecks (PHP Anthology Volume II) - * @version svn:$id$ - */ - -include_once dirname(__DIR__) . '/include/common.php'; - -/** - * Class XnewsletterSession - */ -class XnewsletterSession -{ - /** - * Session constructor<br /> - * Starts the session with session_start() - * <strong>Note:</strong> that if the session has already started, - * session_start() does nothing - */ - protected function __construct() - { - @session_start(); - } - - /** - * Sets a session variable - * - * @param string $name name of variable - * @param mixed $value value of variable - * - * @return void - * @access public - */ - public function set($name, $value) - { - $_SESSION[$name] = $value; - } - - /** - * Fetches a session variable - * - * @param string $name name of variable - * - * @return mixed value of session variable - * @access public - */ - public function get($name) - { - if (isset($_SESSION[$name])) { - return $_SESSION[$name]; - } else { - return false; - } - } - - /** - * Deletes a session variable - * - * @param string $name name of variable - * - * @return void - * @access public - */ - public function del($name) - { - unset($_SESSION[$name]); - } - - /** - * Destroys the whole session - * - * @return void - * @access public - */ - public function destroy() - { - $_SESSION = array(); - session_destroy(); - } - - /** - * @return XnewsletterSession - */ - public static function &getInstance() - { - static $_sess; - if (!isset($_sess)) { - $_sess = new XnewsletterSession(); - } - - return $_sess; - } -} Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/subscr.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/subscr.php 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/class/subscr.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -48,7 +48,7 @@ $this->initVar('subscr_email', XOBJ_DTYPE_TXTBOX, '', false, 255); $this->initVar('subscr_firstname', XOBJ_DTYPE_TXTBOX, '', true, 255); $this->initVar('subscr_lastname', XOBJ_DTYPE_TXTBOX, '', false, 255); - $this->initVar('subscr_uid', XOBJ_DTYPE_INT, null, false); + $this->initVar('subscr_uid', XOBJ_DTYPE_INT, 0, false); // default: anonymous $this->initVar('subscr_sex', XOBJ_DTYPE_TXTBOX, '', false, 100); $this->initVar('subscr_submitter', XOBJ_DTYPE_INT, null, false); $this->initVar('subscr_created', XOBJ_DTYPE_INT, time(), false); @@ -115,7 +115,8 @@ public function getForm($action = false) { global $xoopsUser; - // + $gperm_handler = xoops_gethandler('groupperm'); + $user_handler = xoops_gethandler('user'); xoops_load('XoopsFormLoader'); // if ($action === false) { @@ -123,10 +124,12 @@ } // $isAdmin = xnewsletter_userIsAdmin(); - $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); // + $uid = (is_object($GLOBALS['xoopsUser']) && isset($GLOBALS['xoopsUser'])) ? $GLOBALS['xoopsUser']->uid() : 0; + $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); + // $title = $this->isNew() ? sprintf(_MA_XNEWSLETTER_SUBSCRIPTION_ADD) : sprintf(_MA_XNEWSLETTER_SUBSCRIPTION_EDIT); - $form = new XoopsThemeForm($title, 'form', $action, 'post', true); + $form = new XoopsThemeForm($title, 'form', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); // $form->addElement(new XoopsFormLabel("<span style='text-decoration:underline'>" . _MA_XNEWSLETTER_SUBSCRIPTION_INFO_PERS . "</span>", '')); @@ -155,17 +158,11 @@ // $form->addElement(new XoopsFormLabel('<br/><br/>', '')); // get newsletters available for current user - $opt_cat = array(); - $opt_tray = new XoopsFormElementTray("<span style='text-decoration:underline'>" . _MA_XNEWSLETTER_SUBSCRIPTION_CATS_AVAIL . "</span>", "<br />"); - $opt_tray->setDescription(_MA_XNEWSLETTER_SUBSCRIPTION_CATS_AVAIL_DESC); - $gperm_handler = xoops_gethandler('groupperm'); - $uid = (is_object($GLOBALS['xoopsUser']) && isset($GLOBALS['xoopsUser'])) ? $GLOBALS['xoopsUser']->uid() : 0; - $groups = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); // cats[], existing_catsubcr_id_{$cat_id}, existing_catsubscr_quited_{$cat_id} $catCriteria = new CriteriaCompo(); $catCriteria->setSort('cat_id'); $catCriteria->setOrder('ASC'); - $catObjs = $this->xnewsletter->getHandler('cat')->getAll($catCriteria); + $catObjs = $this->xnewsletter->getHandler('cat')->getAll($catCriteria); $cat_checkbox = new XoopsFormCheckBox(_MA_XNEWSLETTER_SUBSCRIPTION_SELECT_CATS, "cats", null, '<br />'); $cat_checkbox->setDescription(_MA_XNEWSLETTER_SUBSCRIPTION_CATS_AVAIL_DESC); $values = array(); @@ -177,16 +174,16 @@ // get existing catsubscr $catsubscrCriteria = new CriteriaCompo(); $catsubscrCriteria->add(new Criteria('catsubscr_catid', $cat_id)); - $catsubscrCriteria->add(new Criteria('catsubscr_subscrid', $subscr_id)); + $catsubscrCriteria->add(new Criteria('catsubscr_subscrid', $this->getVar('subscr_id'))); $catsubscrCriteria->setLimit(1); $catsubscrObjs = $this->xnewsletter->getHandler('catsubscr')->getObjects($catsubscrCriteria); if (isset($catsubscrObjs[0])) { - $values[] = $cat_id; + $values[] = $cat_id; $catsubscr_quited = $catsubscrObjs[0]->getVar('catsubscr_quited'); - $catsubscr_id = $catsubscrObjs[0]->getVar('catsubscr_id'); + $catsubscr_id = $catsubscrObjs[0]->getVar('catsubscr_id'); } else { $catsubscr_quited = 0; - $catsubscr_id = 0; + $catsubscr_id = 0; } $name = $catObj->getVar('cat_name'); $name .= "<div>" . $catObj->getVar('cat_info', 's') . "</div>"; @@ -225,10 +222,9 @@ return $form; } - //********************************************************************************************** - // form for admin aerea ******************************************************************* - //********************************************************************************************** /** + * Form for admin area + * * * * @param bool $action * * @return XoopsThemeForm @@ -236,7 +232,8 @@ public function getFormAdmin($action = false) { global $xoopsUser; - // + $gperm_handler = xoops_gethandler('groupperm'); + $user_handler = xoops_gethandler('user'); xoops_load('XoopsFormLoader'); // if ($action === false) { @@ -244,26 +241,87 @@ } // $isAdmin = xnewsletter_userIsAdmin(); - $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); + $subscr_uid = $this->getVar('subscr_uid'); + $subscr_xoopsUser = $user_handler->get($subscr_uid); + $subscr_groups = is_object($subscr_xoopsUser) ? $subscr_xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); // $title = $this->isNew() ? sprintf(_AM_XNEWSLETTER_SUBSCR_ADD) : sprintf(_AM_XNEWSLETTER_SUBSCR_EDIT); $form = new XoopsThemeForm($title, 'form', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); + // subscr: subscr_email + if ($subscr_id > 0 || $this->getVar('subscr_email') != '') { + $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_SUBSCR_EMAIL, $this->getVar('subscr_email'))); + $form->addElement(new XoopsFormHidden('subscr_email', $this->getVar('subscr_email'))); + } else { + $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_EMAIL, 'subscr_email', 50, 255, $this->getVar('subscr_email')), true); + } // subscr: subscr_sex - $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_EMAIL, 'subscr_email', 50, 255, $this->getVar('subscr_email')), true); - $select_subscr_sex = new XoopsFormSelect(_AM_XNEWSLETTER_SUBSCR_SEX, 'subscr_sex', $this->getVar('subscr_sex')); - $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_EMPTY, _AM_XNEWSLETTER_SUBSCR_SEX_EMPTY); - $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_FEMALE, _AM_XNEWSLETTER_SUBSCR_SEX_FEMALE); - $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_MALE, _AM_XNEWSLETTER_SUBSCR_SEX_MALE); - $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_COMP, _AM_XNEWSLETTER_SUBSCR_SEX_COMP); - $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_FAMILY, _AM_XNEWSLETTER_SUBSCR_SEX_FAMILY); - $form->addElement($select_subscr_sex); + if ($this->xnewsletter->getConfig('xn_use_salutation') == 1) { + $select_subscr_sex = new XoopsFormSelect(_AM_XNEWSLETTER_SUBSCR_SEX, 'subscr_sex', $this->getVar('subscr_sex')); + $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_EMPTY, _AM_XNEWSLETTER_SUBSCR_SEX_EMPTY); + $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_FEMALE, _AM_XNEWSLETTER_SUBSCR_SEX_FEMALE); + $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_MALE, _AM_XNEWSLETTER_SUBSCR_SEX_MALE); + $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_COMP, _AM_XNEWSLETTER_SUBSCR_SEX_COMP); + $select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_FAMILY, _AM_XNEWSLETTER_SUBSCR_SEX_FAMILY); + $form->addElement($select_subscr_sex); + } // subscr: subscr_firstname $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_FIRSTNAME, 'subscr_firstname', 50, 255, $this->getVar('subscr_firstname')), false); // subscr: subscr_lastname $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_LASTNAME, 'subscr_lastname', 50, 255, $this->getVar('subscr_lastname')), false); // subscr: subscr_uid $form->addElement(new XoopsFormSelectUser(_AM_XNEWSLETTER_SUBSCR_UID, 'subscr_uid', true, $this->getVar('subscr_uid'), 1, false), false); + // subscr: subscr_activated + $form->addElement(new XoopsFormRadioYN(_AM_XNEWSLETTER_SUBSCR_ACTIVATED, 'subscr_activated', $this->getVar('subscr_activated'))); + // get newsletters available for subscr + // cats[], existing_catsubcr_id_{$cat_id}, existing_catsubscr_quited_{$cat_id} + $catCriteria = new CriteriaCompo(); + $catCriteria->setSort('cat_id'); + $catCriteria->setOrder('ASC'); + $catObjs = $this->xnewsletter->getHandler('cat')->getAll($catCriteria); + $cat_checkbox = new XoopsFormCheckBox(_MA_XNEWSLETTER_SUBSCRIPTION_SELECT_CATS, "cat_ids", null, '<br />'); + $cat_checkbox->setDescription(_MA_XNEWSLETTER_SUBSCRIPTION_CATS_AVAIL_DESC); + $values = array(); + foreach ($catObjs as $cat_id => $catObj) { + // if anonymous user or Xoops user can read cat... + if ($gperm_handler->checkRight('newsletter_read_cat', $cat_id, XOOPS_GROUP_ANONYMOUS, $this->xnewsletter->getModule()->mid()) + || $gperm_handler->checkRight('newsletter_read_cat', $cat_id, $subscr_groups, $this->xnewsletter->getModule()->mid()) + ) { + // get existing catsubscr + $catsubscrCriteria = new CriteriaCompo(); + $catsubscrCriteria->add(new Criteria('catsubscr_catid', $cat_id)); + $catsubscrCriteria->add(new Criteria('catsubscr_subscrid', $this->getVar('subscr_id'))); + $catsubscrCriteria->setLimit(1); + $catsubscrObjs = $this->xnewsletter->getHandler('catsubscr')->getObjects($catsubscrCriteria); + if (isset($catsubscrObjs[0])) { + $values[] = $cat_id; + $catsubscr_quited = $catsubscrObjs[0]->getVar('catsubscr_quited'); + $catsubscr_id = $catsubscrObjs[0]->getVar('catsubscr_id'); + } else { + $catsubscr_quited = 0; + $catsubscr_id = 0; + } + $name = $catObj->getVar('cat_name'); + $name .= "<div>" . $catObj->getVar('cat_info', 's') . "</div>"; + if ($catsubscr_quited == 0) { + // NOP + } else { + $name .= "<div>"; + $name .= str_replace("%q", formatTimeStamp($catsubscr_quited, $this->xnewsletter->getConfig('dateformat')), _MA_XNEWSLETTER_SUBSCRIPTION_QUITED_DETAIL); + $name .= "</div>"; + } + $name .= "<div style='clear:both'></div>"; + $cat_checkbox->addOption($cat_id, $name); + $form->addElement(new XoopsFormHidden("existing_catsubcr_id_{$cat_id}", $catsubscr_id)); + $form->addElement(new XoopsFormHidden("existing_catsubscr_quited_{$cat_id}", $catsubscr_quited)); + } + } + $cat_checkbox->setValue($values); + $form->addElement($cat_checkbox); + + + + // subscr: subscr_submitter $form->addElement(new XoopsFormHidden('subscr_submitter', $GLOBALS['xoopsUser']->uid())); $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_SUBSCR_SUBMITTER, $GLOBALS['xoopsUser']->uname())); @@ -284,7 +342,6 @@ $form->addElement(new XoopsFormHidden('subscr_created', $time)); $form->addElement(new XoopsFormHidden('subscr_ip', $ip)); } - $form->addElement(new XoopsFormRadioYN(_AM_XNEWSLETTER_SUBSCR_ACTIVATED, 'subscr_activated', $this->getVar('subscr_activated'))); // subscr: subscr_actkey $form->addElement(new XoopsFormHidden('subscr_actkey', '')); // form: button tray Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/common.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/common.php 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/common.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -30,12 +30,12 @@ xoops_loadLanguage('common', XNEWSLETTER_DIRNAME); +include_once XNEWSLETTER_ROOT_PATH . '/class/xnewsletter.php'; // XnewsletterXnewsletter class include_once XNEWSLETTER_ROOT_PATH . '/include/config.php'; // IN PROGRESS include_once XNEWSLETTER_ROOT_PATH . '/include/functions.php'; include_once XNEWSLETTER_ROOT_PATH . '/include/constants.php'; -include_once XNEWSLETTER_ROOT_PATH . '/class/session.php'; // XnewsletterSession class -include_once XNEWSLETTER_ROOT_PATH . '/class/xnewsletter.php'; // XnewsletterXnewsletter class -//include_once XNEWSLETTER_ROOT_PATH . '/class/breadcrumb.php'; // XnewsletterBreadcrumb class +include_once XNEWSLETTER_ROOT_PATH . '/class/common/session.php'; // XnewsletterSession class +include_once XNEWSLETTER_ROOT_PATH . '/class/common/breadcrumb.php'; // XnewsletterBreadcrumb class xoops_load('XoopsUserUtility'); xoops_load('XoopsRequest'); Deleted: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/templates/xNewsletter_common_breadcrumb.tpl =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/templates/xNewsletter_common_breadcrumb.tpl 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/templates/xNewsletter_common_breadcrumb.tpl 2015-02-03 22:32:13 UTC (rev 12965) @@ -1,16 +0,0 @@ -<div class="xnewsletter_headertable"> - <div class="xnewsletter_breadcrumb"> - <{foreach item=bread from=$breadcrumb name=bcloop}> - <span class="bread"> - <{if ($bread.link)}> - <a href="<{$bread.link}>" title="<{$bread.title}>"><{$bread.title}></a> - <{else}> - <{$bread.title}> - <{/if}> - </span> - <{if !$smarty.foreach.bcloop.last}> - <span class="delimiter">></span> - <{/if}> - <{/foreach}> - </div> -</div> Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/xoops_version.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/xoops_version.php 2015-02-03 22:20:34 UTC (rev 12964) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/xoops_version.php 2015-02-03 22:32:13 UTC (rev 12965) @@ -48,8 +48,8 @@ include_once XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php'; // About -$modversion['module_status'] = 'Beta 1'; -$modversion['release_date'] = '2014/12/22'; +$modversion['module_status'] = 'RC 1'; +$modversion['release_date'] = '2015/02/03'; $modversion['module_website_url'] = 'wedega.com'; $modversion['module_website_name'] = 'Webdesign Gabor'; $modversion['min_php'] = '5.3.7'; @@ -308,9 +308,9 @@ $modversion['templates'][$i]['file'] = $modversion['dirname'] . '_protocol.tpl'; $modversion['templates'][$i]['description'] = ''; // Common templates -++$i; -$modversion['templates'][$i]['file'] = $modversion['dirname'] . '_common_breadcrumb.tpl'; -$modversion['templates'][$i]['description'] = ''; + + + // Admin templates ++$i; $modversion['templates'][$i]['file'] = $modversion['dirname'] . '_admin_subscrs_list.tpl'; |
From: <luc...@us...> - 2015-02-03 22:20:50
|
Revision: 12964 http://sourceforge.net/p/xoops/svn/12964 Author: luciorota Date: 2015-02-03 22:20:34 +0000 (Tue, 03 Feb 2015) Log Message: ----------- xoops 2.5.7.1 compatible change directory structure code cleanup fixed bug when using XoopsFormSelectUser form element Modified Paths: -------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/categories.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/clone.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mimetypes.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mirrors.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ratings.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reviews.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/swishe.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/category.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/mimetype.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/mirror.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/review.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/changelog.txt XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/index.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/mirror.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/newlist.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/ratefile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/review.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/singlefile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_header.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_reviews.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/topten.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php Added Paths: ----------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/directorychecker.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/filechecker.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/session.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/tree.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/xoopstree.php Removed Paths: ------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/breadcrumb.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/session.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/tree.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/xoopstree.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/directorychecker.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/filechecker.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_breadcrumb.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_letterschoice.tpl Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/categories.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/categories.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/categories.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -49,7 +49,7 @@ wfdownloads_xoops_cp_header(); - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); $sform = new XoopsThemeForm(_AM_WFDOWNLOADS_CCATEGORY_MOVE, 'move', xoops_getenv('PHP_SELF')); $categoryObjs = $wfdownloads->getHandler('category')->getObjects(); @@ -99,7 +99,7 @@ include_once XOOPS_ROOT_PATH . '/class/uploader.php'; $allowedMimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'); - $imgurl = 'blank.png'; + $imgUrl = 'blank.png'; $maxFileSize = $wfdownloads->getConfig('maxfilesize'); $maxImgWidth = $wfdownloads->getConfig('maximgwidth'); $maxImgHeight = $wfdownloads->getConfig('maximgheight'); @@ -112,17 +112,17 @@ $errors = $uploader->getErrors(); redirect_header('javascript:history.go(-1)', 3, $errors); } else { - $imgurl = $uploader->getSavedFileName(); + $imgUrl = $uploader->getSavedFileName(); } } else { - $imgurl = (isset($_POST['imgurl']) && $_POST['imgurl'] != 'blank.png') ? $myts->addslashes($_POST['imgurl']) : ''; + $imgUrl = (isset($_POST['imgurl']) && $_POST['imgurl'] != 'blank.png') ? $myts->addslashes($_POST['imgurl']) : ''; } if (!$cid) { $categoryObj = $wfdownloads->getHandler('category')->create(); } else { $categoryObj = $wfdownloads->getHandler('category')->get($cid); - $childcats = $wfdownloads->getHandler('category')->getChildCats($categoryObj); + $childcats = $wfdownloads->getHandler('category')->getChildCats($categoryObj); if ($pid == $cid || in_array($pid, array_keys($childcats))) { $categoryObj->setErrors(_AM_WFDOWNLOADS_CCATEGORY_CHILDASPARENT); } @@ -131,7 +131,7 @@ $categoryObj->setVar('title', $_POST['title']); $categoryObj->setVar('pid', $pid); $categoryObj->setVar('weight', $weight); - $categoryObj->setVar('imgurl', $imgurl); + $categoryObj->setVar('imgurl', $imgUrl); $categoryObj->setVar('description', $_POST['description']); $categoryObj->setVar('summary', $_POST['summary']); $categoryObj->setVar('dohtml', isset($_POST['dohtml'])); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/clone.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/clone.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/clone.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -78,7 +78,7 @@ wfdownloads_xoops_cp_header(); $indexAdmin = new ModuleAdmin(); echo $indexAdmin->addNavigation($currentFile); - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); $form = new XoopsThemeForm(sprintf(_AM_WFDOWNLOADS_CLONE_TITLE, $wfdownloads->getModule()->getVar('name', 'E')), 'clone', $currentFile, 'post', true); $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 18, 18, ''); $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/downloads.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -609,6 +609,8 @@ case 'downloads.list': case 'downloads.filter': default : + xoops_load('XoopsPageNav'); + // // get filter conditions $filter_title_condition = XoopsRequest::getString('filter_title_condition', '='); $filter_title = XoopsRequest::getString('filter_title', ''); @@ -623,22 +625,17 @@ $op = 'downloads.list'; } } - - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - - $categoryObjs = $wfdownloads->getHandler('category')->getObjects(); - + // $start_published = XoopsRequest::getInt('start_published', 0); $start_new = XoopsRequest::getInt('start_new', 0); $start_autopublished = XoopsRequest::getInt('start_autopublished', 0); $start_expired = XoopsRequest::getInt('start_expired', 0); $start_offline = XoopsRequest::getInt('start_offline', 0); - + // $totalCategoriesCount = wfdownloads_categoriesCount(); - $categoryObjs = $wfdownloads->getHandler('category')->getObjects(null, true, false); - + $categories = $wfdownloads->getHandler('category')->getObjects(null, true, false); // as array $totalDownloadsCount = $wfdownloads->getHandler('download')->getCount(); - + // wfdownloads_xoops_cp_header(); $indexAdmin = new ModuleAdmin(); echo $indexAdmin->addNavigation($currentFile); @@ -691,7 +688,7 @@ foreach ($publishedDownloadObjs as $publishedDownloadObj) { $publishedDownload_array = $publishedDownloadObj->toArray(); $publishedDownload_array['title_html'] = $myts->htmlSpecialChars(trim($publishedDownload_array['title'])); - $publishedDownload_array['category_title'] = $categoryObjs[$publishedDownload_array['cid']]['title']; + $publishedDownload_array['category_title'] = $categories[$publishedDownload_array['cid']]['title']; $publishedDownload_array['submitter_uname'] = XoopsUserUtility::getUnameFromId($publishedDownload_array['submitter']); $publishedDownload_array['published_formatted'] = XoopsLocal::formatTimestamp($publishedDownload_array['published'], 'l'); $GLOBALS['xoopsTpl']->append('published_downloads', $publishedDownload_array); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -137,7 +137,7 @@ echo "</fieldset>\n"; //ask what to do - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); $form = new XoopsThemeForm(_AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, 'form', $_SERVER['REQUEST_URI']); // Avoid module to import form itself Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -24,8 +24,8 @@ define('INDEX_FILE_PATH', XOOPS_ROOT_PATH . '/uploads/index.html'); define('BLANK_FILE_PATH', XOOPS_ROOT_PATH . '/uploads/blank.gif'); -include_once dirname(__DIR__) . '/include/directorychecker.php'; -include_once dirname(__DIR__) . '/include/filechecker.php'; +include_once dirname(__DIR__) . '/class/common/directorychecker.php'; +include_once dirname(__DIR__) . '/class/common/filechecker.php'; xoops_cp_header(); $indexAdmin = new ModuleAdmin(); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -76,7 +76,7 @@ case "indexpage.form": default: include_once WFDOWNLOADS_ROOT_PATH . '/class/wfdownloads_lists.php'; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); $sql = "SELECT indeximage, indexheading, indexheader, indexfooter, nohtml, nosmiley, noxcodes, noimages, nobreak, indexheaderalign, indexfooteralign"; $sql .= " FROM {$GLOBALS['xoopsDB']->prefix('wfdownloads_indexpage')} "; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mimetypes.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mimetypes.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mimetypes.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -207,7 +207,7 @@ $GLOBALS['xoopsTpl']->append('mimetypes', $mimetype_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav = new XoopsPageNav($mimetypes_count, 20, $start, 'start'); $GLOBALS['xoopsTpl']->assign('mimetypes_pagenav', $pagenav->renderNav()); } Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mirrors.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mirrors.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mirrors.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -155,7 +155,7 @@ $GLOBALS['xoopsTpl']->append('mirrors_waiting', $mirror_waiting_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav_waiting = new XoopsPageNav($waiting_count, $wfdownloads->getConfig('admin_perpage'), $start_waiting, 'start_waiting'); $GLOBALS['xoopsTpl']->assign('mirrors_waiting_pagenav', $pagenav_waiting->renderNav()); } @@ -179,7 +179,7 @@ $GLOBALS['xoopsTpl']->append('mirrors_published', $mirror_published_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav_published = new XoopsPageNav($published_count, $wfdownloads->getConfig('admin_perpage'), $start_published, 'start_published'); $GLOBALS['xoopsTpl']->assign('mirrors_published_pagenav', $pagenav_published->renderNav()); } Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ratings.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ratings.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ratings.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -74,7 +74,7 @@ } } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $ratings_pagenav = new XoopsPageNav($ratings_count, $wfdownloads->getConfig('admin_perpage'), $start, 'start'); $GLOBALS['xoopsTpl']->assign('ratings_pagenav', $ratings_pagenav->renderNav()); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reportsmodifications.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -401,7 +401,7 @@ $GLOBALS['xoopsTpl']->append('reports', $report_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav_report = new XoopsPageNav($reports_count, $wfdownloads->getConfig('admin_perpage'), $start_report, 'start_report'); $GLOBALS['xoopsTpl']->assign('reports_pagenav', $pagenav_report->renderNav()); } @@ -428,7 +428,7 @@ $GLOBALS['xoopsTpl']->append('modifications', $modification_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav_modification = new XoopsPageNav( $modifications_count, $wfdownloads->getConfig( 'admin_perpage' Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reviews.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reviews.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/reviews.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -161,7 +161,7 @@ $GLOBALS['xoopsTpl']->append('reviews_waiting', $review_waiting_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav_waiting = new XoopsPageNav($waiting_count, $wfdownloads->getConfig('admin_perpage'), $start_waiting, 'start_waiting'); $GLOBALS['xoopsTpl']->assign('reviews_waiting_pagenav', $pagenav_waiting->renderNav()); } @@ -191,7 +191,7 @@ $GLOBALS['xoopsTpl']->append('reviews_published', $review_published_array); } //Include page navigation - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + xoops_load('XoopsPageNav'); $pagenav_published = new XoopsPageNav($published_count, $wfdownloads->getConfig('admin_perpage'), $start_published, 'start_published'); $GLOBALS['xoopsTpl']->assign('reviews_published_pagenav', $pagenav_published->renderNav()); } Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/swishe.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/swishe.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/swishe.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -48,7 +48,7 @@ echo "OK"; } else { echo "NOT OK" . "<br />"; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); $form = new XoopsThemeForm(_AM_WFDOWNLOADS_SWISHE_CONFIG, 'config', $currentFile, 'post', true); $form->addElement(new XoopsFormHidden('op', 'submit')); $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit')); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -48,7 +48,7 @@ } // Breadcrumb -include_once XOOPS_ROOT_PATH . '/class/tree.php'; +xoops_load('XoopsObjectTree'); $categoryObjsTree = new XoopsObjectTree($wfdownloads->getHandler('category')->getObjects(), 'cid', 'pid'); $breadcrumb = new WfdownloadsBreadcrumb(); $breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL); @@ -139,7 +139,7 @@ $xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render()); // Generate form - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); $sform = new XoopsThemeForm(_MD_WFDOWNLOADS_RATETHISFILE, 'reportform', xoops_getenv('PHP_SELF')); $sform->addElement(new XoopsFormHidden('lid', $lid)); $sform->addElement(new XoopsFormHidden('cid', $cid)); Deleted: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/breadcrumb.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/breadcrumb.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/breadcrumb.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -1,79 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -/** - * WfdownloadsBreadcrumb Class - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author lucio <luc...@gm...> - * @package Wfdownloads - * @since 3.23 - * @version $Id:$ - * - * Example: - * $breadcrumb = new WfdownloadsBreadcrumb(); - * $breadcrumb->addLink( 'bread 1', 'index1.php' ); - * $breadcrumb->addLink( 'bread 2', '' ); - * $breadcrumb->addLink( 'bread 3', 'index3.php' ); - * echo $breadcrumb->render(); - */ -defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); - -/** - * Class WfdownloadsBreadcrumb - */ -class WfdownloadsBreadcrumb -{ - var $dirname; - var $_bread = array(); - - /** - * - */ - function __construct() - { - $this->dirname = basename(dirname(__DIR__)); - } - - /** - * Add link to breadcrumb - * - * @param string $title - * @param string $link - */ - function addLink( $title='', $link='' ) - { - $this->_bread[] = array( - 'link' => $link, - 'title' => $title - ); - } - - /** - * Render Wfdownloads BreadCrumb - * - */ - function render() - { - if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { - include_once $GLOBALS['xoops']->path('/class/theme.php'); - $GLOBALS['xoTheme'] = new xos_opal_Theme(); - } - - require_once $GLOBALS['xoops']->path('class/template.php'); - $breadcrumbTpl = new XoopsTpl(); - $breadcrumbTpl->assign('breadcrumb', $this->_bread); - $html = $breadcrumbTpl->fetch("db:{$this->dirname}_co_breadcrumb.tpl"); - unset($breadcrumbTpl); - - return $html; - } -} Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/category.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/category.php 2015-02-03 22:11:05 UTC (rev 12963) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/category.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -85,7 +85,7 @@ } $title = $this->isNew() ? _AM_WFDOWNLOADS_CCATEGORY_CREATENEW : _AM_WFDOWNLOADS_CCATEGORY_MODIFY; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + xoops_load('XoopsFormLoader'); include_once WFDOWNLOADS_ROOT_PATH . '/class/wfdownloads_lists.php'; $form = new XoopsThemeForm($title, 'form_error', $action, 'post', true); @@ -111,18 +111,18 @@ $groups_up_select->setDescription(_AM_WFDOWNLOADS_FCATEGORY_GROUPPROMPT_UP_DESC); $form->addElement($groups_up_select); // category: imgurl - $imgurl_path = $this->getVar('imgurl') ? $this->wfdownloads->getConfig('catimage') . '/' . $this->getVar('imgurl') : WFDOWNLOADS_IMAGES_URL . '/blank.gif'; - $imgurl_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FCATEGORY_CIMAGE, '<br />'); - $imgurl_tray->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_DOWN_FUPLOADPATH, XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('catimage'))); - $imgurl_tray->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_DOWN_FUPLOADURL, XOOPS_URL . '/' . $this->wfdownloads->getConfig('catimage'))); + $imgUrl_path = $this->getVar('imgurl') ? $this->wfdownloads->getConfig('catimage') . '/' . $this->getVar('imgurl') : WFDOWNLOADS_IMAGES_URL . '/blank.gif'; + $imgUrl_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FCATEGORY_CIMAGE, '<br />'); + $imgUrl_tray->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_DOWN_FUPLOADPATH, XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('catimage'))); + $imgUrl_tray->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_DOWN_FUPLOADURL, XOOPS_URL . '/' . $this->wfdownloads->getConfig('catimage'))); $graph_array = WfsLists::getListTypeAsArray(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('catimage'), 'images'); - $imgurl_select = new XoopsFormSelect('', 'imgurl', $this->getVar('imgurl')); - $imgurl_select->addOptionArray($graph_array); - $imgurl_select->setExtra("onchange='showImgSelected(\"image\", \"imgurl\", \"" . $this->wfdownloads->getConfig('catimage') . "\", \"\", \"" . XOOPS_URL . "\")'"); - $imgurl_tray->addElement($imgurl_select, false); - $imgurl_tray->addElement(new XoopsFormLabel( '', "<img src='" . XOOPS_URL . "/" . $imgurl_path . "' name='image' id='image' alt='' />")); - $imgurl_tray->addElement(new XoopsFormFile(_AM_WFDOWNLOADS_BUPLOAD , 'uploadfile', 0), false); - $form->addElement($imgurl_tray); + $imgUrl_select = new XoopsFormSelect('', 'imgurl', $this->getVar('imgurl')); + $imgUrl_select->addOptionArray($graph_array); + $imgUrl_select->setExtra("onchange='showImgSelected(\"image\", \"imgurl\", \"" . $this->wfdownloads->getConfig('catimage') . "\", \"\", \"" . XOOPS_URL . "\")'"); + $imgUrl_tray->addElement($imgUrl_select, false); + $imgUrl_tray->addElement(new XoopsFormLabel( '', "<img src='" . XOOPS_URL . "/" . $imgUrl_path . "' name='image' id='image' alt='' />")); + $imgUrl_tray->addElement(new XoopsFormFile(_AM_WFDOWNLOADS_BUPLOAD , 'uploadfile', 0), false); + $form->addElement($imgUrl_tray); // category: description $description_textarea = new XoopsFormDhtmlTextArea(_AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60); $description_textarea->setDescription(_AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION_DESC); @@ -227,7 +227,7 @@ */ function getNicePath($cid, $root_filename = 'index.php', $item_filename = 'viewcat.php?op=') { - include_once WFDOWNLOADS_ROOT_PATH . '/class/xoopstree.php'; + //include_once WFDOWNLOADS_ROOT_PATH . '/class/common/xoopstree.php'; $mytree = new WfdownloadsXoopsTree($this->table, $this->keyName, 'pid'); $pathString = $mytree->getNicePathFromId($cid, $this->identifierName, $item_filename); @@ -299,10 +299,10 @@ */ function getChildCats($category) { + xoops_load('XoopsObjectTree'); + // $categoryObjs = $this->getObjects(); - include_once XOOPS_ROOT_PATH . '/class/tree.php'; $categoryObjsTree = new XoopsObjectTree($categoryObjs, $this->keyName, 'pid'); - return $categoryObjsTree->getAllChild($category->getVar($this->keyName)); } @@ -311,11 +311,12 @@ */ function getAllSubcatsTopParentCid() { + xoops_load('XoopsObjectTree'); + // if (!$this->allCategories) { $this->allCategories = $this->getObjects(null, true); } - include_once XOOPS_ROOT_PATH . '/class/tree.php'; $categoryObjsTree = new XoopsObjectTree($this->allCategories, $this->keyName, 'pid'); $allsubcats_linked_totop = array(); Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,86 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * WfdownloadsBreadcrumb Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author lucio <luc...@gm...> + * @package wfdownloads + * @since 3.23 + * @version $Id:$ + * + * Example: + * $breadcrumb = new WfdownloadsBreadcrumb(); + * $breadcrumb->addLink( 'bread 1', 'index1.php' ); + * $breadcrumb->addLink( 'bread 2', '' ); + * $breadcrumb->addLink( 'bread 3', 'index3.php' ); + * echo $breadcrumb->render(); + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +/** + * Class WfdownloadsBreadcrumb + */ +class WfdownloadsBreadcrumb +{ + private $dirname; + private $_bread = array(); + + /** + * + */ + public function __construct() + { + $this->dirname = basename(dirname(dirname(__DIR__))); + } + + /** + * Add link to breadcrumb + * + * @param string $title + * @param string $link + */ + public function addLink( $title='', $link='' ) + { + $this->_bread[] = array( + 'link' => $link, + 'title' => $title + ); + } + + /** + * Render Wfdownloads BreadCrumb + * + */ + public function render() + { + $ret = ''; + + if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { + include_once $GLOBALS['xoops']->path('/class/theme.php'); + $GLOBALS['xoTheme'] = new xos_opal_Theme(); + } + require_once $GLOBALS['xoops']->path('/class/template.php'); + $breadcrumbTpl = new XoopsTpl(); + $breadcrumbTpl->assign('breadcrumb', $this->_bread); +// IN PROGRESS +// IN PROGRESS +// IN PROGRESS + //$ret .= $breadcrumbTpl->fetch(__DIR__ . '_breadcrumb.tpl'); + $tplSource = file_get_contents(__DIR__ . '/breadcrumb.tpl'); +// $ret .= $choiceByLetterTpl->fetchFromData($tplSource, false, null); + $ret .= $breadcrumbTpl->fetchFromData($tplSource, false, null); + unset($breadcrumbTpl); + + return $ret; + } +} Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,16 @@ +<div class="wfdownloads_headertable"> + <div class="wfdownloads_breadcrumb"> + <{foreach item=bread from=$breadcrumb name=bcloop}> + <span class="bread"> + <{if ($bread.link)}> + <a href="<{$bread.link}>" title="<{$bread.title}>"><{$bread.title}></a> + <{else}> + <{$bread.title}> + <{/if}> + </span> + <{if !$smarty.foreach.bcloop.last}> + <span class="delimiter">></span> + <{/if}> + <{/foreach}> + </div> +</div> Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,138 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * WfdownloadsChoiceByLetter class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author lucio <luc...@gm...> + * @package wfdownloads + * @since 1.00 + * @version $Id:$ + * + * Example: + * $choicebyletter = new WfdownloadsChoiceByLetter($objHandler, null, null, range('a', 'z'), 'letter'); + * echo $choicebyletter->render(); + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +/** + * Class WfdownloadsChoiceByLetter + */ +class WfdownloadsChoiceByLetter +{ + /** + * *#@+ + * + * @access private + */ + private $objHandler; + private $criteria; + private $field_name; + private $alphabet; + private $arg_name; + private $url; + private $extra; + private $caseSensitive; + + /** + * *#@- + */ + + /** + * Constructor + * + * @param object $objHandler {@link XoopsPersistableObjectHandler} + * @param object $criteria {@link CriteriaElement} + * @param string $field_name search by field + * @param array $alphabet array of alphabet letters + * @param string $arg_name item on the current page + * @param string $url + * @param string $extra_arg Additional arguments to pass in the URL + * @param boolean $caseSensitive + */ + public function __construct($objHandler, $criteria = null, $field_name = null, $alphabet = array(), $arg_name = 'letter', $url = null, $extra_arg = '', $caseSensitive = false) + { + $this->objHandler = $objHandler; + $this->criteria = is_null($criteria) ? new CriteriaCompo() : $criteria; + $this->field_name = is_null($field_name) ? $this->objHandler->identifierName : $field_name; + $this->alphabet = (count($alphabet) > 0) ? $alphabet : range('a', 'z'); // is there a way to get locale alphabet? + $this->arg_name = $arg_name; + $this->url = is_null($url) ? $_SERVER['PHP_SELF'] : $url; + if ($extra_arg != '' && (substr($extra_arg, - 5) != '&' || substr($extra_arg, - 1) != '&')) { + $this->extra = '&' . $extra_arg; + } + $this->caseSensitive = $caseSensitive; + } + + /** + * Create choice by letter + * + * @return string + */ + public function render() + { + $ret = ''; + // + if (!$this->caseSensitive) { + $this->criteria->setGroupby('UPPER(LEFT(' . $this->field_name . ',1))'); + } else { + $this->criteria->setGroupby('LEFT(' . $this->field_name . ',1)'); + } + $countsByLetters = $this->objHandler->getCounts($this->criteria); + // fill alphabet array + $alphabet_array = array(); + foreach ($this->alphabet as $letter) { + $letter_array = array(); + if (!$this->caseSensitive) { + if (isset($countsByLetters[strtoupper($letter)])) { + $letter_array['letter'] = $letter; + $letter_array['count'] = $countsByLetters[strtoupper($letter)]; + $letter_array['url'] = $this->url . '?' . $this->arg_name . '=' . $letter . $this->extra; + } else { + $letter_array['letter'] = $letter; + $letter_array['count'] = 0; + $letter_array['url'] = ""; + } + } else { + if (isset($countsByLetters[$letter])) { + $letter_array['letter'] = $letter; + $letter_array['count'] = $countsByLetters[$letter]; + $letter_array['url'] = $this->url . '?' . $this->arg_name . '=' . $letter . $this->extra; + } else { + $letter_array['letter'] = $letter; + $letter_array['count'] = 0; + $letter_array['url'] = ""; + } + } + $alphabet_array[$letter] = $letter_array; + unset($letter_array); + } + // render output + if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { + include_once $GLOBALS['xoops']->path('/class/theme.php'); + $GLOBALS['xoTheme'] = new xos_opal_Theme(); + } + require_once $GLOBALS['xoops']->path('/class/template.php'); + $choiceByLetterTpl = new XoopsTpl(); + $choiceByLetterTpl->caching = false; // Disable cache + $choiceByLetterTpl->assign('alphabet', $alphabet_array); +// IN PROGRESS +// IN PROGRESS +// IN PROGRESS + //$ret .= $choiceByLetterTpl->fetch(__DIR__ . '/choicebyletter.tpl'); + $tplSource = file_get_contents(__DIR__ . '/choicebyletter.tpl'); + $ret .= $choiceByLetterTpl->fetchFromData($tplSource, false, null); + unset($choiceByLetterTpl); + + return $ret; + } +} Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,96 @@ +<style type="text/css"> + .button_green { + -moz-box-shadow: inset 0 1px 0 0 #d9fbbe; + -webkit-box-shadow: inset 0 1px 0 0 #d9fbbe; + box-shadow: inset 0 1px 0 0 #d9fbbe; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #d9fbbe), color-stop(1, #d9fbbe)); + background: -moz-linear-gradient(center top, #a5cc52 5%, #d9fbbe 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d9fbbe', endColorstr='#b8e356'); + background-color: #d9fbbe; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + text-indent: 0; + border: 1px solid #83c41a; + display: inline-block; + color: inherit; + font-family: inherit; + font-size: 12px; + font-weight: bold; + font-style: normal; + height: 20px; + line-height: 20px; + width: auto; + min-width: 10px; + text-decoration: none; + text-align: center; + text-shadow: 1px 1px 0 #d9fbbe; + margin: 2px 0; + padding: 0 4px; + } + + .button_green:hover { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #b8e356), color-stop(1, #a5cc52)); + background: -moz-linear-gradient(center top, #b8e356 5%, #a5cc52 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b8e356', endColorstr='#a5cc52'); + background-color: #86ae47; + } + + .button_green:active { + position: relative; + top: 1px; + } + + .button_grey { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf)); + background: -moz-linear-gradient(center top, #ededed 5%, #dfdfdf 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf'); + background-color: #ededed; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + text-indent: 0; + border: 1px solid #dcdcdc; + display: inline-block; + color: inherit; + font-family: inherit; + font-size: 12px; + font-weight: bold; + font-style: normal; + height: 20px; + line-height: 20px; + width: auto; + min-width: 10px; + text-decoration: none; + text-align: center; + text-shadow: 1px 1px 0 #ffffff; + margin: 2px 0; + padding: 0 4px; + } + + .button_grey:hover { + background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed)); + background: -moz-linear-gradient(center top, #dfdfdf 5%, #ededed 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed'); + background-color: #dfdfdf; + } + + .button_grey:active { + position: relative; + top: 1px; + } +</style> +<br/> +<div> + <{assign var="alphabetcount" value=$alphabet|@count}> + <{foreach name=letters item=letter from=$alphabet}> + <{if ($letter.count > 0)}> + <a class='button_green' href='<{$letter.url}>' title='<{$letter.count}>'><{$letter.letter}></a> + <{else}> + <span class='button_grey'><{$letter.letter}></span> + <{/if}> + <{if ($smarty.foreach.letters.iteration == (round($alphabetcount/2))+1)}> +</div> +<div><{else}><{/if}> + <{/foreach}> +</div> Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/directorychecker.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/directorychecker.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/directorychecker.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,155 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * Wfdownloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author Xoops Development Team + * @version svn:$id$ + */ + +//defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/include/cp_header.php'; +$mydirname = basename(dirname(dirname(__DIR__))); +xoops_loadLanguage('directorychecker', $mydirname); + +/** + * Class DirectoryChecker + * check status of a directory + */ +class DirectoryChecker +{ + /** + * @param $path + * @param int $mode + * @param $redirectFile + * + * @return bool|string + */ + public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = null) + { + global $pathIcon16; + + if (empty($path)) { + return false; + } + if (is_null($redirectFile)) { + $redirectFile = $_SERVER['PHP_SELF']; + } + if (!@is_dir($path)) { + $path_status = "<img src='$pathIcon16/0.png' >"; + $path_status .= "$path (" . _DC_WFDOWNLOADS_NOTAVAILABLE . ") "; + $path_status .= "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; + $path_status .= "<input type='hidden' name='op' value='createdir'>"; + $path_status .= "<input type='hidden' name='path' value='$path'>"; + $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; + $path_status .= "<button class='submit' onClick='this.form.submit();'>" . _DC_WFDOWNLOADS_CREATETHEDIR . "</button>"; + $path_status .= "</form>"; + } elseif (@is_writable($path)) { + $path_status = "<img src='$pathIcon16/1.png' >"; + $path_status .= "$path (" . _DC_WFDOWNLOADS_AVAILABLE . ") "; + $currentMode = (substr(decoct(fileperms($path)), 2)); + if ($currentMode != decoct($mode)) { + $path_status = "<img src='$pathIcon16/0.png' >"; + $path_status .= $path . sprintf(_DC_WFDOWNLOADS_NOTWRITABLE, decoct($mode), $currentMode); + $path_status .= "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; + $path_status .= "<input type='hidden' name='op' value='setdirperm'>"; + $path_status .= "<input type='hidden' name='mode' value='$mode'>"; + $path_status .= "<input type='hidden' name='path' value='$path'>"; + $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; + $path_status .= "<button class='submit' onClick='this.form.submit();'>" . _DC_WFDOWNLOADS_SETMPERM . "</button>"; + $path_status .= "</form>"; + } + } else { + $currentMode = (substr(decoct(fileperms($path)), 2)); + $path_status = "<img src='$pathIcon16/0.png' >"; + $path_status .= $path . sprintf(_DC_WFDOWNLOADS_NOTWRITABLE, decoct($mode), $currentMode); + $path_status .= "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; + $path_status .= "<input type='hidden' name='op' value='setdirperm'>"; + $path_status .= "<input type='hidden' name='mode' value='$mode'>"; + $path_status .= "<input type='hidden' name='path' value='$path'>"; + $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; + $path_status .= "<button class='submit' onClick='this.form.submit();'>" . _DC_WFDOWNLOADS_SETMPERM . "</button>"; + $path_status .= "</form>"; + } + + return $path_status; + } + + /** + * @param $target + * @param int $mode + * + * @return bool + */ + public static function createDirectory($target, $mode = 0777) + { + $target = str_replace('..', '', $target); + // http://www.php.net/manual/en/function.mkdir.php + return is_dir($target) || (self::createDirectory(dirname($target), $mode) && mkdir($target, $mode)); + } + + /** + * @param $target + * @param int $mode + * + * @return bool + */ + public static function setDirectoryPermissions($target, $mode = 0777) + { + $target = str_replace('..', '', $target); + + return @chmod($target, (int) $mode); + } + + /** + * @param $dir_path + * + * @return bool + */ + public static function dirExists($dir_path) + { + return is_dir($dir_path); + } +} + +$op = (isset($_POST['op'])) ? $_POST['op'] : ""; +switch ($op) { + case 'createdir': + if (isset($_POST['path'])) { + $path = $_POST['path']; + } + if (isset($_POST['redirect'])) { + $redirect = $_POST['redirect']; + } + $msg = (DirectoryChecker::createDirectory($path)) ? _DC_WFDOWNLOADS_DIRCREATED : _DC_WFDOWNLOADS_DIRNOTCREATED; + redirect_header($redirect, 2, $msg . ': ' . $path); + exit(); + break; + case 'setdirperm': + if (isset($_POST['path'])) { + $path = $_POST['path']; + } + if (isset($_POST['redirect'])) { + $redirect = $_POST['redirect']; + } + if (isset($_POST['mode'])) { + $mode = $_POST['mode']; + } + $msg = (DirectoryChecker::setDirectoryPermissions($path, $mode)) ? _DC_WFDOWNLOADS_PERMSET : _DC_WFDOWNLOADS_PERMNOTSET; + redirect_header($redirect, 2, $msg . ': ' . $path); + exit(); + break; +} Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/filechecker.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/filechecker.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/filechecker.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,161 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * Wfdownloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author Xoops Development Team + * @version svn:$id$ + */ + +//defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/include/cp_header.php'; +$mydirname = basename(dirname(dirname(__DIR__))); +xoops_loadLanguage('filechecker', $mydirname); + +/** + * Class FileChecker + * check status of a directory + */ +class FileChecker +{ + /** + * @param $file_path + * @param null $original_file_path + * @param $redirectFile + * + * @internal param $path + * @internal param int $mode + * @return bool|string + */ + public static function getFileStatus($file_path, $original_file_path = null, $redirectFile) + { + global $pathIcon16; + + if (empty($file_path)) { + return false; + } + if (is_null($redirectFile)) { + $redirectFile = $_SERVER['PHP_SELF']; + } + if (is_null($original_file_path)) { + if (self::fileExists($file_path)) { + $path_status = "<img src='$pathIcon16/1.png' >"; + $path_status .= "$file_path (" . _FC_WFDOWNLOADS_AVAILABLE . ") "; + } else { + $path_status = "<img src='$pathIcon16/0.png' >"; + $path_status .= "$file_path (" . _FC_WFDOWNLOADS_NOTAVAILABLE . ") "; + } + } else { + if (self::compareFiles($file_path, $original_file_path)) { + $path_status = "<img src='$pathIcon16/1.png' >"; + $path_status .= "$file_path (" . _FC_WFDOWNLOADS_AVAILABLE . ") "; + } else { + $path_status = "<img src='$pathIcon16/0.png' >"; + $path_status .= "$file_path (" . _FC_WFDOWNLOADS_NOTAVAILABLE . ") "; + $path_status .= "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; + $path_status .= "<input type='hidden' name='op' value='copyfile'>"; + $path_status .= "<input type='hidden' name='file_path' value='$file_path'>"; + $path_status .= "<input type='hidden' name='original_file_path' value='$original_file_path'>"; + $path_status .= "<input type='hidden' name='redirect' value='$redirectFile'>"; + $path_status .= "<button class='submit' onClick='this.form.submit();'>" . _FC_WFDOWNLOADS_CREATETHEFILE . "</button>"; + $path_status .= "</form>"; + } + } + + return $path_status; + } + + /** + * @param $source_path + * @param $destination_path + * + * @return bool + */ + public static function copyFile($source_path, $destination_path) + { + $source_path = str_replace('..', '', $source_path); + $destination_path = str_replace('..', '', $destination_path); + + return @copy($source_path, $destination_path); + } + + /** + * @param $file1_path + * @param $file2_path + * + * @return bool + */ + public static function compareFiles($file1_path, $file2_path) + { + if (!self::fileExists($file1_path) || !self::fileExists($file2_path)) { + return false; + } + if (filetype($file1_path) !== filetype($file2_path)) { + return false; + } + if (filesize($file1_path) !== filesize($file2_path)) { + return false; + } + $crc1 = strtoupper(dechex(crc32(file_get_contents($file1_path)))); + $crc2 = strtoupper(dechex(crc32(file_get_contents($file2_path)))); + if ($crc1 !== $crc2) { + return false; + } + + return true; + } + + /** + * @param $file_path + * + * @return bool + */ + public static function fileExists($file_path) + { + return is_file($file_path); + } + + /** + * @param $target + * @param int $mode + * + * @return bool + */ + public static function setFilePermissions($target, $mode = 0777) + { + $target = str_replace('..', '', $target); + + return @chmod($target, (int) $mode); + } +} + +$op = (isset($_POST['op'])) ? $_POST['op'] : ""; +switch ($op) { + case 'copyfile': + if (isset($_POST['original_file_path'])) { + $original_file_path = $_POST['original_file_path']; + } + if (isset($_POST['file_path'])) { + $file_path = $_POST['file_path']; + } + if (isset($_POST['redirect'])) { + $redirect = $_POST['redirect']; + } + $msg = (FileChecker::copyFile($original_file_path, $file_path)) ? _FC_WFDOWNLOADS_FILECOPIED : _FC_WFDOWNLOADS_FILENOTCOPIED; + redirect_header($redirect, 2, $msg . ': ' . $file_path); + exit(); + break; +} Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/session.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/session.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/session.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,110 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * WfdownloadsSession class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Wfdownloads + * @since 3.23 + * @author trabis <lus...@gm...> + * @author Harry Fuecks (PHP Anthology Volume II) + * @version $Id: session.php 10283 2012-11-28 13:39:36Z trabis $ + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +include_once dirname(dirname(__DIR__)) . '/include/common.php'; + +/** + * Class WfdownloadsSession + */ +class WfdownloadsSession +{ + /** + * Session constructor<br /> + * Starts the session with session_start() + * <strong>Note:</strong> that if the session has already started, + * session_start() does nothing + */ + protected function __construct() + { + @session_start(); + } + + /** + * Sets a session variable + * + * @param string $name name of variable + * @param mixed $value value of variable + * + * @return void + * @access public + */ + public function set($name, $value) + { + $_SESSION[$name] = $value; + } + + /** + * Fetches a session variable + * + * @param string $name name of variable + * + * @return mixed value of session variable + * @access public + */ + public function get($name) + { + if (isset($_SESSION[$name])) { + return $_SESSION[$name]; + } else { + return false; + } + } + + /** + * Deletes a session variable + * + * @param string $name name of variable + * + * @return void + * @access public + */ + public function del($name) + { + unset($_SESSION[$name]); + } + + /** + * Destroys the whole session + * + * @return void + * @access public + */ + public function destroy() + { + $_SESSION = array(); + session_destroy(); + } + + /** + * @return WfdownloadsSession + */ + public static function &getInstance() + { + static $_sess; + if (!isset($_sess)) { + $_sess = new WfdownloadsSession(); + } + + return $_sess; + } +} Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/tree.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/tree.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/tree.php 2015-02-03 22:20:34 UTC (rev 12964) @@ -0,0 +1,80 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * WfdownloadsObjectTree + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author lucio <luc...@gm...> + * @package Wfdownloads + * @since 3.23 + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +//xoops_load('XoopsObjectTree'); +include_once XOOPS_ROOT_PATH . '/class/tree.php'; + +/** + * Form element that ... + */ +class WfdownloadsObjectTree extends XoopsObjectTree +{ + /** + * Make options for a select box from + * + * @param string $fieldName Name of the member variable from the node objects that should be used as the title for the options. + * @param int $key ID of the object to display as the root of select options + * @param string $optionsArray (reference to a string when called from outside) Result from previous recursions + * @param string $prefix_orig String to indent items at deeper levels + * @param string $prefix_curr String to indent the cur... [truncated message content] |
From: <luc...@us...> - 2015-02-03 22:11:14
|
Revision: 12963 http://sourceforge.net/p/xoops/svn/12963 Author: luciorota Date: 2015-02-03 22:11:05 +0000 (Tue, 03 Feb 2015) Log Message: ----------- changed directory structure xoops 2.5.7.1 compatible fixed bug in class/error.php Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Added Paths: ----------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/common/session.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -0,0 +1,111 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * XhttperrorSession class + * + * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package Xhttperror + * @since 1.01 + * @author Lucio Rota <luc...@gm...> + * @author trabis <lus...@gm...> + * @author Harry Fuecks (PHP Anthology Volume II) + * @version $Id:$ + */ +defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); + +include_once dirname(dirname(__DIR__)) . '/include/common.php'; + +/** + * Class XhttperrorSession + */ +class XhttperrorSession +{ + /** + * Session constructor<br /> + * Starts the session with session_start() + * <strong>Note:</strong> that if the session has already started, + * session_start() does nothing + */ + protected function __construct() + { + @session_start(); + } + + /** + * Sets a session variable + * + * @param string $name name of variable + * @param mixed $value value of variable + * + * @return void + * @access public + */ + public function set($name, $value) + { + $_SESSION[$name] = $value; + } + + /** + * Fetches a session variable + * + * @param string $name name of variable + * + * @return mixed value of session variable + * @access public + */ + public function get($name) + { + if (isset($_SESSION[$name])) { + return $_SESSION[$name]; + } else { + return false; + } + } + + /** + * Deletes a session variable + * + * @param string $name name of variable + * + * @return void + * @access public + */ + public function del($name) + { + unset($_SESSION[$name]); + } + + /** + * Destroys the whole session + * + * @return void + * @access public + */ + public function destroy() + { + $_SESSION = array(); + session_destroy(); + } + + /** + * @return XhttperrorSession + */ + public static function &getInstance() + { + static $_sess; + if (!isset($_sess)) { + $_sess = new XhttperrorSession(); + } + + return $_sess; + } +} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -22,9 +22,9 @@ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); include_once dirname(__DIR__) . '/include/common.php'; -define('_XHTTPERROR_REDIRECT_NO', 0); -define('_XHTTPERROR_REDIRECT_URI', 1); -define('_XHTTPERROR_REDIRECT_PREVIOUS', 2); +define('XHTTPERROR_REDIRECT_NO', 0); +define('XHTTPERROR_REDIRECT_URI', 1); +define('XHTTPERROR_REDIRECT_PREVIOUS', 2); /** * Class XhttperrorError Deleted: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/session.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -1,111 +0,0 @@ -<?php -/* - You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code - which is considered copyrighted (c) material of the original comment or credit authors. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ -/** - * XhttperrorSession class - * - * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @package Xhttperror - * @since 1.01 - * @author Lucio Rota <luc...@gm...> - * @author trabis <lus...@gm...> - * @author Harry Fuecks (PHP Anthology Volume II) - * @version $Id:$ - */ -defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); - -include_once dirname(dirname(__FILE__)) . '/include/common.php'; - -/** - * Class XhttperrorSession - */ -class XhttperrorSession -{ - /** - * Session constructor<br /> - * Starts the session with session_start() - * <strong>Note:</strong> that if the session has already started, - * session_start() does nothing - */ - protected function __construct() - { - @session_start(); - } - - /** - * Sets a session variable - * - * @param string $name name of variable - * @param mixed $value value of variable - * - * @return void - * @access public - */ - public function set($name, $value) - { - $_SESSION[$name] = $value; - } - - /** - * Fetches a session variable - * - * @param string $name name of variable - * - * @return mixed value of session variable - * @access public - */ - public function get($name) - { - if (isset($_SESSION[$name])) { - return $_SESSION[$name]; - } else { - return false; - } - } - - /** - * Deletes a session variable - * - * @param string $name name of variable - * - * @return void - * @access public - */ - public function del($name) - { - unset($_SESSION[$name]); - } - - /** - * Destroys the whole session - * - * @return void - * @access public - */ - public function destroy() - { - $_SESSION = array(); - session_destroy(); - } - - /** - * @return XhttperrorSession - */ - public static function &getInstance() - { - static $_sess; - if (!isset($_sess)) { - $_sess = new XhttperrorSession(); - } - - return $_sess; - } -} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2015-02-03 22:11:05 UTC (rev 12963) @@ -6,11 +6,9 @@ ! Bug fix. o General comment. -version 1.01 (Released: 2014/11/26) +version 1.01 (Released: 2015/02/03) =================================== -+ delete multiple reports. -o Use native XoopsRequest (mamba) -o Upgraded to Xoops 2.5.7 coding standard. +o Upgraded to Xoops 2.5.7.1 coding standard. o Refactory all language definitions ! store wrong requested uri in reports (REDIRECT_URL, REDIRECT_QUERY_STRING) Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -21,6 +21,20 @@ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +// common Xoops stuff +xoops_load('XoopsRequest'); +xoops_load('XoopsUserUtility'); +xoops_load('XoopsLocal'); + +// MyTextSanitizer object +$myts = MyTextSanitizer::getInstance(); + +// Load Xoops handlers +$module_handler = xoops_gethandler('module'); +$member_handler = xoops_gethandler('member'); +$notification_handler = xoops_gethandler('notification'); +$groupperm_handler = xoops_gethandler('groupperm'); + // This must contain the name of the folder in which reside Xhttperror define("XHTTPERROR_DIRNAME", basename(dirname(dirname(__FILE__)))); define("XHTTPERROR_URL", XOOPS_URL . '/modules/' . XHTTPERROR_DIRNAME); @@ -35,14 +49,9 @@ include_once XHTTPERROR_ROOT_PATH . '/include/functions.php'; include_once XHTTPERROR_ROOT_PATH . '/include/constants.php'; -include_once XHTTPERROR_ROOT_PATH . '/class/session.php'; // XhttperrorSession class include_once XHTTPERROR_ROOT_PATH . '/class/xhttperror.php'; // XhttperrorXhttperror class +include_once XHTTPERROR_ROOT_PATH . '/class/common/session.php'; // XhttperrorSession class -xoops_load('XoopsUserUtility'); -xoops_load('XoopsLocal'); -// MyTextSanitizer object -$myts = MyTextSanitizer::getInstance(); - $debug = false; $xhttperror = XhttperrorXhttperror::getInstance($debug); @@ -54,9 +63,3 @@ // Find if the user is admin of the module $xhttperror_isAdmin = xhttperror_userIsAdmin(); } - -// Load Xoops handlers -$module_handler = xoops_gethandler('module'); -$member_handler = xoops_gethandler('member'); -$notification_handler = xoops_gethandler('notification'); -$groupperm_handler = xoops_gethandler('groupperm'); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2015-02-02 19:39:18 UTC (rev 12962) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php 2015-02-03 22:11:05 UTC (rev 12963) @@ -40,8 +40,8 @@ include_once XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/include/constants.php'; // About -$modversion['module_status'] = 'RC1'; -$modversion['release_date'] = '2014/11/26'; // YYYY/mm/dd +$modversion['module_status'] = 'Beta'; +$modversion['release_date'] = '2015/02/03'; // YYYY/mm/dd $modversion['module_website_url'] = 'http://www.xoops.org/'; $modversion['module_website_name'] = 'XOOPS'; $modversion['min_php'] = '5.3.7'; |
From: <be...@us...> - 2015-02-02 19:39:20
|
Revision: 12962 http://sourceforge.net/p/xoops/svn/12962 Author: beckmi Date: 2015-02-02 19:39:18 +0000 (Mon, 02 Feb 2015) Log Message: ----------- new branch Added Paths: ----------- XoopsModules/dms/branches/mamba/dms/ |
From: <be...@us...> - 2015-02-02 19:38:01
|
Revision: 12961 http://sourceforge.net/p/xoops/svn/12961 Author: beckmi Date: 2015-02-02 19:38:00 +0000 (Mon, 02 Feb 2015) Log Message: ----------- new branch Added Paths: ----------- XoopsModules/dms/branches/mamba/ |
From: <wis...@us...> - 2015-02-02 11:10:53
|
Revision: 12960 http://sourceforge.net/p/xoops/svn/12960 Author: wishcraft Date: 2015-02-02 11:10:47 +0000 (Mon, 02 Feb 2015) Log Message: ----------- Xortify XOOPS 2.5 - Client 5.00 Modified Paths: -------------- XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/admin/index.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/curl.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/curlserialised.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/curlxml.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/json.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/minimumcloud.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/rest_curl.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/rest_curlserialised.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/rest_curlxml.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/rest_json.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/rest_wgetserialised.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/rest_wgetxml.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/soap.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/wgetserialised.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/class/wgetxml.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/include/instance.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/language/english/modinfo.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/preloads/bans.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/preloads/core.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/preloads/php.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/preloads/sfs.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/preloads/users.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/providers/projecthoneypot.org/post.loader.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/providers/stopforumspam.com/post.loader.php XoopsModules/xortify/trunk/XOOPS 2.5/htdocs/modules/xortify/providers/xortify/post.loader.php Added Paths: ----------- XoopsModules/xortify/releases/XOOPS 2.5/5.00/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formdhtmltextarea.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formeditor.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formtextarea.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/menu.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/blocks/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/blocks/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/blocks/spoof.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_curl.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_curl_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_curlserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_curlserialised_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_curlxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_curlxml_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_json.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_json_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_minimumcloud.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_minimumcloud_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_curl.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_curl_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_curlserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_curlserialised_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_curlxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_curlxml_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_json.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_json_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_wgetserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_wgetserialised_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_wgetxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_rest_wgetxml_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_soap.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_soap_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_wgetserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_wgetserialised_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_wgetxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/auth_wgetxml_provisionning.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/authfactory.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/auth/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/curl.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/curlserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/curlxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/emails.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/emails_links.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/json.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/log.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/minimumcloud.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/rest_curl.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/rest_curlserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/rest_curlxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/rest_json.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/rest_wgetserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/rest_wgetxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/servers.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/soap.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/wgetserialised.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/class/wgetxml.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/cron/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/cron/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/cron/serverup.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/cron/unbanner.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/changelog.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/credits.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/install.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/lang_diff.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/licence.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/docs/readme.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/accessdenied.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/arck.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/chronolabs.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/16/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/16/access.list.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/16/current.bans.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/16/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/16/xortify.log.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/about.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/access.list.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/current.bans.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/home.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/32/xortify.log.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/icons/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/left_both.gif XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/right_both.gif XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/images/xortify_slogo.png XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/JSON.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/forms.objects.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/forms.xortify.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/functions.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/install.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/instance.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/post.footer.end.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/post.header.addmeta.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/post.header.endcache.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/post.loader.mainfile.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/pre.loader.mainfile.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/uninstall.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/include/update.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/admin.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/ban.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/help/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/help/help.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/help/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/main.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/english/modinfo.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/language/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/projecthoneypot.org.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/protector.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/spiders.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/stopforumspam.com.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/plugin/xortify.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/poll/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/poll/index.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/bans.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/core.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/markonline.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/php.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/servers.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/sfs.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/unbanner.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/unbans.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/usercrawl.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/preloads/users.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/projecthoneypot.org/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/projecthoneypot.org/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/projecthoneypot.org/post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/protector/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/protector/footer.post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/protector/header.post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/protector/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/providers.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/spiders/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/spiders/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/spiders/post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/stopforumspam.com/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/stopforumspam.com/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/stopforumspam.com/post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/xortify/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/xortify/footer.post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/xortify/header.post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/xortify/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/xortify/post.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/providers/xortify/pre.loader.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/sql/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/sql/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/sql/mysql.sql XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/admin/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/admin/xortify_cpanel_bans.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/admin/xortify_cpanel_log.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/admin/xortify_cpanel_signup_form.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/admin/xortify_cpanel_signup_nocommunication.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/blocks/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/blocks/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/blocks/xortify_block_spoof.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_banning_notice.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_cpanel_bans.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_cpanel_log.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_cpanel_signup_form.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_cpanel_signup_nocommunication.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_instance_key.php.txt XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_spamming_notice.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/templates/xortify_words_notice.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/xoops_version.php XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/xoops_lib/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/xoops_lib/modules/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/xoops_lib/modules/index.html XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/xoops_lib/modules/protector/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/xoops_lib/modules/protector/include/ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/xoops_lib/modules/protector/include/precheck.inc.php Added: XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formdhtmltextarea.php =================================================================== --- XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formdhtmltextarea.php (rev 0) +++ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formdhtmltextarea.php 2015-02-02 11:10:47 UTC (rev 12960) @@ -0,0 +1,271 @@ +<?php +/** + * Formatted textarea form + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @subpackage form + * @since 2.0.0 + * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ + * @author Taiwen Jiang <ph...@us...> + * @author Vinod <sma...@gm...> + * @version $Id: formdhtmltextarea.php 8066 2011-11-06 05:09:33Z beckmi $ + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + + +/** + * base class + */ +xoops_load('XoopsFormTextArea'); + +/** + * A textarea with xoopsish formatting and smilie buttons + * + */ +class XoopsFormDhtmlTextArea extends XoopsFormTextArea +{ + /** + * Extended HTML editor + * + * <p>If an extended HTML editor is set, the renderer will be replaced by the specified editor, usually a visual or WYSIWYG editor.</p> + * + * <ul>Developer and user guide: + * <li><ul>For run-time settings per call + * <li>To use an editor pre-configured by {@link XoopsEditor}, e.g. 'fckeditor': <code>$options['editor'] = 'fckeditor';</code></li> + * <li>To use a custom editor, e.g. 'MyEditor' class located in "/modules/myeditor/myeditor.php": <code>$options['editor'] = array('MyEditor', XOOPS_ROOT_PATH . "/modules/myeditor/myeditor.php");</code></li> + * </ul></li> + * <li><ul>For pre-configured settings, which will force to use a editor if no specific editor is set for call + * <li><ul>Set up custom configs: in XOOPS_VAR_PATH . '/configs/xoopsconfig.php' set a editor as default, e.g. + * <li>a pre-configured editor 'fckeditor': <code>return array('editor' => 'fckeditor');</code></li> + * <li>a custom editor 'MyEditor' class located in "/modules/myeditor/myeditor.php": <code>return array('editor' => array('MyEditor', XOOPS_ROOT_PATH . "/modules/myeditor/myeditor.php");</code></li> + * </ul></li> + * <li>To disable the default editor, in XOOPS_VAR_PATH . '/configs/xoopsconfig.php': <code>return array();</code></li> + * <li>To disable the default editor for a specific call: <code>$options['editor'] = 'dhtmltextarea';</code></li> + * </ul></li> + * </ul> + */ + var $htmlEditor = array(); + + /** + * Hidden text + * + * @var string + * @access private + */ + var $_hiddenText; + + var $skipPreview = false; + var $doHtml = false; + var $js = ''; + + /** + * Constructor + * + * @param string $caption Caption + * @param string $name "name" attribute + * @param string $value Initial text + * @param int $rows Number of rows + * @param int $cols Number of columns + * @param string $hiddentext Identifier for hidden Text + * @param array $options Extra options + */ + function XoopsFormDhtmlTextArea($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = array()) + { + global $xoopsConfig; + static $inLoop = 0; + + $inLoop ++; + // Second loop, invalid, return directly + if ($inLoop > 2) { + return; + } + // Else, initialize + $this->XoopsFormTextArea($caption, $name, $value, $rows, $cols); + $this->_hiddenText = $hiddentext; + + if ($inLoop > 1) { + return; + } + if (!isset($options['editor'])) { + if (isset($xoopsConfig['editor'])) + $options['editor'] = $xoopsConfig['editor']; + } + + if (! empty($this->htmlEditor) || ! empty($options['editor'])) { + $options['name'] = $this->getName(); + $options['value'] = $this->getValue(); + if (! empty($options['editor'])) { + $this->htmlEditor = is_array($options['editor']) ? $options['editor'] : array($options['editor']); + } + + if (count($this->htmlEditor) == 1) { + xoops_load('XoopsEditorHandler'); + $editor_handler = &XoopsEditorHandler::getInstance(); + $this->htmlEditor = $editor_handler->get($this->htmlEditor[0], $options); + if ($inLoop > 1) { + $this->htmlEditor = null; + } + } else { + list ($class, $path) = $this->htmlEditor; + include_once XOOPS_ROOT_PATH . $path; + if (class_exists($class)) { + $this->htmlEditor = new $class($options); + } + if ($inLoop > 1) { + $this->htmlEditor = null; + } + } + } + + $inLoop = 0; + } + + /** + * Prepare HTML for output + * + * @return string HTML + */ + function render() + { + if ($this->htmlEditor && is_object($this->htmlEditor)) { + if (! isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) { + return $this->htmlEditor->render(); + } + } + static $js_loaded; + + xoops_loadLanguage('formdhtmltextarea'); + $ret = ""; + // actions + $ret .= $this->codeIcon() . "<br />\n"; + // fonts + $ret .= $this->fontArray(); + // length checker + $ret .= "<input type='button' onclick=\"XoopsCheckLength('" . $this->getName() . "', '" . @$this->configs['maxlength'] . "', '" . _XOOPS_FORM_ALT_LENGTH . "', '" . _XOOPS_FORM_ALT_LENGTH_MAX . "');\" value=' ? ' title='" . _XOOPS_FORM_ALT_CHECKLENGTH . "' />"; + $ret .= "<br />\n"; + // the textarea box + $ret .= "<textarea id='" . $this->getName() . "' name='" . $this->getName() . "' title='". $this->getTitle() . "' onselect=\"xoopsSavePosition('" . $this->getName() . "');\" onclick=\"xoopsSavePosition('" . $this->getName() . "');\" onkeyup=\"xoopsSavePosition('" . $this->getName() . "');\" cols='" . $this->getCols() . "' rows='" . $this->getRows() . "'" . $this->getExtra() . ">" . $this->getValue() . "</textarea><br />\n"; + + if (empty($this->skipPreview)) { + if (empty($GLOBALS['xoTheme'])) { + $this->js .= implode("", file(XOOPS_ROOT_PATH . "/class/textsanitizer/image/image.js")); + } else { + $GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array('type' => 'text/javascript')); + } + $button = // "<br />" . +"<input " . " id='" . $this->getName() . "_preview_button'" . " type='button' " . " value='" . _PREVIEW . "' " . " onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . intval($this->doHtml) . ", '" . $GLOBALS['xoopsSecurity']->createToken() . "')\"" . " />"; + $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . " <fieldset>" . " <legend>" . $button . "</legend>" . " <div id='" . $this->getName() . "_hidden_data'>" . _XOOPS_FORM_PREVIEW_CONTENT . "</div>" . " </fieldset>" . "</div>"; + } + // Load javascript + if (empty($js_loaded)) { + $javascript = (($this->js) ? '<script language="JavaScript" type="text/javascript">' . $this->js . '</script>' : '') . '<script language="JavaScript" type="text/javascript" src="' . XOOPS_URL . '/include/formdhtmltextarea.js"></script>'; + $ret = $javascript . $ret; + $js_loaded = true; + } + $ret .= "<input type='hidden' name='xortify_check[]' value='".$this->getName()."'/>"; + return $ret; + } + + /** + * XoopsFormDhtmlTextArea::codeIcon() + * + * @return + */ + function codeIcon() + { + $textarea_id = $this->getName(); + $code = "<a name='moresmiley'></a>" . "<img src='" . XOOPS_URL . "/images/url.gif' alt='" . _XOOPS_FORM_ALT_URL . "' title='" . _XOOPS_FORM_ALT_URL . "' onclick='xoopsCodeUrl(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERURL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> " . "<img src='" . XOOPS_URL . "/images/email.gif' alt='" . _XOOPS_FORM_ALT_EMAIL . "' title='" . _XOOPS_FORM_ALT_EMAIL . "' onclick='xoopsCodeEmail(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTEREMAIL, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> " . "<img src='" . XOOPS_URL . "/images/imgsrc.gif' alt='" . _XOOPS_FORM_ALT_IMG . "' title='" . _XOOPS_FORM_ALT_IMG . "' onclick='xoopsCodeImg(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERIMGURL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ENTERIMGPOS, ENT_QUOTES) . "\", \"" . htmlspecialchars(_IMGPOSRORL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ERRORIMGPOS, ENT_QUOTES) . "\", \"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> " . "<img src='" . XOOPS_URL . "/images/image.gif' alt='" . _XOOPS_FORM_ALT_IMAGE . "' title='" . _XOOPS_FORM_ALT_IMAGE . "' onclick='openWithSelfMain(\"" . XOOPS_URL . "/imagemanager.php?target={$textarea_id}\",\"imgmanager\",400,430);' onmouseover='style.cursor=\"hand\"'/> " . "<img src='" . XOOPS_URL . "/images/smiley.gif' alt='" . _XOOPS_FORM_ALT_SMILEY . "' title='" . _XOOPS_FORM_ALT_SMILEY . "' onclick='openWithSelfMain(\"" . XOOPS_URL . "/misc.php?action=showpopups&type=smilies&target={$textarea_id}\",\"smilies\",300,475);' onmouseover='style.cursor=\"hand\"'/> "; + $myts = &MyTextSanitizer::getInstance(); + + $extensions = array_filter($myts->config['extensions']); + foreach(array_keys($extensions) as $key) { + $extension = $myts->loadExtension($key); + @list ($encode, $js) = $extension->encode($textarea_id); + if (empty($encode)) + continue; + $code .= $encode; + if (! empty($js)) { + $this->js .= $js; + } + } + $code .= "<img src='" . XOOPS_URL . "/images/code.gif' alt='" . _XOOPS_FORM_ALT_CODE . "' title='" . _XOOPS_FORM_ALT_CODE . "' onclick='xoopsCodeCode(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERCODE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> " . "<img src='" . XOOPS_URL . "/images/quote.gif' alt='" . _XOOPS_FORM_ALT_QUOTE . "' title='" . _XOOPS_FORM_ALT_QUOTE . "' onclick='xoopsCodeQuote(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERQUOTE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/>"; + + $xoopsPreload =& XoopsPreload::getInstance(); + $xoopsPreload->triggerEvent('core.class.xoopsform.formdhtmltextarea.codeicon', array(&$code)); + return $code; + } + + /** + * XoopsFormDhtmlTextArea::fontArray() + * + * @return + */ + function fontArray() + { + $textarea_id = $this->getName(); + $hiddentext = $this->_hiddenText; + + $fontStr = "<script type=\"text/javascript\" language=\"JavaScript\">" . "var _editor_dialog = ''" . "+ '<select id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'SIZE\'>" . _SIZE . "</option>'"; + foreach($GLOBALS["formtextdhtml_sizes"] as $_val => $_name) { + $fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'"; + } + ; + $fontStr .= " + '</select> '"; + $fontStr .= "+ '<select id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'FONT\'>" . _FONT . "</option>'"; + $fontarray = ! empty($GLOBALS["formtextdhtml_fonts"]) ? $GLOBALS["formtextdhtml_fonts"] : array("Arial" , "Courier" , "Georgia" , "Helvetica" , "Impact" , "Verdana" , "Haettenschweiler"); + foreach($fontarray as $font) { + $fontStr .= " + '<option value=\'{$font}\'>{$font}</option>'"; + } + ; + $fontStr .= " + '</select> '"; + $fontStr .= "+ '<select id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'COLOR\'>" . _COLOR . "</option>';" . "var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF'); + for(var i = 0; i < _color_array.length; i ++) { + for(var j = 0; j < _color_array.length; j ++) { + for(var k = 0; k < _color_array.length; k ++) { + var _color_ele = _color_array[i] + _color_array[j] + _color_array[k]; + _editor_dialog += '<option value=\''+_color_ele+'\' style=\'background-color:#'+_color_ele+';color:#'+_color_ele+';\'>#'+_color_ele+'</option>'; + } + } + } + _editor_dialog += '</select>';"; + + $fontStr .= "document.write(_editor_dialog); </script>"; + + $styleStr = "<img src='" . XOOPS_URL . "/images/bold.gif' alt='" . _XOOPS_FORM_ALT_BOLD . "' title='" . _XOOPS_FORM_ALT_BOLD . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; + $styleStr .= "<img src='" . XOOPS_URL . "/images/italic.gif' alt='" . _XOOPS_FORM_ALT_ITALIC . "' title='" . _XOOPS_FORM_ALT_ITALIC . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; + $styleStr .= "<img src='" . XOOPS_URL . "/images/underline.gif' alt='" . _XOOPS_FORM_ALT_UNDERLINE . "' title='" . _XOOPS_FORM_ALT_UNDERLINE . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/> "; + $styleStr .= "<img src='" . XOOPS_URL . "/images/linethrough.gif' alt='" . _XOOPS_FORM_ALT_LINETHROUGH . "' title='" . _XOOPS_FORM_ALT_LINETHROUGH . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' /></a> "; + + $alignStr = "<img src='" . XOOPS_URL . "/images/alignleft.gif' alt='" . _XOOPS_FORM_ALT_LEFT . "' title='" . _XOOPS_FORM_ALT_LEFT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; + $alignStr .= "<img src='" . XOOPS_URL . "/images/aligncenter.gif' alt='" . _XOOPS_FORM_ALT_CENTER . "' title='" . _XOOPS_FORM_ALT_CENTER . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; + $alignStr .= "<img src='" . XOOPS_URL . "/images/alignright.gif' alt='" . _XOOPS_FORM_ALT_RIGHT . "' title='" . _XOOPS_FORM_ALT_RIGHT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; + $fontStr = $fontStr . "<br />\n{$styleStr} {$alignStr} \n"; + return $fontStr; + } + + /** + * XoopsFormDhtmlTextArea::renderValidationJS() + * + * @return + */ + function renderValidationJS() + { + if ($this->htmlEditor && is_object($this->htmlEditor) && method_exists($this->htmlEditor, 'renderValidationJS')) { + if (! isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) { + return $this->htmlEditor->renderValidationJS(); + } + } + return parent::renderValidationJS(); + } +} + +?> Added: XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formeditor.php =================================================================== --- XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formeditor.php (rev 0) +++ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formeditor.php 2015-02-02 11:10:47 UTC (rev 12960) @@ -0,0 +1,92 @@ +<?php +/** + * XOOPS Form Class Elements + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @subpackage form + * @since 2.0.0 + * @author Taiwen Jiang <ph...@us...> + * @version $Id: formeditor.php 8066 2011-11-06 05:09:33Z beckmi $ + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +xoops_load('XoopsFormTextArea'); + +/** + * XOOPS Form Editor + * + */ +class XoopsFormEditor extends XoopsFormTextArea +{ + var $editor; + + /** + * Constructor + * + * @param string $caption Caption + * @param string $name Name for textarea field + * @param string $value Initial text + * @param array $configs configures: editor - editor identifier; name - textarea field name; width, height - dimensions for textarea; value - text content + * @param bool $noHtml use non-WYSIWYG eitor onfailure + * @param string $OnFailure editor to be used if current one failed + */ + function XoopsFormEditor($caption, $name, $configs = null, $nohtml = false, $OnFailure = '') + { + // Backward compatibility: $name -> editor name; $configs['name'] -> textarea field name + if (! isset($configs['editor'])) { + $configs['editor'] = $name; + $name = $configs['name']; + // New: $name -> textarea field name; $configs['editor'] -> editor name; $configs['name'] -> textarea field name + } else { + $configs['name'] = $name; + } + $this->XoopsFormTextArea($caption, $name); + xoops_load('XoopsEditorHandler'); + $editor_handler = XoopsEditorHandler::getInstance(); + $this->editor = $editor_handler->get($configs['editor'], $configs, $nohtml, $OnFailure); + } + + /** + * renderValidationJS + * TEMPORARY SOLUTION to 'override' original renderValidationJS method + * with custom XoopsEditor's renderValidationJS method + */ + function renderValidationJS() + { + if (is_object($this->editor) && $this->isRequired()) { + if (method_exists($this->editor, 'renderValidationJS')) { + $this->editor->setName($this->getName()); + $this->editor->setCaption($this->getCaption()); + $this->editor->_required = $this->isRequired(); + $ret = $this->editor->renderValidationJS(); + return $ret; + } else { + parent::renderValidationJS(); + } + } + return false; + } + + /** + * XoopsFormEditor::render() + * + * @return + */ + function render() + { + if (is_object($this->editor)) { + return $this->editor->render() . "<input type='hidden' name='xortify_check[]' value='".$this->getName()."'/>"; + } + } +} + +?> Added: XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formtextarea.php =================================================================== --- XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formtextarea.php (rev 0) +++ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/class/xoopsform/formtextarea.php 2015-02-02 11:10:47 UTC (rev 12960) @@ -0,0 +1,124 @@ +<?php +/** + * XOOPS form element + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @subpackage form + * @since 2.0.0 + * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ + * @version $Id: formtextarea.php 8066 2011-11-06 05:09:33Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +xoops_load('XoopsFormElement'); + +/** + * A textarea + */ +class XoopsFormTextArea extends XoopsFormElement +{ + /** + * number of columns + * + * @var int + * @access private + */ + var $_cols; + + /** + * number of rows + * + * @var int + * @access private + */ + var $_rows; + + /** + * initial content + * + * @var string + * @access private + */ + var $_value; + + /** + * Constuctor + * + * @param string $caption caption + * @param string $name name + * @param string $value initial content + * @param int $rows number of rows + * @param int $cols number of columns + */ + function XoopsFormTextArea($caption, $name, $value = "", $rows = 5, $cols = 50) + { + $this->setCaption($caption); + $this->setName($name); + $this->_rows = intval($rows); + $this->_cols = intval($cols); + $this->setValue($value); + } + + /** + * get number of rows + * + * @return int + */ + function getRows() + { + return $this->_rows; + } + + /** + * Get number of columns + * + * @return int + */ + function getCols() + { + return $this->_cols; + } + + /** + * Get initial content + * + * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compat + * @return string + */ + function getValue($encode = false) + { + return $encode ? htmlspecialchars($this->_value) : $this->_value; + } + + /** + * Set initial content + * + * @param $value string + */ + function setValue($value) + { + $this->_value = $value; + } + + /** + * prepare HTML for output + * + * @return sting HTML + */ + function render() + { + return "<textarea name='" . $this->getName() . "' id='" . $this->getName() . "' title='" . $this->getTitle() . "' rows='" . $this->getRows() . "' cols='" . $this->getCols() . "'" . $this->getExtra() . ">" . $this->getValue() . "</textarea><input type='hidden' name='xortify_check[]' value='".$this->getName()."'/>"; + } +} + +?> \ No newline at end of file Added: XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.html =================================================================== --- XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.html (rev 0) +++ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.html 2015-02-02 11:10:47 UTC (rev 12960) @@ -0,0 +1,10 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Untitled Document</title> +</head> + +<body> +</body> +</html> Property changes on: XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.html ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.php =================================================================== --- XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.php (rev 0) +++ XoopsModules/xortify/releases/XOOPS 2.5/5.00/htdocs/modules/xortify/admin/index.php 2015-02-02 11:10:47 UTC (rev 12960) @@ -0,0 +1,486 @@ +<?php +/* + * Prevents Spam, Harvesting, Human Rights Abuse, Captcha Abuse etc. + * basic statistic of them in XOOPS Copyright (C) 2012 Simon Roberts + * Contact: wishcraft - si...@ch... + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * See /docs/license.pdf for full license. + * + * Shouts:- Mamba (www.xoops.org), flipse (www.nlxoops.nl) + * Many thanks for your additional work with version 1.01 + * + * Version: 4.99.1 Final (Stable) + * Published: Chronolabs + * Download: http://sourceforge.net/projects/xortify + * This File: index.php + * Description: Admin Dashboard and Other panels file + * Date: 06-Jan-2015 03:45 AEST + * License: GNU3 + * + */ + + + include('../../../include/cp_header.php'); + + ////error_reporting(0); + + if (!defined('_CHARSET')) + define ("_CHARSET","UTF-8"); + if (!defined('_CHARSET_ISO')) + define ("_CHARSET_ISO","ISO-8859-1"); + + $GLOBALS['myts'] = MyTextSanitizer::getInstance(); + + $module_handler = xoops_gethandler('module'); + $config_handler = xoops_gethandler('config'); + if (!isset($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module'])) $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module'] = $module_handler->getByDirname('xortify'); + if (!isset($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig'])) $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig'] = $config_handler->getConfigList($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module']->getVar('mid')); + + include_once $GLOBALS['xoops']->path('class'.DS.'cache'.DS.'xoopscache.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'pagenav.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopslists.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopstree.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsformloader.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'class'.DS.'auth'.DS.'authfactory.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'functions.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'forms.xortify.php'); + + $GLOBALS['xoopsLoad'] = new XoopsLoad(); + $GLOBALS['xoopsCache'] = new XoopsCache(); + + xoops_loadLanguage('admin', 'xortify'); + + if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); + //return true; + }else{ + echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); + //return false; + } + $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['ImageIcon'] = XOOPS_URL .'/'. $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module']->getInfo('icons16'); + $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['ImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module']->getInfo('icons32'); + + if ($GLOBALS['xoopsUser']) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } + } else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); + } + + xoops_cp_header(); + + if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $GLOBALS['xoopsTpl'] = new XoopsTpl(); + } + + $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['ImageIcon']); + $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['ImageAdmin']); + + $op = isset($_REQUEST['op'])?$_REQUEST['op']:"dashboard"; + $fct = isset($_REQUEST['fct'])?$_REQUEST['fct']:""; + + switch($op) { + case "signup": + + switch ($fct) + { + case "save": + + $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']); + $myts =& MyTextSanitizer::getInstance(); + $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : ''; + $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : ''; + $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : ''; + $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : ''; + $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass'])) : ''; + $agree = (isset($_POST['agree']) && intval($_POST['agree'])) ? 1 : 0; + + if ($agree != 1) { + $stop .= _US_UNEEDAGREE . '<br />'; + } + + $validate = $xortifyAuth->validate($uname, $email, $pass, $vpass); + + if ($validate!=false) + $stop .= "User details didn't validate with Xortify.com<br/>$validate"; + + $GLOBALS['xoopsLoad']->load("captcha"); + $xoopsCaptcha = XoopsCaptcha::getInstance(); + if (! $xoopsCaptcha->verify() ) { + $stop .= $xoopsCaptcha->getMessage(); + } + + if ($stop!='') { + xortify_adminMenu(4, 'index.php?op=signup&fct=signup'); + echo "<p align='center' style='font-size: 15px; color: #FF0000;'>$stop</p>"; + $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']); + $disclaimer = $xortifyAuth->network_disclaimer(); + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "url", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts =& MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoopsTpl']->assign('uname',$uname->render()); + $GLOBALS['xoopsTpl']->assign('pass',$pass->render()); + $GLOBALS['xoopsTpl']->assign('vpass',$vpass->render()); + $GLOBALS['xoopsTpl']->assign('email',$email->render()); + $GLOBALS['xoopsTpl']->assign('yoururl',$url->render()); + $GLOBALS['xoopsTpl']->assign('viewemail',$viewemail->render()); + $GLOBALS['xoopsTpl']->assign('timezone',$timezone->render()); + $GLOBALS['xoopsTpl']->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoopsTpl']->assign('agree',$agree->render()); + $GLOBALS['xoopsTpl']->assign('captcha',$captcha->render()); + $GLOBALS['xoopsTpl']->assign('op',$op->render()); + $GLOBALS['xoopsTpl']->assign('fct',$fct->render()); + $GLOBALS['xoopsTpl']->assign('submit',$submit->render()); + $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['PHP_SELF']); + $GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('/modules/xortify/templates/xortify_cpanel_signup_form.html')); + xortify_footer_adminMenu(); + xoops_cp_footer(); + exit; + + } else { + $GLOBALS['xoopsTpl']->assign('protocol', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']); + switch($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoopsTpl']->assign('port', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoopsTpl']->assign('port', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoopsTpl']->assign('port', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoopsTpl']->assign('port', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoopsTpl']->assign('error', $disclaimer); + $GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('/modules/xortify/templates/xortify_cpanel_signup_nocommunication.html')); + } + + } else { + @$xortifyAuth->create_user( $_REQUEST['viewemail'], $uname, $email, $url, $actkey, + $pass, $_REQUEST['timezone'], $_REQUEST['mailok'], $xortifyAuth->check_siteinfo(array())); + + $moduleHandler =& xoops_gethandler('module'); + $configHandler =& xoops_gethandler('config'); + if (!isset($GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module'])) + $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module'] = $moduleHandler->getByDirname('xortify'); + $configs = $configHandler->getConfigs(new Criteria('conf_modid', $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['module']->mid()) ); + foreach($configs as $id => $config) + switch($config->getVar('conf_name')) { + case 'xortify_username': + $config->setVar('conf_value', $uname); + @$configHandler->insertConfig($config); + break; + case 'xortify_password': + $config->setVar('conf_value', $pass); + @$configHandler->insertConfig($config); + break; + } + redirect_header("index.php", 4, _XOR_USERCREATED_PLEASEACTIVATE); + exit(0); + } + break; + default: + case "signup": + xortify_adminMenu(4, 'index.php?op=signup&fct=signup'); + $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['moduleConfig']['protocol']); + $disclaimer = $xortifyAuth->network_disclaimer(); + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "url", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts =& MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoopsTpl']->assign('uname',$uname->render()); + $GLOBALS['xoopsTpl']->assign('pass',$pass->render()); + $GLOBALS['xoopsTpl']->assign('vpass',$vpass->render()); + $GLOBALS['xoopsTpl']->assign('email',$email->render()); + $GLOBALS['xoopsTpl']->assign('yoururl',$url->render()); + $GLOBALS['xoopsTpl']->assign('viewemail',$viewemail->render()); + $GL... [truncated message content] |
From: <zy...@us...> - 2015-01-31 18:47:57
|
Revision: 12959 http://sourceforge.net/p/xoops/svn/12959 Author: zyspec Date: 2015-01-31 18:47:43 +0000 (Sat, 31 Jan 2015) Log Message: ----------- * minor code cleanup * utilize XoopsFilterInput in ContactContact->contactSendMail() * add missing define(s) _MD_CONTACT_MSG_NOVALIDEMAIL2, _MD_CONTACT_MSG_EMAILMATCHFAILURE * removed deprecated methods from Contact class (getInsertId, contactCleanVars) * moved XoopsRequest loading to ./admin/admin_header.php * changed defines from _MD_CONTACT_MES_xxx to _MD_CONTACT_MSG_xxx for consistency Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/class/contact.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions_update.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/admin.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/main.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/modinfo.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/xoops_version.php Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -26,7 +26,8 @@ require __DIR__ . '/admin_header.php'; // Display Admin header xoops_cp_header(); -// Define default value + +//Get input $op = XoopsRequest::getString('op', 'list'); $contactId = XoopsRequest::getInt('id', '0'); $level = ''; @@ -66,14 +67,14 @@ if ($contactCount > $pageSettingsObj->limit) { $contactPageNavObj = new XoopsPageNav($contactCount, $pageSettingsObj->limit, $pageSettingsObj->start, 'start', 'limit=' . $pageSettingsObj->limit); - $contact_pagenav = $contactPageNavObj->renderNav(4); + $contactPagenav = $contactPageNavObj->renderNav(4); } else { - $contact_pagenav = ''; + $contactPagenav = ''; } $GLOBALS['xoopsTpl']->assign(array('use_depts' => $GLOBALS['xoopsModuleConfig']['form_dept'] ? 1 : 0, 'contacts' => $contacts, - 'contact_pagenav' => $contact_pagenav) + 'contact_pagenav' => $contactPagenav) ); $level = 'list'; break; @@ -106,7 +107,7 @@ // verfiy we're sending to a valid email if ((!$mailObj->contact_mail || !(checkEmail($mailObj->contact_mail))) && !$GLOBALS['xoopsModuleConfig']['form_dept']) { - redirect_header($_SERVER['PHP_SELF'], 3, _MD_CONTACT_MES_NOVALIDEMAIL); + redirect_header($_SERVER['PHP_SELF'], 3, _MD_CONTACT_MSG_NOVALIDEMAIL); } // verify valid message body @@ -128,9 +129,9 @@ if ($sendmail = true) { $message[] = $contactHandler->contactReplyMail($mailObj); } elseif ($saveinfo = true) { - $message = _MD_CONTACT_MES_SAVEINDB; + $message = _MD_CONTACT_MSG_SAVEINDB; } else { - $message[] = _MD_CONTACT_MES_SENDERROR; + $message[] = _MD_CONTACT_MSG_SENDERROR; } } else { Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -26,7 +26,8 @@ require __DIR__ . '/admin_header.php'; // Display Admin header xoops_cp_header(); -// Define default value + +// Get input $op = XoopsRequest::getCmd('op', 'form'); switch ($op) { Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -27,7 +27,8 @@ require __DIR__ . '/admin_header.php'; // Display Admin header xoops_cp_header(); -// Define default value + +// Get input $op = XoopsRequest::getCmd('op', 'list'); switch ($op) { @@ -87,11 +88,9 @@ redirect_header('index.php', 3, _MD_CONTACT_INVALID_SECURITY_TOKEN); } - $timeRequest = XoopsRequest::getString('prune_date', 0); + $timeRequest = XoopsRequest::getString('prune_date', 0, 'POST'); $timestamp = ($timeRequest) ? strtotime($timeRequest) : xoops_getUserTimestamp(time()); $onlyreply = XoopsRequest::getBool('onlyreply', false, 'POST'); -// $timestamp = $contactHandler->contactCleanVars($_POST, 'prune_date', xoops_getUserTimestamp(time()), 'date'); -// $onlyreply = (bool) $contactHandler->contactCleanVars($_POST, 'onlyreply', 0, 'int'); $count = (int) $contactHandler->deleteBeforeDate($timestamp, $onlyreply); redirect_header('prune.php', 2, sprintf(_AM_CONTACT_MSG_PRUNE_DELETED, $count)); xoops_cp_footer(); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -30,7 +30,6 @@ // Save info $contactObj = $contactHandler->create(); $contactObj->prepareToInsert($mailObj); -// $contentObj->setVars($contact); $contactHandler->insert($contactObj); // send mail can send message $message = $contactHandler->contactSendMail($mailObj); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/class/contact.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/class/contact.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/class/contact.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -240,69 +240,7 @@ } /** - * Get variables passed by $_GET, $_POST, or unknown ($_REQUEST) * - * @deprecated in v1.82 Beta 2 - * @param array $global - * @param string $key array key to clean (e.g. id) - * @param mixed $default key's default value if invalid/no input - * @param string $type type of clean (e.g. int|string|date|array|mail, etc.. - * - * @return mixed sanitized value - */ - public function contactCleanVars(&$global, $key, $default = '', $type = 'int') - { - - switch ($type) { - case 'array': - $ret = (isset($global[$key]) && is_array($global[$key])) ? $global[$key] : $default; - break; - case 'date': - $ret = (isset($global[$key])) ? strtotime($global[$key]) : $default; - break; - case 'string': - $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_SANITIZE_MAGIC_QUOTES) : $default; - break; - case 'mail': - $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_VALIDATE_EMAIL) : $default; - break; - case 'url': - $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) : $default; - break; - case 'ip': - $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_VALIDATE_IP) : $default; - break; - case 'amp': - $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_FLAG_ENCODE_AMP) : $default; - break; - case 'text': - $ret = (isset($global[$key])) ? htmlentities($global[$key], ENT_QUOTES, 'UTF-8') : $default; - break; - case 'platform': - $ret = (isset($global[$key])) ? $this->contactPlatform($global[$key]) : $this->contactPlatform($default); - break; - case 'type': - $ret = (isset($global[$key])) ? $this->contactType($global[$key]) : $this->contactType($default); - break; - case 'int': - case 'integer': - default: - $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_SANITIZE_NUMBER_INT) : $default; - break; - case 'float': - case 'double': - // Only use the first floating point value - preg_match('/-?[0-9]+(\.[0-9]+)?/', (string) $source, $matches); - $ret = @ (float) $matches[0]; - break; - - } - - return (false === $ret) ? $default : $ret; - } - - /** - * * Clean all the incoming Vars from Form(s) * @param $global global var array (POST, GET, REQUEST) * @uses {@link XoopsRequest} @@ -373,6 +311,7 @@ public function contactSendMail(stdClass &$mailObj) { include_once $GLOBALS['xoops']->path("modules/contact/include/functions.php"); + xoops_load('XoopsFilterInput'); $xoopsMailer = xoops_getMailer(); $xoopsMailer->useMail(); $deptEmailAddresses = contactGetDepartmentEmails($mailObj->contact_department); @@ -382,16 +321,19 @@ } else { $xoopsMailer->setToEmails($GLOBALS['xoopsConfig']['adminmail']); //just send to admin } +/* if (!in_array($GLOBALS['xoopsConfig']['adminmail'], $deptEmailAddresses)) { - $xoopsMailer->multimailer->addBCC($GLOBALS['xoopsConfig']['adminmail'], 'TMC Administrator'); + $xoopsMailer->multimailer->addBCC($GLOBALS['xoopsConfig']['adminmail'], 'Administrator'); } - +*/ xoops_loadLanguage('modinfo', 'contact'); // get the language string(s) $myts =& MyTextSanitizer::getInstance(); // pre-process FromName since it came from input field - $fromName = stripslashes(strip_tags(html_entity_decode($mailObj->contact_name, ENT_QUOTES, 'UTF-8'))); + $fromName = XoopsFilterInput::getString($mailObj->contact_name, 'STRING'); +// $fromName = stripslashes(strip_tags(html_entity_decode($mailObj->contact_name, ENT_QUOTES, 'UTF-8'))); // pre-process Subject since it came from input field - $mailSubject = stripslashes(strip_tags(html_entity_decode($mailObj->contact_subject, ENT_QUOTES, 'UTF-8'))); + $mailSubject = XoopsFilterInput::getString($mailObj->contact_subject, 'STRING'); +// $mailSubject = stripslashes(strip_tags(html_entity_decode($mailObj->contact_subject, ENT_QUOTES, 'UTF-8'))); $xoopsMailer->setFromName(ucwords($fromName)); $xoopsMailer->setFromEmail($mailObj->contact_mail); @@ -427,11 +369,10 @@ */ public function contactReplyMail(stdClass &$mailObj) { - $xoopsMailer = xoops_getMailer(); $xoopsMailer->useMail(); $toEmails = $mailObj->contact_mail; - include_once "../include/functions.php"; + include_once $GLOBALS['xoops']->path("modules/contact/include/functions.php"); $deptEmailAddresses = contactGetDepartmentEmails($mailObj->contact_department); //get emails for department (if enabled) if (!empty($deptEmailAddresses)) { //get emails for department (if enabled) $xoopsMailer->setFromEmail($deptEmailAddresses[0]); // set to dept email to first one @@ -449,9 +390,11 @@ } $xoopsMailer->setFromName($fromName); - if (!empty($mailObj->contact_mailfrom)) { // use mail addr from ReplyForm + if (!empty($mailObj->contact_mailfrom)) { + // use mail addr from ReplyForm $xoopsMailer->setFromName($mailObj->contact_mailfrom); - } else { // otherwise use default site admin email + } else { + // otherwise use default site admin email $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']); } } @@ -531,7 +474,7 @@ $criteria->setOrder($pgObj->order); $criteria->setStart($pgObj->start); $criteria->setLimit($pgObj->limit); - $contactObjs = $this->getObjects($criteria, false); + $contactObjs = $this->getObjects($criteria, false); $user_timezone = ($GLOBALS['xoopsUser'] instanceof XoopsUser) ? $GLOBALS['xoopsUser']->timezone() : null; foreach($contactObjs as $thisContact) { $tab = $thisContact->getValues(); @@ -564,38 +507,6 @@ } /** - * Get Insert ID - * - * @deprecated - * @return bool|int false on failure, integer of item Id - */ - public function getInsertId() - { - return $this->db->getInsertId(); - } - - /** - * Contact Prune Count - * @deprecated - * @param int $timestamp all items <= this timestamp - * @param bool $onlyreply true - only include replies, false include everything - * - * @param int count of items to be pruned - */ - public function pruneCount($timestamp=0, $onlyreply=false) - { - $criteria = new CriteriaCompo(); - if (!empty($timestamp)) { - $criteria->add(new Criteria('contact_create', $timestamp, '<=')); - } - if ($onlyreply) { - $criteria->add(new Criteria('contact_reply', 1)); - } - - return $this->getCount($criteria); - } - - /** * Contact Delete Before Date * @param int $timestamp Unix timestamp * @param bool $onlyreply - true only delete replies, false delete everything Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -24,5 +24,6 @@ include dirname(dirname(__DIR__)) . '/mainfile.php'; include $GLOBALS['xoops']->path('www/modules/contact/class/contact.php'); include_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); +xoops_load('XoopsRequest'); $contactHandler =& xoops_getModuleHandler('contact', 'contact'); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions_update.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions_update.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions_update.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -40,10 +40,10 @@ * - the routine is intentionally limitted for this * install routine's requirements} */ - $moduleDir = basename(dirname(__DIR__)); + $moduleDirname = basename(dirname(__DIR__)); $dir = preg_replace('/[^a-zA-Z\s\d\_\-\/]/', '', $dir); $dir = trim($dir, " \t\n\r\0\x0B\/"); //trim leading/trailing spaces and '/' - $path = $GLOBALS['xoops']->path("www/modules/{$moduleDir}/{$dir}"); + $path = $GLOBALS['xoops']->path("www/modules/{$moduleDirname}/{$dir}"); $objs = array_diff(scandir($path), array('.','..')); // remove relative dirs foreach ($objs as $obj) { if (is_dir("{$path}/{$obj}")) { Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -23,20 +23,15 @@ include __DIR__ . '/header.php'; $GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl'; -//unset($_SESSION); include $GLOBALS['xoops']->path("/header.php"); -xoops_load('XoopsRequest'); $op = XoopsRequest::getCmd('op', 'form', 'POST'); $department = XoopsRequest::getString('contact_department', '', 'GET'); -//$op = $contactHandler->contactCleanVars($_POST, 'op', 'form', 'string'); -//$department = $contactHandler->contactCleanVars($_GET, 'contact_department', '', 'string'); - switch ($op) { case 'save': if (empty($_POST['submit']) ) { - redirect_header($GLOBALS['xoops']->url('www'), 3, _MD_CONTACT_MES_ERROR); + redirect_header($GLOBALS['xoops']->url('www'), 3, _MD_CONTACT_MSG_ERROR); } else { // check to make sure this passes form submission security if ( ($GLOBALS['xoopsSecurity'] instanceof XoopsSecurity) ) { @@ -67,20 +62,18 @@ // check email $input_mail = XoopsRequest::getString('contact_mail', '', 'POST'); $contact_mail = checkEmail($input_mail); -// $contact_mail = $contactHandler->contactCleanVars($_POST, 'contact_mail', '', 'mail'); if (empty($contact_mail)) { - redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_NOVALIDEMAIL); -// redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_NOVALIDEMAIL); + redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MSG_NOVALIDEMAIL); +// redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MSG_NOVALIDEMAIL); } elseif (!$GLOBALS['xoopsUser'] && $GLOBALS['xoopsModuleConfig']['form_req_email2']) { $input_mail2 = XoopsRequest::getString('contact_mail2', '', 'POST'); $contact_mail2 = checkEmail($input_mail2); -// $contact_mail2 = $contactHandler->contactCleanVars($_POST, 'contact_mail2', '', 'mail'); if (empty($contact_mail2)) { - redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_NOVALIDEMAIL2); -// redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_NOVALIDEMAIL); + redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MSG_NOVALIDEMAIL2); +// redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MSG_NOVALIDEMAIL); } elseif (($contact_mail != $contact_mail2)) { - redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_EMAILMATCHFAILURE); -// redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_EMAILMATCHFAILURE); + redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MSG_EMAILMATCHFAILURE); +// redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MSG_EMAILMATCHFAILURE); } } @@ -92,7 +85,7 @@ $contactObj = $contactHandler->create(); $contactObj->prepareToInsert($mailObj); if (!$contactHandler->insert($contactObj)) { - redirect_header('index.php', 3, _MD_CONTACT_MES_NOTSAVE); + redirect_header('index.php', 3, _MD_CONTACT_MSG_NOTSAVE); } } @@ -100,9 +93,9 @@ if ($sendmail = true) { $message = $contactHandler->contactSendMail($mailObj); } elseif ($saveinfo = true) { - $message = _MD_CONTACT_MES_SAVEINDB; + $message = _MD_CONTACT_MSG_SAVEINDB; } else { - $message = _MD_CONTACT_MES_SENDERROR; + $message = _MD_CONTACT_MSG_SENDERROR; } redirect_header($GLOBALS['xoops']->url('www'), 3, $message); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/admin.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/admin.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/admin.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -9,7 +9,7 @@ define('_AM_CONTACT_MAINTAINED_TITLE', "Visit XOOPS Community"); define('_AM_CONTACT_MAINTAINED_TEXT', "XOOPS Community"); // Contact -define('_AM_CONTACT_ID', "Id"); +//define('_AM_CONTACT_ID', "Id"); define('_AM_CONTACT_SUBJECT', "Subject"); define('_AM_CONTACT_DEPARTMENT', "Department"); define('_AM_CONTACT_SUBMITTER', "Submitter"); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/main.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/main.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/main.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -13,10 +13,12 @@ define('_MD_CONTACT_MESSAGE', "Comment"); define('_MD_CONTACT_DEPARTMENT', "Department"); define('_MD_CONTACT_DEFULTDEP', "Contact us"); -define('_MD_CONTACT_MES_SEND', "Thank you for contacting us"); -define('_MD_CONTACT_MES_NOVALIDEMAIL', "Your Email is not Valid"); -define('_MD_CONTACT_MES_NOTSAVE', "Sorry, your Message was not saved in our DB"); -define('_MD_CONTACT_MES_SAVEINDB', "Your Message has been saved in our DB"); -define('_MD_CONTACT_MES_SENDERROR', "Error in sending Message"); -define('_MD_CONTACT_MES_ERROR', "Error"); +define('_MD_CONTACT_MSG_SEND', "Thank you for contacting us"); +define('_MD_CONTACT_MSG_NOVALIDEMAIL', "Your Email is not valid"); +define('_MD_CONTACT_MSG_NOVALIDEMAIL2', "The 2nd Email entered is not valid"); +define('_MD_CONTACT_MSG_EMAILMATCHFAILURE', "Email fields do not match"); +define('_MD_CONTACT_MSG_NOTSAVE', "Sorry, your Message was not saved in our DB"); +define('_MD_CONTACT_MSG_SAVEINDB', "Your Message has been saved in our DB"); +define('_MD_CONTACT_MSG_SENDERROR', "Error in sending Message"); +define('_MD_CONTACT_MSG_ERROR', "Error"); define('_MD_CONTACT_INVALID_SECURITY_TOKEN', "Invalid security token. Please try again."); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/modinfo.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/modinfo.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/language/english/modinfo.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -34,8 +34,8 @@ define('_MI_CONTACT_MENU_LOGS_DESC', "Get Logs"); define('_MI_CONTACT_MENU_ABOUT', "About"); define('_MI_CONTACT_MENU_ABOUT_DESC', "About this module"); -define('_MI_CONTACT_MENU_HELP', "Help"); -define('_MI_CONTACT_MENU_HELP_DESC', "Module help"); +//define('_MI_CONTACT_MENU_HELP', "Help"); +//define('_MI_CONTACT_MENU_HELP_DESC', "Module help"); // Module Settings define('_MI_CONTACT_FORM_URL', "Get URL"); define('_MI_CONTACT_FORM_URL_DESC', ""); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/xoops_version.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/xoops_version.php 2015-01-31 15:28:27 UTC (rev 12958) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/xoops_version.php 2015-01-31 18:47:43 UTC (rev 12959) @@ -80,7 +80,7 @@ // Blocks 'blocks'=> array(array('file' => "stats.php", 'name' => _MI_CONTACT_BNAME1, - 'description' => '_MI_STATS_BNAME1_DESC', + 'description' => '_MI_CONTACT_BNAME1_DESC', 'show_func' => 'b_contact_stats_show', // 'edit_func' => 'b_contact_stats_edit', 'template' => 'contact_block_stats.tpl', |
From: <zy...@us...> - 2015-01-31 15:28:35
|
Revision: 12958 http://sourceforge.net/p/xoops/svn/12958 Author: zyspec Date: 2015-01-31 15:28:27 +0000 (Sat, 31 Jan 2015) Log Message: ----------- * fixed syntax error in ./ajax.php (extra apostrophy) * minor code cleanup for PSRx naming nomenclature Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/admin_header.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/blocks/stats.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/waiting.plugin.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/admin_header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/admin_header.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/admin_header.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -22,8 +22,8 @@ * @version $Id$ */ -$path = dirname(dirname(dirname(__DIR__))); -require_once $path . '/mainfile.php'; +$xoopsPath = dirname(dirname(dirname(__DIR__))); +require_once $xoopsPath . '/mainfile.php'; include_once $GLOBALS['xoops']->path('www/include/cp_functions.php'); include_once $GLOBALS['xoops']->path('www/include/cp_header.php'); include_once $GLOBALS['xoops']->path('www/class/pagenav.php'); @@ -31,12 +31,12 @@ xoops_load('XoopsRequest'); -$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); +$moduleDirname = $GLOBALS['xoopsModule']->getVar('dirname'); // Load language files -xoops_loadLanguage('admin', $thisModuleDir); -xoops_loadLanguage('modinfo', $thisModuleDir); -xoops_loadLanguage('main', $thisModuleDir); +xoops_loadLanguage('admin', $moduleDirname); +xoops_loadLanguage('modinfo', $moduleDirname); +xoops_loadLanguage('main', $moduleDirname); $pathIcon16 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('icons16')); $pathIcon32 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('icons32')); @@ -45,5 +45,5 @@ $admin_class = new ModuleAdmin(); // Contact Module specific pieces -include_once $GLOBALS['xoops']->path("/modules/{$thisModuleDir}/include/functions.php"); -$contact_handler =& xoops_getModuleHandler('contact', $thisModuleDir); +include_once $GLOBALS['xoops']->path("/modules/{$moduleDirname}/include/functions.php"); +$contactHandler =& xoops_getModuleHandler('contact', $moduleDirname); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -29,21 +29,22 @@ // Define default value $op = XoopsRequest::getString('op', 'list'); $contactId = XoopsRequest::getInt('id', '0'); -$level = ''; +$level = ''; // Define scripts $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); $xoTheme->addScript($GLOBALS['xoops']->url('www/modules/contact/assets/js/admin.js')); + // Add module stylesheet $xoTheme->addStylesheet($GLOBALS['xoops']->url('www/modules/contact/assets/css/admin.css')); //add system module stylesheets -$module_handler =& xoops_gethandler('module'); -$systemModule =& $module_handler->getByDirname('system'); -$config_handler =& xoops_gethandler('config'); +$moduleHandler =& xoops_gethandler('module'); +$systemModule =& $moduleHandler->getByDirname('system'); +$configHandler =& xoops_gethandler('config'); if ($systemModule instanceof XoopsModule) { - $moduleConfig =& $config_handler->getConfigsByCat(0, $systemModule->getVar('mid')); + $moduleConfig =& $configHandler->getConfigsByCat(0, $systemModule->getVar('mid')); if (isset($moduleConfig['jquery_theme'])) { $xoTheme->addStylesheet($GLOBALS['xoops']->url("www/modules/system/css/ui/{$moduleConfig['jquery_theme']}/ui.all.css")); } @@ -60,8 +61,8 @@ $pageSettingsObj->limit = XoopsRequest::getInt('limit', $pageSettingsObj->perpage); $pageSettingsObj->start = XoopsRequest::getInt('start', 0); - $contactCount = $contact_handler->contactGetCount('contact_cid'); //count all contacts - $contacts = $contact_handler->getAdminList($pageSettingsObj, 'contact_cid'); + $contactCount = $contactHandler->contactGetCount('contact_cid'); //count all contacts + $contacts = $contactHandler->getAdminList($pageSettingsObj, 'contact_cid'); if ($contactCount > $pageSettingsObj->limit) { $contactPageNavObj = new XoopsPageNav($contactCount, $pageSettingsObj->limit, $pageSettingsObj->start, 'start', 'limit=' . $pageSettingsObj->limit); @@ -79,14 +80,14 @@ case 'reply': if ($contactId > 0) { - $obj = $contact_handler->get($contactId); + $obj = $contactHandler->get($contactId); if (!($obj instanceof contact) || (0 != $obj->getVar('contact_cid'))) { redirect_header($_SERVER['PHP_SELF'], 3, _AM_CONTACT_REPLY_CANT); } $form = $obj->replyForm(); $GLOBALS['xoopsTpl']->assign(array('replyform' => $form->render(), - 'replylist' => $contact_handler->contactGetReply($contactId), + 'replylist' => $contactHandler->contactGetReply($contactId), 'use_depts' => $GLOBALS['xoopsModuleConfig']['form_dept'] ? 1 : 0, ) ); @@ -97,7 +98,7 @@ break; case 'doreply': - $formInput = $contact_handler->infoProcessing('POST'); + $formInput = $contactHandler->infoProcessing('POST'); $mailObj = (object) $formInput; unset($formInput); $deptEmails = array(); @@ -109,23 +110,23 @@ } // verify valid message body - $mailObj->contact_message = $contact_handler->replyBodyFormat($mailObj, (bool) $mailObj->inc_orig); + $mailObj->contact_message = $contactHandler->replyBodyFormat($mailObj, (bool) $mailObj->inc_orig); if ($mailObj->contact_message) { // successfully retrieved message body so insert into dB if ($saveinfo = true) { - $contactObj = $contact_handler->create(); + $contactObj = $contactHandler->create(); $contactObj->prepareToInsert($mailObj); - if (!$contact_handler->insert($contactObj)) { + if (!$contactHandler->insert($contactObj)) { redirect_header($_SERVER['PHP_SELF'], 3, _AM_CONTACT_MSG_NOTSAVED); } - $contact_handler->contactAddReply($contactObj->getVar('contact_cid')); + $contactHandler->contactAddReply($contactObj->getVar('contact_cid')); } else { $message[] = _AM_CONTACT_MSG_NOTSAVED; // did not save message } // send mail can send message if $sendmail = true if ($sendmail = true) { - $message[] = $contact_handler->contactReplyMail($mailObj); + $message[] = $contactHandler->contactReplyMail($mailObj); } elseif ($saveinfo = true) { $message = _MD_CONTACT_MES_SAVEINDB; } else { @@ -143,7 +144,7 @@ break; case 'view': - $obj = $contact_handler->get($contactId); + $obj = $contactHandler->get($contactId); if (!$obj) { redirect_header($_SERVER['PHP_SELF'], 3, _AM_CONTACT_MSG_NOTEXIST); @@ -157,7 +158,7 @@ $GLOBALS['xoopsTpl']->assign(array('use_depts' => $GLOBALS['xoopsModuleConfig']['form_dept'] ? 1 : 0, 'contact' => $contact, - 'replylist' => $contact_handler->contactGetReply($contactId)) + 'replylist' => $contactHandler->contactGetReply($contactId)) ); $level = 'view'; @@ -189,7 +190,7 @@ $criteria = new CriteriaCompo (); $criteria->add(new Criteria ('contact_id', $contactId)); //messages $criteria->add(new Criteria ('contact_cid', $contactId), 'OR'); //replies - $msg = (!$contact_handler->deleteAll($criteria)) ? _AM_CONTACT_MSG_DELETEERROR : _AM_CONTACT_MSG_DELETED; + $msg = (!$contactHandler->deleteAll($criteria)) ? _AM_CONTACT_MSG_DELETEERROR : _AM_CONTACT_MSG_DELETED; } redirect_header($_SERVER['PHP_SELF'], 3, $msg); break; Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/index.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/index.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -34,16 +34,16 @@ $criteria->add(new Criteria('contact_cid', 0)); $criteria->add(new Criteria('contact_reply', 0)); $criteria->add(new Criteria('contact_type', 'Contact')); -$admin_class->addInfoBoxLine(_AM_CONTACT_INDEX_ADMENU1, _AM_CONTACT_INDEX_NOREPLIES, $contact_handler->getCount($criteria)); +$admin_class->addInfoBoxLine(_AM_CONTACT_INDEX_ADMENU1, _AM_CONTACT_INDEX_NOREPLIES, $contactHandler->getCount($criteria)); // Display total number of messages -$admin_class->addInfoBoxLine(_AM_CONTACT_INDEX_ADMENU1, _AM_CONTACT_INDEX_TOTAL, $contact_handler->contactGetCount('contact_cid')); +$admin_class->addInfoBoxLine(_AM_CONTACT_INDEX_ADMENU1, _AM_CONTACT_INDEX_TOTAL, $contactHandler->contactGetCount('contact_cid')); // Display total number of replies $criteria = new CriteriaCompo(); $criteria->add(new Criteria('contact_cid', 0, '<>')); $criteria->add(new Criteria('contact_reply', 0)); -$admin_class->addInfoBoxLine(_AM_CONTACT_INDEX_ADMENU1, _AM_CONTACT_INDEX_REPLIES, $contact_handler->getCount($criteria)); +$admin_class->addInfoBoxLine(_AM_CONTACT_INDEX_ADMENU1, _AM_CONTACT_INDEX_REPLIES, $contactHandler->getCount($criteria)); $GLOBALS['xoopsTpl']->assign('navigation', $admin_class->addNavigation('index.php')); $GLOBALS['xoopsTpl']->assign('renderindex', $admin_class->renderIndex()); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -32,7 +32,7 @@ switch ($op) { case 'form': // log manager - $log_count = $contact_handler->getCount(); + $log_count = $contactHandler->getCount(); if ($log_count) { $form = new XoopsThemeForm(_AM_CONTACT_LOGS_FORM, 'logs', 'log.php', 'post', true); $column = new XoopsFormSelect(_AM_CONTACT_LOGS_COLUMN, 'column', 'contact_mail'); @@ -75,7 +75,7 @@ $valid_column = in_array(trim($column), array('contact_icq', 'contact_mail', 'contact_phone', 'contact_url')); $column = ($valid_column) ? trim($column) : 'contact_mail'; $timestamp = XoopsRequest::getString('timestamp', formatTimestamp(xoops_getUserTimestamp(time()), 's'), 'POST'); - $log = $contact_handler->contactLogs($column, $timestamp); + $log = $contactHandler->contactLogs($column, $timestamp); if (!$log) { $log = array(_AM_CONTACT_LOGS_NOTHING_HERE); } Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/menu.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/menu.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/menu.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -24,35 +24,33 @@ // defined("XOOPS_ROOT_PATH") || exit("Restricted access"); -$module_handler = xoops_gethandler('module'); -$module = $module_handler->getByDirname(basename(dirname(__DIR__))); -$pathIcon32 = '../../' . $module->getInfo('icons32'); +$moduleHandler = xoops_gethandler('module'); +$module = $moduleHandler->getByDirname(basename(dirname(__DIR__))); +$pathIcon32 = '../../' . $module->getInfo('icons32'); xoops_loadLanguage('modinfo', $module->dirname()); -$adminmenu = array(); +$adminmenu = array(array('title' => _MI_CONTACT_MENU_HOME, + 'link' => "admin/index.php", + 'desc' => _MI_CONTACT_MENU_HOME_DESC, + 'icon' => "{$pathIcon32}/home.png"), -$i = 1; -$adminmenu[$i]["title"] = _MI_CONTACT_MENU_HOME; -$adminmenu[$i]["link"] = "admin/index.php"; -$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_HOME_DESC; -$adminmenu[$i]["icon"] = "{$pathIcon32}/home.png"; -++$i; -$adminmenu[$i]["title"] = _MI_CONTACT_MENU_CONTACT; -$adminmenu[$i]["link"] = "admin/contact.php"; -$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_CONTACT_DESC; -$adminmenu[$i]["icon"] = "{$pathIcon32}/content.png"; -++$i; -$adminmenu[$i]["title"] = _MI_CONTACT_MENU_LOGS; -$adminmenu[$i]["link"] = "admin/log.php"; -$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_LOGS_DESC; -$adminmenu[$i]["icon"] = "{$pathIcon32}/exec.png"; -++$i; -$adminmenu[$i]["title"] = _MI_CONTACT_MENU_PRUNE; -$adminmenu[$i]["link"] = "admin/prune.php"; -$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_PRUNE_DESC; -$adminmenu[$i]["icon"] = "{$pathIcon32}/prune.png"; -++$i; -$adminmenu[$i]["title"] = _MI_CONTACT_MENU_ABOUT; -$adminmenu[$i]["link"] = "admin/about.php"; -$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_ABOUT_DESC; -$adminmenu[$i]["icon"] = "{$pathIcon32}/about.png"; + array('title' => _MI_CONTACT_MENU_CONTACT, + 'link' => "admin/contact.php", + 'desc' => _MI_CONTACT_MENU_CONTACT_DESC, + 'icon' => "{$pathIcon32}/content.png"), + + array('title' => _MI_CONTACT_MENU_LOGS, + 'link' => "admin/log.php", + 'desc' => _MI_CONTACT_MENU_LOGS_DESC, + 'icon' => "{$pathIcon32}/exec.png"), + + array('title' => _MI_CONTACT_MENU_PRUNE, + 'link' => "admin/prune.php", + 'desc' => _MI_CONTACT_MENU_PRUNE_DESC, + 'icon' => "{$pathIcon32}/prune.png"), + + array('title' => _MI_CONTACT_MENU_ABOUT, + 'link' => "admin/about.php", + 'desc' => _MI_CONTACT_MENU_ABOUT_DESC, + 'icon' => "{$pathIcon32}/about.png") +); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -35,7 +35,7 @@ default: // prune manager // check to see if there are any items in the dB - $contact_count = $contact_handler->getCount(); + $contact_count = $contactHandler->getCount(); if ($contact_count) { $form = new XoopsThemeForm(_AM_CONTACT_PRUNE_PRUNE, 'prune', 'prune.php', 'post', true); $form->addElement(new XoopsFormTextDateSelect(_AM_CONTACT_PRUNE_BEFORE, 'prune_date', 15, xoops_getUserTimestamp(time()))); @@ -90,9 +90,9 @@ $timeRequest = XoopsRequest::getString('prune_date', 0); $timestamp = ($timeRequest) ? strtotime($timeRequest) : xoops_getUserTimestamp(time()); $onlyreply = XoopsRequest::getBool('onlyreply', false, 'POST'); -// $timestamp = $contact_handler->contactCleanVars($_POST, 'prune_date', xoops_getUserTimestamp(time()), 'date'); -// $onlyreply = (bool) $contact_handler->contactCleanVars($_POST, 'onlyreply', 0, 'int'); - $count = (int) $contact_handler->deleteBeforeDate($timestamp, $onlyreply); +// $timestamp = $contactHandler->contactCleanVars($_POST, 'prune_date', xoops_getUserTimestamp(time()), 'date'); +// $onlyreply = (bool) $contactHandler->contactCleanVars($_POST, 'onlyreply', 0, 'int'); + $count = (int) $contactHandler->deleteBeforeDate($timestamp, $onlyreply); redirect_header('prune.php', 2, sprintf(_AM_CONTACT_MSG_PRUNE_DELETED, $count)); xoops_cp_footer(); exit (); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/ajax.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -25,13 +25,13 @@ if (!empty($_POST)) { // Info Processing - $mailFormContents = $contact_handler->infoProcessing('POST''); + $mailFormContents = $contactHandler->infoProcessing('POST'); $mailObj = (object) $mailFormContents; // Save info - $contactObj = $contact_handler->create(); + $contactObj = $contactHandler->create(); $contactObj->prepareToInsert($mailObj); // $contentObj->setVars($contact); - $contact_handler->insert($contactObj); + $contactHandler->insert($contactObj); // send mail can send message - $message = $contact_handler->contactSendMail($mailObj); + $message = $contactHandler->contactSendMail($mailObj); } Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/blocks/stats.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/blocks/stats.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/blocks/stats.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -39,38 +39,30 @@ */ function b_contact_stats_show($options) { - $dirname = basename(dirname(__DIR__)); + $moduleDirname = basename(dirname(__DIR__)); $block = array(); - $contact_handler =& xoops_getmodulehandler('contact', $dirname); + $contactHandler =& xoops_getmodulehandler('contact', $moduleDirname); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('contact_cid', 0)); $criteria->add(new Criteria('contact_type', 'Contact')); $criteria->setGroupby('contact_reply'); - $msgCountArray = $contact_handler->getCounts($criteria); + $msgCountArray = $contactHandler->getCounts($criteria); if ((is_array($msgCountArray) && count($msgCountArray) > 0)) { $block['noreplies'] = (isset($msgCountArray[0])) ? $msgCountArray[0] : 0; $block[ 'replies'] = (isset($msgCountArray[1])) ? $msgCountArray[1] : 0; $block[ 'total'] = $block['noreplies'] + $block['replies']; // if using departments show number of contacts per department - include_once $GLOBALS['xoops']->path( "modules/{$dirname}/include/functions.php"); -// include_once '../include/functions.php'; + include_once $GLOBALS['xoops']->path( "modules/{$moduleDirname}/include/functions.php"); $moduleMgr = contactGetModuleManager(); -/* - $module_handler =& xoops_gethandler('module'); - $module =& $module_handler->getByDirname($dirname); - $config_handler =& xoops_gethandler('config'); - $contactConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); - if ($contactConfig['form_dept']) { -*/ if ($moduleMgr->config['form_dept']) { $criteria = new CriteriaCompo(); $criteria->add(new Criteria('contact_cid', 0)); $criteria->add(new Criteria('contact_type', 'Contact')); $criteria->setGroupby('contact_department'); - $depts = $contact_handler->getCounts($criteria); + $depts = $contactHandler->getCounts($criteria); if ((is_array($depts) && count($depts) > 0)) { $block['depts'] = $depts; } Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt 2015-01-31 15:28:27 UTC (rev 12958) @@ -8,6 +8,7 @@ - Changed "Submitter" information in admin to be able to email from contact page - Improved ContactContact->contactSendMail() method to improve anti-spam score - Removed unnecessary exit() statement after redirect_header() calls +- minor code cleanup for PSRx naming nomenclature <u>Version 1.82 Beta 2 from 2014-12-03</u> - Replaced ContactContactHandler->contactCleanVars function with XoopsRequest Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/header.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -25,4 +25,4 @@ include $GLOBALS['xoops']->path('www/modules/contact/class/contact.php'); include_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); -$contact_handler =& xoops_getModuleHandler('contact', 'contact'); +$contactHandler =& xoops_getModuleHandler('contact', 'contact'); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/functions.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -27,9 +27,9 @@ * * Get an array of all department names and emails * - *@param bool $email_as_key true: use email as array key, false: don't + * @param bool $email_as_key true: use email as array key, false: don't * @uses MyTextSanitizer - * @uses xoops_gethandler + * @uses contactGetModuleManager * @uses checkEmail * @return array with 'name' and 'email' keys */ @@ -37,20 +37,10 @@ { $moduleMgr = contactGetModuleManager(); $departments = array(); -/* - //get the configs for this module - $module_handler =& xoops_gethandler('module'); - $config_handler =& xoops_gethandler('config'); - $contactModule =& $module_handler->getByDirname('contact'); - $contactConfig =& $config_handler->getConfigsByCat(0, $contactModule->getVar('mid')); - - if ($contactConfig['form_dept']) { // using departments -*/ if ($moduleMgr->config['form_dept']) { // using departments // show a drop down with the correct departments listed $myts =& MyTextSanitizer::getInstance(); $depts = $moduleMgr->config['contact_dept']; -// $depts = explode('|', $contactConfig['contact_dept']); foreach ($depts as $thisDept) { list($name, $email) = explode(',', $thisDept, 2); //split the name and email if (checkEmail($email)) { @@ -80,15 +70,6 @@ { $moduleMgr = contactGetModuleManager(); $dept_emails = array(); -/* - //get the configs for this module - $module_handler =& xoops_gethandler('module'); - $config_handler =& xoops_gethandler('config'); - $contactModule =& $module_handler->getByDirname('contact'); - $contactConfig =& $config_handler->getConfigsByCat(0, $contactModule->getVar('mid')); - - if ($contactConfig['form_dept']) { // using departments -*/ if ($moduleMgr->config['form_dept']) { // using departments $departments = contactGetDepartments(); $dept_emails = array(); @@ -112,15 +93,6 @@ { $moduleMgr = contactGetModuleManager(); $dept_names = array(); -/* - //get the configs for this module - $module_handler =& xoops_gethandler('module'); - $config_handler =& xoops_gethandler('config'); - $contactModule =& $module_handler->getByDirname('contact'); - $contactConfig =& $config_handler->getConfigsByCat(0, $contactModule->getVar('mid')); - - if ($contactConfig['form_dept']) { // using departments -*/ if ($moduleMgr->config['form_dept']) { $departments = contactGetDepartments(); $dept_names = array(); @@ -135,24 +107,26 @@ * * Get the Module handlers & configs * - * @return array module_handler, config_handler, module, config + * @return array moduleHandler, configHandler, module, config * @see XoopsModule * @see XoopsConfigHandler * @see XoopsModuleHandler + * @uses xoops_gethandler * * @return object moduleMgr {@see stdClass} - * with module_handler, config_handler, module, moduleConfigs properties + * with moduleHandler, configHandler, module, moduleConfigs properties */ function contactGetModuleManager() { static $moduleMgr; if (!isset($moduleMgr)) { + $moduleDirname = basename(dirname(__DIR__)); + $moduleMgr = new stdClass(); - $moduleMgr->module_handler =& xoops_gethandler('module'); - $moduleMgr->config_handler =& xoops_gethandler('config'); - $moduleMgr->module =& $moduleMgr->module_handler->getByDirname('contact'); - $moduleMgr->config =& $moduleMgr->config_handler->getConfigsByCat(0, $moduleMgr->module->getVar('mid')); - + $moduleMgr->moduleHandler =& xoops_gethandler('module'); + $moduleMgr->configHandler =& xoops_gethandler('config'); + $moduleMgr->module =& $moduleMgr->moduleHandler->getByDirname($moduleDirname); + $moduleMgr->config =& $moduleMgr->configHandler->getConfigsByCat(0, $moduleMgr->module->getVar('mid')); } return $moduleMgr; Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/waiting.plugin.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/waiting.plugin.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/include/waiting.plugin.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -25,21 +25,22 @@ { // $contactDB =& XoopsDatabaseFactory::getDatabaseConnection(); + $moduleDirname = basename(dirname(__DIR__)); + $block = array(); + $moduleHandler =& xoops_gethandler('module'); + $contactModule =& $moduleHandler->getByDirname($moduleDirname); +// $configHandler =& xoops_gethandler('config'); +// $contactModuleConfigs =& $configHandler->getConfigsByCat(0, $contactModule->getVar('mid')); - $module_handler =&xoops_gethandler('module'); - $contactModule =&$module_handler->getByDirname('contact'); - $config_handler =& xoops_gethandler('config'); - $contactModuleConfigs =& $config_handler->getConfigsByCat(0, $contactModule->getVar('mid')); - //check to see if module is active, return if not... if ($contactModule->isactive()) { // setup the contact messages - $contact_handler = & xoops_getModuleHandler('contact', $contactModule->dirname()); + $contactHandler = & xoops_getModuleHandler('contact', $contactModule->dirname()); $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('contact_cid', 0, '=')); //don't include replies + $criteria->add(new Criteria('contact_cid', 0, '=')); //don't include replies $criteria->add(new Criteria('contact_reply', 0, '=')); // only include messages that haven't had a reply - $messageCount = $contact_handler->getCount($criteria); + $messageCount = $contactHandler->getCount($criteria); if ($messageCount) { $block = array('adminlink' => $GLOBALS['xoops']->url("www/modules/" . $contactModule->dirname() . "/admin/contact.php"), 'pendingnum' => $messageCount, Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php 2015-01-30 22:30:05 UTC (rev 12957) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php 2015-01-31 15:28:27 UTC (rev 12958) @@ -30,8 +30,8 @@ $op = XoopsRequest::getCmd('op', 'form', 'POST'); $department = XoopsRequest::getString('contact_department', '', 'GET'); -//$op = $contact_handler->contactCleanVars($_POST, 'op', 'form', 'string'); -//$department = $contact_handler->contactCleanVars($_GET, 'contact_department', '', 'string'); +//$op = $contactHandler->contactCleanVars($_POST, 'op', 'form', 'string'); +//$department = $contactHandler->contactCleanVars($_GET, 'contact_department', '', 'string'); switch ($op) { case 'save': @@ -67,14 +67,14 @@ // check email $input_mail = XoopsRequest::getString('contact_mail', '', 'POST'); $contact_mail = checkEmail($input_mail); -// $contact_mail = $contact_handler->contactCleanVars($_POST, 'contact_mail', '', 'mail'); +// $contact_mail = $contactHandler->contactCleanVars($_POST, 'contact_mail', '', 'mail'); if (empty($contact_mail)) { redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_NOVALIDEMAIL); // redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_NOVALIDEMAIL); } elseif (!$GLOBALS['xoopsUser'] && $GLOBALS['xoopsModuleConfig']['form_req_email2']) { $input_mail2 = XoopsRequest::getString('contact_mail2', '', 'POST'); $contact_mail2 = checkEmail($input_mail2); -// $contact_mail2 = $contact_handler->contactCleanVars($_POST, 'contact_mail2', '', 'mail'); +// $contact_mail2 = $contactHandler->contactCleanVars($_POST, 'contact_mail2', '', 'mail'); if (empty($contact_mail2)) { redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_NOVALIDEMAIL2); // redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_NOVALIDEMAIL); @@ -85,20 +85,20 @@ } // Info Processing - $mailFormResults = $contact_handler->infoProcessing('POST'); + $mailFormResults = $contactHandler->infoProcessing('POST'); $mailObj = (object) $mailFormResults; // insert in DB if ($saveinfo = true) { - $contactObj = $contact_handler->create(); + $contactObj = $contactHandler->create(); $contactObj->prepareToInsert($mailObj); - if (!$contact_handler->insert($contactObj)) { + if (!$contactHandler->insert($contactObj)) { redirect_header('index.php', 3, _MD_CONTACT_MES_NOTSAVE); } } // send mail can send message if ($sendmail = true) { - $message = $contact_handler->contactSendMail($mailObj); + $message = $contactHandler->contactSendMail($mailObj); } elseif ($saveinfo = true) { $message = _MD_CONTACT_MES_SAVEINDB; } else { @@ -112,7 +112,7 @@ case 'form'; default: - $contactObj = $contact_handler->create(); + $contactObj = $contactHandler->create(); $form = $contactObj->contactForm(); $GLOBALS['xoopsTpl']->assign(array('form' => $form->render(), 'breadcrumb' => '<a href="' . $GLOBALS['xoops']->url('www') . '">' . _YOURHOME . '</a> » ' . $GLOBALS['xoopsModule']->name(), |
From: <zy...@us...> - 2015-01-30 22:30:07
|
Revision: 12957 http://sourceforge.net/p/xoops/svn/12957 Author: zyspec Date: 2015-01-30 22:30:05 +0000 (Fri, 30 Jan 2015) Log Message: ----------- removed unnecessary exit() statement after redirect_header() calls Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php 2015-01-30 20:58:24 UTC (rev 12956) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/contact.php 2015-01-30 22:30:05 UTC (rev 12957) @@ -106,7 +106,6 @@ // verfiy we're sending to a valid email if ((!$mailObj->contact_mail || !(checkEmail($mailObj->contact_mail))) && !$GLOBALS['xoopsModuleConfig']['form_dept']) { redirect_header($_SERVER['PHP_SELF'], 3, _MD_CONTACT_MES_NOVALIDEMAIL); - exit(); } // verify valid message body @@ -118,7 +117,6 @@ $contactObj->prepareToInsert($mailObj); if (!$contact_handler->insert($contactObj)) { redirect_header($_SERVER['PHP_SELF'], 3, _AM_CONTACT_MSG_NOTSAVED); - exit(); } $contact_handler->contactAddReply($contactObj->getVar('contact_cid')); } else { @@ -168,7 +166,6 @@ case 'delete': if (!$contactId) { redirect_header($_SERVER['PHP_SELF'], 3, _AM_CONTACT_MSG_NOTEXIST); - exit(); } // Prompt message xoops_confirm(array('id' => $contactId, 'op' => 'dodelete'), $_SERVER['PHP_SELF'], _AM_CONTACT_MSG_DELETE); @@ -181,7 +178,6 @@ if ( !$GLOBALS['xoopsSecurity']->check() ) { // failed xoops security check redirect_header('index.php', 3, $GLOBALS['xoopsSecurity']->getErrors(true)); - exit(); } } else { redirect_header('index.php', 3, _MD_CONTACT_INVALID_SECURITY_TOKEN); @@ -196,8 +192,6 @@ $msg = (!$contact_handler->deleteAll($criteria)) ? _AM_CONTACT_MSG_DELETEERROR : _AM_CONTACT_MSG_DELETED; } redirect_header($_SERVER['PHP_SELF'], 3, $msg); -// xoops_cp_footer(); - exit(); break; } Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php 2015-01-30 20:58:24 UTC (rev 12956) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/log.php 2015-01-30 22:30:05 UTC (rev 12957) @@ -66,7 +66,6 @@ if ( !$GLOBALS['xoopsSecurity']->check() ) { // failed xoops security check redirect_header('index.php', 3, $GLOBALS['xoopsSecurity']->getErrors(true)); - exit(); } } else { xoops_loadLanguage('main', 'contact'); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php 2015-01-30 20:58:24 UTC (rev 12956) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/admin/prune.php 2015-01-30 22:30:05 UTC (rev 12957) @@ -58,7 +58,6 @@ if (!$GLOBALS['xoopsSecurity']->check()) { // failed xoops security check redirect_header('index.php', 3, $GLOBALS['xoopsSecurity']->getErrors(true)); - exit(); } } else { xoops_loadLanguage('main', 'contact'); @@ -82,7 +81,6 @@ if (!$GLOBALS['xoopsSecurity']->check()) { // failed xoops security check redirect_header('index.php', 3, $GLOBALS['xoopsSecurity']->getErrors(true)); - exit(); } } else { xoops_loadLanguage('main', 'contact'); Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt 2015-01-30 20:58:24 UTC (rev 12956) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/docs/changelog.txt 2015-01-30 22:30:05 UTC (rev 12957) @@ -1,12 +1,13 @@ <u>Version 1.82 Beta 3 from 2015-1-28</u> - Improved module update script to add some error reporting on failure(s) - Fixed bug in subdirectory removal script on update -- added KEY(s) to dB table to improve search performance -- changed ContactContactHandler->infoProcessing() to use XoopsRequest -- sort departments alphabetically when displayed on contact form +- Added KEY(s) to dB table to improve search performance +- Changed ContactContactHandler->infoProcessing() to use XoopsRequest +- Sort departments alphabetically when displayed on contact form - Replaced "Reply" text in admin (./admin/contact.php) with icons - Changed "Submitter" information in admin to be able to email from contact page - Improved ContactContact->contactSendMail() method to improve anti-spam score +- Removed unnecessary exit() statement after redirect_header() calls <u>Version 1.82 Beta 2 from 2014-12-03</u> - Replaced ContactContactHandler->contactCleanVars function with XoopsRequest Modified: XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php 2015-01-30 20:58:24 UTC (rev 12956) +++ XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/contact/index.php 2015-01-30 22:30:05 UTC (rev 12957) @@ -37,14 +37,12 @@ case 'save': if (empty($_POST['submit']) ) { redirect_header($GLOBALS['xoops']->url('www'), 3, _MD_CONTACT_MES_ERROR); - exit(); } else { // check to make sure this passes form submission security if ( ($GLOBALS['xoopsSecurity'] instanceof XoopsSecurity) ) { if ( !$GLOBALS['xoopsSecurity']->check() ) { // failed xoops security check redirect_header('index.php', 2, $GLOBALS['xoopsSecurity']->getErrors(true)); - exit(); } } else { redirect_header('index.php', 3, _MD_CONTACT_INVALID_SECURITY_TOKEN); @@ -62,8 +60,6 @@ if (!$xoopsCaptcha->verify()) { $err[] = $xoopsCaptcha->getMessage(); redirect_header("index.php", 2, $xoopsCaptcha->getMessage()); - - exit(); } } } @@ -75,7 +71,6 @@ if (empty($contact_mail)) { redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_NOVALIDEMAIL); // redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_NOVALIDEMAIL); - exit(); } elseif (!$GLOBALS['xoopsUser'] && $GLOBALS['xoopsModuleConfig']['form_req_email2']) { $input_mail2 = XoopsRequest::getString('contact_mail2', '', 'POST'); $contact_mail2 = checkEmail($input_mail2); @@ -83,11 +78,9 @@ if (empty($contact_mail2)) { redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_NOVALIDEMAIL2); // redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_NOVALIDEMAIL); - exit(); } elseif (($contact_mail != $contact_mail2)) { redirect_header($_SERVER['PHP_SELF'], 2, _MD_CONTACT_MES_EMAILMATCHFAILURE); // redirect_header("javascript:history.go(-1)", 2, _MD_CONTACT_MES_EMAILMATCHFAILURE); - exit(); } } @@ -100,7 +93,6 @@ $contactObj->prepareToInsert($mailObj); if (!$contact_handler->insert($contactObj)) { redirect_header('index.php', 3, _MD_CONTACT_MES_NOTSAVE); - exit(); } } @@ -114,7 +106,6 @@ } redirect_header($GLOBALS['xoops']->url('www'), 3, $message); - exit(); } break; |
From: <be...@us...> - 2015-01-30 08:53:01
|
Revision: 12955 http://sourceforge.net/p/xoops/svn/12955 Author: beckmi Date: 2015-01-30 08:53:00 +0000 (Fri, 30 Jan 2015) Log Message: ----------- Branching Zyspec's modules Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/branches/mamba/ |
From: <zy...@us...> - 2015-01-29 06:11:55
|
Revision: 12954 http://sourceforge.net/p/xoops/svn/12954 Author: zyspec Date: 2015-01-29 06:11:53 +0000 (Thu, 29 Jan 2015) Log Message: ----------- -create copy of trunk for new branch Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/branches/zyspec/xsitemap/ |
From: <zy...@us...> - 2015-01-29 06:01:20
|
Revision: 12953 http://sourceforge.net/p/xoops/svn/12953 Author: zyspec Date: 2015-01-29 06:01:11 +0000 (Thu, 29 Jan 2015) Log Message: ----------- - added breadcrumb display to top of index page - improved index.tpl rendering - changed to allow HTML in quote entry (XoopsRequest::getText) in admin - moved some hard coded language strings from templates to language files - fixed typo in block text length calculation - fixed bug where 'item_tag' wasn't correctly assigned to template in /class/quotes.php - fixed bug in install script PHP version checking - fixed bug where language file wasn't being loaded in install script Modified Paths: -------------- XoopsModules/randomquote/branches/zyspec/randomquote/admin/main.php XoopsModules/randomquote/branches/zyspec/randomquote/blocks/views.php XoopsModules/randomquote/branches/zyspec/randomquote/class/quotes.php XoopsModules/randomquote/branches/zyspec/randomquote/docs/changelog.txt XoopsModules/randomquote/branches/zyspec/randomquote/include/action.module.php XoopsModules/randomquote/branches/zyspec/randomquote/index.php XoopsModules/randomquote/branches/zyspec/randomquote/language/english/main.php XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_header.tpl XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_index.tpl XoopsModules/randomquote/branches/zyspec/randomquote/xoops_version.php Modified: XoopsModules/randomquote/branches/zyspec/randomquote/admin/main.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/admin/main.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/admin/main.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -114,11 +114,11 @@ $input = new stdClass; // setup input array $input->id = XoopsRequest::getInt('id', RandomquoteConstants::DEFAULT_ID, 'POST'); - $input->quote = XoopsRequest::getString('quote', '', 'POST'); - $input->author = XoopsRequest::getString('author', '', 'POST'); + $input->quote = XoopsRequest::getText('quote', '', 'POST'); + $input->author = XoopsRequest::getText('author', '', 'POST'); $input->item_tag = XoopsRequest::getString('item_tag', '', 'POST'); - $verify_quote_status = XoopsRequest::getInt('quote_status', RandomquoteConstants::STATUS_OFFLINE, 'POST'); + $verify_quote_status = XoopsRequest::getInt('quote_status', RandomquoteConstants::STATUS_OFFLINE, 'POST'); $input->quote_status = (in_array($verify_quote_status, array(RandomquoteConstants::STATUS_ONLINE, RandomquoteConstants::STATUS_OFFLINE, RandomquoteConstants::STATUS_WAITING))) ? $verify_quote_status : RandomquoteConstants::STATUS_OFFLINE; if (!empty($input->id)) { Modified: XoopsModules/randomquote/branches/zyspec/randomquote/blocks/views.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/blocks/views.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/blocks/views.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -44,14 +44,12 @@ */ function showRandomquoteBlockViews($options) { -// xoops_load('quotes', 'randomquote'); - xoops_load('constants', 'randomquote'); +// xoops_load('constants', 'randomquote'); - $citas = array(); - $type_block = $options[0]; - $nb_quotes = $options[1]; - $length_title = $options[2]; - + $citas = array(); + $type_block = $options[0]; + $nb_quotes = (int) $options[1]; + $length_title = (int) $options[2]; $quotesHandler =& xoops_getmodulehandler('quotes', 'randomquote'); $criteria = new CriteriaCompo(); @@ -83,10 +81,10 @@ } $quoteObjsArray = $quotesHandler->getAll($criteria); foreach ($quoteObjsArray as $thisQuote) { - if ($options[2] > 0) { - $short_quote = xoops_substr($thisQuote->getVar('quote'), 0, $options[2], $trimmarker = '...'); + if ($length_title > 0) { + $short_quote = xoops_substr($thisQuote->getVar('quote'), 0, $length_title, $trimmarker = '...'); } else { - $shotr_quote = $thisQuote->getVar('quote'); + $short_quote = $thisQuote->getVar('quote'); } $citas[] = array('quote' => $short_quote, 'author' => $thisQuote->getVar('author') @@ -106,8 +104,8 @@ $quotes_arr = array(); $form = "" . _MB_RANDOMQUOTE_QUOTES_DISPLAY . "\n" . "<input type='hidden' name='options[0]' value='" . $options[0] . "' />\n" - . "<input name='options[1]' size='5' maxlength='255' value='" . $options[1] . "' type='text' /> <br />\n" - . "" . _MB_RANDOMQUOTE_QUOTES_SHORTEN . " <input name='options[2]' size='5' maxlength='255' value='" . $options[2] . "' type='number' min='0' /> " . _MB_RANDOMQUOTE_QUOTES_CHARACTERS . "<br /><br />"; + . "<input name='options[1]' size='3' maxlength='4' value='" . $options[1] . "' type='text' /> <br />\n" + . "" . _MB_RANDOMQUOTE_QUOTES_SHORTEN . " <input name='options[2]' size='3' maxlength='5' value='" . $options[2] . "' type='number' min='0' step='5' /> " . _MB_RANDOMQUOTE_QUOTES_CHARACTERS . "<br /><br />"; /* array_shift($options); array_shift($options); Modified: XoopsModules/randomquote/branches/zyspec/randomquote/class/quotes.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/class/quotes.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/class/quotes.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -85,8 +85,8 @@ $editorConfigs = array("name" => "quote", "value" => $this->getVar("quote", "e"), - "rows" => 10, - "cols" => 80, + "rows" => 8, + "cols" => 50, "width" => "100%", "height" => "400px", "editor" => $GLOBALS["xoopsModuleConfig"]["randomquote_editor"] @@ -115,7 +115,7 @@ $form->addElement(new TagFormTag('item_tag', 60, 255, $tag_string, 0)); } } else { - $form->XoopsFormHidden('item_tag', ''); + $form->addElement(new XoopsFormHidden('item_tag', '')); } $quote_status = ($this->isNew()) ? RandomquoteConstants::STATUS_OFFLINE : $this->getVar("quote_status"); Modified: XoopsModules/randomquote/branches/zyspec/randomquote/docs/changelog.txt =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/docs/changelog.txt 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/docs/changelog.txt 2015-01-29 06:01:11 UTC (rev 12953) @@ -1,20 +1,28 @@ -Version 2.1 Beta 1 from 2014-12-08 -================================= -- Require PHP 5.3 -- Require XOOPS 2.5.7+ -- Significant security improvements for all vars passed from forms -- Replaced cleanVarsRandomquote with XoopsRequest +<u>Version 2.1 Beta 2 from 2015-1-28</u> +- added breadcrumb display to top of index page +- improved index.tpl rendering +- changed to allow HTML in quote entry (XoopsRequest::getText) in admin +- moved some hard coded language strings from templates to language files +- fixed typo in block text length calculation +- fixed bug where 'item_tag' wasn't correctly assigned to template in /class/quotes.php +- fixed bug in install script PHP version checking +- fixed bug where language file wasn't being loaded in install script + +<u>Version 2.1 Beta 1 from 2014-12-08</u> +- require PHP 5.3 +- require XOOPS 2.5.7+ +- significant security improvements for all vars passed from forms +- replaced cleanVarsRandomquote with XoopsRequest - removed need for ./include/config.php - fixed typo in ./docs/licencs file name to license.txt -- Clean up phpdocumentor comments -- General code cleanup +- clean up phpdocumentor comments +- general code cleanup - added module search capability - added support for XOOPS Tag module - added date quote was created to database - removed "day" block - can be accomplished setting quote cache -Version 2.00 from 2013-06-27 -================================= - - Original release RandomQuote 2.0 Alpha 1. +<u>Version 2.00 from 2013-06-27</u> + - original release RandomQuote 2.0 Alpha 1. This module is developed from scratch using TDMCreate, but it's inspired by the original code from RandomQuote Modified: XoopsModules/randomquote/branches/zyspec/randomquote/include/action.module.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/include/action.module.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/include/action.module.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -53,6 +53,7 @@ * @return bool true if meets requirements, false if not */ function randomquoteCheckXoopsVer(&$module) { + xoops_loadLanguage('admin', $module->dirname()); //check for minimum XOOPS version $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string $currArray = explode('.', $currentVer); @@ -90,14 +91,15 @@ * @return bool true if meets requirements, false if not */ function randomquoteCheckPHPVer(&$module) { + xoops_loadLanguage('admin', $module->dirname()); // check for minimum PHP version - $phpLen = strlen(PHP_VERSION); - $extraLen = strlen(PHP_EXTRA_VERSION); - $verNum = substr(PHP_VERSION, 0, ($phpLen-$extraLen)); - $reqVer = $module->getInfo('min_php'); + $phpLen = strlen(PHP_VERSION); + $extraLen = strlen(PHP_EXTRA_VERSION); + $verNum = trim(substr(PHP_VERSION, 0, ($phpLen-$extraLen))); + $reqVer = trim($module->getInfo('min_php') . ""); //make sure it's a string and then trim it - $success = true; - if ($verNum < $reqVer) { + $success = true; + if ($verNum >= $reqVer) { $module->setErrors(sprintf(_AM_RANDOMQUOTE_ERROR_BAD_PHP, $reqVer, $verNum)); $success = false; } @@ -190,6 +192,7 @@ function xoops_module_uninstall_randomquote(&$module) { + $success = true; return $success; } Modified: XoopsModules/randomquote/branches/zyspec/randomquote/index.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/index.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/index.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -39,7 +39,8 @@ 'fbcomments' => $GLOBALS['xoopsModuleConfig']['fbcomments'], 'admin' => $GLOBALS['xoops']->url("www/modules/randomquote/admin/index.php"), 'copyright' => "<a href='http://xoops.org' title='XOOPS Project' target='_blank'> - <img src='" . $GLOBALS['xoops']->url("www/modules/randomquote/assets/images/randomquote_logo.png") . "' alt='XOOPS Project' /></a>" + <img src='" . $GLOBALS['xoops']->url("www/modules/randomquote/assets/images/randomquote_logo.png") . "' alt='XOOPS Project' /></a>", + 'breadcrumb' => '<a href="' . $GLOBALS['xoops']->url('www') . '">' . _YOURHOME . '</a> » ' . $GLOBALS['xoopsModule']->name(), ) ); @@ -77,7 +78,7 @@ . " <td class='txtcenter'>" . $thisQuote->getVar("author") . "</td>\n" . " </tr>\n"; $GLOBALS['xoopsTpl']->append('sets', array('quote' => $thisQuote->getVar("quote"), - 'author' => $thisQuote->getVar("author")) + 'author' => $thisQuote->getVar("author")) ); // } } Modified: XoopsModules/randomquote/branches/zyspec/randomquote/language/english/main.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/language/english/main.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/language/english/main.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -23,8 +23,9 @@ // Main define('_MA_RANDOMQUOTE_INDEX', "Home"); -define('_MA_RANDOMQUOTE_TITLE', "randomquote"); +define('_MA_RANDOMQUOTE_TITLE', "Random Quote Module"); define('_MA_RANDOMQUOTE_DESC', "This module is for collecting and showing Random Quotes"); +define('_MA_RANDOMQUOTE_NO_QUOTES', "There are no quotes that match your request."); define('_MA_RANDOMQUOTE_QUOTES', "Quotes"); //define('_MA_RANDOMQUOTE_QUOTES', "quotes"); define('_MA_RANDOMQUOTE_ADMIN', "Admin"); Modified: XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_header.tpl =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_header.tpl 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_header.tpl 2015-01-29 06:01:11 UTC (rev 12953) @@ -1,5 +1,5 @@ -<span class='txtleft bold'><{$smarty.const._MA_RANDOMQUOTE_TITLE}>: </span> -<span class='txtleft'><{$smarty.const._MA_RANDOMQUOTE_DESC}></span><br/> -<{if $adv != ''}> +<div class="breadcrumb"><{$breadcrumb}></div> +<div class='txtleft marg5'><strong></b><{$smarty.const._MA_RANDOMQUOTE_TITLE}>:</strong> <{$smarty.const._MA_RANDOMQUOTE_DESC}></div> +<{if '' != $adv}> <div class="center"><{$adv}></div> <{/if}> Modified: XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_index.tpl =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_index.tpl 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/templates/randomquote_index.tpl 2015-01-29 06:01:11 UTC (rev 12953) @@ -1,8 +1,8 @@ -<{include file="db:randomquote_header.tpl"}> +<{include file="db:randomquote_header.tpl" breadcrumb = $breadcrumb}> <{* <link rel="stylesheet" href="assets/css/table.css" type="text/css"/> *}> <{* <div class="outer"> - <div class="center">Randomquote</div> + <div class="center"><{$smarty.const._MA_RANDOMQUOTE_TITLE}></div> <br /> </div> *}> @@ -11,6 +11,7 @@ <{if !empty($sets)}> <div class="head border marg10"> <div class="outer"> +<{* <div class="breadcrumb"><{$breadcrumb}></div> *}> <div class="width80 floatleft center bold big"><{$smarty.const._MA_RANDOMQUOTE_QUOTES_QUOTE}></div> <div class="width10 floatleft center bold big"><{$smarty.const._MA_RANDOMQUOTE_QUOTES_AUTHOR}></div> <div class="clear"></div> @@ -25,9 +26,7 @@ <{* $pagenav *}> </div> <{else}> -<div class='txtcenter bold italic marg3'> - There are no quotes that match your request. -</div> +<div class='txtcenter bold italic marg3'><{$smarty.const._MA_RANDOMQUOTE_NO_QUOTES}></div> <{/if}> <{include file="db:randomquote_footer.tpl"}> Modified: XoopsModules/randomquote/branches/zyspec/randomquote/xoops_version.php =================================================================== --- XoopsModules/randomquote/branches/zyspec/randomquote/xoops_version.php 2015-01-28 21:33:49 UTC (rev 12952) +++ XoopsModules/randomquote/branches/zyspec/randomquote/xoops_version.php 2015-01-29 06:01:11 UTC (rev 12953) @@ -32,7 +32,7 @@ 'version' => 2.10, 'module_status' => "Beta 1", 'official' => 0, //1 if supported by XOOPS CORE Dev Team, 0 otherwise - 'release_date' => "2014/12/06", + 'release_date' => "2015/1/28", 'author' => "XOOPS Module Development Team", 'author_mail' => "na...@si...", 'author_website_url' => "http://xoops.org", |
From: <txm...@us...> - 2015-01-28 21:33:58
|
Revision: 12952 http://sourceforge.net/p/xoops/svn/12952 Author: txmodxoops Date: 2015-01-28 21:33:49 +0000 (Wed, 28 Jan 2015) Log Message: ----------- Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/bootstrap/css/bootstrap-theme.min.css Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/bootstrap/css/bootstrap-theme.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/bootstrap/css/bootstrap-theme.min.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/bootstrap/css/bootstrap-theme.min.css 2015-01-28 21:33:49 UTC (rev 12952) @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file |