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: <txm...@us...> - 2015-02-19 09:38:01
|
Revision: 13002 http://sourceforge.net/p/xoops/svn/13002 Author: txmodxoops Date: 2015-02-19 09:37:52 +0000 (Thu, 19 Feb 2015) Log Message: ----------- Updated form elements to bootstrap 3 Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formselect.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formpassword.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtext.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextarea.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/grouppermform.php Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formdhtmltextarea.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formdhtmltextarea.php 2015-02-18 23:25:57 UTC (rev 13001) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formdhtmltextarea.php 2015-02-19 09:37:52 UTC (rev 13002) @@ -152,7 +152,7 @@ $ret .= "<input type='button' class='btn btn-info' 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"; + $ret .= "<textarea id='" . $this->getName() . "' name='" . $this->getName() . "' class=\"form-control\" 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'])) { @@ -214,20 +214,20 @@ $textarea_id = $this->getName(); $hiddentext = $this->_hiddenText; - $fontStr = "<script type=\"text/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>'"; + $fontStr = "<script type=\"text/javascript\">" . "var _editor_dialog = ''" . "+ '<select class=\"form-control\" 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>'"; + $fontStr .= "+ '<select class=\"form-control\" 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'); + $fontStr .= "+ '<select class=\"form-control\" 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 ++) { Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formpassword.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formpassword.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formpassword.php 2015-02-19 09:37:52 UTC (rev 13002) @@ -0,0 +1,132 @@ +<?php +/** + * Password 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/ + * @author Taiwen Jiang <ph...@us...> + * @version $Id: formpassword.php 12537 2014-05-19 14:19:33Z beckmi $ + */ +defined('XOOPS_ROOT_PATH') || die('Restricted access'); + +/** + * Password Field + */ +class XoopsFormPassword extends XoopsFormElement +{ + /** + * Size of the field. + * + * @var int + * @access private + */ + var $_size; + + /** + * Maximum length of the text + * + * @var int + * @access private + */ + var $_maxlength; + + /** + * Initial content of the field. + * + * @var string + * @access private + */ + var $_value; + + /** + * Cache password with browser. Disabled by default for security consideration + * Added in 2.3.1 + * + * @var boolean + * @access public + */ + var $autoComplete = false; + + /** + * Constructor + * + * @param string $caption Caption + * @param string $name "name" attribute + * @param int $size Size of the field + * @param int $maxlength Maximum length of the text + * @param string $value Initial value of the field. + * <strong>Warning:</strong> this is readable in cleartext in the page's source! + * @param bool $autoComplete To enable autoComplete or browser cache + */ + function XoopsFormPassword($caption, $name, $size, $maxlength, $value = '', $autoComplete = false) + { + $this->setCaption($caption); + $this->setName($name); + $this->_size = intval($size); + $this->_maxlength = intval($maxlength); + $this->setValue($value); + $this->autoComplete = ! empty($autoComplete); + } + + /** + * Get the field size + * + * @return int + */ + function getSize() + { + return $this->_size; + } + + /** + * Get the max length + * + * @return int + */ + function getMaxlength() + { + return $this->_maxlength; + } + + /** + * Get the "value" attribute + * + * @param bool $encode To sanitizer the text? + * @return string + */ + function getValue($encode = false) + { + return $encode ? htmlspecialchars($this->_value, ENT_QUOTES) : $this->_value; + } + + /** + * Set the initial value + * + * @patam $value string + */ + function setValue($value) + { + $this->_value = $value; + } + + /** + * Prepare HTML for output + * + * @return string HTML + */ + function render() + { + return '<input type="password" name="' . $this->getName() . '" id="' . $this->getName() . '" class="form-control" size="' . $this->getSize() . '" maxlength="' . $this->getMaxlength() . '" value="' . $this->getValue() . '"' . $this->getExtra() . ' ' . ($this->autoComplete ? '' : 'autocomplete="off" ') . '/>'; + } +} Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formselect.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formselect.php 2015-02-18 23:25:57 UTC (rev 13001) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formselect.php 2015-02-19 09:37:52 UTC (rev 13002) @@ -204,7 +204,7 @@ $ele_title = $this->getTitle(); $ele_value = $this->getValue(); $ele_options = $this->getOptions(); - $ret = '<select size="' . $this->getSize() . '"' . $this->getExtra(); + $ret = '<select class="form-control" size="' . $this->getSize() . '"' . $this->getExtra(); if ($this->isMultiple() != false) { $ret .= ' multiple name="' . $ele_name . '[]" id="' . $ele_name . '" title="'. $ele_title. '">'; } else { Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtext.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtext.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtext.php 2015-02-19 09:37:52 UTC (rev 13002) @@ -0,0 +1,120 @@ +<?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: formtext.php 12537 2014-05-19 14:19:33Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') || die('Restricted access'); + +/** + * A simple text field + */ +class XoopsFormText extends XoopsFormElement +{ + /** + * Size + * + * @var int + * @access private + */ + var $_size; + + /** + * Maximum length of the text + * + * @var int + * @access private + */ + var $_maxlength; + + /** + * Initial text + * + * @var string + * @access private + */ + var $_value; + + /** + * Constructor + * + * @param string $caption Caption + * @param string $name "name" attribute + * @param int $size Size + * @param int $maxlength Maximum length of text + * @param string $value Initial text + */ + function XoopsFormText($caption, $name, $size, $maxlength, $value = '') + { + $this->setCaption($caption); + $this->setName($name); + $this->_size = intval($size); + $this->_maxlength = intval($maxlength); + $this->setValue($value); + } + + /** + * Get size + * + * @return int + */ + function getSize() + { + return $this->_size; + } + + /** + * Get maximum text length + * + * @return int + */ + function getMaxlength() + { + return $this->_maxlength; + } + + /** + * Get initial content + * + * @param bool $encode To sanitizer the text? Default value should be "true"; however we have to set "false" for backward compatibility + * @return string + */ + function getValue($encode = false) + { + return $encode ? htmlspecialchars($this->_value, ENT_QUOTES) : $this->_value; + } + + /** + * Set initial text value + * + * @param $value string + */ + function setValue($value) + { + $this->_value = $value; + } + + /** + * Prepare HTML for output + * + * @return string HTML + */ + function render() + { + return "<input type='text' name='" . $this->getName() . "' class='form-control' title='" . $this->getTitle() . "' id='" . $this->getName() . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "'" . $this->getExtra() . " />"; + } +} \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextarea.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextarea.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextarea.php 2015-02-19 09:37:52 UTC (rev 13002) @@ -0,0 +1,122 @@ +<?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 12537 2014-05-19 14:19:33Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') || 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 compatibility + * @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() . "' class=\"form-control\" title='" . $this->getTitle() . "' rows='" . $this->getRows() . "' cols='" . $this->getCols() . "'" . $this->getExtra() . ">" . $this->getValue() . "</textarea>"; + } +} Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/grouppermform.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/grouppermform.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/grouppermform.php 2015-02-19 09:37:52 UTC (rev 13002) @@ -0,0 +1,320 @@ +<?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 + * @version $Id: grouppermform.php 12537 2014-05-19 14:19:33Z beckmi $ + */ + +defined('XOOPS_ROOT_PATH') || die('Restricted access'); + +xoops_load('XoopsFormElement'); +xoops_load('XoopsFormHidden'); +xoops_load('XoopsFormHiddenToken'); +xoops_load('XoopsForm'); +xoops_load('XoopsFormElementTray'); +xoops_load('XoopsFormButton'); + +/** + * Renders a form for setting module specific group permissions + */ +class XoopsGroupPermForm extends XoopsForm +{ + /** + * Module ID + * + * @var int + */ + var $_modid; + /** + * Tree structure of items + * + * @var array + */ + var $_itemTree = array(); + /** + * Name of permission + * + * @var string + */ + var $_permName; + /** + * Description of permission + * + * @var string + */ + var $_permDesc; + + /** + * Whether to include anonymous users + * + * @var bool + */ + var $_showAnonymous; + + /** + * Constructor + */ + function XoopsGroupPermForm($title, $modid, $permname, $permdesc, $url = '', $anonymous = true) + { + $this->XoopsForm($title, 'groupperm_form', XOOPS_URL . '/modules/system/admin/groupperm.php', 'post'); + $this->_modid = intval($modid); + $this->_permName = $permname; + $this->_permDesc = $permdesc; + $this->addElement(new XoopsFormHidden('modid', $this->_modid)); + $this->addElement(new XoopsFormHiddenToken($permname)); + if ($url != "") { + $this->addElement(new XoopsFormHidden('redirect_url', $url)); + } + $this->_showAnonymous = $anonymous; + } + + /** + * Adds an item to which permission will be assigned + * + * @param string $itemName + * @param int $itemId + * @param int $itemParent + * @access public + */ + function addItem($itemId, $itemName, $itemParent = 0) + { + $this->_itemTree[$itemParent]['children'][] = $itemId; + $this->_itemTree[$itemId]['parent'] = $itemParent; + $this->_itemTree[$itemId]['name'] = $itemName; + $this->_itemTree[$itemId]['id'] = $itemId; + } + + /** + * Loads all child ids for an item to be used in javascript + * + * @param int $itemId + * @param array $childIds + * @access private + */ + function _loadAllChildItemIds($itemId, &$childIds) + { + if (! empty($this->_itemTree[$itemId]['children'])) { + $first_child = $this->_itemTree[$itemId]['children']; + foreach($first_child as $fcid) { + array_push($childIds, $fcid); + if (! empty($this->_itemTree[$fcid]['children'])) { + foreach($this->_itemTree[$fcid]['children'] as $_fcid) { + array_push($childIds, $_fcid); + $this->_loadAllChildItemIds($_fcid, $childIds); + } + } + } + } + } + + /** + * Renders the form + * + * @return string + * @access public + */ + function render() + { + // load all child ids for javascript codes + foreach(array_keys($this->_itemTree) as $item_id) { + $this->_itemTree[$item_id]['allchild'] = array(); + $this->_loadAllChildItemIds($item_id, $this->_itemTree[$item_id]['allchild']); + } + $gperm_handler = &xoops_gethandler('groupperm'); + $member_handler = &xoops_gethandler('member'); + $glist = $member_handler->getGroupList(); + foreach(array_keys($glist) as $i) { + if ($i == XOOPS_GROUP_ANONYMOUS && ! $this->_showAnonymous) + continue; + // get selected item id(s) for each group + $selected = $gperm_handler->getItemIds($this->_permName, $i, $this->_modid); + $ele = new XoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected); + $ele->setOptionTree($this->_itemTree); + $this->addElement($ele); + unset($ele); + } + $tray = new XoopsFormElementTray(''); + $tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); + $tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset')); + $this->addElement($tray); + + $ret = '<h4>' . $this->getTitle() . '</h4>'; + if ($this->_permDesc) { + $ret .= $this->_permDesc . '<br /><br />'; + } + $ret .= '<form title="' . str_replace('"', '', $this->getTitle()) . '" name="' . $this->getName() . '" id="' . $this->getName() . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '"' . $this->getExtra() . '>' . '<table width="100%" class="outer" cellspacing="1" valign="top">' ; + $elements = $this->getElements(); + $hidden = ''; + foreach(array_keys($elements) as $i) { + if (! is_object($elements[$i])) { + $ret .= $elements[$i]; + } elseif (! $elements[$i]->isHidden()) { + $ret .= '<tr valign="top" class="left"><td class="head">' . $elements[$i]->getCaption(); + if ($elements[$i]->getDescription() != "") { + $ret .= "<br /><br /><span style='font-weight: normal;'>" . $elements[$i]->getDescription() . "</span>"; + } + $ret .= '</td>' . '<td class="even">' . $elements[$i]->render() . '</td></tr>' . ''; + } else { + $hidden .= $elements[$i]->render(); + } + } + $ret .= '</table>' . $hidden . '</form>'; + $ret .= $this->renderValidationJS(true); + return $ret; + } +} + +/** + * Renders checkbox options for a group permission form + */ +class XoopsGroupFormCheckBox extends XoopsFormElement +{ + /** + * Pre-selected value(s) + * + * @var array ; + */ + var $_value = array(); + /** + * Group ID + * + * @var int + */ + var $_groupId; + /** + * Option tree + * + * @var array + */ + var $_optionTree = array(); + + /** + * Constructor + */ + function XoopsGroupFormCheckBox($caption, $name, $groupId, $values = null) + { + $this->setCaption($caption); + $this->setName($name); + if (isset($values)) { + $this->setValue($values); + } + $this->_groupId = $groupId; + } + + /** + * Sets pre-selected values + * + * @param mixed $value A group ID or an array of group IDs + * @access public + */ + function setValue($value) + { + if (is_array($value)) { + foreach($value as $v) { + $this->setValue($v); + } + } else { + $this->_value[] = $value; + } + } + + /** + * Sets the tree structure of items + * + * @param array $optionTree + * @access public + */ + function setOptionTree(&$optionTree) + { + $this->_optionTree = &$optionTree; + } + + /** + * Renders checkbox options for this group + * + * @return string + * @access public + */ + function render() + { + $ele_name = $this->getName(); + $ret = '<table class="table table-bordered"><tr><td class="odd"><table class="table table-striped"><tr>'; + $cols = 1; + foreach($this->_optionTree[0]['children'] as $topitem) { + if ($cols > 4) { + $ret .= '</tr><tr>'; + $cols = 1; + } + $tree = '<td valign="top">'; + $prefix = ''; + $this->_renderOptionTree($tree, $this->_optionTree[$topitem], $prefix); + $ret .= $tree . '</td>'; + $cols ++; + } + $ret .= '</tr></table></td><td class="even" valign="top">'; + $option_ids = array(); + foreach(array_keys($this->_optionTree) as $id) { + if (! empty($id)) { + $option_ids[] = "'" . $ele_name . '[groups][' . $this->_groupId . '][' . $id . ']' . "'"; + } + } + $checkallbtn_id = $ele_name . '[checkallbtn][' . $this->_groupId . ']'; + $option_ids_str = implode(', ', $option_ids); + $ret .= _ALL . " <input id=\"" . $checkallbtn_id . "\" type=\"checkbox\" value=\"\" onclick=\"var optionids = new Array(" . $option_ids_str . "); xoopsCheckAllElements(optionids, '" . $checkallbtn_id . "');\" />"; + $ret .= '</td></tr></table>'; + return $ret; + } + + /** + * Renders checkbox options for an item tree + * + * @param string $tree + * @param array $option + * @param string $prefix + * @param array $parentIds + * @access private + */ + function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()) + { + $ele_name = $this->getName(); + $tree .= $prefix . "<input type=\"checkbox\" name=\"" . $ele_name . "[groups][" . $this->_groupId . "][" . $option['id'] . "]\" id=\"" . $ele_name . "[groups][" . $this->_groupId . "][" . $option['id'] . "]\" onclick=\""; + // If there are parent elements, add javascript that will + // make them selecteded when this element is checked to make + // sure permissions to parent items are added as well. + foreach($parentIds as $pid) { + $parent_ele = $ele_name . '[groups][' . $this->_groupId . '][' . $pid . ']'; + $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if(ele.checked != true) {ele.checked = this.checked;}"; + } + // If there are child elements, add javascript that will + // make them unchecked when this element is unchecked to make + // sure permissions to child items are not added when there + // is no permission to this item. + foreach($option['allchild'] as $cid) { + $child_ele = $ele_name . '[groups][' . $this->_groupId . '][' . $cid . ']'; + $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if(this.checked != true) {ele.checked = false;}"; + } + $tree .= '" value="1"'; + if (in_array($option['id'], $this->_value)) { + $tree .= ' checked="checked"'; + } + $tree .= " />" . $option['name'] . "<input type=\"hidden\" name=\"" . $ele_name . "[parents][" . $option['id'] . "]\" value=\"" . implode(':', $parentIds) . "\" /><input type=\"hidden\" name=\"" . $ele_name . "[itemname][" . $option['id'] . "]\" value=\"" . htmlspecialchars($option['name']) . "\" /><br />\n"; + if (isset($option['children'])) { + foreach($option['children'] as $child) { + array_push($parentIds, $option['id']); + $this->_renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds); + } + } + } +} Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html 2015-02-18 23:25:57 UTC (rev 13001) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html 2015-02-19 09:37:52 UTC (rev 13002) @@ -1,6 +1,6 @@ <{$xoForm.javascript}> - <form id="<{$xoForm.name}>" name="<{$xoForm.name}>" action="<{$xoForm.action}>" method="<{$xoForm.method}>" <{$xoForm.extra}> > + <form class='form-inline' id="<{$xoForm.name}>" name="<{$xoForm.name}>" action="<{$xoForm.action}>" method="<{$xoForm.method}>" <{$xoForm.extra}> > <table class="table table-bordered" id="profile-form-<{$xoForm.name}>"> <tbody> <{foreach item=element from=$xoForm.elements}> @@ -16,7 +16,9 @@ <{/if}> </td> <td class="<{cycle values='odd, even'}>"> - <{$element.body}> + <div class="form-group"> + <{$element.body}> + </div> </td> </tr> <{/if}> |
From: <txm...@us...> - 2015-02-18 23:26:00
|
Revision: 13001 http://sourceforge.net/p/xoops/svn/13001 Author: txmodxoops Date: 2015-02-18 23:25:57 +0000 (Wed, 18 Feb 2015) Log Message: ----------- Updated to bootstrap profile and pm modules Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/icons.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/page.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/scripts.html Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_pmlite.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_readpmsg.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_viewpmsg.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_avatar.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_breadcrumbs.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_changepass.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_editprofile.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_email.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_register.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_results.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_search.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userform.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userinfo.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/style.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/metisMenu.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/metisMenu.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/themes/ Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/index.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/index.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/index.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_pmlite.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_pmlite.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_pmlite.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,42 @@ +<{$pmform.javascript}> +<form name="<{$pmform.name}>" id="<{$pmform.name}>" action="<{$pmform.action}>" method="<{$pmform.method}>" <{$pmform.extra}> > + <table class='table table-bordered bnone width100'> + <tr> + <td class='head width30 text-right'><{$smarty.const._PM_TO}></td> + <td class='even txtleft'><{if $pmform.elements.to_userid.hidden != 1}><{$pmform.elements.to_userid.body}><{/if}><{$to_username}></td> + </tr> + <tr> + <td class='head width30 text-right'><{$smarty.const._PM_SUBJECTC}></td> + <td class='even txtleft'><{$pmform.elements.subject.body}></td> + </tr> + <tr> + <td class='head width30 text-right'><{$smarty.const._PM_SUBJECT_ICONS}></td> + <td class='even txtleft'> + + <{foreachq item=icon from=$radio_icons}> + <input type='radio' name='icon' id='<{$icon}>' value='<{$icon}>' /><label name='xolb_icon' for='<{$icon}>'><img src='<{xoAppUrl}>images/subject/<{$icon}>' alt="" /></label> + <{/foreach}> </td> + </tr> + <tr class='aligntop'> + <td class='head width30 text-right'><{$smarty.const._PM_MESSAGEC}></td> + <td class='even txtleft'><{$pmform.elements.message.body}></td> + </tr> + <tr class='aligntop'> + <td class='head width30'><{$smarty.const._PM_SAVEINOUTBOX}></td> + <td class='even'><{$pmform.elements.savecopy.body}></td> + </tr> + <tr> + <td class='head'> </td> + <td class='even'> + <{foreach item=element from=$pmform.elements}> + <{if $element.hidden == 1}> + <{$element.body}> + <{/if}> + <{/foreach}> + <{$pmform.elements.submit.body}> + <{$pmform.elements.reset.body}> + <{$pmform.elements.cancel.body}> + </td> + </tr> + </table> +</form> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_readpmsg.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_readpmsg.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_readpmsg.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,77 @@ +<div> + <h4><{$smarty.const._PM_PRIVATEMESSAGE}></h4> +</div><br /> +<{if $op==out}> + <a href='viewpmsg.php?op=out' title='<{$smarty.const._PM_OUTBOX}>'><{$smarty.const._PM_OUTBOX}></a> +<{elseif $op == "save"}> + <a href='viewpmsg.php?op=save' title='<{$smarty.const._PM_SAVEBOX}>'><{$smarty.const._PM_SAVEBOX}></a> +<{else}> + <a href='viewpmsg.php?op=in' title='<{$smarty.const._PM_INBOX}>'><{$smarty.const._PM_INBOX}></a> +<{/if}> + +<{if $message}> + <span class='bold'>»»</span> <{$message.subject}><br /> + <form name="<{$pmform.name}>" id="<{$pmform.name}>" action="<{$pmform.action}>" method="<{$pmform.method}>" <{$pmform.extra}> > + <table class='table table-bordered bnone width100'> + <tr> + <th colspan='2'><{if $op==out}><{$smarty.const._PM_TO}><{else}><{$smarty.const._PM_FROM}><{/if}></th> + </tr> + <tr class='even'> + <td class='aligntop'> + <{if ( $poster != false ) }> + <a href='<{$xoops_url}>/userinfo.php?uid=<{$poster->getVar("uid")}>'><{$poster->getVar("uname")}></a><br /> + <{if ( $poster->getVar("user_avatar") != "" ) }> + <img src='<{$xoops_url}>/uploads/<{$poster->getVar("user_avatar")}>' alt='' /><br /> + <{/if}> + <{if ( $poster->getVar("user_from") != "" ) }> + <{$smarty.const._PM_FROMC}><{$poster->getVar("user_from")}><br /><br /> + <{/if}> + <{if ( $poster->isOnline() ) }> + <span class='bold red'><{$smarty.const._PM_ONLINE}></span><br /><br /> + <{/if}> + <{else}> + <{$anonymous}> + <{/if}> + </td> + <td> + <{if $message.msg_image != ""}> + <img src='<{$xoops_url}>/images/subject/<{$message.msg_image}>' alt='' /> + <{/if}> + <{$smarty.const._PM_SENTC}><{$message.msg_time}><br /> + <hr /> + <strong><{$message.subject}></strong><br /> + <br /> + <{$message.msg_text}><br /> + <br /> + </td> + </tr> + <tr class='foot'> + <td class='width20 txtleft' colspan='2'> + <{foreach item=element from=$pmform.elements}> + <{$element.body}> + <{/foreach}> + </td> + </tr> + <tr> + <td class='text-right' colspan='2'> + <{if ( $previous >= 0 ) }> + <a href='readpmsg.php?start=<{$previous}>&total_messages=<{$total_messages}>&op=<{$op}>' title='<{$smarty.const._PM_PREVIOUS}>'> + <{$smarty.const._PM_PREVIOUS}> + </a> | + <{else}> + <{$smarty.const._PM_PREVIOUS}> | + <{/if}> + <{if ( $next < $total_messages ) }> + <a href='readpmsg.php?start=<{$next}>&total_messages=<{$total_messages}>&op=<{$op}>' title='<{$smarty.const._PM_NEXT}>'> + <{$smarty.const._PM_NEXT}> + </a> + <{else}> + <{$smarty.const._PM_NEXT}> + <{/if}> + </td> + </tr> + </table> + </form> +<{else}> + <br /><br /><{$smarty.const._PM_YOUDONTHAVE}> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_viewpmsg.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_viewpmsg.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/pm/templates/pm_viewpmsg.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,108 @@ +<h4 class="text-center"><{$smarty.const._PM_PRIVATEMESSAGE}></h4> +<{if $op}> +<br /> +<div class="pull-right text-right" style="width: 18%;"> + <{if $op == "out"}> + <a href='viewpmsg.php?op=in' title='<{$smarty.const._PM_INBOX}>'><{$smarty.const._PM_INBOX}></a> | <a href='viewpmsg.php?op=save' title='<{$smarty.const._PM_SAVEBOX}>'><{$smarty.const._PM_SAVEBOX}></a> + <{elseif $op == "save"}> + <a href='viewpmsg.php?op=in' title='<{$smarty.const._PM_INBOX}>'><{$smarty.const._PM_INBOX}></a> | <a href='viewpmsg.php?op=out' title='<{$smarty.const._PM_OUTBOX}>'><{$smarty.const._PM_OUTBOX}></a> + <{elseif $op == "in"}> + <a href='viewpmsg.php?op=out' title='<{$smarty.const._PM_OUTBOX}>'><{$smarty.const._PM_OUTBOX}></a> | <a href='viewpmsg.php?op=save' title='<{$smarty.const._PM_SAVEBOX}>'><{$smarty.const._PM_SAVEBOX}></a> + <{/if}> +</div> +<div class="pull-left width80"> + <{if $op == "out"}><{$smarty.const._PM_OUTBOX}> + <{elseif $op == "save"}><{$smarty.const._PM_SAVEBOX}> + <{else}><{$smarty.const._PM_INBOX}><{/if}> +</div> +<br /> +<br /> +<{if $msg}> + <div class="confirmMsg"><{$msg}></div> +<{/if}> +<{if $errormsg}> + <div class="errorMsg"><{$errormsg}></div> +<{/if}> + +<{if $pagenav}> + <div class="pull-right text-right pad5"> + <{$pagenav}> + </div> + <br class="clear" /> +<{/if}> + +<form name="<{$pmform.name}>" id="<{$pmform.name}>" action="<{$pmform.action}>" method="<{$pmform.method}>" <{$pmform.extra}> > + <table class='table table-bordered bnone width100'> + <tr class='text-center alignmiddle'> + <th><input name='allbox' id='allbox' onclick='xoopsCheckAll("<{$pmform.name}>", "allbox");' type='checkbox' value='Check All' /></th> + <th><img class='bnone' src='<{xoAppUrl images/download.gif}>' alt=''/></th> + <th> </th> + <{if $op == "out"}> + <th><{$smarty.const._PM_TO}></th> + <{else}> + <th><{$smarty.const._PM_FROM}></th> + <{/if}> + <th><{$smarty.const._PM_SUBJECT}></th> + <th class='text-center'><{$smarty.const._PM_DATE}></th> + </tr> + + <{if $total_messages == 0}> + <tr> + <td class='even text-center' colspan='6'><{$smarty.const._PM_YOUDONTHAVE}></td> + </tr> + <{/if}> + <{foreach item=message from=$messages}> + <tr class='<{cycle values="odd, even"}> txtleft'> + <td class='aligntop text-center width2'> + <input type='checkbox' id='msg_id_<{$message.msg_id}>' name='msg_id[]' value='<{$message.msg_id}>' /> + </td> + <{if $message.read_msg == 1}> + <td class='aligntop width5 text-center'><img src='<{xoModuleIcons16 mail_read.png}>' alt='<{$smarty.const._PM_READ}>' title='<{$smarty.const._PM_READ}>'/></td> + <{else}> + <td class='aligntop width5 text-center'><img src='<{xoModuleIcons16 mail_notread.png}>' alt='<{$smarty.const._PM_NOTREAD}>' title='<{$smarty.const._PM_NOTREAD}>'/></td> + <{/if}> + <td class='aligntop width5 text-center'> + <{if $message.msg_image != ""}> + <img src='<{$xoops_url}>/images/subject/<{$message.msg_image}>' alt='' /> + <{/if}> + </td> + <td class='alignmiddle width10'> + <{if $message.postername != ""}> + <a href='<{$xoops_url}>/userinfo.php?uid=<{$message.posteruid}>' title=''><{$message.postername}></a> + <{else}> + <{$anonymous}> + <{/if}> + </td> + <td class='alignmiddle'> + <a href='readpmsg.php?msg_id=<{$message.msg_id}>&start=<{$message.msg_no}>&total_messages=<{$total_messages}>&op=<{$op}>' title=''> + <{$message.subject}> + </a> + </td> + <td class='alignmiddle text-center width20'> + <{$message.msg_time}> + </td> + </tr> + <{/foreach}> + <tr class='bg2 txtleft'> + <td class='txtleft' colspan='6'> + <{$pmform.elements.send.body}> + <{if $display}> + <{$pmform.elements.move_messages.body}> + <{$pmform.elements.delete_messages.body}> + <{$pmform.elements.empty_messages.body}> + <{/if}> + <{foreach item=element from=$pmform.elements}> + <{if $element.hidden == 1}> + <{$element.body}> + <{/if}> + <{/foreach}> + </td> + </tr> + </table> +</form> +<{if $pagenav}> +<div class="pull-right text-right pad5"> +<{$pagenav}> +</div> +<{/if}> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/index.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/index.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/index.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_avatar.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_avatar.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_avatar.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,70 @@ +<{includeq file="db:profile_breadcrumbs.html"}> + +<{if $old_avatar}> + <div class="pad10 center"> + <h4 class="bold red"><{$smarty.const._US_OLDDELETED}></h4> + <img src="<{$old_avatar}>" alt="" /> + </div> +<{/if}> + +<{if $uploadavatar}> +<{$uploadavatar.javascript}> +<form name="<{$uploadavatar.name}>" action="<{$uploadavatar.action}>" method="<{$uploadavatar.method}>" <{$uploadavatar.extra}>> + <table class="table table-bordered"> + <thead> + <tr> + <th colspan="2"><{$uploadavatar.title}></th> + </tr> + </thead> + <tbody> + <!-- start of form elements loop --> + <{foreach item=element from=$uploadavatar.elements}> + <{if $element.hidden != true}> + <tr> + <td class="head"><{$element.caption}> + <{if $element.description}> + <div style="font-weight: normal"><{$element.description}></div> + <{/if}> + </td> + <td class="<{cycle values='even,odd'}>"><{$element.body}></td> + </tr> + <{else}> + <{$element.body}> + <{/if}> + <{/foreach}> + <!-- end of form elements loop --> + </tbody> + </table> +</form> +<br /> +<{/if}> + +<br /> +<{$chooseavatar.javascript}> +<form name="<{$chooseavatar.name}>" action="<{$chooseavatar.action}>" method="<{$chooseavatar.method}>" <{$chooseavatar.extra}>> + <table class="table table-bordered"> + <thead> + <tr> + <th colspan="2"><{$chooseavatar.title}></th> + </tr> + </thead> + <tbody> + <!-- start of form elements loop --> + <{foreach item=element from=$chooseavatar.elements}> + <{if $element.hidden != true}> + <tr> + <td class="head"><{$element.caption}> + <{if $element.description}> + <div style="font-weight: normal"><{$element.description}></div> + <{/if}> + </td> + <td class="<{cycle values='even,odd'}>"><{$element.body}></td> + </tr> + <{else}> + <{$element.body}> + <{/if}> + <{/foreach}> + <!-- end of form elements loop --> + </tbody> + </table> +</form> Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_breadcrumbs.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_breadcrumbs.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_breadcrumbs.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,9 @@ +<ul class="breadcrumb"> + <{foreach item=itm from=$xoBreadcrumbs name=bcloop}> + <li><{if $itm.link}><a href="<{$itm.link}>" title="<{$itm.title}>"><{$itm.title}></a><{else}><{$itm.title}><{/if}></li> + <{if !$smarty.foreach.bcloop.last}> + <span class="divider">»</span> + <{/if}> + <{/foreach}> +</ul> +<br class="clear"/> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_changepass.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_changepass.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_changepass.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,3 @@ +<{includeq file="db:profile_breadcrumbs.html"}> + +<{includeq file="db:profile_form.html" xoForm=$form}> Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_editprofile.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_editprofile.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_editprofile.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,6 @@ +<{includeq file="db:profile_breadcrumbs.html"}> +<{if $stop}> + <div class="alert alert-danger"><{$stop}></div> + <br class='clear'/> +<{/if}> +<{includeq file="db:profile_form.html" xoForm=$userinfo}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_email.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_email.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_email.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,3 @@ +<{includeq file="db:profile_breadcrumbs.html"}> + +<{includeq file="db:profile_form.html" xoForm=$emailform}> Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_form.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,31 @@ + + <{$xoForm.javascript}> + <form id="<{$xoForm.name}>" name="<{$xoForm.name}>" action="<{$xoForm.action}>" method="<{$xoForm.method}>" <{$xoForm.extra}> > + <table class="table table-bordered" id="profile-form-<{$xoForm.name}>"> + <tbody> + <{foreach item=element from=$xoForm.elements}> + <{if !$element.hidden}> + <tr> + <td class="head"> + <div class='xoops-form-element-caption<{if $element.required}>-required<{/if}>'> + <span class='caption-text'><{$element.caption}></span> + <span class='caption-marker'>*</span> + </div> + <{if $element.description != ""}> + <div class='xoops-form-element-help'><{$element.description}></div> + <{/if}> + </td> + <td class="<{cycle values='odd, even'}>"> + <{$element.body}> + </td> + </tr> + <{/if}> + <{/foreach}> + </tbody> + </table> + <{foreach item=element from=$xoForm.elements}> + <{if $element.hidden}> + <{$element.body}> + <{/if}> + <{/foreach}> + </form> Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_register.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_register.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_register.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,45 @@ +<{includeq file="db:profile_breadcrumbs.html"}> + +<{if $steps|@count > 1 AND $current_step >= 0}> + <div class='register-steps'> + <span class='caption'><{$lang_register_steps}></span> + <{foreachq item=step from=$steps key=stepno name=steploop}> + <{if $stepno == $current_step}> + <span class='item current'><{$step.step_name}></span> + <{else}> + <span class='item'><{$step.step_name}></span> + <{/if}> + <{if !$smarty.foreach.steploop.last}> + <span class='delimiter'>»</span> + <{/if}> + <{/foreach}> + </div> +<{/if}> + +<{if $stop}> + <div class='errorMsg txtleft'><{$stop}></div> + <br class='clear'/> +<{/if}> + +<{if $confirm}> + <{foreach item=msg from=$confirm}> + <div class='confirmMsg txtleft'><{$msg}></div> + <br class='clear'/> + <{/foreach}> +<{/if}> + +<{if $regform}> + <h3><{$regform.title}></h3> + <{includeq file="db:profile_form.html" xoForm=$regform}> +<{elseif $finish}> + <h1><{$finish}></h1> + <{if $finish_message}><p><{$finish_message}></p><{/if}> + <{if $finish_login}> + <form id='register_login' name='register_login' action='user.php' method='post'> + <input type='submit' class="btn btn-default" value="<{$finish_login}>"> + <input type='hidden' name="op" id="op" value="login"> + <input type='hidden' name="uname" id="uname" value="<{$finish_uname}>"> + <input type='hidden' name="pass" id="pass" value="<{$finish_pass}>"> + </form> + <{/if}> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_results.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_results.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_results.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,28 @@ +<{includeq file="db:profile_breadcrumbs.html"}> +<div>( <{$total_users}> )</div> +<{if $users}> + <table class="table table-bordered"> + <thead> + <tr> + <{foreach item=caption from=$captions}> + <th><{$caption}></th> + <{/foreach}> + </tr> + </thead> + <tbody> + <{foreach item=user from=$users}> + <tr class="<{cycle values='odd, even'}>"> + <{foreach item=fieldvalue from=$user.output}> + <td><{$fieldvalue}></td> + <{/foreach}> + </tr> + <{/foreach}> + </tbody> + </table> + + <{$nav}> +<{else}> + <div class="alert alert-danger"> + <{$smarty.const._PROFILE_MA_NOUSERSFOUND}> + </div> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_search.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_search.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_search.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,3 @@ +<{includeq file="db:profile_breadcrumbs.html"}> +<div>( <{$total_users}> )</div> +<{includeq file="db:profile_form.html" xoForm=$searchform}> Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userform.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userform.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userform.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,40 @@ +<fieldset class="pad10"> + <legend class="bold"><{$lang_login}></legend> + <form action="user.php" method="post"> + <div class="form-group"> + <label for="inputUsername"><{$lang_username}></label> + <input type="text" class="form-control" name="uname" id="inputUsername" placeholder="<{$lang_username}>..."> + </div> + <div class="form-group"> + <label for="inputPassword"><{$lang_password}></label> + <input type="password" class="form-control" name="pass" id="inputPassword" placeholder="<{$lang_password}>..."> + </div> + <{if isset($lang_rememberme)}> + <div class="checkbox"> + <label> + <input type="checkbox" name="rememberme" value="On" checked /> <{$lang_rememberme}> + </label> + </div> + <{/if}> + <input type="hidden" name="op" value="login" /> + <input type="hidden" name="xoops_redirect" value="<{$redirect_page}>" /> + <input type="submit" class="btn btn-default" value="<{$lang_login}>" /> + </form> + <br /> + <a name="lost"></a> + <div><{$lang_notregister}><br /></div> +</fieldset> +<br /> +<fieldset class="pad10"> + <legend class="bold"><{$lang_lostpassword}></legend> + <div><br /><{$lang_noproblem}></div> + <form action="lostpass.php" method="post"> + <div class="form-group"> + <label for="inputYourEmail"><{$lang_youremail}></label> + <input type="text" class="form-control" name="email" id="inputYourEmail" placeholder="<{$lang_youremail}>..."> + </div> + <input type="hidden" name="op" value="mailpasswd" /> + <input type="hidden" name="t" value="<{$mailpasswd_token}>" /> + <input type="submit" class="btn btn-default" value="<{$lang_sendpassword}>" /> + </form> +</fieldset> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userinfo.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userinfo.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_userinfo.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,107 @@ +<{includeq file="db:profile_breadcrumbs.html"}> + +<div> + <{if $avatar}> + <div class="pull-left pad5"> + <img src="<{$avatar}>" alt="<{$uname}>" /> + </div> + <{/if}> + <div class="pull-left pad10 block"> + <strong><{$uname}></strong> + <{if $email}> + <{$email}> <br /> + <{/if}> + <{if !$user_ownpage && $xoops_isuser == true}> + <form name="usernav" action="user.php" method="post"> + <input type="button" class="btn btn-default" value="<{$smarty.const._PROFILE_MA_SENDPM}>" onclick="javascript:openWithSelfMain('<{$xoops_url}>/pmlite.php?send2=1&to_userid=<{$user_uid}>', 'pmlite', 450, 380);" /> + </form> + <{/if}> + </div> +</div> +<br class="clear"/> + +<{if $user_ownpage == true}> +<div class="pull-left pad5"> + <form name="usernav" action="user.php" method="post"> + <input type="button" class="btn btn-default" value="<{$lang_editprofile}>" onclick="location='<{$xoops_url}>/modules/<{$xoops_dirname}>/edituser.php'" /> + <input type="button" class="btn btn-default" value="<{$lang_changepassword}>" onclick="location='<{$xoops_url}>/modules/<{$xoops_dirname}>/changepass.php'" /> + <{if $user_changeemail}> + <input type="button" class="btn btn-default" value="<{$smarty.const._PROFILE_MA_CHANGEMAIL}>" onclick="location='<{$xoops_url}>/modules/<{$xoops_dirname}>/changemail.php'" /> + <{/if}> + + <{if $user_candelete == true}> + <form method="post" action="<{$xoops_url}>/modules/<{$xoops_dirname}>/user.php"> + <input type="hidden" name="op" value="delete"> + <input type="hidden" name="uid" value="<{$user_uid}>"> + <input type="button" class="btn btn-default" value="<{$lang_deleteaccount}>" onclick="submit();" /> + </form> + <{/if}> + + <input type="button" class="btn btn-default" value="<{$lang_avatar}>" onclick="location='edituser.php?op=avatarform'" /> + <input type="button" class="btn btn-default" value="<{$lang_inbox}>" onclick="location='<{$xoops_url}>/viewpmsg.php'" /> + <input type="button" class="btn btn-default" value="<{$lang_logout}>" onclick="location='<{$xoops_url}>/modules/<{$xoops_dirname}>/user.php?op=logout'" /> + </form> +</div> +<{elseif $xoops_isadmin != false}> +<div class="pull-left pad5"> + <form method="post" action="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/deactivate.php"> + <input type="button" value="<{$lang_editprofile}>" onclick="location='<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/user.php?op=edit&id=<{$user_uid}>'" /> + <input type="hidden" name="uid" value="<{$user_uid}>" /> + <{if $userlevel == 1}> + <input type="hidden" name="level" value="0" /> + <input type="button" class="btn btn-default" value="<{$smarty.const._PROFILE_MA_DEACTIVATE}>" onclick="submit();" /> + <{else}> + <input type="hidden" name="level" value="1" /> + <input type="button" class="btn btn-default" value="<{$smarty.const._PROFILE_MA_ACTIVATE}>" onclick="submit();" /> + <{/if}> + </form> +</div> +<{/if}> + +<br class="clear"/> + +<{foreach item=category from=$categories}> + <{if isset($category.fields)}> + <div class="profile-list-category" id="profile-category-<{$category.cat_id}>"> + <table class="table table-bordered"> + <thead> + <tr> + <th class="txtcenter" colspan="2"><{$category.cat_title}></th> + </tr> + </thead> + <tbody> + <{foreach item=field from=$category.fields}> + <tr> + <td class="head"><{$field.title}></td> + <td class="even"><{$field.value}></td> + </tr> + <{/foreach}> + </tbody> + </table> + </div> + <{/if}> +<{/foreach}> + +<{if $modules}> +<br class="clear" /> +<div class="profile-list-activity"> + <h2><{$recent_activity}></h2> + <!-- start module search results loop --> + <{foreach item=module from=$modules}> + + <h4><{$module.name}></h4> + + <!-- start results item loop --> + <{foreach item=result from=$module.results}> + + <img src="<{$result.image}>" alt="<{$module.name}>" /> <strong><a href="<{$result.link}>"><{$result.title}></a></strong><br /><span class="x-small">(<{$result.time}>)</span><br /> + + <{/foreach}> + <!-- end results item loop --> + + <{$module.showall_link}> + + <{/foreach}> + <!-- end module search results loop --> +</div> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/style.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/style.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/style.css 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,13 @@ +.breadcrumbs { font-size: 1.2em; padding: 10px 2px;} +.breadcrumbs span { border: 0; padding: 0 2px;} +.breadcrumbs .item {} +.breadcrumbs .delimiter { font-size: 1.2em;} +.register-steps { font-size: 1.2em; padding: 5px 2px;} +.register-steps span { border: 0; padding: 0 2px;} +.register-steps .current { font-weight: bold; text-decoration: underline;} +.register-steps .delimiter { font-size: 1.2em;} +table.profile-form { width: 90%;} +.profile-form td.head { width: 20%;} +.profile-list-category table { width: 80%; margin: 10px 5px;} +.profile-list-category td.head { width: 20%;} +.profile-list-activity { width: 90%; padding: 5px;} \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/metisMenu.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/metisMenu.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/metisMenu.css 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,65 @@ +/* + * metismenu - v1.1.3 + * Easy menu jQuery plugin for Twitter Bootstrap 3 + * https://github.com/onokumus/metisMenu + * + * Made by Osman Nuri Okumus + * Under MIT License + */ + +.arrow { + float: right; + line-height: 1.42857; +} + +.glyphicon.arrow:before { + content: "\e079"; +} + +.active > a > .glyphicon.arrow:before { + content: "\e114"; +} + + +/* + * Require Font-Awesome + * http://fortawesome.github.io/Font-Awesome/ +*/ + + +.fa.arrow:before { + content: "\f104"; +} + +.active > a > .fa.arrow:before { + content: "\f107"; +} + +.plus-times { + float: right; +} + +.fa.plus-times:before { + content: "\f067"; +} + +.active > a > .fa.plus-times { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} + +.plus-minus { + float: right; +} + +.fa.plus-minus:before { + content: "\f067"; +} + +.active > a > .fa.plus-minus:before { + content: "\f068"; +} \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/metisMenu.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/metisMenu.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/metisMenu.js 2015-02-18 23:25:57 UTC (rev 13001) @@ -0,0 +1,120 @@ +/* + * metismenu - v1.1.3 + * Easy menu jQuery plugin for Twitter Bootstrap 3 + * https://github.com/onokumus/metisMenu + * + * Made by Osman Nuri Okumus + * Under MIT License + */ +;(function($, window, document, undefined) { + + var pluginName = "metisMenu", + defaults = { + toggle: true, + doubleTapToGo: false + }; + + function Plugin(element, options) { + this.element = $(element); + this.settings = $.extend({}, defaults, options); + this._defaults = defaults; + this._name = pluginName; + this.init(); + } + + Plugin.prototype = { + init: function() { + + var $this = this.element, + $toggle = this.settings.toggle, + obj = this; + + if (this.isIE() <= 9) { + $this.find("li.active").has("ul").children("ul").collapse("show").attr("aria-expanded", "true"); + $this.find("li").not(".active").has("ul").children("ul").collapse("hide").attr("aria-expanded", "false"); + } else { + $this.find("li.active").has("ul").children("ul").addClass("collapse in").attr("aria-expanded", "true"); + $this.find("li").not(".active").has("ul").children("ul").addClass("collapse").attr("aria-expanded", "false"); + } + + //add the "doubleTapToGo" class to active items if needed + if (obj.settings.doubleTapToGo) { + $this.find("li.active").has("ul").children("a").addClass("doubleTapToGo"); + } + + $this.find("li").has("ul").children("a").on("click" + "." + pluginName, function(e) { + e.preventDefault(); + + //Do we need to enable the double tap + if (obj.settings.doubleTapToGo) { + + //if we hit a second time on the link and the href is valid, navigate to that url + if (obj.doubleTapToGo($(this)) && $(this).attr("href") !== "#" && $(this).attr("href") !== "") { + e.stopPropagation(); + document.location = $(this).attr("href"); + return; + } + } + + $(this).parent("li").toggleClass("active").children("ul").collapse("toggle"); + + if ($toggle) { + $(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide"); + } + + }); + }, + + isIE: function() { //https://gist.github.com/padolsey/527683 + var undef, + v = 3, + div = document.createElement("div"), + all = div.getElementsByTagName("i"); + + while ( + div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->", + all[0] + ) { + return v > 4 ? v : undef; + } + }, + + //Enable the link on the second click. + doubleTapToGo: function(elem) { + var $this = this.element; + + //if the class "doubleTapToGo" exists, remove it and return + if (elem.hasClass("doubleTapToGo")) { + elem.removeClass("doubleTapToGo"); + return true; + } + + //does not exists, add a new class and return false + if (elem.parent().children("ul").length) { + //first remove all other class + $this.find(".doubleTapToGo").removeClass("doubleTapToGo"); + //add the class on the current element + elem.addClass("doubleTapToGo"); + return false; + } + }, + + remove: function() { + this.element.off("." + pluginName); + this.element.removeData(pluginName); + } + + }; + + $.fn[pluginName] = function(options) { + this.each(function () { + var el = $(this); + if (el.data(pluginName)) { + el.data(pluginName).remove(); + } + el.data(pluginName, new Plugin(this, options)); + }); + return this; + }; + +})(jQuery, window, document); \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html 2015-02-18 18:43:38 UTC (rev 13000) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -82,7 +82,7 @@ <i class="fa fa-caret-down pull-right"></i> <div class="user-mini pull-right"> <span class="welcome">Welcome,</span> - <span>Admin</span> + <span><{$xoops_uname}></span> </div> </a> <ul class="dropdown-menu dropdown-user"> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/icons.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/icons.html 2015-02-18 18:43:38 UTC (rev 13000) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/icons.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -1,19 +1,17 @@ <{* start system icons *}> -<div id="xo-system-icons"> - <div id="xo-icon"> - <{foreach item=op from=$mod_options}> - <a href="<{$op.link}>" title="<{$op.desc}>"> - <img class="img-rounded" src='<{$op.icon|default:"$theme_icons/icon_options.png"}>' alt="<{$op.desc}>" /> - <{* <span><{$op.title}></span> *}> - </a> - <{/foreach}> - <a href="<{xoAppUrl modules/system/admin.php}>" title="<{$smarty.const._AM_SYSTEM_CONFIG}>"> - <img src='<{"$theme_icons/configuration.png"}>' /> - <{* <span><{$smarty.const._AM_SYSTEM_CONFIG}></span> *}> - </a> - <a href="<{xoAppUrl modules/system/help.php}>" title="<{$smarty.const._AM_SYSTEM_HELP}>"> - <img src='<{"$theme_icons/help.png"}>' /> - <{* <span><{$smarty.const._AM_SYSTEM_HELP}></span> *}> - </a> - </div> -</div> \ No newline at end of file +<ul class="thumbnails"> + <{foreach item=op from=$mod_options}> + <li class="box-icon text-center"><a class="thumbnail" href="<{$op.link}>" title="<{$op.desc}>"> + <img class="img-rounded" src='<{$op.icon|default:"$theme_icons/icon_options.png"}>' alt="<{$op.desc}>" /> + <{* <span><{$op.title}></span> *}> + </a></li> + <{/foreach}> + <li class="box-icon text-center"><a class="thumbnail" href="<{xoAppUrl modules/system/admin.php}>" title="<{$smarty.const._AM_SYSTEM_CONFIG}>"> + <img src='<{"$theme_icons/configuration.png"}>' /> + <{* <span><{$smarty.const._AM_SYSTEM_CONFIG}></span> *}> + </a></li> + <li class="box-icon text-center"><a class="thumbnail" href="<{xoAppUrl modules/system/help.php}>" title="<{$smarty.const._AM_SYSTEM_HELP}>"> + <img src='<{"$theme_icons/help.png"}>' /> + <{* <span><{$smarty.const._AM_SYSTEM_HELP}></span> *}> + </a></li> +</ul> \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html 2015-02-18 18:43:38 UTC (rev 13000) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -1,7 +1,7 @@ <ul class="thumbnails"> <{foreach item=mod from=$modules}> <li class="box-icon text-center"><a class="thumbnail" href="<{$mod.link}>" title="<{$mod.title}> - <{$mod.description}>"> - <img src='<{$mod.icon|default:"$theme_img/modules.png"}>' alt="<{$mod.title}>" /> + <img class="img-rounded" src='<{$mod.icon|default:"$theme_img/modules.png"}>' alt="<{$mod.title}>" /> <{* <span><{$mod.title}></span> *}> </a></li> <{/foreach}> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/page.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/page.html 2015-02-18 18:43:38 UTC (rev 13000) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/page.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -3,7 +3,11 @@ <div class="row"> <div class="col-lg-12"> <h3 class="page-header"><{$modname}></h3> - <{if $xo_sys_breadcrumb}> + </div> + </div> + <{if $xo_sys_breadcrumb}> + <div class="row"> + <div class="col-lg-12"> <ol class="breadcrumb"> <{foreach item=breadcrumb from=$xo_sys_breadcrumb}> <{if $breadcrumb.home}> @@ -14,12 +18,12 @@ <li class="breadcrumb-title"><{$breadcrumb.title}></li> <{/if}> <{/foreach}> - </ol> - <{/if}> + </ol> + </div> </div> - </div> + <{/if}> <{* /.row *}> - <{if $xoops_contents}> + <{if $xoops_contents || $xo_system_menu}> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/scripts.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/scripts.html 2015-02-18 18:43:38 UTC (rev 13000) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/scripts.html 2015-02-18 23:25:57 UTC (rev 13001) @@ -1,5 +1,5 @@ <{* jQuery *}> - <script src="<{xoAppUrl browse.php?Frameworks/jquery/jquery.js}>"></script> + <script src="<{xoAppUrl browse.php?Frameworks/jquery/jquery.min.js}>"></script> <script src="<{xoAppUrl browse.php?Frameworks/jquery/plugins/jquery-ui.min.js}>"></script> <{* Bootstrap Core JavaScript *}> <script src="<{xoImgUrl assets/js/bootstrap.min.js}>"></script> |
From: <be...@us...> - 2015-02-18 18:43:52
|
Revision: 13000 http://sourceforge.net/p/xoops/svn/13000 Author: beckmi Date: 2015-02-18 18:43:38 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 1 31_ALPHA6_zyspec Modified Paths: -------------- XoopsModules/pedigree/branches/zyspec/pedigree/add_breeder.php XoopsModules/pedigree/branches/zyspec/pedigree/add_dog.php XoopsModules/pedigree/branches/zyspec/pedigree/add_litter.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/about.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/admin_footer.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/admin_header.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/config.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/index.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/main.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/owner.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/pedigree.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/pedigree_config.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/pedigree_temp.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/pedigree_trash.php XoopsModules/pedigree/branches/zyspec/pedigree/admin/permissions.php XoopsModules/pedigree/branches/zyspec/pedigree/advanced.php XoopsModules/pedigree/branches/zyspec/pedigree/blocks/menu_block.php XoopsModules/pedigree/branches/zyspec/pedigree/book.php XoopsModules/pedigree/branches/zyspec/pedigree/breeder.php XoopsModules/pedigree/branches/zyspec/pedigree/class/breadcrumb.php XoopsModules/pedigree/branches/zyspec/pedigree/class/fields.php XoopsModules/pedigree/branches/zyspec/pedigree/class/owner.php XoopsModules/pedigree/branches/zyspec/pedigree/class/pedigree.php XoopsModules/pedigree/branches/zyspec/pedigree/class/pedigreeUtilities.php XoopsModules/pedigree/branches/zyspec/pedigree/class/temp.php XoopsModules/pedigree/branches/zyspec/pedigree/class/trash.php XoopsModules/pedigree/branches/zyspec/pedigree/class/tree.php XoopsModules/pedigree/branches/zyspec/pedigree/coi.php XoopsModules/pedigree/branches/zyspec/pedigree/comment_delete.php XoopsModules/pedigree/branches/zyspec/pedigree/comment_edit.php XoopsModules/pedigree/branches/zyspec/pedigree/comment_new.php XoopsModules/pedigree/branches/zyspec/pedigree/comment_post.php XoopsModules/pedigree/branches/zyspec/pedigree/comment_reply.php XoopsModules/pedigree/branches/zyspec/pedigree/convert.php XoopsModules/pedigree/branches/zyspec/pedigree/delete.php XoopsModules/pedigree/branches/zyspec/pedigree/deletebreeder.php XoopsModules/pedigree/branches/zyspec/pedigree/deletebreederpage.php XoopsModules/pedigree/branches/zyspec/pedigree/deletepage.php XoopsModules/pedigree/branches/zyspec/pedigree/docs/changelog.txt XoopsModules/pedigree/branches/zyspec/pedigree/dog.php XoopsModules/pedigree/branches/zyspec/pedigree/edit.php XoopsModules/pedigree/branches/zyspec/pedigree/footer.php XoopsModules/pedigree/branches/zyspec/pedigree/header.php XoopsModules/pedigree/branches/zyspec/pedigree/imagemanager.php XoopsModules/pedigree/branches/zyspec/pedigree/include/class_field.php XoopsModules/pedigree/branches/zyspec/pedigree/include/common.php XoopsModules/pedigree/branches/zyspec/pedigree/include/config.php XoopsModules/pedigree/branches/zyspec/pedigree/include/functions.php XoopsModules/pedigree/branches/zyspec/pedigree/include/install_function.php XoopsModules/pedigree/branches/zyspec/pedigree/include/notification.inc.php XoopsModules/pedigree/branches/zyspec/pedigree/include/update_function.php XoopsModules/pedigree/branches/zyspec/pedigree/include/waiting.plugin.php XoopsModules/pedigree/branches/zyspec/pedigree/index.php XoopsModules/pedigree/branches/zyspec/pedigree/language/english/main.php XoopsModules/pedigree/branches/zyspec/pedigree/latest.php XoopsModules/pedigree/branches/zyspec/pedigree/members.php XoopsModules/pedigree/branches/zyspec/pedigree/menu_block.php XoopsModules/pedigree/branches/zyspec/pedigree/mpedigree.php XoopsModules/pedigree/branches/zyspec/pedigree/notification_update.php XoopsModules/pedigree/branches/zyspec/pedigree/owner.php XoopsModules/pedigree/branches/zyspec/pedigree/pedigree.php XoopsModules/pedigree/branches/zyspec/pedigree/print.php XoopsModules/pedigree/branches/zyspec/pedigree/result.php XoopsModules/pedigree/branches/zyspec/pedigree/seldog.php XoopsModules/pedigree/branches/zyspec/pedigree/templates/pedigree_result.tpl XoopsModules/pedigree/branches/zyspec/pedigree/templates/pedigree_sel.tpl XoopsModules/pedigree/branches/zyspec/pedigree/tools.php XoopsModules/pedigree/branches/zyspec/pedigree/topstud.php XoopsModules/pedigree/branches/zyspec/pedigree/update.php XoopsModules/pedigree/branches/zyspec/pedigree/updateowner.php XoopsModules/pedigree/branches/zyspec/pedigree/updatepage.php XoopsModules/pedigree/branches/zyspec/pedigree/virtual.php XoopsModules/pedigree/branches/zyspec/pedigree/welcome.php XoopsModules/pedigree/branches/zyspec/pedigree/xoops_version.php Added Paths: ----------- XoopsModules/pedigree/branches/zyspec/pedigree/class/animal.php XoopsModules/pedigree/branches/zyspec/pedigree/class/htmlinput.abstract.php XoopsModules/pedigree/branches/zyspec/pedigree/class/radiobutton.php XoopsModules/pedigree/branches/zyspec/pedigree/class/selectbox.php Modified: XoopsModules/pedigree/branches/zyspec/pedigree/add_breeder.php =================================================================== --- XoopsModules/pedigree/branches/zyspec/pedigree/add_breeder.php 2015-02-18 18:40:33 UTC (rev 12999) +++ XoopsModules/pedigree/branches/zyspec/pedigree/add_breeder.php 2015-02-18 18:43:38 UTC (rev 13000) @@ -1,88 +1,104 @@ <?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. +*/ +/** + * pedigree module for XOOPS + * + * @todo: move hard coded language strings to language files + * + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package pedigree + * @author XOOPS Module Dev Team + * @version $Id: $ + */ + require_once dirname(dirname(__DIR__)) . '/mainfile.php'; -/* -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language'] . "/main.php")) { - require_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language'] . "/main.php"; -} else { - include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/english/main.php"; -} -*/ - xoops_loadLanguage('main', basename(dirname(__DIR__))); // Include any common code for this module. -require_once(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/include/functions.php"); +xoops_load('XoopsRequest'); +require_once $GLOBALS['xoops']->path("/modules/" . $xoopsModule->dirname() . "/include/functions.php"); $xoopsOption['template_main'] = "pedigree_adddog.tpl"; -include XOOPS_ROOT_PATH . '/header.php'; -$xoopsTpl->assign('page_title', "Pedigree database - Add owner/breeder"); +include $GLOBALS['xoops']->path('/header.php'); +//@todo: move hard coded language string to language file +$GLOBALS['xoopsTpl']->assign('page_title', "Pedigree database - Add owner/breeder"); //check for access -$xoopsModule =& XoopsModule::getByDirname("pedigree"); -if (empty($xoopsUser)) { +if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof XoopsUser)) { redirect_header("index.php", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } -$f = isset($_GET['f']) ? $_GET['f'] : ''; -if ($f == "check") { - check(); -} +$op = XoopsRequest::getCmd('op', '', 'POST'); +if ('check' == $op) { + // check XoopsSecurityToken + if (!$GLOBALS["xoopsSecurity"]->check()) { + redirect_header("index.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } -function check() -{ - global $xoopsTpl, $xoopsUser, $xoopsDB, $xoopsModuleConfig; - //check for access - $xoopsModule =& XoopsModule::getByDirname("pedigree"); - if (empty($xoopsUser)) { - redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); - exit(); - } + $achternaam = XoopsRequest::getString('achternaam', '', 'POST'); + $voornaam = XoopsRequest::getString('voornaam', '', 'POST'); + $email = XoopsRequest::getString('email', '', 'POST'); + $website = XoopsRequest::getString('website', '', 'POST'); + $user = XoopsRequest::getString('user', '', 'POST'); + + $ownerHandler =& xoops_getmodulehandler('owner', 'pedigree'); + $ownerObj = $ownerHandler->create(); + $ownerObj->setVar('firstname', $achternaam); + $ownerObj->setVar('lastname', $voornaam); + $ownerObj->setVar('emailadres', $email); + $ownerObj->setVar('website', $website); + $ownerObj->setVar('user', $user); + $ownerHandler->insert($ownerObj); +/* $achternaam = $_POST['achternaam']; $voornaam = $_POST['voornaam']; $email = $_POST['email']; $website = $_POST['website']; $user = $_POST['user']; //insert into owner - $query = "INSERT INTO " . $xoopsDB->prefix("pedigree_owner") . " VALUES ('','" . $voornaam . "','" . $achternaam . "','','','','','','" . $email . "','" . $website . "','" . $user . "')"; - $xoopsDB->query($query); - redirect_header("index.php", 1, "The data has been stored."); -} + $query = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix("pedigree_owner") . " VALUES ('','" . $voornaam . "','" . $achternaam . "','','','','','','" . $email . "','" . $website . "','" . $user . "')"; + $GLOBALS['xoopsDB']->query($query); +*/ + //@todo: move hard coded language string to language file + redirect_header("index.php", 3, "The data has been stored."); +} else { + //create form + include $GLOBALS['xoops']->path("/class/xoopsformloader.php"); + $form = new XoopsThemeForm(_MA_PEDIGREE_ADD_OWNER, 'breedername', 'add_breeder.php', 'POST'); + $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); + $form->addElement(new XoopsFormHidden('op', 'check')); + $form->addElement(new XoopsFormHidden('user', $GLOBALS['xoopsUser']->getVar("uid"))); + //lastname + $form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_LNAME . "</b>", 'achternaam', 50, 255, '')); -global $xoopsTpl, $xoopsUser, $xoopsDB; -//check for access -$xoopsModule =& XoopsModule::getByDirname("pedigree"); -if (empty($xoopsUser)) { - redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); - exit(); -} -//create form -include XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; -$form = new XoopsThemeForm(_MA_PEDIGREE_ADD_OWNER, 'breedername', 'add_breeder.php?f=check', 'POST'); -$form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); -$form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid"))); -//lastname -$form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_LNAME . "</b>", 'achternaam', $size = 50, $maxsize = 255, $value = '')); + //firstname + $form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_FNAME . "</b>", 'voornaam', 50, 255, '')); -//firstname -$form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_FNAME . "</b>", 'voornaam', $size = 50, $maxsize = 255, $value = '')); + //email + $form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_EMAIL . "</b>", 'email', 50, 255, '')); -//email -$form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_EMAIL . "</b>", 'email', $size = 50, $maxsize = 255, $value = '')); + //website + $form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_WEB . "</b>", 'website', 50, 255, '')); + $form->addElement(new XoopsFormLabel("<b>" . _MA_PEDIGREE_EXPLAIN . "</b>", _MA_PEDIGREE_FLD_OWN_WEB_EX)); -//website -$form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_OWN_WEB . "</b>", 'website', $size = 50, $maxsize = 255, $value = '')); -$form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_OWN_WEB_EX)); + //submit button + $form->addElement(new XoopsFormButton('', 'button_id', _MA_PEDIGREE_ADD_OWNER, 'submit')); -//submit button -$form->addElement(new XoopsFormButton('', 'button_id', _MA_PEDIGREE_ADD_OWNER, 'submit')); + //add data (form) to smarty template + $GLOBALS['xoopsTpl']->assign("form", $form->render()); -//add data (form) to smarty template -$xoopsTpl->assign("form", $form->render()); - -//footer -include XOOPS_ROOT_PATH . "/footer.php"; + //footer + include $GLOBALS['xoops']->path("/footer.php"); +} Modified: XoopsModules/pedigree/branches/zyspec/pedigree/add_dog.php =================================================================== --- XoopsModules/pedigree/branches/zyspec/pedigree/add_dog.php 2015-02-18 18:40:33 UTC (rev 12999) +++ XoopsModules/pedigree/branches/zyspec/pedigree/add_dog.php 2015-02-18 18:43:38 UTC (rev 13000) @@ -1,7 +1,25 @@ <?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. +*/ +/** + * animal module for xoops + * + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package pedigree + * @author XOOPS Module Dev Team + * @version $Id: $ + */ + require_once dirname(dirname(__DIR__)) . '/mainfile.php'; +xoops_load('animal', 'pedigree'); /* if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language'] . "/main.php")) { @@ -12,24 +30,46 @@ */ xoops_loadLanguage('main', basename(dirname(__DIR__))); +xoops_load('XoopsRequest'); // Include any common code for this module. -require_once(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/include/functions.php"); -require_once(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/include/class_field.php"); +require_once $GLOBALS['xoops']->path("/modules/" . $xoopsModule->dirname() . "/include/functions.php"); +require_once $GLOBALS['xoops']->path("/modules/" . $xoopsModule->dirname() . "/include/class_field.php"); $xoopsOption['template_main'] = "pedigree_adddog.tpl"; -include XOOPS_ROOT_PATH . '/header.php'; -$xoopsTpl->assign('page_title', "Pedigree database - Update details"); +include $GLOBALS['xoops']->path('/header.php'); +/* @todo: move hard coded language string to language files */ +$GLOBALS['xoopsTpl']->assign('page_title', "Pedigree database - Update details"); //check for access -$xoopsModule =& XoopsModule::getByDirname("pedigree"); -if (empty($xoopsUser)) { +$GLOBALS['xoopsModule'] =& XoopsModule::getByDirname("pedigree"); +if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof XoopsUser)) { redirect_header("index.php", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } //create function variable from url +$f = XoopsRequest::getString('f', 'add', 'GET'); +switch ($f) { + case "add": + $f = ''; + adddog(); + break; + case "checkname": + checkname(); + break; + case "sire": + sire(); + break; + case "dam": + dam(); + break; + case "check": + check(); + break; +} +/* if (isset($_GET['f'])) { $f = $_GET['f']; } else { @@ -48,11 +88,10 @@ if ($f == "check") { check(); } +*/ function adddog() { - global $xoopsTpl, $xoopsUser, $xoopsDB; - //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); @@ -60,23 +99,23 @@ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); //check for access - if (empty($xoopsUser)) { + if (empty($GLOBALS['xoopsUser'])) { redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } - if ($xoopsUser->getVar("uid") == 0) { + if ($GLOBALS['xoopsUser']->getVar("uid") == 0) { redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } //create form - include XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + include $GLOBALS['xoops']->path("/class/xoopsformloader.php"); $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array('[animalType]' => $moduleConfig['animalType'])), 'dogname', 'add_dog.php?f=checkname', 'POST'); $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); //create random value $random = (rand() % 10000); $form->addElement(new XoopsFormHidden('random', $random)); //find userid - $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid"))); + $form->addElement(new XoopsFormHidden('user', $GLOBALS['xoopsUser']->getVar("uid"))); //name $form->addElement(new XoopsFormText("<b>" . _MA_PEDIGREE_FLD_NAME . "</b>", 'NAAM', $size = 50, $maxsize = 255, $value = '')); @@ -87,15 +126,11 @@ $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_DATA, array('[animalType]' => $moduleConfig['animalType'])), 'submit')); //add data (form) to smarty template - $xoopsTpl->assign("form", $form->render()); + $GLOBALS['xoopsTpl']->assign("form", $form->render()); } function checkname() - { - //configure global variables - global $xoopsTpl, $xoopsDB, $xoopsUser; - //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); @@ -104,29 +139,43 @@ $name = $_POST['NAAM']; //query - $queryString = "SELECT * from " . $xoopsDB->prefix("pedigree_tree") . " WHERE NAAM LIKE'%" . $name . "%' ORDER BY NAAM"; - $result = $xoopsDB->query($queryString); - $numresults = $xoopsDB->getRowsNum($result); + $pTreeHandler =& xoops_getmodulehandler('tree', 'pedigree'); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('NAAM', "%{$name}%", 'LIKE')); + $treeObjs = $pTreeHandler->getALL($criteria); + $numObjs = (is_array($treeObjs) && !empty($treeObjs)) ? count($treeObjs) : 0; +/* + $queryString = "SELECT * FROM " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE NAAM LIKE'%{$name}%' ORDER BY NAAM"; + $result = $GLOBALS['xoopsDB']->query($queryString); + $numresults = $GLOBALS['xoopsDB']->getRowsNum($result); if ($numresults >= 1 && !(isset($_GET['r']))) { +*/ + include $GLOBALS['xoops']->path("/class/xoopsformloader.php"); + if ($numObjs >= 1 && !(isset($_GET['r']))) { //create form - include XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array('[animalType]' => $moduleConfig['animalType'])), 'dogname', 'add_dog.php?f=checkname&r=1', 'POST'); //other elements $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); - $form->addElement(new XoopsFormHidden('NAAM', $_POST['NAAM'])); - $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid"))); - while ($row = $xoopsDB->fetchArray($result)) { + $naam = XoopsRequest::getString('NAAM', '', 'POST'); + $form->addElement(new XoopsFormHidden('NAAM', $naam)); +// $form->addElement(new XoopsFormHidden('NAAM', $_POST['NAAM'])); + $form->addElement(new XoopsFormHidden('user', $GLOBALS['xoopsUser']->getVar("uid"))); + foreach($treeObjs as $treeObj) { + $form->addElement(new XoopsFormLabel("<b>" . _MA_PEDIGREE_FLD_NAME . "</b>", "<a href=\"dog.php?id=" . $treeObj->getVar('ID') . "\">" . $treeObj->getVar('NAAM', 's') . "</a>")); + } +/* + while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) { //name $form->addElement(new XoopsFormLabel("<b>" . _MA_PEDIGREE_FLD_NAME . "</b>", "<a href=\"dog.php?id=" . $row['ID'] . "\">" . stripslashes($row['NAAM']) . "</a>")); } +*/ $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_ADD_KNOWN, array('[animalTypes]' => $moduleConfig['animalTypes'])))); //submit button $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_KNOWNOK, array('[animalType]' => $moduleConfig['animalType'])), 'submit')); //add data (form) to smarty template - $xoopsTpl->assign("form", $form->render()); + $GLOBALS['xoopsTpl']->assign("form", $form->render()); } else { //create form - include XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array('[animalType]' => $moduleConfig['animalType'])), 'dogname', 'add_dog.php?f=sire', 'POST'); //added to handle upload $form->setExtra("enctype='multipart/form-data'"); @@ -146,13 +195,13 @@ array('0' => strtr(_MA_PEDIGREE_FLD_MALE, array('[male]' => $moduleConfig['male'])), '1' => strtr(_MA_PEDIGREE_FLD_FEMA, array('[female]' => $moduleConfig['female']))) ); $form->addElement($gender_radio); - if ($moduleConfig['ownerbreeder'] == '1') { + if (1 == $moduleConfig['ownerbreeder']) { //breeder $breeder_select = new XoopsFormSelect("<b>" . _MA_PEDIGREE_FLD_BREE . "</b>", $name = "id_breeder", $value = '0', $size = 1, $multiple = false); - $queryfok = "SELECT ID, lastname, firstname from " . $xoopsDB->prefix("pedigree_owner") . " ORDER BY lastname"; - $resfok = $xoopsDB->query($queryfok); + $queryfok = "SELECT ID, lastname, firstname from " . $GLOBALS['xoopsDB']->prefix("pedigree_owner") . " ORDER BY lastname"; + $resfok = $GLOBALS['xoopsDB']->query($queryfok); $breeder_select->addOption('0', $name = _MA_PEDIGREE_UNKNOWN, $disabled = false); - while ($rowfok = $xoopsDB->fetchArray($resfok)) { + while ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok)) { $breeder_select->addOption($rowfok['ID'], $name = $rowfok['lastname'] . ", " . $rowfok['firstname'], $disabled = false); } $form->addElement($breeder_select); @@ -160,10 +209,10 @@ //owner $owner_select = new XoopsFormSelect("<b>" . _MA_PEDIGREE_FLD_OWNE . "</b>", $name = "id_owner", $value = '0', $size = 1, $multiple = false); - $queryfok = "SELECT ID, lastname, firstname from " . $xoopsDB->prefix("pedigree_owner") . " ORDER BY lastname"; - $resfok = $xoopsDB->query($queryfok); + $queryfok = "SELECT ID, lastname, firstname from " . $GLOBALS['xoopsDB']->prefix("pedigree_owner") . " ORDER BY lastname"; + $resfok = $GLOBALS['xoopsDB']->query($queryfok); $owner_select->addOption('0', $name = _MA_PEDIGREE_UNKNOWN, $disabled = false); - while ($rowfok = $xoopsDB->fetchArray($resfok)) { + while ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok)) { $owner_select->addOption($rowfok['ID'], $name = $rowfok['lastname'] . ", " . $rowfok['firstname'], $disabled = false); } $form->addElement($owner_select); @@ -176,15 +225,15 @@ $form->addElement($img_box); //create animal object - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are.. - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); - if ($userfield->active() && !$userfield->isLocked()) { + if ($userfield->isActive() && !$userfield->isLocked()) { $newentry = $fieldobject->newField(); $form->addElement($newentry); } @@ -195,14 +244,12 @@ $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_SIRE, array('[father]' => $moduleConfig['father'])), 'submit')); //add data (form) to smarty template - $xoopsTpl->assign("form", $form->render()); + $GLOBALS['xoopsTpl']->assign("form", $form->render()); } } function sire() { - global $xoopsTpl, $xoopsUser, $xoopsDB; - //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); @@ -211,7 +258,7 @@ $empty = array(); // an empty array //check for access - if (empty($xoopsUser)) { + if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof XoopsUser)) { redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } @@ -248,16 +295,16 @@ redirect_header("add_dog.php", 1, _MA_PEDIGREE_ADD_NAMEPLZ); } //create animal object - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are.. - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); sort($fields); //sort by ID not by order $usersql = ""; for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); - if ($userfield->active()) { + if ($userfield->isActive()) { //check if _FILES variable exists for user picturefield $currentfield = 'user' . $fields[$i]; $picturefield = $_FILES[$currentfield]['name']; @@ -281,10 +328,10 @@ //insert into pedigree_temp $query - = "INSERT INTO " . $xoopsDB->prefix("pedigree_temp") . " VALUES ('" . $random . "','" . unhtmlentities($name) . "','" . $id_owner . "','" . $id_breeder . "','" . $user . "','" . $roft + = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix("pedigree_temp") . " VALUES ('" . $random . "','" . unhtmlentities($name) . "','" . $id_owner . "','" . $id_breeder . "','" . $user . "','" . $roft . "','','','" . $foto . "', ''" . $usersql . ")"; //echo $query; die(); - $xoopsDB->query($query); + $GLOBALS['xoopsDB']->query($query); redirect_header("add_dog.php?f=sire&random=" . $random . "&st=" . $st . "&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREPLZ, array('[father]' => $moduleConfig['father']))); } //find letter on which to start else set to 'a' @@ -294,14 +341,14 @@ $l = "a"; } //assign sire to template - $xoopsTpl->assign("sire", "1"); + $GLOBALS['xoopsTpl']->assign("sire", "1"); //create list of males dog to select from $perp = $moduleConfig['perpage']; //count total number of dogs - $numdog = "SELECT count(ID) from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft='0' and NAAM LIKE '" . $l . "%'"; - $numres = $xoopsDB->query($numdog); + $numdog = "SELECT count(ID) from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft='0' and NAAM LIKE '" . $l . "%'"; + $numres = $GLOBALS['xoopsDB']->query($numdog); //total number of dogs the query will find - list($numresults) = $xoopsDB->fetchRow($numres); + list($numresults) = $GLOBALS['xoopsDB']->fetchRow($numres); //total number of pages $numpages = (floor($numresults / $perp)) + 1; if (($numpages * $perp) == ($numresults + $perp)) { @@ -349,22 +396,22 @@ } //query - $queryString = "SELECT * from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft = '0' and NAAM like '" . $l . "%'ORDER BY NAAM LIMIT " . $st . ", " . $perp; - $result = $xoopsDB->query($queryString); + $queryString = "SELECT * from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft = '0' and NAAM like '" . $l . "%'ORDER BY NAAM LIMIT " . $st . ", " . $perp; + $result = $GLOBALS['xoopsDB']->query($queryString); - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are... - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); $numofcolumns = 1; $columns[] = array('columnname' => "Name"); for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); //create empty string $lookupvalues = ""; - if ($userfield->active() && $userfield->inlist()) { - if ($userfield->haslookup()) { + if ($userfield->isActive() && $userfield->inList()) { + if ($userfield->hasLookup()) { $lookupvalues = $userfield->lookup($fields[$i]); //debug information //print_r($lookupvalues); @@ -388,7 +435,7 @@ 'usercolumns' => $empty ); - while ($row = $xoopsDB->fetchArray($result)) { + while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) { //create picture information if ($row['foto'] != '') { $camera = " <img src=\"assets/images/camera.png\">"; @@ -430,20 +477,17 @@ //add data to smarty template //assign dog - $xoopsTpl->assign("dogs", $dogs); - $xoopsTpl->assign("columns", $columns); - $xoopsTpl->assign("numofcolumns", $numofcolumns); - $xoopsTpl->assign("tsarray", sorttable($numofcolumns)); - //assign links - $xoopsTpl->assign("nummatch", strtr(_MA_PEDIGREE_ADD_SELSIRE, array('[father]' => $moduleConfig['father']))); - $xoopsTpl->assign("pages", $pages); - + $GLOBALS['xoopsTpl']->assign(array("dogs" => $dogs, + "columns" => $columns, + "numofcolumns" => $numofcolumns, + "tsarray" => sorttable($numofcolumns), + "nummatch" => strtr(_MA_PEDIGREE_ADD_SELSIRE, array('[father]' => $moduleConfig['father'])), + "pages" => $pages) + ); } function dam() { - global $xoopsTpl, $xoopsUser, $xoopsDB; - //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); @@ -453,7 +497,7 @@ //check for access $xoopsModule =& XoopsModule::getByDirname("pedigree"); - if (empty($xoopsUser)) { + if (empty($GLOBALS['xoopsUser'])) { redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } @@ -478,18 +522,18 @@ //make the redirect if (!isset($_GET['r'])) { //insert into pedigree_temp - $query = "UPDATE " . $xoopsDB->prefix("pedigree_temp") . " SET father =" . $_GET['selsire'] . " WHERE ID=" . $random; - $xoopsDB->queryf($query); + $query = "UPDATE " . $GLOBALS['xoopsDB']->prefix("pedigree_temp") . " SET father =" . $_GET['selsire'] . " WHERE ID=" . $random; + $GLOBALS['xoopsDB']->queryf($query); redirect_header("add_dog.php?f=dam&random=" . $random . "&st=" . $st . "&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREOK, array('[mother]' => $moduleConfig['mother']))); } - $xoopsTpl->assign("sire", "1"); + $GLOBALS['xoopsTpl']->assign("sire", "1"); //create list of males dog to select from $perp = $moduleConfig['perpage']; //count total number of dogs - $numdog = "SELECT count(ID) from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft='1' and NAAM LIKE '" . $l . "%'"; - $numres = $xoopsDB->query($numdog); - list($numresults) = $xoopsDB->fetchRow($numres); + $numdog = "SELECT count(ID) from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft='1' and NAAM LIKE '" . $l . "%'"; + $numres = $GLOBALS['xoopsDB']->query($numdog); + list($numresults) = $GLOBALS['xoopsDB']->fetchRow($numres); $numpages = (floor($numresults / $perp)) + 1; if (($numpages * $perp) == ($numresults + $perp)) { $numpages = $numpages - 1; @@ -534,22 +578,22 @@ } //query - $queryString = "SELECT * from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft = '1' and NAAM LIKE '" . $l . "%' ORDER BY NAAM LIMIT " . $st . ", " . $perp; - $result = $xoopsDB->query($queryString); + $queryString = "SELECT * from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft = '1' and NAAM LIKE '" . $l . "%' ORDER BY NAAM LIMIT " . $st . ", " . $perp; + $result = $GLOBALS['xoopsDB']->query($queryString); - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are... - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); $numofcolumns = 1; $columns[] = array('columnname' => "Name"); for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); //create empty string $lookupvalues = ""; - if ($userfield->active() && $userfield->inlist()) { - if ($userfield->haslookup()) { + if ($userfield->isActive() && $userfield->inList()) { + if ($userfield->hasLookup()) { $lookupvalues = $userfield->lookup($fields[$i]); //debug information //print_r($lookupvalues); @@ -573,7 +617,7 @@ 'usercolumns' => $empty ); - while ($row = $xoopsDB->fetchArray($result)) { + while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) { //create picture information if ($row['foto'] != '') { $camera = " <img src=\"assets/images/camera.png\">"; @@ -585,48 +629,47 @@ unset($columnvalue); //fill array for ($i = 1; $i < ($numofcolumns); ++$i) { - $x = $columns[$i]['columnnumber']; + $x = 'user' . $columns[$i]['columnnumber']; if (is_array($columns[$i]['lookupval'])) { foreach ($columns[$i]['lookupval'] as $key => $keyvalue) { - if ($key == $row['user' . $x]) { + if ($key == $row[$x]) { $value = $keyvalue['value']; } } - //debug information - ///echo $columns[$i]['columnname']."is an array !"; + /** @internal{debug information } + echo $columns[$i]['columnname']."is an array !"; + */ } //format value - cant use object because of query count - elseif (substr($row['user' . $x], 0, 7) == 'http://') { - $value = "<a href=\"" . $row['user' . $x] . "\">" . $row['user' . $x] . "</a>"; + elseif (substr($row[$x], 0, 7) == 'http://') { + $value = "<a href='{$row[$x]}'>{$row[$x]}</a>"; } else { - $value = $row['user' . $x]; + $value = $row[$x]; } $columnvalue[] = array('value' => $value); } - $dogs[] = array( - 'id' => $row['ID'], - 'name' => $name, - 'gender' => '<img src="assets/images/female.gif">', - 'link' => "<a href=\"add_dog.php?f=check&random=" . $random . "&seldam=" . $row['ID'] . "\">" . $name . "</a>", - 'colour' => "", - 'number' => "", - 'usercolumns' => $columnvalue + $dogs[] = array('id' => $row['ID'], + 'name' => $name, + 'gender' => '<img src="assets/images/female.gif">', + 'link' => "<a href='add_dog.php?f=check&random=" . $random . "&seldam={$row['ID']}'>{$name}</a>", + 'colour' => "", + 'number' => "", + 'usercolumns' => $columnvalue ); } //add data to smarty template //assign dog - $xoopsTpl->assign("dogs", $dogs); - $xoopsTpl->assign("columns", $columns); - $xoopsTpl->assign("numofcolumns", $numofcolumns); - $xoopsTpl->assign("tsarray", sorttable($numofcolumns)); - $xoopsTpl->assign("nummatch", strtr(_MA_PEDIGREE_ADD_SELDAM, array('[mother]' => $moduleConfig['mother']))); - $xoopsTpl->assign("pages", $pages); + $GLOBALS['xoopsTpl']->assign(array("dogs" => $dogsm, + "columns" => $columns, + "numofcolumns" => $numofcolumns, + "tsarray" => sorttable($numofcolumns), + "nummatch" => strtr(_MA_PEDIGREE_ADD_SELDAM, array('[mother]' => $moduleConfig['mother'])), + "pages" => $pages) + ); } function check() { - global $xoopsTpl, $xoopsUser, $xoopsDB; - //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); @@ -635,32 +678,34 @@ //check for access $xoopsModule =& XoopsModule::getByDirname("pedigree"); - if (empty($xoopsUser)) { + if (empty($GLOBALS['xoopsUser'])) { redirect_header("index.php", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } + $random = (empty($random)) ? XoopsRequest::getInt('random', 0) : $random; +/* if (empty($random)) { $random = $_POST['random']; } if (isset($_GET['random'])) { $random = $_GET['random']; } - +*/ //query - $queryString = "SELECT * from " . $xoopsDB->prefix("pedigree_temp") . " WHERE ID = " . $random; - $result = $xoopsDB->query($queryString); - while ($row = $xoopsDB->fetchArray($result)) { + $queryString = "SELECT * from " . $GLOBALS['xoopsDB']->prefix("pedigree_temp") . " WHERE ID = " . $random; + $result = $GLOBALS['xoopsDB']->query($queryString); + while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) { //create animal object - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are.. - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); sort($fields); $usersql = ""; for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); - if ($userfield->active()) { + if ($userfield->isActive()) { $usersql .= ",'" . addslashes($row['user' . $fields[$i]]) . "'"; } else { $usersql .= ",'" . $fieldobject->defaultvalue . "'"; @@ -669,15 +714,14 @@ } //insert into pedigree $query - = "INSERT INTO " . $xoopsDB->prefix("pedigree_tree") . " VALUES ('','" . addslashes($row['NAAM']) . "','" . $row['id_owner'] . "','" . $row['id_breeder'] . "','" . $row['user'] . "','" + = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " VALUES ('','" . addslashes($row['NAAM']) . "','" . $row['id_owner'] . "','" . $row['id_breeder'] . "','" . $row['user'] . "','" . $row['roft'] . "','" . $_GET['seldam'] . "','" . $row['father'] . "','" . addslashes($row['foto']) . "',''" . $usersql . ")"; mysql_query($query); //echo $query; die(); } - $sqlquery = "DELETE from " . $xoopsDB->prefix("pedigree_temp") . " where ID='" . $random . "'"; - $xoopsDB->queryf($sqlquery); + $sqlquery = "DELETE from " . $GLOBALS['xoopsDB']->prefix("pedigree_temp") . " where ID='{$random}'"; + $GLOBALS['xoopsDB']->queryf($sqlquery); redirect_header("latest.php", 1, strtr(_MA_PEDIGREE_ADD_OK, array('[animalType]' => $moduleConfig['animalType']))); } -//footer -include XOOPS_ROOT_PATH . "/footer.php"; +include $GLOBALS['xoops']->path("/footer.php"); Modified: XoopsModules/pedigree/branches/zyspec/pedigree/add_litter.php =================================================================== --- XoopsModules/pedigree/branches/zyspec/pedigree/add_litter.php 2015-02-18 18:40:33 UTC (rev 12999) +++ XoopsModules/pedigree/branches/zyspec/pedigree/add_litter.php 2015-02-18 18:43:38 UTC (rev 13000) @@ -1,38 +1,51 @@ <?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. +*/ +/** + * animal module for xoops + * + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @package pedigree + * @subpackage class + * @author XOOPS Module Dev Team + * @version $Id: $ + */ + require_once dirname(dirname(__DIR__)) . '/mainfile.php'; -/* -if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language'] . "/main.php")) { - require_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language'] . "/main.php"; -} else { - include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/english/main.php"; -} -*/ +xoops_loadLanguage('main', 'pedigree'); +xoops_load('XoopsRequest'); +xoops_load('animal', 'pedigree'); -xoops_loadLanguage('main', basename(dirname(__DIR__))); - // Include any common code for this module. -require_once(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/include/functions.php"); -require_once(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/include/class_field.php"); +require_once $GLOBALS['xoops']->path("/modules/" . $GLOBALS['xoopsModule']->dirname() . "/include/functions.php"); +require_once $GLOBALS['xoops']->path("/modules/" . $GLOBALS['xoopsModule']->dirname() . "/include/class_field.php"); $xoopsOption['template_main'] = "pedigree_addlitter.tpl"; -include XOOPS_ROOT_PATH . '/header.php'; -$xoopsTpl->assign('page_title', "Pedigree database - add a litter"); +include $GLOBALS['xoops']->path('/header.php'); +/* @todo: move hard coded language string to language files */ +$GLOBALS['xoopsTpl']->assign('page_title', "Pedigree database - add a litter"); //check for access $xoopsModule =& XoopsModule::getByDirname("pedigree"); -if (empty($xoopsUser)) { +if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof XoopsUser)) { redirect_header("index.php", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } //get module configuration -$module_handler =& xoops_gethandler('module'); -$module =& $module_handler->getByDirname("pedigree"); +//$module_handler =& xoops_gethandler('module'); +//$module =& $module_handler->getByDirname("pedigree"); $config_handler =& xoops_gethandler('config'); -$moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); +$moduleConfig =& $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid')); if (!isset($_GET['f'])) { addlitter(); @@ -51,27 +64,28 @@ function addlitter() { - global $xoopsTpl, $xoopsUser, $xoopsDB, $xoopsOption; + global $xoopsOption, $moduleConfig; +/* //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); $config_handler =& xoops_gethandler('config'); $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); - +*/ //create xoopsform - include XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + include $GLOBALS['xoops']->path("/class/xoopsformloader.php"); $searchform = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_LITTER, array('[litter]' => $moduleConfig['litter'])), "searchform", "add_litter.php?f=sire", "post"); $searchform->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360)); //create random value $random = (rand() % 10000); $searchform->addElement(new XoopsFormHidden('random', $random)); //find userid - $searchform->addElement(new XoopsFormHidden('userid', $xoopsUser->getVar("uid"))); + $searchform->addElement(new XoopsFormHidden('userid', $GLOBALS['xoopsUser']->getVar("uid"))); //create animal object - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are... - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); //create form contents for ($count = 1; $count < 11; ++$count) { @@ -87,10 +101,10 @@ $searchform->addElement($gender_radio[$count]); //add userfields for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); - if ($userfield->active() && $userfield->getSetting("Litter") == "1" && !$userfield->isLocked()) { + if ($userfield->isActive() && $userfield->getSetting("Litter") == "1" && !$userfield->isLocked()) { $newentry[$count][$i] = $fieldobject->newField($count); $searchform->addElement($newentry[$count][$i]); } @@ -102,10 +116,10 @@ $searchform->addElement(new XoopsFormLabel(_MA_PEDIGREE_ADD_DATA, _MA_PEDIGREE_DATA_INFO . $moduleConfig['litter'] . ".</h2>")); //add userfields that are not shown in the litter for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); - if ($userfield->active() && $userfield->generallitter() && !$userfield->isLocked()) { + if ($userfield->isActive() && $userfield->generalLitter() && !$userfield->isLocked()) { //add the "-" character to the beginning of the fieldname !!! $newentry[$i] = $fieldobject->newField("-"); $searchform->addElement($newentry[$i]); @@ -113,13 +127,14 @@ } //add the breeder to the list for the entire litter //no need to add the owner here because they will be different for each animal in the litter. - if ($moduleConfig['ownerbreeder'] == '1') { + /* @todo: move hard coded language string to language files */ + if (1 == $moduleConfig['ownerbreeder']) { //breeder $breeder = new XoopsFormSelect(_MA_PEDIGREE_FLD_BREE, 'id_breeder', $value = '', $size = 1, $multiple = false); - $queryfok = "SELECT ID, firstname, lastname from " . $xoopsDB->prefix("pedigree_owner") . " order by `lastname`"; - $resfok = $xoopsDB->query($queryfok); + $queryfok = "SELECT ID, firstname, lastname from " . $GLOBALS['xoopsDB']->prefix("pedigree_owner") . " order by `lastname`"; + $resfok = $GLOBALS['xoopsDB']->query($queryfok); $breeder->addOption(0, $name = 'Unknown', $disabled = false); - while ($rowfok = $xoopsDB->fetchArray($resfok)) { + while ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok)) { $breeder->addOption($rowfok['ID'], $name = $rowfok['lastname'] . ", " . $rowfok['firstname'], $disabled = false); } $searchform->addElement($breeder); @@ -128,13 +143,12 @@ //submit button $searchform->addElement(new XoopsFormButton('', 'submit', strtr(_MA_PEDIGREE_ADD_SIRE, array('[father]' => $moduleConfig['father'])), 'submit')); //send to template - $searchform->assign($xoopsTpl); + $searchform->assign($GLOBALS['xoopsTpl']); } function sire() { - global $xoopsTpl, $xoopsUser, $xoopsDB; //debug option ! //print_r($_POST); die(); //get module configuration @@ -143,12 +157,15 @@ $config_handler =& xoops_gethandler('config'); $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); +/* DONE AT BEGINNING OF FILE //check for access $xoopsModule =& XoopsModule::getByDirname("pedigree"); - if (empty($xoopsUser)) { + if (empty($GLOBALS['xoopsUser'])) { redirect_header("javascript:history.go(-1)", 3, _NOPERM . "<br />" . _MA_PEDIGREE_REGIST); exit(); } +*/ + /* @todo: need to filter '_GET' and '_POST' data */ $userid = $_POST['userid']; if (empty($random)) { $random = $_POST['random']; @@ -164,8 +181,8 @@ } $userfields = ""; for ($count = 1; $count < 11; ++$count) { - $namelitter = "name" . $count; - $roftlitter = "roft" . $count; + $namelitter = "name{$count}"; + $roftlitter = "roft{$count}"; //check for an empty name if ($_POST[$namelitter] !== "") { $name .= ":" . $_POST[$namelitter]; @@ -185,13 +202,13 @@ //make the redirect if (!isset($_GET['r'])) { //create animal object - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are.. - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); sort($fields); $usersql = ""; for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); $defvalue = $fieldobject->defaultvalue; @@ -204,7 +221,7 @@ //echo $count.'user'.$fields[$i]."=".$_POST[$count.'user'.$fields[$i]]."<br />"; $withinfield .= ":" . $_POST[$count . 'user' . $fields[$i]]; } else { - if ($userfield->active() && $userfield->generallitter() && !$userfield->isLocked()) { + if ($userfield->isActive() && $userfield->generalLitter() && !$userfield->isLocked()) { //use $_POST value if this is a general litter field $withinfield .= ":" . $_POST['-user' . $fields[$i]]; } else { @@ -219,9 +236,9 @@ $user{$fields[$i]} = $withinfield; } //insert into pedigree_temp - $query = "INSERT INTO " . $xoopsDB->prefix("pedigree_temp") . " VALUES ('" . $random . "','" . unhtmlentities($name) . "','0','" . $id_breeder . "','" . $userid . "','" . $roft . "','','','', ''"; + $query = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix("pedigree_temp") . " VALUES ('" . $random . "','" . unhtmlentities($name) . "','0','" . $id_breeder . "','" . $userid . "','" . $roft . "','','','', ''"; for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); //do we only need to create a query for active fields ? @@ -230,7 +247,7 @@ $query .= ")"; //debug options //echo $query."<br />"; die(); - $xoopsDB->query($query); + $GLOBALS['xoopsDB']->query($query); redirect_header("add_litter.php?f=sire&random=" . $random . "&st=" . $st . "&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREPLZ, array('[father]' => $moduleConfig['father']))); } //find letter on which to start else set to 'a' @@ -240,14 +257,14 @@ $l = "a"; } //assign 'sire' to the template - $xoopsTpl->assign("sire", "1"); + $GLOBALS['xoopsTpl']->assign("sire", "1"); //create list of males dog to select from $perp = $moduleConfig['perpage']; //count total number of dogs - $numdog = "SELECT ID from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft='0' and NAAM LIKE '" . $l . "%'"; - $numres = $xoopsDB->query($numdog); + $numdog = "SELECT ID from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft='0' and NAAM LIKE '" . $l . "%'"; + $numres = $GLOBALS['xoopsDB']->query($numdog); //total number of dogs the query will find - $numresults = $xoopsDB->getRowsNum($numres); + $numresults = $GLOBALS['xoopsDB']->getRowsNum($numres); //total number of pages $numpages = (floor($numresults / $perp)) + 1; if (($numpages * $perp) == ($numresults + $perp)) { @@ -294,22 +311,22 @@ } } //query - $queryString = "SELECT * from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft = '0' and NAAM LIKE '" . $l . "%' ORDER BY NAAM LIMIT " . $st . ", " . $perp; - $result = $xoopsDB->query($queryString); + $queryString = "SELECT * from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft = '0' and NAAM LIKE '" . $l . "%' ORDER BY NAAM LIMIT " . $st . ", " . $perp; + $result = $GLOBALS['xoopsDB']->query($queryString); - $animal = new Animal(); + $animal = new PedigreeAnimal(); //test to find out how many user fields there are... - $fields = $animal->numoffields(); + $fields = $animal->numOfFields(); $numofcolumns = 1; $columns[] = array('columnname' => "Name"); for ($i = 0; $i < count($fields); ++$i) { - $userfield = new Field($fields[$i], $animal->getconfig()); + $userfield = new Field($fields[$i], $animal->getConfig()); $fieldType = $userfield->getSetting("FieldType"); $fieldobject = new $fieldType($userfield, $animal); //create empty string $lookupvalues = ""; - if ($userfield->active() && $userfield->inlist()) { - if ($userfield->haslookup()) { + if ($userfield->isActive() && $userfield->inList()) { + if ($userfield->hasLookup()) { $lookupvalues = $userfield->lookup($fields[$i]); //debug information //print_r($lookupvalues); @@ -333,7 +350,7 @@ 'usercolumns' => $empty ); - while ($row = $xoopsDB->fetchArray($result)) { + while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) { //create picture information if ($row['foto'] != '') { $camera = " <img src=\"assets/images/camera.png\">"; @@ -375,30 +392,31 @@ //add data to smarty template //assign dog - $xoopsTpl->assign("dogs", $dogs); - $xoopsTpl->assign("columns", $columns); - $xoopsTpl->assign("numofcolumns", $numofcolumns); - $xoopsTpl->assign("tsarray", sorttable($numofcolumns)); - $xoopsTpl->assign("nummatch", strtr(_MA_PEDIGREE_ADD_SELSIRE, array('[father]' => $moduleConfig['father']))); - $xoopsTpl->assign("pages", $pages); + $GLOBALS['xoopsTpl']->assign(array("dogs" => $dogs, + "columns" => $columns, + "numofcolumns" => $numofcolumns, + "tsarray" => sorttable($numofcolumns), + "nummatch" => strtr(_MA_PEDIGREE_ADD_SELSIRE, array('[father]' => $moduleConfig['father'])), + "pages" => $pages) + ); } function dam() { - global $xoopsTpl, $xoopsUser, $xoopsDB; - //get module configuration $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("pedigree"); $config_handler =& xoops_gethandler('config'); $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); - +/* if (empty($random)) { $random = $_POST['random']; } if (isset($_GET['random'])) { $random = $_GET['random']; } +*/ + $random = empty($random) ? XoopsRequest::getInt('random', 0) : $random; if (empty($st)) { $st = 0; } @@ -408,8 +426,8 @@ //make the redirect if (!isset($_GET['r'])) { //insert into pedigree_temp - $query = "UPDATE " . $xoopsDB->prefix("pedigree_temp") . " SET father =" . $_GET['selsire'] . " WHERE ID=" . $random; - $xoopsDB->queryf($query); + $query = "UPDATE " . $GLOBALS['xoopsDB']->prefix("pedigree_temp") . " SET father =" . $_GET['selsire'] . " WHERE ID=" . $random; + $GLOBALS['xoopsDB']->queryf($query); redirect_header("add_litter.php?f=dam&random=" . $random . "&st=" . $st . "&r=1", 1, strtr(_MA_PEDIGREE_ADD_SIREOK, array('[mother]' => $moduleConfig['mother']))); } //find letter on which to start else set to 'a' @@ -419,14 +437,14 @@ $l = "a"; } //assign sire to the template - $xoopsTpl->assign("sire", "1"); + $GLOBALS['xoopsTpl']->assign("sire", "1"); //create list of males dog to select from $perp = $moduleConfig['perpage']; //count total number of dogs - $numdog = "SELECT ID from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft='1' and NAAM LIKE '" . $l . "%'"; - $numres = $xoopsDB->query($numdog); + $numdog = "SELECT ID from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft='1' and NAAM LIKE '" . $l . "%'"; + $numres = $GLOBALS['xoopsDB']->query($numdog); //total number of dogs the query will find - $numresults = $xoopsDB->getRowsNum($numres); + $numresults = $GLOBALS['xoopsDB']->getRowsNum($numres); //total number of pages $numpages = (floor($numresults / $perp)) + 1; if (($numpages * $perp) == ($numresults + $perp)) { @@ -473,22 +491,22 @@ } } //query - $queryString = "SELECT * from " . $xoopsDB->prefix("pedigree_tree") . " WHERE roft = '1' and NAAM LIKE '" . $l . "%' ORDER BY NAAM LIMIT " . $st . ", " . $perp; - $result = $xoopsDB->query($queryString); + $queryString = "SELECT * from " . $GLOBALS['xoopsDB']->prefix("pedigree_tree") . " WHERE roft = '1' and NAAM LIKE '" . $l . "%' ORDER BY NAAM LIMIT " . $st . ", " . $pe... [truncated message content] |
From: <be...@us...> - 2015-02-18 18:40:44
|
Revision: 12999 http://sourceforge.net/p/xoops/svn/12999 Author: beckmi Date: 2015-02-18 18:40:33 +0000 (Wed, 18 Feb 2015) Log Message: ----------- Setting up branch for Zyspec Added Paths: ----------- XoopsModules/pedigree/branches/zyspec/pedigree/ |
From: <be...@us...> - 2015-02-18 18:40:03
|
Revision: 12998 http://sourceforge.net/p/xoops/svn/12998 Author: beckmi Date: 2015-02-18 18:39:56 +0000 (Wed, 18 Feb 2015) Log Message: ----------- Setting up branch for Zyspec Added Paths: ----------- XoopsModules/pedigree/branches/zyspec/ |
From: <be...@us...> - 2015-02-18 18:28:54
|
Revision: 12997 http://sourceforge.net/p/xoops/svn/12997 Author: beckmi Date: 2015-02-18 18:28:39 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 1.11 RC3 Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about2.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header2.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/answer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/docbook_export.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/faq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/import.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/myblocksadmin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/mygroupperm.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/mygrouppermform.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/permissions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/question.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/wffaq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/xoopsfaq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/answer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_context.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_most_viewed.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_new.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_random_diduno.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_random_faq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_random_how.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_recent.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/blocks/faqs_recent_questions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/class/answer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/class/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/class/faq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/class/permission.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/class/smartdbupdater.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/comment_delete.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/comment_edit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/comment_new.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/comment_post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/comment_reply.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/docs/credits.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/docs/readme.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/faq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/answer.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/blocksadmin.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/comment_functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/displayfaqs.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/notification.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/onupdate.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/request.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/search.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/searchform.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/submit.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/language/english/admin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/language/english/blocks.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/language/english/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/language/english/modinfo.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/language/english/smartdbupdater.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/notification_update.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/open_category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/open_index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/print.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/request.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/sql/mysql.sql XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/submit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/xoops_version.php Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/css/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/css/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/bg.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/blank.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/approve.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/cat.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/close12.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/delete.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/edit.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/friend.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/merge.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/newanswer.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/open12.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/print.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/icon/subcat.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/left_both.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/delete.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/delete.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/edit.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/friend.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/newanswer.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/links/print.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/right_both.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/sfcssbutton.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/smartfaq.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/images/smartfaq_logo.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_anchor_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_crossframe_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_cssstyle_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_exclusive_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_followscroll_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_hideform_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/mini/overlib_shadow_mini.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_anchor.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_crossframe.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_cssstyle.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_exclusive.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_followscroll.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_hideform.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/assets/js/overlib/overlib_shadow.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/class/uploader.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/functions.image.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/functions.render.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_context.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_most_viewed.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_new.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_random_diduno.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_random_faq.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_random_how.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_recent.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_recent_questions.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_category.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_faq.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_index.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_lastfaqs.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_singlefaq.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_submit.tpl Removed Paths: ------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/images/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/include/overlib/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_context.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_most_viewed.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_new.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_random_diduno.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_random_faq.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_random_how.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_recent.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/blocks/faqs_recent_questions.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_category.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_faq.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_lastfaqs.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_singlefaq.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/templates/smartfaq_submit.html Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -1,30 +1,30 @@ -<?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. - */ - -/** - * @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 - * @since - * @author XOOPS Development Team - * @version $Id $ - */ - -include_once dirname(__FILE__) . '/admin_header.php'; - -xoops_cp_header(); - -$aboutAdmin = new ModuleAdmin(); - -echo $aboutAdmin->addNavigation('about.php'); -echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); - -include 'admin_footer.php'; \ No newline at end of file +<?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. + */ + +/** + * @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 + * @since + * @author XOOPS Development Team + * @version $Id $ + */ + +include_once __DIR__ . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + +include_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about2.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about2.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/about2.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -7,7 +7,7 @@ * Licence: GNU */ -include_once("admin_header.php"); +include_once __DIR__ . '/admin_header.php'; $myts = &MyTextSanitizer::getInstance(); Global $xoopsModule; @@ -26,11 +26,9 @@ echo "<td align = 'center'>"; echo "<img src='".XOOPS_URL."/modules/smartfaq/".$versioninfo->getInfo('image')."' alt='' align='center'/></a>"; echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " version " . $versioninfo->getInfo('version') . "</div>"; -if ( $versioninfo->getInfo('author_realname') != '') -{ +if ( $versioninfo->getInfo('author_realname') != '') { $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; -} else -{ +} else { $author_name = $versioninfo->getInfo('author'); } @@ -49,7 +47,7 @@ $author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")"; } else { $author_name = $versioninfo->getInfo('author'); -} +} echo "<div style = 'line-height: 16px; font-weight: bold; display: block;'>" . _AM_SF_BY . " " . $author_name; echo "</div>"; @@ -66,27 +64,26 @@ echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_LEAD . "</td>"; echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_lead') . "</td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('developer_contributor') != '') { echo "<tr>"; echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_CONTRIBUTOR . "</td>"; echo "<td class='even' align='left'>" . $versioninfo->getInfo('developer_contributor') . "</td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('developer_website_url') != '') { echo "<tr>"; echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_WEBSITE . "</td>"; echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('developer_website_url') . "' target='blank'>" . $versioninfo->getInfo('developer_website_name') . "</a></td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('developer_email') != '') { echo "<tr>"; echo "<td class='head' width = '150px' align='left'>" . _MI_SF_DEVELOPER_EMAIL . "</td>"; echo "<td class='even' align='left'><a href='mailto:" . $versioninfo->getInfo('developer_email') . "'>" . $versioninfo->getInfo('developer_email') . "</a></td>"; echo "</tr>"; -} +} - echo "</table>"; echo "<br />\n"; // Module Developpment information @@ -100,41 +97,41 @@ echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_RELEASE_DATE . "</td>"; echo "<td class='even' align='left'>" . $versioninfo->getInfo('date') . "</td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('status') != '') { echo "<tr>"; echo "<td class='head' width = '200' align='left'>" . _MI_SF_MODULE_STATUS . "</td>"; echo "<td class='even' align='left'>" . $versioninfo->getInfo('status') . "</td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('demo_site_url') != '') { echo "<tr>"; echo "<td class='head' align='left'>" . _MI_SF_MODULE_DEMO . "</td>"; echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('demo_site_url') . "' target='blank'>" . $versioninfo->getInfo('demo_site_name') . "</a></td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('support_site_url') != '') { echo "<tr>"; echo "<td class='head' align='left'>" . _MI_SF_MODULE_SUPPORT . "</td>"; echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('support_site_url') . "' target='blank'>" . $versioninfo->getInfo('support_site_name') . "</a></td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('submit_bug') != '') { echo "<tr>"; echo "<td class='head' align='left'>" . _MI_SF_MODULE_BUG . "</td>"; echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_bug') . "' target='blank'>" . "Submit a Bug in SmartFAQ Bug Tracker" . "</a></td>"; echo "</tr>"; -} +} if ($versioninfo->getInfo('submit_feature') != '') { echo "<tr>"; echo "<td class='head' align='left'>" . _MI_SF_MODULE_FEATURE . "</td>"; echo "<td class='even' align='left'><a href='" . $versioninfo->getInfo('submit_feature') . "' target='blank'>" . "Request a feature in the SmartFAQ Feature Tracker" . "</a></td>"; echo "</tr>"; -} +} echo "</table>"; // Warning @@ -150,7 +147,7 @@ echo "</tr>"; echo "</table>"; -} +} // Author's note if ($versioninfo->getInfo('author_word') != '') { echo "<br />\n"; @@ -164,7 +161,7 @@ echo "</tr>"; echo "</table>"; -} +} // Version History if ($versioninfo->getInfo('version_history') != '') { @@ -179,10 +176,10 @@ echo "</tr>"; echo "</table>"; -} +} echo "<br />"; //$modfooter = sf_modFooter(); //echo "<div align='center'>" . $modfooter . "</div>"; //xoops_cp_footer(); -include "admin_footer.php"; \ No newline at end of file +include_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -28,18 +28,16 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -if (!defined("XOOPS_ROOT_PATH")) { - die("XOOPS root path not defined"); -} +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); if (isset($HTTP_POST_VARS['fct'])) { - $fct = trim($HTTP_POST_VARS['fct']); + $fct = trim($HTTP_POST_VARS['fct']); } if (isset($HTTP_GET_VARS['fct'])) { - $fct = trim($HTTP_GET_VARS['fct']); + $fct = trim($HTTP_GET_VARS['fct']); } if (empty($fct)) $fct = 'preferences' ; -include "../../../mainfile.php"; +include dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; include XOOPS_ROOT_PATH."/include/cp_functions.php"; include_once XOOPS_ROOT_PATH."/kernel/module.php"; @@ -47,108 +45,106 @@ $admintest = 0; if (is_object($xoopsUser)) { - $xoopsModule =& XoopsModule::getByDirname("system"); - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); - exit(); - } - $admintest=1; + $xoopsModule =& XoopsModule::getByDirname("system"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); + } + $admintest=1; } else { - redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); - exit(); + redirect_header(XOOPS_URL.'/user.php',3,_NOPERM); + exit(); } // include system category definitions include_once XOOPS_ROOT_PATH."/modules/system/constants.php"; $error = false; if ($admintest != 0) { - if (isset($fct) && $fct != '') { - if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { - - include_once( XOOPS_ROOT_PATH."/modules/system/language/" . $xoopsConfig['language'] . "/admin.php" ) ; - - if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { - include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; - } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { - include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; - } - include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; - $sysperm_handler =& xoops_gethandler('groupperm'); - $category = !empty($modversion['category'])? intval($modversion['category']) : 0; - unset($modversion); - if ($category > 0) { - $groups =& $xoopsUser->getGroups(); - if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){ - if (file_exists("../include/{$fct}.inc.php")) { - include_once "../include/{$fct}.inc.php" ; - } else { - $error = true; - } - } else { - $error = true; - } - } elseif ($fct == 'version') { - if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { - include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; - } else { - $error = true; - } - } else { - $error = true; - } - } else { - $error = true; - } - } else { - $error = true; - } + if (isset($fct) && $fct != '') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { + + include_once( XOOPS_ROOT_PATH."/modules/system/language/" . $xoopsConfig['language'] . "/admin.php" ) ; + + if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; + } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; + } + include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; + $sysperm_handler =& xoops_gethandler('groupperm'); + $category = !empty($modversion['category'])? intval($modversion['category']) : 0; + unset($modversion); + if ($category > 0) { + $groups =& $xoopsUser->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { + if (file_exists("../include/{$fct}.inc.php")) { + include_once "../include/{$fct}.inc.php" ; + } else { + $error = true; + } + } else { + $error = true; + } + } elseif ($fct == 'version') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } } if (false != $error) { - xoops_cp_header(); - echo "<h4>System Configuration</h4>"; - echo '<table class="outer" cellpadding="4" cellspacing="1">'; - echo '<tr>'; - $groups = $xoopsUser->getGroups(); - $all_ok = false; - if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { - $sysperm_handler =& xoops_gethandler('groupperm'); - $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups); - } else { - $all_ok = true; - } - $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; - $handle = opendir($admin_dir); - $counter = 0; - $class = 'even'; - while ($file = readdir($handle)) { - if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { - include $admin_dir.'/'.$file.'/xoops_version.php'; - if ($modversion['hasAdmin']) { - $category = isset($modversion['category'])? intval($modversion['category']) : 0; - if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { - echo "<td class='$class' align='center' valign='bottom' width='19%'>"; - echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; - echo "</td>"; - $counter++; - $class = ($class == 'even')? 'odd' : 'even'; - } - if ( $counter > 4 ) { - $counter = 0; - echo "</tr>"; - echo "<tr>"; - } - } - unset($modversion); - } - } - while ($counter < 5) { - echo '<td class="'.$class.'"> </td>'; - $class = ($class == 'even')? 'odd' : 'even'; - $counter++; - } - echo '</tr></table>'; + xoops_cp_header(); + echo "<h4>System Configuration</h4>"; + echo '<table class="outer" cellpadding="4" cellspacing="1">'; + echo '<tr>'; + $groups = $xoopsUser->getGroups(); + $all_ok = false; + if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { + $sysperm_handler =& xoops_gethandler('groupperm'); + $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups); + } else { + $all_ok = true; + } + $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; + $handle = opendir($admin_dir); + $counter = 0; + $class = 'even'; + while ($file = readdir($handle)) { + if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { + include $admin_dir.'/'.$file.'/xoops_version.php'; + if ($modversion['hasAdmin']) { + $category = isset($modversion['category'])? intval($modversion['category']) : 0; + if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { + echo "<td class='$class' align='center' valign='bottom' width='19%'>"; + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; + echo "</td>"; + ++$counter; + $class = ($class == 'even')? 'odd' : 'even'; + } + if ($counter > 4) { + $counter = 0; + echo "</tr>"; + echo "<tr>"; + } + } + unset($modversion); + } + } + while ($counter < 5) { + echo '<td class="'.$class.'"> </td>'; + $class = ($class == 'even')? 'odd' : 'even'; + ++$counter; + } + echo '</tr></table>'; xoops_cp_footer(); } - -?> \ No newline at end of file Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_footer.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_footer.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_footer.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -1,28 +1,28 @@ -<?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. - */ - -/** - * @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 - * @since - * @author XOOPS Development Team - * @version $Id $ - */ - -echo "<div class='adminfooter'>\n" - ." <div style='text-align: center;'>\n" - ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" - ." </div>\n" - ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" - ."</div>"; - -xoops_cp_footer(); \ No newline at end of file +<?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. + */ + +/** + * @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 + * @since + * @author XOOPS Development Team + * @version $Id $ + */ + +echo "<div class='adminfooter'>\n" + ." <div style='text-align: center;'>\n" + ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + ." </div>\n" + ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" + ."</div>"; + +xoops_cp_footer(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -1,63 +1,59 @@ -<?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. - */ - -/** - * @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 - * @since - * @author XOOPS Development Team - * @version $Id $ - */ - -$path = dirname(dirname(dirname(dirname(__FILE__)))); -include_once $path . '/mainfile.php'; -include_once $path . '/include/cp_functions.php'; -require_once $path . '/include/cp_header.php'; - - - -include_once $path . "/kernel/module.php"; -include_once $path . "/class/xoopstree.php"; -include_once $path . "/class/xoopslists.php"; -include_once $path . '/class/pagenav.php'; -include_once $path . "/class/xoopsformloader.php"; - -include_once $path .'/modules/smartfaq/include/functions.php'; -include_once $path .'/modules/smartfaq/class/category.php'; -include_once $path .'/modules/smartfaq/class/faq.php'; -include_once $path .'/modules/smartfaq/class/answer.php'; - -$myts = &MyTextSanitizer::getInstance(); - - - -global $xoopsModule; - -$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); - -//if functions.php file exist -//require_once dirname(dirname(__FILE__)) . '/include/functions.php'; - -// Load language files -xoops_loadLanguage('admin', $thisModuleDir); -xoops_loadLanguage('modinfo', $thisModuleDir); -xoops_loadLanguage('main', $thisModuleDir); - -$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); -$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); -$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - -if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ - include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); - }else{ - redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false); - } \ No newline at end of file +<?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. + */ + +/** + * @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 + * @since + * @author XOOPS Development Team + * @version $Id $ + */ + +$path = dirname(dirname(dirname(__DIR__))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +include_once $path . "/kernel/module.php"; +include_once $path . "/class/xoopstree.php"; +include_once $path . "/class/xoopslists.php"; +include_once $path . '/class/pagenav.php'; +include_once $path . "/class/xoopsformloader.php"; + +include_once $path .'/modules/smartfaq/include/functions.php'; +include_once $path .'/modules/smartfaq/class/category.php'; +include_once $path .'/modules/smartfaq/class/faq.php'; +include_once $path .'/modules/smartfaq/class/answer.php'; + +$myts = &MyTextSanitizer::getInstance(); + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +//if functions.php file exist +//require_once dirname(__DIR__) . '/include/functions.php'; + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); +$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) { + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + } else { + redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false); + } Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header2.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header2.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/admin_header2.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -7,8 +7,8 @@ * Licence: GNU */ -include_once "../../../mainfile.php"; -include_once '../../../include/cp_header.php'; +include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; +include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; include_once XOOPS_ROOT_PATH . "/kernel/module.php"; include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; @@ -21,5 +21,3 @@ include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; $myts = &MyTextSanitizer::getInstance(); - -?> \ No newline at end of file Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/answer.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/answer.php 2015-02-18 18:20:22 UTC (rev 12996) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/admin/answer.php 2015-02-18 18:28:39 UTC (rev 12997) @@ -7,7 +7,7 @@ * Licence: GNU */ -include_once("admin_header.php"); +include_once __DIR__ . '/admin_header.php'; $op = ''; @@ -21,262 +21,260 @@ function editfaq($faqid = '') { - global $answer_handler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts, $pathIcon16, $smartModuleConfig; + global $answer_handler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts, $pathIcon16, $smartModuleConfig; - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - // Creating the FAQ object - $faqObj = new sfFaq($faqid); + // Creating the FAQ object + $faqObj = new sfFaq($faqid); - // Creating the category object - $categoryObj =& $faqObj->category(); + // Creating the category object + $categoryObj =& $faqObj->category(); - if ($faqObj->notLoaded()) { - redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); - exit(); - } + if ($faqObj->notLoaded()) { + redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); + exit(); + } - switch ($faqObj->status()) { + switch ($faqObj->status()) { - case _SF_STATUS_ANSWERED : - $breadcrumb_action1 = _AM_SF_SUBMITTED; - $breadcrumb_action2 = _AM_SF_APPROVING; - $collapsableBar_title = _AM_SF_SUBMITTED_TITLE; - $collapsableBar_info = _AM_SF_SUBMITTED_INFO; - $button_caption = _AM_SF_APPROVE; - $an_status = _SF_AN_STATUS_PROPOSED; - break; + case _SF_STATUS_ANSWERED : + $breadcrumb_action1 = _AM_SF_SUBMITTED; + $breadcrumb_action2 = _AM_SF_APPROVING; + $collapsableBar_title = _AM_SF_SUBMITTED_TITLE; + $collapsableBar_info = _AM_SF_SUBMITTED_INFO; + $button_caption = _AM_SF_APPROVE; + $an_status = _SF_AN_STATUS_PROPOSED; + break; - } + } - $module_id = $xoopsModule->getVar('mid'); - $gperm_handler = &xoops_gethandler('groupperm'); - $groups = ($xoopsUser)? ($xoopsUser->getGroups()) : XOOPS_GROUP_ANONYMOUS; + $module_id = $xoopsModule->getVar('mid'); + $gperm_handler = &xoops_gethandler('groupperm'); + $groups = ($xoopsUser)? ($xoopsUser->getGroups()) : XOOPS_GROUP_ANONYMOUS; - if (!sf_userIsAdmin() && (!($gperm_handler->checkRight('category_admin', $faqObj->categoryid(), $groups, $module_id)))) { - redirect_header("javascript:history.go(-1)", 1, _NOPERM); - exit; - } - // Retreiving the official answer - $official_answer = $faqObj->answer(); + if (!sf_userIsAdmin() && (!($gperm_handler->checkRight('category_admin', $faqObj->categoryid(), $groups, $module_id)))) { + redirect_header("javascript:history.go(-1)", 1, _NOPERM); + exit; + } + // Retreiving the official answer + $official_answer = $faqObj->answer(); - //sf_adminMenu(-1, _AM_SF_SMARTFAQ . " > " . _AM_SF_ANSWER); + //sf_adminMenu(-1, _AM_SF_SMARTFAQ . " > " . _AM_SF_ANSWER); - sf_collapsableBar('bottomtable', 'bottomtableicon'); - echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a> " . _AM_SF_SUBMITTED_ANSWER . "</h3>"; - echo "<div id='bottomtable'>"; - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_SUBMITTED_ANSWER_INFO . "</span>"; + sf_collapsableBar('bottomtable', 'bottomtableicon'); + echo "<img id='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a> " . _AM_SF_SUBMITTED_ANSWER . "</h3>"; + echo "<div id='bottomtable'>"; + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_SF_SUBMITTED_ANSWER_INFO . "</span>"; - $proposed_answers = $answer_handler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); + $proposed_answers = $answer_handler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); - if (count($proposed_answers) == 0) { - redirect_header("index.php", 1, _AM_SF_NOANSWERS); - exit(); - } + if (count($proposed_answers) == 0) { + redirect_header("index.php", 1, _AM_SF_NOANSWERS); + exit(); + } - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer> - <tr> - <td class='head' width='100px'>" . _AM_SF_CATEGORY . "</td> - <td class='even'>" . $categoryObj->name() . "</td> - </tr> - <tr> - <td class='head' width='100px'>" . _AM_SF_QUESTION . "</td> - <td class='even'>" . $faqObj->question() . "</td> - </tr>"; - if ($official_answer) { - echo " - <tr> - <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL . "</td> - <td class='even'>" . $official_answer->answer() . "</td> - </tr>"; - } - echo "</table><br />\n"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer> + <tr> + <td class='head' width='100px'>" . _AM_SF_CATEGORY . "</td> + <td class='even'>" . $categoryObj->name() . "</td> + </tr> + <tr> + <td class='head' width='100px'>" . _AM_SF_QUESTION . "</td> + <td class='even'>" . $faqObj->question() . "</td> + </tr>"; + if ($official_answer) { + echo " + <tr> + <td class='head' width='100px'>" . _AM_SF_ANSWER_OFFICIAL . "</td> + <td class='even'>" . $official_answer->answer() . "</td> + </tr>"; + } + echo "</table><br />\n"; - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; - echo "<tr>"; - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . "</b></td>"; - echo "<th class='bg3' class='bg3' align='center'><b>" . _AM_SF_ANSWER . "</b></td>"; + echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; + echo "<tr>"; + echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . "</b></td>"; + echo "<th class='bg3' class='bg3' align='center'><b>" . _AM_SF_ANSWER . "</b></td>"; echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . "</b></td>"; - echo "<th width='180' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; - echo "<th width='120' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; - echo "</tr>"; + echo "<th width='180' class='bg3' align='center'><b>" . _AM_SF_CREATED . "</b></td>"; + echo "<th width='120' class='bg3' align='center'><b>" . _AM_SF_ACTION . "</b></td>"; + echo "</tr>"; - $merge = ''; - $modify = ''; - $approve = ''; - foreach ($proposed_answers as $proposed_answer) { - if ($faqObj->status() == _SF_STATUS_NEW_ANSWER) { - $merge = "<a href='faq.php?op=merge&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/merge.gif' title='" . _AM_SF_FAQ_MERGE . "' alt='" . _AM_SF_FAQ_MERGE . "' /></a> "; - $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/on.png'."' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "' /></a>"; - } - $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "' /></a> "; - $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "' /></a>"; - echo "<tr>"; - echo "<td class='head' align='center'>" . $proposed_answer->answerid(). "</td>"; - echo "<td class='even' align='left'>" . $proposed_answer->answer() . "</td>"; + $merge = ''; + $modify = ''; + $approve = ''; + foreach ($proposed_answers as $proposed_answer) { + if ($faqObj->status() == _SF_STATUS_NEW_ANSWER) { + $merge = "<a href='faq.php?op=merge&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/merge.gif' title='" . _AM_SF_FAQ_MERGE . "' alt='" . _AM_SF_FAQ_MERGE . "' /></a> "; + $approve = "<a href='answer.php?op=selectanswer&faqid=" . $faqid . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/on.png'."' title='" . _AM_SF_FAQ_APPROVE_NEW_ANSWER . "' alt='" . _AM_SF_APPROVESUB . "' /></a>"; + } + $modify = "<a href='faq.php?op=mod&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/edit.png'."' title='" . _AM_SF_FAQ_REVIEW . "' alt='" . _AM_SF_FAQ_REVIEW . "' /></a> "; + $delete = "<a href='answer.php?op=del&faqid=" . $faqObj->faqid() . "&answerid=" . $proposed_answer->answerid() . "'><img src='". $pathIcon16 .'/delete.png'."' title='" . _AM_SF_DELETESUBM . "' alt='" . _AM_SF_DELETESUBM . "' /></a>"; + echo "<tr>"; + echo "<td class='head' align='center'>" . $proposed_answer->answerid(). "</td>"; + echo "<td class='even' align='left'>" . $proposed_answer->answer() . "</td>"; //show name of the answer submitter $submitter= sf_getLinkedUnameFromId($proposed_answer->uid(), $smartModuleConfig['userealname']); echo "<td class='even' align='center'>" . $submitter . "</td>"; - echo "<td class='even' align='center'>" . $proposed_answer->datesub() . "</td>"; - echo "<td class='even' align='center'> $merge $modify $approve $delete </td>"; - echo "</tr>"; - } + echo "<td class='even' align='center'>" . $proposed_answer->datesub() . "</td>"; + echo "<td class='even' align='center'> $merge $modify $approve $delete </td>"; + echo "</tr>"; + } - echo "</table>\n<br />"; + echo "</table>\n<br />"; } /* -- Available operations -- */ switch ($op) { - case "mod": - xoops_cp_header(); - include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; - Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts; - $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : 0; - editfaq($faqid); - break; + case "mod": + xoops_cp_header(); + include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; + Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts; + $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : 0; + editfaq($faqid); + break; - case "selectanswer": - global $xoopsUser, $_GET, $xoopsModuleConfig; + case "selectanswer": + global $xoopsUser, $_GET, $xoopsModuleConfig; - $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : 0; - $answerid = isset($_GET['answerid'])? intval($_GET['answerid']) : 0; + $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : 0; + $answerid = isset($_GET['answerid'])? intval($_GET['answerid']) : 0; - // Creating the FAQ object - $faqObj = new sfFaq($faqid); + // Creating the FAQ object + $faqObj = new sfFaq($faqid); - if ($faqObj->notLoaded()) { - redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); - exit(); - } + if ($faqObj->notLoaded()) { + redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); + exit(); + } - // Creating the answer object - $answerObj = new sfAnswer($answerid); + // Creating the answer object + $answerObj = new sfAnswer($answerid); - if ($answerObj->notLoaded()) { - redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); - exit(); - } + if ($answerObj->notLoaded()) { + redirect_header("index.php", 1, _AM_SF_NOFAQSELECTED); + exit(); + } - $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); - $notifToDo_answer = null; - $notifToDo_faq = null; + $notifToDo_answer = null; + $notifToDo_faq = null; - switch ($faqObj->status()) - { - // This was an Open Question that became a Submitted FAQ - case _SF_STATUS_ANSWERED : - if ( $xoopsModuleConfig['autoapprove_submitted_faq'] == 1) { - // We automatically approve Submitted Q&A - $redirect_msg = _AM_SF_ANSWER_APPROVED_PUBLISHED; - $faqObj->setVar('status', _SF_STATUS_PUBLISHED); - $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); - $notifToDo_faq = array(_SF_NOT_FAQ_PUBLISHED); - } else { - // Submitted Q&A need approbation - $redirect_msg = _AM_SF_ANSWER_APPROVED_NEED_APPROVED; - $faqObj->setVar('status', _SF_STATUS_SUBMITTED); - $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); - $notifToDo_faq = array(_SF_NOT_FAQ_SUBMITTED); - } - break; + switch ($faqObj->status()) { + // This was an Open Question that became a Submitted FAQ + case _SF_STATUS_ANSWERED : + if ($xoopsModuleConfig['autoapprove_submitted_faq'] == 1) { + // We automatically approve Submitted Q&A + $redirect_msg = _AM_SF_ANSWER_APPROVED_PUBLISHED; + $faqObj->setVar('status', _SF_STATUS_PUBLISHED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $notifToDo_faq = array(_SF_NOT_FAQ_PUBLISHED); + } else { + // Submitted Q&A need approbation + $redirect_msg = _AM_SF_ANSWER_APPROVED_NEED_APPROVED; + $faqObj->setVar('status', _SF_STATUS_SUBMITTED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $notifToDo_faq = array(_SF_NOT_FAQ_SUBMITTED); + } + break; - // This is a published FAQ for which a user submitted a new answer and we just accepeted one - case _SF_STATUS_NEW_ANSWER : - $redirect_msg = _AM_SF_FAQ_NEW_ANSWER_PUBLISHED; - $faqObj->setVar('status', _SF_STATUS_PUBLISHED); - $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); - $notifToDo_answer = array(_SF_NOT_ANSWER_APPROVED); - break; - } + // This is a published FAQ for which a user submitted a new answer and we just accepeted one + case _SF_STATUS_NEW_ANSWER : + $redirect_msg = _AM_SF_FAQ_NEW_ANSWER_PUBLISHED; + $faqObj->setVar('status', _SF_STATUS_PUBLISHED); + $answerObj->setVar('status', _SF_AN_STATUS_APPROVED); + $notifToDo_answer = array(_SF_NOT_ANSWER_APPROVED); + break; + } - // Storing the FAQ object in the database - if ( !$faqObj->store() ) { - redirect_header("javascript:history.go(-1)", 2, _AM_SF_ERROR_FAQ_NOT_SAVED); - exit(); - } + // Storing the FAQ object in the database + if ( !$faqObj->store() ) { + redirect_header("javascript:history.go(-1)", 2, _AM_SF_ERROR_FAQ_NOT_SAVED); + exit(); + } - // Storing the answer object in the database - if ( !$answerObj->store() ) { - redirect_header("javascript:history.go(-1)", 2, _AM_SF_ERROR_ANSWER_NOT_SAVED); - exit(); - } + // Storing the answer object in the database + if ( !$answerObj->store() ) { + redirect_header("javascript:history.go(-1)", 2, _AM_SF_ERROR_ANSWER_NOT_SAVED); + exit(); + } - // Send FAQ notifications - if (!empty($notifToDo_faq)) { - $faqObj->sendNotifications($notifToDo_faq); - } + // Send FAQ notifications + if (!empty($notifToDo_faq)) { + $faqObj->sendNotifications($notifToDo_faq); + } - // Send answer notifications - if (!empty($notifToDo_answer)) { - $answerObj->sendNotifications($notifToDo_answer); - } + // Send answer notifications + if (!empty($notifToDo_answer)) { + $answerObj->sendNotifications($notifToDo_answer); + } + redirect_header("index.php", 2, $redirect_msg); + exit(); + break; - redirect_header("index.php", 2, $redirect_msg); - exit(); - break; + case "del": + Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB; - case "del": - Global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB; + $faqid = isset($_POST['faqid'])? intval($_POST['faqid']) : 0; + $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : $faqid; + $answerid = isset($_POST['answerid'])? intval($_POST['answerid']) : 0; + $answerid = isset($_GET['answerid'])? intval($_GET['answerid']) : $answerid; + $confirm = isset($_POST['confirm'])? intval($_POST['confirm']) : 0; + $faqObj = new sfFaq($faqid); + $answerObj = new sfAnswer($answerid); + if ($confirm) { + $answerObj->setVar('status', _SF_AN_STATUS_REJECTED); + $answerObj->store(); - $faqid = isset($_POST['faqid'])? intval($_POST['faqid']) : 0; - $faqid = isset($_GET['faqid'])? intval($_GET['faqid']) : $faqid; - $answerid = isset($_POST['answerid'])? intval($_POST['answerid']) : 0; - $answerid = isset($_GET['answerid'])? intval($_GET['answerid']) : $answerid; - $confirm = isset($_POST['confirm'])? intval($_POST['confirm']) : 0; - $faqObj = new sfFaq($faqid); - $answerObj = new sfAnswer($answerid); - if ($confirm) { - $answerObj->setVar('status', _SF_AN_STATUS_REJECTED); - $answerObj->store(); + switch ($faqObj->status()) { + // Open Question for which we are rejecting an answer + case _SF_STATUS_ANSWERED : + $redirect_page = "index.php"; + $redirect_msg = _AM_SF_ANSWER_REJECTED_OPEN_QUESTION; + $faqObj->setVar('status', _SF_STATUS_OPENED); + break; - switch ($faqObj->status()) { - // Open Question for which we are rejecting an answer - case _SF_STATUS_ANSWERED : - $redirect_page = "index.php"; - $redirect_msg = _AM_SF_ANSWER_REJECTED_OPEN_QUESTION; - $faqObj->setVar('status', _SF_STATUS_OPENED); - break; + case _SF_STATUS_NEW_ANSWER : + $proposed_answers = $answer_handler->getAllAnswers($faqid, _SF_AN_STATUS_PROPOSED); + if (count($proposed_answers) > 0) { + // This question has other proposed answer + $redirect_page = "answer.php?op=mod&faqid=" . $faqid; + $redirect_msg = _AM_SF_ANSWER_REJECTED; + } else { + // The question has no other proposed answer + $redirect_page = "index.php"; + $redirect_msg = _AM_SF_ANSWER_REJECTED; + $faqObj->setVar('status', _SF_STATUS_PUBLISHED); + } + break; + } + $faqObj->store(); + redirect_header($redirect_page, 3, $redirect_msg); + ... [truncated message content] |
From: <be...@us...> - 2015-02-18 18:20:36
|
Revision: 12996 http://sourceforge.net/p/xoops/svn/12996 Author: beckmi Date: 2015-02-18 18:20:22 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 1.40 RC1 Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/about.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/utility.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/constants.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/formdatetimepicker.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/log.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/option.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/plugin/userlog.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/poll.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/pollutility.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/renderer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/xoopspoll.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/comment_delete.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/comment_edit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/comment_new.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/comment_post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/comment_reply.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/docs/readme.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/marquee/plugins/xoopspoll.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/class/post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/class/userlanguage.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/language/english/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/polls.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/templates/css/language/english/style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/templates/css/language/persian/style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/templates/newbb_viewtopic.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/topicmanager.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/viewtopic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/irmtfan/votepolls.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/trunk_4_00/class/post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/trunk_4_00/language/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/trunk_4_00/polls.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/trunk_4_00/topicmanager.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/trunk_4_00/viewtopic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/newbb_4x/trunk_4_00/votepolls.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/extras/smartclone/plugins/xoopspoll.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/include/oninstall.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/include/onuninstall.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/include/onupdate.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/include/search.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/language/english/modinfo.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/pollresults.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/preloads/core.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/sql/mysql.sql XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/templates/blocks/xoopspoll_block_singlepoll.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/templates/xoopspoll_results.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/templates/xoopspoll_view.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/xoops_version.php Removed Paths: ------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/request.php Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/about.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/about.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/about.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -23,7 +23,7 @@ * @uses ModuleAdmin::addNavigation to set the display page * @uses ModuleAdmin::renderAbout to display the page passing PAYPAL key to method */ -require_once 'admin_header.php'; +require_once __DIR__ . '/admin_header.php'; xoops_cp_header(); $aboutAdmin = new ModuleAdmin(); @@ -31,4 +31,4 @@ echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); -include 'admin_footer.php'; +include_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_footer.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_footer.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_footer.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -31,11 +31,11 @@ $moduleHandler =& xoops_gethandler('module'); $moduleInfo =& $moduleHandler->get($GLOBALS['xoopsModule']->getVar('mid')); -$pathImageAdmin = '..' . DIRECTORY_SEPARATOR . $moduleInfo->getInfo('icons32'); +$pathImageAdmin = '../' . $moduleInfo->getInfo('icons32'); echo "<div class='adminfooter'>\n" . " <div class='center'>\n" - . " <a href='" . $moduleInfo->getInfo('author_website_url') . "' target='_blank'><img src='{$pathImageAdmin}" . DIRECTORY_SEPARATOR . "xoopsmicrobutton.gif' alt='" . $xoopsModule->getInfo('author_website_name') . "' title='" . $moduleInfo->getInfo('author_website_name') . "' /></a>\n" + . " <a href='" . $moduleInfo->getInfo('author_website_url') . "' target='_blank'><img src='{$pathImageAdmin}" . "/xoopsmicrobutton.gif' alt='" . $xoopsModule->getInfo('author_website_name') . "' title='" . $moduleInfo->getInfo('author_website_name') . "' /></a>\n" . " </div>\n" . " <div class='center smallsmall italic pad5'>\n" . " " . _AM_XOOPSPOLL_MAINTAINED_BY Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_header.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/admin_header.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -30,27 +30,26 @@ * required as they are done by cp_header.php} */ -$path = dirname(dirname(dirname(dirname(__FILE__)))); -require_once $path . DIRECTORY_SEPARATOR . 'include' - . DIRECTORY_SEPARATOR . 'cp_header.php'; +$path = dirname(dirname(dirname(__DIR__))); +require_once $path . '/include/cp_header.php'; /** Load language files - * {@internal the following load is not needed, it's done in ./include/cp_header.php */ + * {@internal the following load is not needed, it's done in ./include/cp_header.php} */ //xoops_loadLanguage('admin', 'xoopspoll'); xoops_loadLanguage('modinfo', 'xoopspoll'); xoops_loadLanguage('main', 'xoopspoll'); xoops_load('constants', 'xoopspoll'); -$pathIcon16 = '..' . DIRECTORY_SEPARATOR . $GLOBALS['xoopsModule']->getInfo('icons16'); -$pathIcon32 = '..' . DIRECTORY_SEPARATOR . $GLOBALS['xoopsModule']->getInfo('icons32'); +$pathIcon16 = '../' . $GLOBALS['xoopsModule']->getInfo('icons16'); +$pathIcon32 = '../' . $GLOBALS['xoopsModule']->getInfo('icons32'); $pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'); // technically this isn't needed if only supporting XOOPS >= 2.5.5+ -if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php"))) { - include_once $GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php"); -} else { - redirect_header($GLOBALS['xoops']->path('admin.php'), XoopspollConstants::REDIRECT_DELAY_LONG, _AM_XOOPSPOLL_ADMIN_MISSING, false); -} +//if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php"))) { +include_once $GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php"); +//} else { +// redirect_header($GLOBALS['xoops']->path('admin.php'), XoopspollConstants::REDIRECT_DELAY_LONG, _AM_XOOPSPOLL_ADMIN_MISSING, false); +//} $myts =& MyTextSanitizer::getInstance(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/index.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/index.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -35,18 +35,18 @@ * @version:: $Id$ **/ -require_once 'admin_header.php'; +require_once __DIR__ . '/admin_header.php'; xoops_cp_header(); $admin_class = new ModuleAdmin(); $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); -$totalPolls = $pollHandler->getCount(); -$criteria = new CriteriaCompo(); +$totalPolls = $pollHandler->getCount(); +$criteria = new CriteriaCompo(); $criteria->add(new Criteria('start_time', time(), '<=')); $criteria->add(new Criteria('end_time', time(), '>')); $totalActivePolls = $pollHandler->getCount($criteria); -$criteria = new CriteriaCompo(); +$criteria = new CriteriaCompo(); $criteria->add(new Criteria('start_time', time(), '>')); $totalWaitingPolls = $pollHandler->getCount($criteria); $totalExpiredPolls = $totalPolls - $totalActivePolls - $totalWaitingPolls; @@ -60,11 +60,6 @@ /* use templates just in case we want to easily modify display in the future */ $GLOBALS['xoopsTpl']->assign('navigation', $admin_class->addNavigation('index.php')); $GLOBALS['xoopsTpl']->assign('renderindex', $admin_class->renderIndex()); -$GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR - . 'xoopspoll' . DIRECTORY_SEPARATOR - . 'templates' . DIRECTORY_SEPARATOR - . 'admin' . DIRECTORY_SEPARATOR - . 'xoopspoll_index.tpl') -); +$GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('modules/xoopspoll/templates/admin/xoopspoll_index.tpl')); -require 'admin_footer.php'; +require_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/main.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/main.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/main.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -49,22 +49,22 @@ * @uses redirect_header() function to send user to page after completing task(s) */ -require_once 'admin_header.php'; -include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "xoopsblock.php"); +require_once __DIR__ . '/admin_header.php'; +include_once $GLOBALS['xoops']->path("class/xoopsblock.php"); xoops_load('xoopsformloader'); xoops_load('xoopslists'); xoops_load('renderer', 'xoopspoll'); xoops_load('pollUtility', 'xoopspoll'); -xoops_load('request', 'xoopspoll'); +xoops_load('XoopsRequest'); -$op = XoopspollRequest::getString('op', 'list'); +$op = XoopsRequest::getString('op', 'list'); switch ($op) { case 'list': default: - $limit = XoopspollRequest::getInt('limit', XoopspollConstants::DEFAULT_POLL_PAGE_LIMIT); - $start = XoopspollRequest::getInt('start', 0); + $limit = XoopsRequest::getInt('limit', XoopspollConstants::DEFAULT_POLL_PAGE_LIMIT); + $start = XoopsRequest::getInt('start', 0); $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); $criteria = new CriteriaCompo(); @@ -104,7 +104,7 @@ } if (!empty($pollsWithTopics)) { $admin_class->addInfoBox(_AM_XOOPSPOLL_NEWBB_SUPPORT); - $admin_class->addInfoBoxLine(_AM_XOOPSPOLL_NEWBB_SUPPORT, "<img src='" . $pathIcon16 . DIRECTORY_SEPARATOR . "forum.png' alt='" . _AM_XOOPSPOLL_NEWBB_SUPPORT . "' /> " . _AM_XOOPSPOLL_NEWBB_INTRO, null, null, "information"); + $admin_class->addInfoBoxLine(_AM_XOOPSPOLL_NEWBB_SUPPORT, "<img src='" . $pathIcon16 . "/forum.png' alt='" . _AM_XOOPSPOLL_NEWBB_SUPPORT . "' /> " . _AM_XOOPSPOLL_NEWBB_INTRO, null, null, "information"); $newbbIntro = $admin_class->renderInfoBox(); } else { $newbbIntro = ""; @@ -158,26 +158,26 @@ 'buttons' => array( 'edit' => array( 'href' => $_SERVER['PHP_SELF'] . "?op=edit&poll_id={$id}", - 'file' => $pathIcon16 . DIRECTORY_SEPARATOR . "edit.png", + 'file' => $pathIcon16 . "/edit.png", 'alt' => _AM_XOOPSPOLL_EDITPOLL), 'clone' => array( 'href' => $_SERVER['PHP_SELF'] . "?op=clone&poll_id={$id}", - 'file' => $pathIcon16 . DIRECTORY_SEPARATOR . "editcopy.png", + 'file' => $pathIcon16 . "/editcopy.png", 'alt' => _AM_XOOPSPOLL_CLONE), 'delete' => array( 'href' => $_SERVER['PHP_SELF'] . "?op=delete&poll_id={$id}", - 'file' => $pathIcon16 . DIRECTORY_SEPARATOR . "delete.png", + 'file' => $pathIcon16 . "/delete.png", 'alt' => _DELETE), 'log' => array( 'href' => $_SERVER['PHP_SELF'] . "?op=log&poll_id={$id}", - 'file' => $pathIcon16 . DIRECTORY_SEPARATOR . "search.png", + 'file' => $pathIcon16 . "/search.png", 'alt' => _AM_XOOPSPOLL_VIEWLOG) ) ); if ($topic_id > 0) { $pollItems[$id]['buttons']['forum'] = array( 'href' => $GLOBALS['xoops']->url("modules/newbb/viewtopic.php") . "?topic_id={$topic_id}", - 'file' => $pathIcon16 . DIRECTORY_SEPARATOR . "forum.png", + 'file' => $pathIcon16 . "/forum.png", 'alt' => _AM_XOOPSPOLL_NEWBB_TOPIC . " " . htmlspecialchars($topic_title) ); } @@ -190,13 +190,8 @@ $xoopsTpl->assign('pollItems', $pollItems); $xoopsTpl->assign('rendered_nav', $renderedNav); $xoopsTpl->assign('self', $_SERVER['PHP_SELF']); - $xoopsTpl->display($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR - . 'xoopspoll' . DIRECTORY_SEPARATOR - . 'templates' . DIRECTORY_SEPARATOR - . 'admin' . DIRECTORY_SEPARATOR - . 'xoopspoll_list.tpl') - ); - include 'admin_footer.php'; + $xoopsTpl->display($GLOBALS['xoops']->path('modules/xoopspoll/templates/admin/xoopspoll_list.tpl')); + include_once __DIR__ . '/admin_footer.php'; exit(); break; @@ -204,7 +199,7 @@ case 'add': $optHandler =& xoops_getmodulehandler('option', 'xoopspoll'); $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); - $pollId = XoopspollRequest::getInt('poll_id', 0); + $pollId = XoopsRequest::getInt('poll_id', 0); $pollObj = $pollHandler->get($pollId); // will auto create object if poll_id=0 // display the form @@ -212,7 +207,7 @@ $admin_class = new ModuleAdmin(); echo $admin_class->addNavigation('main.php'); $pollObj->renderForm($_SERVER['PHP_SELF'], 'post'); - include 'admin_footer.php'; + include_once __DIR__ . '/admin_footer.php'; exit(); break; @@ -225,16 +220,16 @@ $logHandler =& xoops_getmodulehandler('log', 'xoopspoll'); $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); - $pollId = XoopspollRequest::getInt('poll_id', 0, 'POST'); + $pollId = XoopsRequest::getInt('poll_id', 0, 'POST'); $pollObj = $pollHandler->get($pollId); - $notify = XoopspollRequest::getInt('notify', XoopspollConstants::NOTIFICATION_ENABLED, 'POST'); + $notify = XoopsRequest::getInt('notify', XoopspollConstants::NOTIFICATION_ENABLED, 'POST'); $currentTimestamp = time(); - $xuEndTimestamp = strtotime(XoopspollRequest::getString('xu_end_time', null, 'POST')); - $endTimestamp = (empty($_POST['xu_end_time'])) ? ($currentTimestamp + XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuEndTimestamp); - $xuStartTimestamp = strtotime(XoopspollRequest::getString('xu_start_time', null, 'POST')); - $startTimestamp = (empty($_POST['xu_start_time'])) ? ($endTimestamp - XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuStartTimestamp); + $xuEndTimestamp = strtotime(XoopsRequest::getString('xu_end_time', null, 'POST')); + $endTimestamp = (empty($xuEndTimestamp)) ? ($currentTimestamp + XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuEndTimestamp); + $xuStartTimestamp = strtotime(XoopsRequest::getString('xu_start_time', null, 'POST')); + $startTimestamp = (empty($xuStartTimestamp)) ? ($endTimestamp - XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuStartTimestamp); // don't allow changing start time if there are votes in the log if (($startTimestamp < $pollObj->getVar('start_time')) @@ -244,19 +239,19 @@ } $pollVars = array( - 'user_id' => XoopspollRequest::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'), - 'question' => XoopspollRequest::getString('question', null, 'POST'), - 'description' => XoopspollRequest::getText('description', null, 'POST'), + 'user_id' => XoopsRequest::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'), + 'question' => XoopsRequest::getString('question', null, 'POST'), + 'description' => XoopsRequest::getText('description', null, 'POST'), 'mail_status' => (XoopspollConstants::NOTIFICATION_ENABLED == $notify) ? XoopspollConstants::POLL_NOT_MAILED : XoopspollConstants::POLL_MAILED, - 'mail_voter' => XoopspollRequest::getInt('mail_voter', XoopspollConstants::NOT_MAIL_POLL_TO_VOTER, 'POST'), + 'mail_voter' => XoopsRequest::getInt('mail_voter', XoopspollConstants::NOT_MAIL_POLL_TO_VOTER, 'POST'), 'start_time' => $startTimestamp, 'end_time' => $endTimestamp, - 'display' => XoopspollRequest::getInt('display', XoopspollConstants::DO_NOT_DISPLAY_POLL_IN_BLOCK, 'POST'), - 'visibility' => XoopspollRequest::getInt('visibility', XoopspollConstants::HIDE_NEVER, 'POST'), - 'weight' => XoopspollRequest::getInt('weight', XoopspollConstants::DEFAULT_WEIGHT, 'POST'), - 'multiple' => XoopspollRequest::getInt('multiple', XoopspollConstants::NOT_MULTIPLE_SELECT_POLL, 'POST'), - 'multilimit' => XoopspollRequest::getInt('multilimit', XoopspollConstants::MULTIPLE_SELECT_LIMITLESS, 'POST'), - 'anonymous' => XoopspollRequest::getInt('anonymous', XoopspollConstants::ANONYMOUS_VOTING_DISALLOWED, 'POST'), + 'display' => XoopsRequest::getInt('display', XoopspollConstants::DO_NOT_DISPLAY_POLL_IN_BLOCK, 'POST'), + 'visibility' => XoopsRequest::getInt('visibility', XoopspollConstants::HIDE_NEVER, 'POST'), + 'weight' => XoopsRequest::getInt('weight', XoopspollConstants::DEFAULT_WEIGHT, 'POST'), + 'multiple' => XoopsRequest::getInt('multiple', XoopspollConstants::NOT_MULTIPLE_SELECT_POLL, 'POST'), + 'multilimit' => XoopsRequest::getInt('multilimit', XoopspollConstants::MULTIPLE_SELECT_LIMITLESS, 'POST'), + 'anonymous' => XoopsRequest::getInt('anonymous', XoopspollConstants::ANONYMOUS_VOTING_DISALLOWED, 'POST'), ); $pollObj->setVars($pollVars); $pollId = $pollHandler->insert($pollObj); @@ -266,10 +261,10 @@ } // now get the options - $optionIdArray = XoopspollRequest::getArray('option_id', array(), 'POST'); + $optionIdArray = XoopsRequest::getArray('option_id', array(), 'POST'); $optionIdArray = array_map('intval', $optionIdArray); - $optionTextArray = XoopspollRequest::getArray('option_text', array(), 'POST'); - $optionColorArray = XoopspollRequest::getArray('option_color', array(), 'POST'); + $optionTextArray = XoopsRequest::getArray('option_text', array(), 'POST'); + $optionColorArray = XoopsRequest::getArray('option_color', array(), 'POST'); foreach ($optionIdArray as $key=>$oId) { if (!empty($oId) && ($optionObj = $optHandler->get($oId))) { @@ -303,25 +298,23 @@ unset($optHandler, $logHandler, $pollObj, $pollHandler, $pollId); // clear the template cache so changes take effect immediately - include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "template.php"); + include_once $GLOBALS['xoops']->path("class/template.php"); xoops_template_clear_module_cache($GLOBALS['xoopsModule']->getVar('mid')); redirect_header($_SERVER['PHP_SELF'] . "?op=list", XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_DBUPDATED); - exit(); break; case 'delete': - $pollId = XoopspollRequest::getInt('poll_id', 0); + $pollId = XoopsRequest::getInt('poll_id', 0); $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); $pollObj = $pollHandler->get($pollId); if (empty($pollObj) || !($pollObj instanceof XoopspollPoll)) { redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, implode('<br />', $pollHandler->getErrors())); - exit(); } xoops_cp_header(); $admin_class = new ModuleAdmin(); echo $admin_class->addNavigation('main.php'); xoops_confirm(array('op' => 'delete_ok', 'poll_id' => $pollId), $_SERVER['PHP_SELF'], sprintf(_AM_XOOPSPOLL_RUSUREDEL, $myts->htmlSpecialChars($pollObj->getVar('question')))); - include 'admin_footer.php'; + include_once __DIR__ . '/admin_footer.php'; // xoops_cp_footer(); exit(); break; @@ -331,7 +324,7 @@ redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_MEDIUM, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); } $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); - $pollId = XoopspollRequest::getInt('poll_id', 0, 'POST'); + $pollId = XoopsRequest::getInt('poll_id', 0, 'POST'); if ($pollHandler->deleteAll(new Criteria('poll_id', $pollId, '='))) { $optHandler =& xoops_getmodulehandler('option', 'xoopspoll'); $optHandler->deleteAll(new Criteria('poll_id', $pollId)); @@ -339,7 +332,7 @@ $logHandler->deleteByPollId($pollId); unset($pollHandler, $optHandler, $logHandler); // clear the template cache - include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "template.php"); + include_once $GLOBALS['xoops']->path("class/template.php"); xoops_template_clear_module_cache($GLOBALS['xoopsModule']->getVar('mid')); // delete comments for this poll xoops_comment_delete($GLOBALS['xoopsModule']->getVar('mid'), $pollId); @@ -358,12 +351,11 @@ } } redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_DBUPDATED); - exit(); break; case 'restart': xoops_load('FormDateTimePicker', 'xoopspoll'); - $pollId = XoopspollRequest::getInt('poll_id', 0); + $pollId = XoopsRequest::getInt('poll_id', 0); $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); $pollObj = $pollHandler->get($pollId); $pollForm = new XoopsThemeForm(_AM_XOOPSPOLL_RESTARTPOLL, "poll_form", $_SERVER['PHP_SELF'], 'post', true); @@ -403,7 +395,7 @@ $admin_class = new ModuleAdmin(); echo $admin_class->addNavigation('main.php'); $pollForm->display(); - include 'admin_footer.php'; + include_once __DIR__ . '/admin_footer.php'; exit(); break; @@ -411,24 +403,23 @@ if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_MEDIUM, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); } - $pollId = XoopspollRequest::getInt('poll_id', 0, 'POST'); + $pollId = XoopsRequest::getInt('poll_id', 0, 'POST'); if (empty($pollId)) { redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_ERROR_INVALID_POLLID); - exit(); } $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); $pollObj = $pollHandler->get($pollId); - $xuEndTimestamp = strtotime(XoopspollRequest::getString('xu_end_time', null, 'POST')); - $xuStartTimestamp = strtotime(XoopspollRequest::getString('xu_start_time', null, 'POST')); + $xuEndTimestamp = strtotime(XoopsRequest::getString('xu_end_time', null, 'POST')); + $xuStartTimestamp = strtotime(XoopsRequest::getString('xu_start_time', null, 'POST')); - $endTimestamp = (empty($_POST['xu_end_time'])) ? (time() + XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuEndTimestamp); - $startTimestamp = (empty($_POST['xu_start_time'])) ? ($xuEndTimestamp - XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuStartTimestamp); + $endTimestamp = (empty($xuEndTimestamp)) ? (time() + XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuEndTimestamp); + $startTimestamp = (empty($xuStartTimestamp)) ? ($xuEndTimestamp - XoopspollConstants::DEFAULT_POLL_DURATION) : userTimeToServerTime($xuStartTimestamp); $pollObj->setVar('end_time', $endTimestamp); $pollObj->setVar('start_time', $startTimestamp); - $notify = XoopspollRequest::getInt('notify', XoopspollConstants::NOTIFICATION_DISABLED, 'POST'); + $notify = XoopsRequest::getInt('notify', XoopspollConstants::NOTIFICATION_DISABLED, 'POST'); if (XoopspollConstants::NOTIFICATION_ENABLED == $notify) { // if notify, set mail status to "not mailed" $pollObj->setVar('mail_status', XoopspollConstants::POLL_NOT_MAILED); @@ -439,7 +430,7 @@ // save the poll settings $pollHandler->insert($pollObj); - $reset = XoopspollRequest::getInt('reset', XoopspollConstants::DO_NOT_RESET_RESULTS, 'POST'); + $reset = XoopsRequest::getInt('reset', XoopspollConstants::DO_NOT_RESET_RESULTS, 'POST'); if (XoopspollConstants::RESET_RESULTS == $reset) { // reset all logs $logHandler =& xoops_getmodulehandler('log', 'xoopspoll'); @@ -453,22 +444,20 @@ echo $pollObj->getHtmlErrors(); exit(); } - include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "template.php"); + include_once $GLOBALS['xoops']->path("class/template.php"); xoops_template_clear_module_cache($GLOBALS['xoopsModule']->getVar('mid')); redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_DBUPDATED); - exit(); break; case 'log': - $pollId = XoopspollRequest::getInt('poll_id', 0); - $limit = XoopspollRequest::getInt('limit', XoopspollConstants::DEFAULT_POLL_PAGE_LIMIT); - $start = XoopspollRequest::getInt('start', 0); - $orderby = XoopspollRequest::getString('orderby', 'time'); - $orderdir = XoopspollRequest::getString('orderdir', 'ASC'); + $pollId = XoopsRequest::getInt('poll_id', 0); + $limit = XoopsRequest::getInt('limit', XoopspollConstants::DEFAULT_POLL_PAGE_LIMIT); + $start = XoopsRequest::getInt('start', 0); + $orderby = XoopsRequest::getString('orderby', 'time'); + $orderdir = XoopsRequest::getString('orderdir', 'ASC'); if (empty($pollId)) { redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_ERROR_INVALID_POLLID); - exit(); } $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); @@ -486,7 +475,7 @@ * {@internal show a brief description of the question we are focusing on} */ echo "<h4 class='left'>" . _AM_XOOPSPOLL_LOGSLIST . "</h4>\n" - . "<table class='outer bnone width100' style='padding: 0px; margin: 0px;'>\n" + . "<table class='outer bnone width100' style='padding: 0; margin: 0;'>\n" . " <tr>\n" . " <td>\n" . " <table class='width100 bnone marg2 pad3'>\n" @@ -525,7 +514,7 @@ echo "<div class='center' style='margin-bottom: 2em;'>\n" . "<h4 class='left'>" . _AM_XOOPSPOLL_LOGSLIST . "</h4>\n" - . "<table class='outer bnone width100' style='padding: 0px; margin: 0px;'>\n" + . "<table class='outer bnone width100' style='padding: 0; margin: 0;'>\n" . "<thead>\n" . " <tr>\n" . " <th class='width15'>" . _AM_XOOPSPOLL_OPTION . "</th>\n" @@ -559,13 +548,13 @@ $criteria->setLimit($limit); $logsArray = $logHandler->getAll($criteria); - $arrowUp = $pathIcon16 . DIRECTORY_SEPARATOR . "up.gif"; - $arrowDown = $pathIcon16 . DIRECTORY_SEPARATOR . "down.gif"; + $arrowUp = $pathIcon16 . "/up.gif"; + $arrowDown = $pathIcon16 . "/down.gif"; $sorthref = $_SERVER['PHP_SELF'] . "?op=log&poll_id={$pollId}&orderby="; $class = 'even'; if (is_array($logsArray) && $logsCount > 0) { - echo "<table class='outer bnone width100' style='padding: 0px; margin: 0px;'>\n" + echo "<table class='outer bnone width100' style='padding: 0; margin: 0;'>\n" . " <tr>\n" . " <td class='bg2'>\n" . " <table class='width100 bnone pad3 marg2'>\n" @@ -613,7 +602,7 @@ echo " <td class='{$class} center'>\n" . " <a href=" . $GLOBALS['xoops']->url('/userinfo.php') . "?uid=" . $user->getVar('uid') . ">{$uname}</a> \n" - . " <a href='{$pmLink}' target='_blank'><img src='" . $pathIcon16 . DIRECTORY_SEPARATOR . "mail_generic.png' alt='" . _AM_XOOPSPOLL_PM_VOTER . "' title='" . _AM_XOOPSPOLL_PM_VOTER . "' />\n" + . " <a href='{$pmLink}' target='_blank'><img src='" . $pathIcon16 . "/mail_generic.png' alt='" . _AM_XOOPSPOLL_PM_VOTER . "' title='" . _AM_XOOPSPOLL_PM_VOTER . "' />\n" . " </td>\n"; } else { echo " <td class='{$class} center'>{$GLOBALS['xoopsConfig']['anonymous']}</td>\n"; @@ -641,13 +630,12 @@ // echo "<div class='center' style='margin-bottom: 1em;'>[ <a href='" . $_SERVER['PHP_SELF'] . "?op=list'><img src='". $pathIcon16 ."/back.png' alt='" . _AM_XOOPSPOLL_RETURNLIST . "' title='" . _AM_XOOPSPOLL_RETURNLIST . "'>" . _AM_XOOPSPOLL_RETURNLIST . "</a> ]</div>\n"; $admin_class->addItemButton(_AM_XOOPSPOLL_RETURNLIST, 'main.php' . '?op=list', $icon = '../16/back'); echo $admin_class->renderButton('center'); - include 'admin_footer.php'; - exit(); + include_once __DIR__ . '/admin_footer.php'; break; case 'quickupdate': - $pollId = isset($_POST['poll_id']) ? $_POST['poll_id'] : array(); + $pollId = XoopsRequest::getArray('poll_id', array(), 'POST'); $pollId = (array) $pollId; $pollId = array_map('intval', $pollId); @@ -661,9 +649,9 @@ $pollObjs = $pollHandler->getAll($criteria); // get display variables from form POST - $display = isset($_POST['display']) ? $_POST['display'] : array(); + $display = XoopsRequest::getArray('display', array(), 'POST'); $display = array_map('intval', (array) $display); - $weight = isset($_POST['weight']) ? $_POST['weight'] : array(); + $weight = XoopsRequest::getArray('weight', array(), 'POST'); $weight = array_map('intval', (array) $weight); foreach ($pollObjs as $pollObj) { @@ -677,19 +665,18 @@ unset($pollObj); } unset($pollObjs); - include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "template.php"); + include_once $GLOBALS['xoops']->path("class/template.php"); xoops_template_clear_module_cache($GLOBALS['xoopsModule']->getVar('mid')); redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_DBUPDATED); } else { redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_SHORT, _AM_XOOPSPOLL_NOTHING_HERE); } - exit(); break; // added cloning capability in v 1.40 case 'clone': $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); $optHandler =& xoops_getmodulehandler('option', 'xoopspoll'); - $pollId = XoopspollRequest::getInt('poll_id', 0); + $pollId = XoopsRequest::getInt('poll_id', 0); $pollObj = $pollHandler->get($pollId); $origValues = $pollObj->getValues(); unset($origValues['poll_id']); @@ -722,6 +709,5 @@ } unset($pollObj, $cloneObj, $origValues, $cloneValues, $newValues); redirect_header($_SERVER['PHP_SELF'] . "?poll_id={$cloneId}&op=edit", XoopspollConstants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPOLL_CLONE_SUCCESS); - exit(); break; } Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/menu.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/menu.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/menu.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -34,7 +34,7 @@ * @version:: $Id$ */ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); $moduleHandler =& xoops_gethandler('module'); $xoopsModule =& XoopsModule::getByDirname('xoopspoll'); @@ -48,25 +48,25 @@ $adminmenu = array(); $i = 1; $adminmenu[$i] = array('title' => _MI_XOOPSPOLL_HOME, - 'link' => "admin" . DIRECTORY_SEPARATOR . "index.php", + 'link' => "admin/index.php", 'desc' => _MI_XOOPSPOLL_HOMEDSC, - 'icon' => "{$pathImageAdmin}" . DIRECTORY_SEPARATOR . "home.png" + 'icon' => "{$pathImageAdmin}" . "/home.png" ); ++$i; $adminmenu[$i] = array('title' => _MI_XOOPSPOLL_ADMENU1, - 'link' => "admin" . DIRECTORY_SEPARATOR . "main.php", + 'link' => "admin/main.php", 'desc' => _MI_XOOPSPOLL_ADMENU1DSC, - 'icon' => "{$pathImageAdmin}" . DIRECTORY_SEPARATOR . "poll.png" + 'icon' => "{$pathImageAdmin}" . "/poll.png" ); ++$i; $adminmenu[$i] = array('title' => _MI_XOOPSPOLL_ADMENU2, - 'link' => "admin" . DIRECTORY_SEPARATOR . "utility.php", + 'link' => "admin/utility.php", 'desc' => _MI_XOOPSPOLL_ADMENU2DSC, - 'icon' => "{$pathImageAdmin}" . DIRECTORY_SEPARATOR . "wizard.png" + 'icon' => "{$pathImageAdmin}" . "/wizard.png" ); ++$i; $adminmenu[$i] = array('title' => _MI_XOOPSPOLL_ADABOUT, - 'link' => "admin" . DIRECTORY_SEPARATOR . "about.php", + 'link' => "admin/about.php", 'desc' => _MI_XOOPSPOLL_ADABOUTDSC, - 'icon' => "{$pathImageAdmin}" . DIRECTORY_SEPARATOR . "about.png" + 'icon' => "{$pathImageAdmin}" . "/about.png" ); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/utility.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/utility.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/admin/utility.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -34,11 +34,11 @@ * @version:: $Id$ */ -require_once 'admin_header.php'; -xoops_load('request', 'xoopspoll'); +require_once __DIR__ . '/admin_header.php'; +xoops_load('XoopsRequest'); xoops_load('pollUtility', 'xoopspoll'); -$op = XoopspollRequest::getString('op', 'list'); +$op = XoopsRequest::getString('op', 'list'); switch ($op) { case 'list': @@ -55,19 +55,14 @@ $GLOBALS['xoopsTpl']->assign('navigation', $admin_class->addNavigation('index.php')); $GLOBALS['xoopsTpl']->assign('umfrageIntro', _AM_XOOPSPOLL_UMFRAGE_INTRO); - $GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR - . 'xoopspoll' . DIRECTORY_SEPARATOR - . 'templates' . DIRECTORY_SEPARATOR - . 'admin' . DIRECTORY_SEPARATOR - . 'xoopspoll_utility.tpl') - ); + $GLOBALS['xoopsTpl']->display($GLOBALS['xoops']->path('modules/xoopspoll/templates/admin/xoopspoll_utility.tpl')); - require 'admin_footer.php'; + require_once __DIR__ . '/admin_header.php'; break; /* Import data from umfrage */ case 'umfrage': - $ok = XoopspollRequest::getString('ok', XoopspollConstants::CONFIRM_NOT_OK, 'POST'); + $ok = XoopsRequest::getString('ok', XoopspollConstants::CONFIRM_NOT_OK, 'POST'); if ($ok) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_MEDIUM, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); @@ -90,21 +85,9 @@ } //setup poll objects for both umfrage and xoopspoll - require_once $GLOBALS['xoops']->path("modules" - . DIRECTORY_SEPARATOR . "umfrage" - . DIRECTORY_SEPARATOR . "class" - . DIRECTORY_SEPARATOR . "umfrage.php" - ); - require_once $GLOBALS['xoops']->path("modules" - . DIRECTORY_SEPARATOR . "umfrage" - . DIRECTORY_SEPARATOR . "class" - . DIRECTORY_SEPARATOR . "umfrageoption.php" - ); - require_once $GLOBALS['xoops']->path("modules" - . DIRECTORY_SEPARATOR . "umfrage" - . DIRECTORY_SEPARATOR . "class" - . DIRECTORY_SEPARATOR . "umfragelog.php" - ); + require_once $GLOBALS['xoops']->path("modules/umfrage/class/umfrage.php"); + require_once $GLOBALS['xoops']->path("modules/umfrage/class/umfrageoption.php"); + require_once $GLOBALS['xoops']->path("modules/umfrage/class/umfragelog.php"); $xpHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); $xpOptHandler =& xoops_getmodulehandler('option', 'xoopspoll'); @@ -217,7 +200,7 @@ $admin_class = new ModuleAdmin(); echo $admin_class->addNavigation('utility.php'); echo "<div class='floatcenter1'>" . xoops_error($e->getMessage(), _AM_XOOPSPOLL_IMPORT_FAILED) . "</div>\n"; - include 'admin_footer.php'; + include_once __DIR__ . '/admin_footer.php'; exit(); } } else { @@ -225,8 +208,9 @@ $admin_class = new ModuleAdmin(); echo $admin_class->addNavigation('utility.php'); xoops_confirm(array('op' => 'umfrage', 'ok' => 1), $_SERVER['PHP_SELF'], _AM_XOOPSPOLL_RUSUREUMFRAGE); - include 'admin_footer.php'; + include_once __DIR__ . '/admin_footer.php'; exit(); } break; } +include_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/constants.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/constants.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/constants.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -40,7 +40,7 @@ * @version:: $Id$ **/ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); interface XoopspollConstants { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/formdatetimepicker.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/formdatetimepicker.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/formdatetimepicker.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -20,7 +20,7 @@ * @version:: $Id$ */ -defined('XOOPS_ROOT_PATH') or die("Restricted access"); +// defined('XOOPS_ROOT_PATH') || die("Restricted access"); /** * Creates a text field with jquery ui calendar & time select popup Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/log.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/log.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/log.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -29,12 +29,12 @@ * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license} * @package:: xoopspoll * @subpackage:: class - * @since:: 1.40 + * @since:: 1.40 * @author:: {@link http://www.myweb.ne.jp/ Kazumi Ono (AKA onokazu)} * @version:: $Id$ **/ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); /** * * XoopspollLog() class definition for Log Objects @@ -49,48 +49,64 @@ /** * Constructor + * @param null $id */ function __construct(&$id = null) { parent::__construct(); - $this->initVar('log_id', XOBJ_DTYPE_INT, 0); - $this->initVar('poll_id', XOBJ_DTYPE_INT, null, true); + $this->initVar('log_id', XOBJ_DTYPE_INT, 0); + $this->initVar('poll_id', XOBJ_DTYPE_INT, null, true); $this->initVar('option_id', XOBJ_DTYPE_INT, null, true); - $this->initVar('ip', XOBJ_DTYPE_OTHER, null); - $this->initVar('user_id', XOBJ_DTYPE_INT, 0); - $this->initVar('time', XOBJ_DTYPE_INT, null); + $this->initVar('ip', XOBJ_DTYPE_OTHER, null); + $this->initVar('user_id', XOBJ_DTYPE_INT, 0); + $this->initVar('time', XOBJ_DTYPE_INT, null); if (!empty($id) && is_array($id)) { $this->assignVars($id); } } + /** + * @param null $id + */ public function XoopspollLog(&$id = null) { $this->__construct($id); } -/**#@+ - * The following method is provided for backward compatibility with cbb/xforum - * @deprecated since Xoopspoll 1.40, please use XoopspollLogHandler & XoopspollLog - */ + /**#@+ + * The following method is provided for backward compatibility with cbb/xforum + * @deprecated since Xoopspoll 1.40, please use XoopspollLogHandler & XoopspollLog + * @param $pid + * @return + */ static function deleteByPollId(&$pid) { $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . "::" . __FUNCTION__ . " is deprecated since Xoopspoll 1.40, please use XoopspollLog and XoopspollLogHandler methods instead."); $slogHandler = self::getStaticLogHandler(); - $criteria = new Criteria('poll_id', intval($pid), '='); + $criteria = new Criteria('poll_id', intval($pid), '='); return $slogHandler->deleteAll($criteria); } + /** + * @param $opt_id + * @return mixed + */ static function deleteByOptionId(&$opt_id) { $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . "::" . __FUNCTION__ . " is deprecated since Xoopspoll 1.40, please use XoopspollLog and XoopspollLogHandler methods instead."); $slogHandler = self::getStaticLogHandler(); - $criteria = new Criteria('option_id', intval($opt_id), '='); + $criteria = new Criteria('option_id', intval($opt_id), '='); return $slogHandler->deleteAll($criteria); } + /** + * @param $pid + * @param $ip + * @param $uid + * @return mixed + */ static function hasVoted(&$pid, &$ip, &$uid) { $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . "::" . __FUNCTION__ . " is deprecated since Xoopspoll 1.40, please use XoopspollLog and XoopspollLogHandler methods instead."); @@ -99,6 +115,9 @@ return $slogHandler->hasVoted($pid, $ip, $uid); } + /** + * @return bool + */ private function getStaticLogHandler() { static $log_h; @@ -110,9 +129,12 @@ return $log_h; } -/**#@-*/ + /**#@-*/ } +/** + * Class XoopspollLogHandler + */ class XoopspollLogHandler extends XoopsPersistableObjectHandler //class XoopspollLogHandler extends XoopsPersistableObjectHandler @@ -124,7 +146,7 @@ **/ function __construct(&$db) { - parent::__construct($db, 'mod_xoopspoll_log', 'XoopspollLog', 'log_id'); + parent::__construct($db, 'xoopspoll_log', 'XoopspollLog', 'log_id'); } /** @@ -140,13 +162,13 @@ /** * * Delete all log entries by Option ID - * @param int $option_id + * @param int $option_id * @return bool $success */ public function deleteByOptionId($option_id) { $criteria = new Criteria('option_id', $option_id, '='); - $success = ($this->deleteAll($criteria)) ? true : false; + $success = ($this->deleteAll($criteria)) ? true : false; return $success; } @@ -155,13 +177,13 @@ * * Delete all log entries by Poll ID * @uses CriteriaCompo - * @param int $pid + * @param int $pid * @return bool $success */ public function deleteByPollId($pid) { $criteria = new Criteria('poll_id', intval($pid), '='); - $success = ($this->deleteAll($criteria)) ? true : false ; + $success = ($this->deleteAll($criteria)) ? true : false; return $success; } @@ -170,14 +192,14 @@ * * Gets all log entries by Poll ID * @uses CriteriaCompo - * @param int $pid - * @param string $sortby sort all results by this field + * @param int $pid + * @param string $sortby sort all results by this field * @param string $orderby sort order (ASC, DESC) * @return bool $success */ public function getAllByPollId($pid, $sortby = 'time', $orderby = 'ASC') { - $ret = array(); + $ret = array(); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('poll_id', intval($pid), '=')); $criteria->setSort($sortby); @@ -222,29 +244,30 @@ /** * Get the total number of votes for an option - *@uses CriteriaCompo + * @uses CriteriaCompo * @param int $option_id * @return int */ public function getTotalVotesByOptionId($option_id) { $criteria = new Criteria('option_id', intval($option_id), '='); - $votes = $this->getCount($criteria); + $votes = $this->getCount($criteria); return $votes; } + /** * hasVoted indicates if user (logged in or not) has voted in a poll * @uses $_COOKIE - * @param int $pid of the poll the check - * @param string $ip the ip address for this voter - * @param int $uid the XOOPS user id of this voter (0 for anon) + * @param int $pid of the poll the check + * @param string $ip the ip address for this voter + * @param int $uid the XOOPS user id of this voter (0 for anon) * @return bool */ - public function hasVoted($pid, $ip, $uid=0) + public function hasVoted($pid, $ip, $uid = 0) { - $uid = intval($uid); - $pid = intval($pid); + $uid = intval($uid); + $pid = intval($pid); $voted = true; xoops_load('pollUtility', 'xoopspoll'); $voted_polls = XoopspollPollUtility::getVoteCookie(); @@ -252,7 +275,7 @@ $pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll'); if ($pollObj = $pollHandler->get($pid)) { $pollStarttime = $pollObj->getVar('start_time'); - $criteria = new CriteriaCompo(); + $criteria = new CriteriaCompo(); $criteria->add(new Criteria('poll_id', $pid, '=')); if ($uid > 0) { /** @@ -263,23 +286,23 @@ $criteria->add(new Criteria('user_id', $uid, '=')); $criteria->add(new Criteria('time', intval($pollStarttime), '>=')); $vCount = $this->getCount($criteria); - $voted = ($vCount > 0) ? true : false; + $voted = ($vCount > 0) ? true : false; } elseif (!empty($ip) && filter_var($ip, FILTER_VALIDATE_IP)) { $criteria->add(new Criteria('ip', $ip, '=')); $criteria->add(new Criteria('time', intval($pollStarttime, '>='))); $criteria->add(new Criteria('user_id', 0, '=')); $vCount = $this->getCount($criteria); - $voted = ($vCount > 0) ? true : false; + $voted = ($vCount > 0) ? true : false; } else { /* Check cookie to see if someone from this system has voted before */ if ((array_key_exists($pid, $voted_polls)) - && (intval($voted_polls[$pid]) >= $pollStarttime)) - { - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('poll_id', $pid, '=')); - $criteria->add(new Criteria('time', $pollStarttime, '>=')); - $vCount = $this->getCount($criteria); - $voted = ($vCount > 0) ? true : false; + && (intval($voted_polls[$pid]) >= $pollStarttime) + ) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('poll_id', $pid, '=')); + $criteria->add(new Criteria('time', $pollStarttime, '>=')); + $vCount = $this->getCount($criteria); + $voted = ($vCount > 0) ? true : false; } else { $voted = false; } Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/option.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/option.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/option.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -34,7 +34,7 @@ * @version:: $Id$ */ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); class XoopspollOption extends XoopsObject { @@ -55,6 +55,9 @@ protected $optHandler; // constructor + /** + * @param null $id + */ function __construct(&$id=null) { parent::__construct(); @@ -80,6 +83,9 @@ } } + /** + * @param null $id + */ public function XoopspollOption(&$id=null) { $this->__construct($id); @@ -165,6 +171,9 @@ /**#@-*/ } +/** + * Class XoopspollOptionHandler + */ class XoopspollOptionHandler extends XoopsPersistableObjectHandler { /** @@ -175,7 +184,7 @@ function __construct(&$db) { xoops_load('constants', 'xoopspoll'); - parent::__construct($db, 'mod_xoopspoll_option', 'XoopspollOption', 'option_id', 'option_text'); + parent::__construct($db, 'xoopspoll_option', 'XoopspollOption', 'option_id', 'option_text'); } /** @@ -211,14 +220,17 @@ return $status; } + /** * * Gets all options for poll ID * - * @param int $pid + * @param int $pid + * @param string $sortby + * @param string $orderby + * @return array an array of Option objects * @uses CriteriaCompo * @uses XoopsPersistableObjectHandler::deleteAll - * @return array an array of Option objects */ public function getAllByPollId($pid=0, $sortby = 'option_id', $orderby = 'ASC') { @@ -280,12 +292,7 @@ xoops_load('xoopsformloader'); $pid = intval($pid); $barcolor_array =& XoopsLists::getImgListAsArray( - $GLOBALS['xoops']->path( "modules" . DIRECTORY_SEPARATOR - . "xoopspoll" . DIRECTORY_SEPARATOR - . "assets" . DIRECTORY_SEPARATOR - . "images" . DIRECTORY_SEPARATOR - . "colorbars" . DIRECTORY_SEPARATOR) - ); + $GLOBALS['xoops']->path( "modules/xoopspoll/assets/images/colorbars/")); /** * get all the options for this poll & add some blank options to allow adding more Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/plugin/userlog.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/plugin/userlog.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/plugin/userlog.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -20,7 +20,7 @@ * @version $Id$ */ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); class XoopspollUserlogPlugin extends Userlog_Module_Plugin_Abstract implements UserlogPluginInterface { @@ -38,8 +38,8 @@ */ public function item($subscribe_from) { - xoops_load('request', 'xoopspoll'); - $poll_id = XoopspollRequest::getInt('poll_id', 0); + xoops_load('XoopsRequest'); + $poll_id = XoopsRequest::getInt('poll_id', 0); switch ($subscribe_from) { case "index.php": case "pollresults.php": Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/poll.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/poll.php 2015-02-18 18:16:27 UTC (rev 12995) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/xoopspoll/class/poll.php 2015-02-18 18:20:22 UTC (rev 12996) @@ -19,14 +19,15 @@ * @author:: zyspec <ow...@zy...> * @version:: $Id$ */ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); class XoopspollPoll extends XoopsObject { /** * XoopspollPoll::__construct() * - **/ + * @param null $id + */ public function __construct(&$id=null) { parent::__construct(); @@ -75,6 +76,7 @@ * * XoopspollPoll::XoopspollPoll() * @access public + * @param null $id */ public function XoopspollPoll(&$id=null) { @@ -131,10 +133,10 @@ * @uses CriteriaCompo() * @uses XoopspollPollHandler::getAll() * @uses XoopspollLogHandler - * @param int $optionId - * @param string $ip ip address of voter - * @param int $uid - * @return bool true vote entered, false voting failed + * @param int $optionId + * @param string $ip ip address of voter + * @param $time + * @return bool true vote entered, false voting failed* @internal param int $uid */ public function vote($optionId, $ip, $time) { @@ -208,8 +210,9 @@ /** * * display the poll form - * @param string $rtnPage where to send the form result + * @param string $rtnPage where to send the form result * @param string $rtnMethod return method get|post + * @param array $addHidden */ public function renderForm($rtnPage, $rtnMethod='post', $addHidden=array()) { @@ -415,12 +418,7 @@ $xoopsMailer->useMail(); $language = $GLOBALS['xoopsConfig']['language']; - $templateDir = $GLOBAL... [truncated message content] |
From: <be...@us...> - 2015-02-18 18:16:34
|
Revision: 12995 http://sourceforge.net/p/xoops/svn/12995 Author: beckmi Date: 2015-02-18 18:16:27 +0000 (Wed, 18 Feb 2015) Log Message: ----------- Adding SmartFAQ Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/smartfaq/ |
From: <luc...@us...> - 2015-02-18 17:22:47
|
Revision: 12994 http://sourceforge.net/p/xoops/svn/12994 Author: luciorota Date: 2015-02-18 17:22:44 +0000 (Wed, 18 Feb 2015) Log Message: ----------- fixed bug in install, uninstall, update move all .tpl to templates folder Modified Paths: -------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/oninstall.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onuninstall.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php Added Paths: ----------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_breadcrumb.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_choicebyletter.tpl Removed Paths: ------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -26,12 +26,19 @@ * echo $breadcrumb->render(); */ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +include_once dirname(dirname(__DIR__)) . '/include/common.php'; /** * Class WfdownloadsBreadcrumb */ class WfdownloadsBreadcrumb { + /** + * @var WfdownloadsWfdownloads + * @access public + */ + public $wfdownloads = null; + private $dirname; private $_bread = array(); @@ -40,7 +47,8 @@ */ public function __construct() { - $this->dirname = basename(dirname(dirname(__DIR__))); + $this->wfdownloads = WfdownloadsWfdownloads::getInstance(); + $this->dirname = basename(dirname(dirname(__DIR__))); } /** @@ -75,10 +83,7 @@ // 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); + $ret .= $breadcrumbTpl->fetch("db:{$this->wfdownloads->getModule()->dirname()}_co_breadcrumb.tpl"); unset($breadcrumbTpl); return $ret; Deleted: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/breadcrumb.tpl 2015-02-18 17:22:44 UTC (rev 12994) @@ -1,16 +0,0 @@ -<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> Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -23,6 +23,7 @@ * echo $choicebyletter->render(); */ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +include_once dirname(dirname(__DIR__)) . '/include/common.php'; /** * Class WfdownloadsChoiceByLetter @@ -30,6 +31,12 @@ class WfdownloadsChoiceByLetter { /** + * @var WfdownloadsWfdownloads + * @access public + */ + public $wfdownloads = null; + + /** * *#@+ * * @access private @@ -61,6 +68,7 @@ */ public function __construct($objHandler, $criteria = null, $field_name = null, $alphabet = array(), $arg_name = 'letter', $url = null, $extra_arg = '', $caseSensitive = false) { + $this->wfdownloads = WfdownloadsWfdownloads::getInstance(); $this->objHandler = $objHandler; $this->criteria = is_null($criteria) ? new CriteriaCompo() : $criteria; $this->field_name = is_null($field_name) ? $this->objHandler->identifierName : $field_name; @@ -128,9 +136,7 @@ // 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); + $ret .= $choiceByLetterTpl->fetch("db:{$this->wfdownloads->getModule()->dirname()}_co_choicebyletter.tpl"); unset($choiceByLetterTpl); return $ret; Deleted: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/common/choicebyletter.tpl 2015-02-18 17:22:44 UTC (rev 12994) @@ -1,96 +0,0 @@ -<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> Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -459,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()) { - $mimetypeCriteria = new Criteria('mime_admin', true); + $criteria = new Criteria('mime_admin', true); } else { - $mimetypeCriteria = new Criteria('mime_user', true); + $criteria = new Criteria('mime_user', true); } - $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($mimetypeCriteria); + $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria); $allowedExtensions = implode(' | ', $mimetypes); $userfile_file->setDescription( sprintf( @@ -711,7 +711,11 @@ // 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 +746,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 - $mimetypeCriteria = new Criteria('mime_admin', true); - $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($mimetypeCriteria); + $criteria = new Criteria('mime_admin', true); + $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria); $allowedExtensions = implode(' | ', $mimetypes); $userfile_file->setDescription( sprintf( @@ -759,7 +763,7 @@ ); $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'))) @@ -1224,17 +1228,17 @@ * * @return array */ - public function getActiveDownloads($criteria = null) + public function getActiveDownloads($crit = null) { - if (is_object($criteria)) { - $downloadsCriteria = $criteria; + if (is_object($crit)) { + $criteria = $crit; } else { - $downloadsCriteria = new CriteriaCompo(); + $criteria = new CriteriaCompo(); } - $activeDownloadsCriteria = $this->getActiveCriteria(); - $downloadsCriteria->add($activeDownloadsCriteria); + $active_crit = $this->getActiveCriteria(); + $criteria->add($active_crit); - return $this->getObjects($downloadsCriteria); + return $this->getObjects($criteria); } /** @@ -1244,14 +1248,14 @@ * * @return array/int */ - public function getActiveCount($criteria = null) + public function getActiveCount($crit = null) { - $activeDownloadsCriteria = $this->getActiveCriteria(); - if (is_object($criteria)) { - $activeDownloadsCriteria->add($criteria); + $criteria = $this->getActiveCriteria(); + if (is_object($crit)) { + $criteria->add($crit); } - return $this->getCount($activeDownloadsCriteria); + return $this->getCount($criteria); } /** @@ -1274,24 +1278,24 @@ * * @return bool */ - public function delete($downloadsObj, $force = false) + public function delete($download, $force = false) { - 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); + 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); // delete comments - xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$downloadsObj->getVar('lid')); + xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$download->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') && $downloadsObj->getVar('formulize_idreq') > 0) { + if (file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') && $download->getVar('formulize_idreq') > 0) { include_once XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php'; //deleteFormEntries(array($download->getVar('formulize_idreq'))); - $categoryObj = $this->wfdownloads->getHandler('category')->get($downloadsObj->getVar('cid')); - deleteFormEntries(array($downloadsObj->getVar('formulize_idreq')), $categoryObj->getVar('formulize_fid')); + $category = $this->wfdownloads->getHandler('category')->get($download->getVar('cid')); + deleteFormEntries(array($download->getVar('formulize_idreq')), $category->getVar('formulize_fid')); } } // Formulize module support (2006/05/04) jpc - end Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/oninstall.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/oninstall.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/oninstall.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -20,8 +20,6 @@ */ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); include_once __DIR__ . '/common.php'; -//@include_once WFDOWNLOADS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/admin.php'; -xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname()); define('INDEX_FILE_PATH', XOOPS_ROOT_PATH . '/uploads/index.html'); define('BLANK_FILE_PATH', XOOPS_ROOT_PATH . '/uploads/blank.gif'); @@ -33,6 +31,7 @@ */ function xoops_module_pre_install_wfdownloads(&$xoopsModule) { + xoops_loadLanguage('admin', $xoopsModule->dirname()); // NOP return true; } @@ -44,6 +43,7 @@ */ function xoops_module_install_wfdownloads(&$xoopsModule) { + xoops_loadLanguage('admin', $xoopsModule->dirname()); // get module config values $hModConfig = xoops_gethandler('config'); $configArray = $hModConfig->getConfigsByCat(0, $xoopsModule->getVar('mid')); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onuninstall.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onuninstall.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onuninstall.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -20,8 +20,6 @@ */ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); include_once __DIR__ . '/common.php'; -//@include_once WFDOWNLOADS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/admin.php'; -xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname()); /** * @param $xoopsModule @@ -30,6 +28,7 @@ */ function xoops_module_pre_uninstall_wfdownloads(&$xoopsModule) { + xoops_loadLanguage('admin', $xoopsModule->dirname()); // NOP return true; } @@ -39,5 +38,6 @@ */ function xoops_module_uninstall_wfdownloads(&$xoopsModule) { + xoops_loadLanguage('admin', $xoopsModule->dirname()); // NOP } Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/onupdate.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -20,8 +20,7 @@ */ defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); include_once __DIR__ . '/common.php'; -$wfdownloads = WfdownloadsWfdownloads::getInstance(); -xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname()); + include_once WFDOWNLOADS_ROOT_PATH . '/class/dbupdater.php'; /** @@ -32,6 +31,7 @@ */ function xoops_module_update_wfdownloads(&$xoopsModule, $previousVersion) { + xoops_loadLanguage('admin', $xoopsModule->dirname()); ob_start(); invert_nohtm_dohtml_values(); if ($previousVersion < 322) { Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_breadcrumb.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_breadcrumb.tpl (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_breadcrumb.tpl 2015-02-18 17:22:44 UTC (rev 12994) @@ -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/templates/wfdownloads_co_choicebyletter.tpl =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_choicebyletter.tpl (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_co_choicebyletter.tpl 2015-02-18 17:22:44 UTC (rev 12994) @@ -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> Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php 2015-02-18 16:22:25 UTC (rev 12993) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php 2015-02-18 17:22:44 UTC (rev 12994) @@ -42,8 +42,8 @@ $modversion['onUpdate'] = 'include/onupdate.php'; $modversion['onUninstall'] = 'include/onuninstall.php'; -$modversion['date'] = '2015-02-13'; -$modversion['release_date'] = '2015-02-13'; +$modversion['date'] = '2015-02-18'; +$modversion['release_date'] = '2015-02-18'; $modversion['status'] = 'RC5'; $modversion['teammembers'] = 'Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff'; @@ -327,9 +327,20 @@ ); // Common templates +$modversion['templates'][] = array( + 'file' => $modversion['dirname'] . '_co_breadcrumb.tpl', + 'type' => 'class/common', + 'description' => '' +); +$modversion['templates'][] = array( + 'file' => $modversion['dirname'] . '_co_choicebyletter.tpl', + 'type' => 'class/common', + 'description' => '' +); + // ------------------- Preferences ------------------- xoops_load('XoopsEditorHandler'); |
From: <be...@us...> - 2015-02-18 16:22:29
|
Revision: 12993 http://sourceforge.net/p/xoops/svn/12993 Author: beckmi Date: 2015-02-18 16:22:25 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 2.33 RC 1 Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/about.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/syn.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/css/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/images/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/blocks/block.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/blocks/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/link.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/docs/credits.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/docs/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/docs/install.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/docs/readme.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/action.module.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/formtag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/functions.ini.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/functions.recon.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/plugin.dist.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/plugin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/search.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/tagbar.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/include/vars.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/admin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/blocks.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/config.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/help/help.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/help/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/english/modinfo.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/language/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/list.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/TDMDownloads.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/article.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/extgallery.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/myalbum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/myalbum0.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/myalbum1.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/myalbum2.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/newbb.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/publisher.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/smartfaq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/xfaq.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/xforum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/sample.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/sql/mysql.150.sql XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/sql/mysql.sql XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/templates/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/templates/tag_view.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/view.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/xoops_version.php Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/cumulus.swf XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/swfobject.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/blockform.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/constants.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/formtag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/class/formvalidatedinput.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/plugin/randomquote.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/templates/blocks/tag_block_cumulus.tpl Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/about.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/about.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/about.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,28 +1,33 @@ -<?php -/** - * Tag module - * - * 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://www.xoops.org) - * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html) - * @package Tag - * @since 2.5.0 - * @author Mage, Mamba - * @version $Id $ - **/ -include_once dirname(__FILE__) . '/admin_header.php'; - -xoops_cp_header(); - -$aboutAdmin = new ModuleAdmin(); - -echo $aboutAdmin->addNavigation('about.php'); -echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); - -include 'admin_footer.php'; +<?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. +*/ + +/** + * XOOPS tag management module + * + * @package tag + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @author Mage + * @author Mamba + * @since 2.31 + * @version $Id$ + */ + +include_once __DIR__ . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin.tag.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin.tag.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin.tag.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -12,41 +12,40 @@ /** * XOOPS tag management module * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @since 1.0.0 + * @package tag + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} * @author Taiwen Jiang <ph...@us...> + * @since 1.00 * @version $Id$ - * @package tag */ -include_once 'admin_header.php'; -require_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; +require_once __DIR__ . '/admin_header.php'; +require_once $GLOBALS['xoops']->path("/class/xoopsformloader.php"); +xoops_load('xoopsrequest'); + $indexAdmin = new ModuleAdmin(); xoops_cp_header(); -include XOOPS_ROOT_PATH . "/modules/tag/include/vars.php"; -//echo function_exists("loadModuleAdminMenu") ? loadModuleAdminMenu(1) : ""; - echo $indexAdmin->addNavigation('admin.tag.php'); +include $GLOBALS['xoops']->path("/modules/tag/include/vars.php"); +echo $indexAdmin->addNavigation('admin.tag.php'); -global $xoopsModuleConfig; +$limit = $GLOBALS['xoopsModuleConfig']['items_perpage']; +$modid = XoopsRequest::getInt('modid', TagConstants::DEFAULT_ID); +$start = XoopsRequest::getInt('start', TagConstants::BEGINNING); +$status = XoopsRequest::getInt('status', TagConstants::STATUS_ALL, 'GET'); -$limit = $xoopsModuleConfig['items_perpage']; -$modid = intval( empty($_GET['modid']) ? @$_POST['modid'] : $_GET['modid'] ); -$start = intval( empty($_GET['start']) ? @$_POST['start'] : $_GET['start'] ); -//$status = intval( empty($_GET['status']) ? @$_POST['status'] : $_GET['status']); +$tag_handler =& xoops_getmodulehandler('tag', $thisModuleDir); +$link_handler =& xoops_getmodulehandler('link', $thisModuleDir); -$status = intval( (isset($_GET['status']) && $_GET['status'] >-1) ? $_GET['status'] : -1); - -$tag_handler =& xoops_getmodulehandler("tag", $xoopsModule->getVar("dirname")); - -if (!empty($_POST['tags'])) { +$postTags = XoopsRequest::getArray('tags', array(), 'POST'); +if (!empty($postTags)) { $msgDBUpdated=''; - foreach ($_POST['tags'] as $tag => $tag_status) { + foreach ($postTags as $tag => $tag_status) { $tag_obj =& $tag_handler->get($tag); - if (!is_object($tag_obj) || !$tag_obj->getVar("tag_id")) continue; - if ($tag_status < 0) { + if (!($tag_obj instanceof TagTag) || !$tag_obj->getVar("tag_id")) continue; + if ($tag_status < TagConstants::STATUS_ACTIVE) { $tag_handler->delete($tag_obj); } elseif ($tag_status != $tag_obj->getVar("tag_status")) { $tag_obj->setVar("tag_status", $tag_status); @@ -54,19 +53,19 @@ $msgDBUpdated = _AM_TAG_DB_UPDATED; } } - redirect_header("admin.tag.php?modid={$modid}&start={$start}&status={$status}", 2, $msgDBUpdated); - exit(); + redirect_header("admin.tag.php?modid={$modid}&start={$start}&status={$status}", TagConstants::REDIRECT_DELAY_MEDIUM, $msgDBUpdated); } -$sql = " SELECT tag_modid, COUNT(DISTINCT tag_id) AS count_tag"; -$sql .= " FROM " . $xoopsDB->prefix("tag_link"); -$sql .= " GROUP BY tag_modid"; +$sql = "SELECT tag_modid, COUNT(DISTINCT tag_id) AS count_tag"; +$sql .= " FROM " . $GLOBALS['xoopsDB']->prefix("tag_link"); +$sql .= " GROUP BY tag_modid"; $counts_module = array(); $module_list = array(); -if ( ($result = $xoopsDB->query($sql)) == false) { - xoops_error($xoopsDB->error()); +$result = $GLOBALS['xoopsDB']->query($sql); +if (false === $result) { + xoops_error($GLOBALS['xoopsDB']->error()); } else { - while ($myrow = $xoopsDB->fetchArray($result)) { + while ($myrow = $GLOBALS['xoopsDB']->fetchArray($result)) { $counts_module[$myrow["tag_modid"]] = $myrow["count_tag"]; } if (!empty($counts_module)) { @@ -84,9 +83,9 @@ } $tray->addElement($mod_select); $status_select = new XoopsFormRadio("", 'status', $status); -$status_select->addOption(-1, _ALL); -$status_select->addOption(1, TAG_AM_ACTIVE); -$status_select->addOption(0, TAG_AM_INACTIVE); +$status_select->addOption(TagConstants::STATUS_ALL, _ALL); +$status_select->addOption(TagConstants::STATUS_ACTIVE, _AM_TAG_ACTIVE); +$status_select->addOption(TagConstants::STATUS_INACTIVE, _AM_TAG_INACTIVE); $tray->addElement($status_select); $tray->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); $opform->addElement($tray); @@ -97,52 +96,62 @@ $criteria->setOrder("ASC"); $criteria->setStart($start); $criteria->setLimit($limit); -if ($status >= 0) { - $criteria->add( new Criteria("o.tag_status", $status) ); +if ($status >= TagConstants::STATUS_ACTIVE) { + $criteria->add(new Criteria("o.tag_status", $status)); } if (!empty($modid)) { - $criteria->add( new Criteria("l.tag_modid", $modid) ); + $criteria->add(new Criteria("l.tag_modid", $modid)); } $tags = $tag_handler->getByLimit($criteria, false); -$form_tags = "<form name='tags' method='post' action='" . xoops_getenv("PHP_SELF") . "'>"; -$form_tags .= "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>"; -$form_tags .= "<tr align='center'>"; -$form_tags .= "<th class='bg3'>" . TAG_AM_TERM . "</td>"; -$form_tags .= "<th class='bg3' width='10%'>" . TAG_AM_ACTIVE . "</td>"; -$form_tags .= "<th class='bg3' width='10%'>" . TAG_AM_INACTIVE . "</td>"; -$form_tags .= "<th class='bg3' width='10%'>" . _DELETE . "</td>"; -$form_tags .= "</tr>"; +$form_tags = "<form name='tags' method='post' action='" . xoops_getenv("PHP_SELF") . "'>\n" + . "<table style='border-width: 0px; margin: 1px; padding: 4px;' cellspacing='1' class='outer width100'>\n" + . " <thead>\n" + . " <tr class='txtcenter'>\n" + . " <th class='bg3'>" . _AM_TAG_TERM . "</th>\n" + . " <th class='bg3 width10'>" . _AM_TAG_INACTIVE . "</th>\n" + . " <th class='bg3 width10'>" . _AM_TAG_ACTIVE . "</th>\n" + . " <th class='bg3 width10'>" . _DELETE . "</th>\n" + . " </tr>\n" + . " </thead>\n" + . " <tbody>\n"; if (empty($tags)) { - $form_tags .= "<tr><td colspan='4'>" . _NONE . "</td></tr>"; + $form_tags .= " <tr><td colspan='4'>" . _NONE . "</td></tr>\n"; } else { - $class_tr = array("odd", "even"); + $class_tr = 'odd'; $i = 0; foreach (array_keys($tags) as $key) { - $form_tags .= "<tr class='" . $class_tr[(++$i) % 2] . "'>"; - $form_tags .= "<td>" . $tags[$key]["term"] . "</td>"; - $form_tags .= "<td align='center'><input type='radio' name='tags[{$key}]' value='1' " . ( $tags[$key]["status"] ? "checked" : " '' ") . "></td>"; - $form_tags .= "<td align='center'><input type='radio' name='tags[{$key}]' value='0' " . ( $tags[$key]["status"] ? " '' " : "checked") . "></td>"; - $form_tags .= "<td align='center'><input type='radio' name='tags[{$key}]' value='-1'></td>"; - $form_tags .= "</tr>"; + $form_tags .= " <tr class='{$class_tr}'>\n" + . " <td>" . $tags[$key]["term"] . "</td>\n" + . " <td class='txtcenter'><input type='radio' name='tags[{$key}]' value='" . TagConstants::STATUS_INACTIVE . "'" . ( $tags[$key]["status"] ? " checked" : " '' ") . "></td>\n" + . " <td class='txtcenter'><input type='radio' name='tags[{$key}]' value='" . TagConstants::STATUS_ACTIVE . "'" . ( $tags[$key]["status"] ? " '' " : " checked") . "></td>\n" + . " <td class='txtcenter'><input type='radio' name='tags[{$key}]' value='" . TagConstants::STATUS_DELETE . "'></td>\n" + . " </tr>\n"; + $class_tr = ('even' == $class_tr) ? 'odd' : 'even'; } - if ( !empty($start) || count($tags) >= $limit ) { + if (!empty($start) || (count($tags) >= $limit)) { $count_tag = $tag_handler->getCount($criteria); - include XOOPS_ROOT_PATH . "/class/pagenav.php"; + include $GLOBALS['xoops']->path("/class/pagenav.php"); $nav = new XoopsPageNav($count_tag, $limit, $start, "start", "modid={$modid}&status={$status}"); - $form_tags .= "<tr><td colspan='4' align='right'>" . $nav->renderNav(4) . "</td></tr>"; + $form_tags .= " <tr><td colspan='4' class='txtright'>" . $nav->renderNav(4) . "</td></tr>\n"; } - $form_tags .= "<tr><td colspan='4' align='center'>"; - $form_tags .= "<input type='hidden' name='status' value='{$status}'> "; - $form_tags .= "<input type='hidden' name='start' value='{$start}'> "; - $form_tags .= "<input type='hidden' name='modid' value='{$modid}'> "; - $form_tags .= "<input type='submit' name='submit' value='" . _SUBMIT . "'> "; - $form_tags .= "<input type='reset' name='submit' value='" . _CANCEL . "'>"; - $form_tags .= "</td></tr>"; + $form_tags .= " </tbody>\n" + . " <tfoot>\n" + . " <tr>\n" + . " <td class='txtcenter' colspan='4'>\n" + . " <input type='hidden' name='status' value='{$status}' /> \n" + . " <input type='hidden' name='start' value='{$start}' /> \n" + . " <input type='hidden' name='modid' value='{$modid}' /> \n" + . " <input type='submit' name='submit' value='" . _SUBMIT . "' /> \n" + . " <input type='reset' name='submit' value='" . _CANCEL . "' />\n" + . " </td>\n" + . " </tr>\n" + . " </tfoot>\n"; } -$form_tags .= "</table>"; -$form_tags .= "</form>"; +$form_tags .= " </tbody>\n" + . "</table>\n" + . "</form>\n"; echo $form_tags; -include 'admin_footer.php'; +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_footer.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_footer.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_footer.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,27 +1,41 @@ -<?php -/** - * Tag module - * - * 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 http://www.fsf.org/copyleft/gpl.html GNU public license - * @package XOOPS Tag - * @since 2.5.0 - * @author Mamba (www.xoops.org) - * @version $Id $ -**/ - -echo "<div class='adminfooter'>\n" - ." <div style='text-align: center;'>\n" - ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" - ." </div>\n" - ." " . _AM_TAG_FOOTER . "\n" - ."</div>"; - -xoops_cp_footer(); +<?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. +*/ + +/** + * XOOPS tag management module + * + * @package tag + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @author Mamba {@link http://www.xoops.org} + * @since 2.31 + * @version $Id$ + */ +/* +echo "<div class='adminfooter'>\n" + ." <div class='txtcenter'>\n" + ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + ." </div>\n" + ." " . _AM_TAG_FOOTER . "\n" + ."</div>"; + */ +echo "<div class='adminfooter'>\n" + . " <div class='center'>\n" + . " <a href='" . $GLOBALS['xoopsModule']->getInfo('author_website_url') . "' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='" . $GLOBALS['xoopsModule']->getInfo('author_website_name') . "' title='" . $GLOBALS['xoopsModule']->getInfo('author_website_name') . "' /></a>\n" + . " </div>\n" + . " <div class='center smallsmall italic pad5'>\n" + . " " . _AM_TAG_MAINTAINED_BY + . " <a class='tooltip' rel='external' href='http://" . $GLOBALS['xoopsModule']->getInfo('module_website_url') . "' " + . "title='" . _AM_TAG_MAINTAINED_TITLE . "'>" . _AM_TAG_MAINTAINED_TEXT . "</a>\n" + . " </div>\n" + . "</div>"; + +xoops_cp_footer(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_header.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/admin_header.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,104 +1,45 @@ -<?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. -*/ - -/** - * XOOPS tag management module - * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @since 1.0.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - * @package tag - */ - -$path = dirname(dirname(dirname(dirname(__FILE__)))); -require_once $path . '/include/cp_header.php'; - -require_once dirname(dirname(__FILE__)) . '/include/vars.php'; -require_once dirname(dirname(__FILE__)) . '/include/functions.php'; - -$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); - -// Load language files -xoops_loadLanguage('admin', $thisModuleDir); -xoops_loadLanguage('modinfo', $thisModuleDir); -xoops_loadLanguage('main', $thisModuleDir); - -$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); -$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); -$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - -if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) { - include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); - } else { - redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); - } - -IF (!@ include_once XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php"): - -function loadModuleAdminMenu($currentoption, $breadcrumb = "") -{ - if (!$adminmenu = $GLOBALS["xoopsModule"]->getAdminMenu()) { - return false; - } - - $breadcrumb = empty($breadcrumb) ? $adminmenu[$currentoption]["title"] : $breadcrumb; - $module_link = XOOPS_URL . "/modules/" . $GLOBALS["xoopsModule"]->getVar("dirname") . "/"; - $image_link = XOOPS_URL . "/modules/" . $GLOBALS["xoopsModule"]->getVar("dirname") . "/images"; - - $adminmenu_text =' - <style type="text/css"> - <!-- - #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0;} - #buttonbar { float:left; width:100%; background: #e7e7e7 url("'.$image_link.'/modadminbg.gif") repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px;} - #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; } - #buttonbar li { display:inline; margin:0; padding:0; } - #buttonbar a { float:left; background:url("'.$image_link.'/left_both.gif") no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; } - #buttonbar a span { float:left; display:block; background:url("'.$image_link.'/right_both.gif") no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #buttonbar a span {float:none;} - /* End IE5-Mac hack */ - #buttonbar a:hover span { color:#333; } - #buttonbar .current a { background-position:0 -150px; border-width:0; } - #buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; } - #buttonbar a:hover { background-position:0% -150px; } - #buttonbar a:hover span { background-position:100% -150px; } - //--> - </style> - <div id="buttontop"> - <table style="width: 100%; padding: 0; " cellspacing="0"> - <tr> - <td style="width: 70%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;"> - <a href="../index.php">' . $GLOBALS["xoopsModule"]->getVar("name") . '</a> - </td> - <td style="width: 30%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;"> - <strong>' . $GLOBALS["xoopsModule"]->getVar("name") . '</strong> ' . $breadcrumb . ' - </td> - </tr> - </table> - </div> - <div id="buttonbar"> - <ul> - '; - foreach (array_keys($adminmenu) as $key) { - $adminmenu_text .= (($currentoption == $key) ? '<li class="current">' : '<li>') . '<a href="' . $module_link . $adminmenu[$key]["link"] . '"><span>' . $adminmenu[$key]["title"] . '</span></a></li>'; - } - $adminmenu_text .= '<li><a href="' . XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $GLOBALS["xoopsModule"]->getVar("mid") . '"><span>' . _PREFERENCES . '</span></a></li>'; - $adminmenu_text .= ' - </ul> - </div> - <br style="clear:both;" />'; - - echo $adminmenu_text; -} - -ENDIF; +<?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. +*/ + +/** + * XOOPS tag management module + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @since 1.00 + * @author Taiwen Jiang <ph...@us...> + * @version $Id$ + * */ + +$path = dirname(dirname(dirname(__DIR__))); +require_once $path . '/include/cp_header.php'; + +require_once dirname(__DIR__) . '/include/vars.php'; +require_once dirname(__DIR__) . '/include/functions.php'; +xoops_load('constants', 'tag'); + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('icons16')); +$pathIcon32 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('icons32')); +$pathModuleAdmin = $GLOBALS['xoops']->path('www/' . $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin')); + +if ( file_exists("{$pathModuleAdmin}/moduleadmin/moduleadmin.php")) { + include_once "{$pathModuleAdmin}/moduleadmin/moduleadmin.php"; +} else { + redirect_header("{$path}/admin.php", TagConstants::REDIRECT_DELAY_LONG, _AM_MODULEADMIN_MISSING, false); +} + +include_once $GLOBALS['xoops']->path("/Frameworks/art/functions.admin.php"); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/index.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/index.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,70 +1,82 @@ -<?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. -*/ - -/** - * XOOPS tag management module - * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @since 1.0.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - * @package tag - */ -include_once 'admin_header.php'; -xoops_cp_header(); - -include XOOPS_ROOT_PATH . "/modules/tag/include/vars.php"; -//echo function_exists("loadModuleAdminMenu") ? loadModuleAdminMenu(0) : ""; - -$indexAdmin = new ModuleAdmin(); - -$tag_handler =& xoops_getmodulehandler("tag", $xoopsModule->getVar("dirname")); -$count_tag = $tag_handler->getCount(); - -$count_item = 0; -$sql = " SELECT COUNT(DISTINCT tl_id) FROM " . $xoopsDB->prefix("tag_link"); -if ( ($result = $xoopsDB->query($sql)) == false) { - xoops_error($xoopsDB->error()); -} else { - list($count_item) = $xoopsDB->fetchRow($result); -} - -$sql = " SELECT tag_modid, SUM(tag_count) AS count_item, COUNT(DISTINCT tag_id) AS count_tag"; -$sql .= " FROM " . $xoopsDB->prefix("tag_stats"); -$sql .= " GROUP BY tag_modid"; -$counts_module = array(); -if ( ($result = $xoopsDB->query($sql)) == false) { - xoops_error($xoopsDB->error()); -} else { - while ($myrow = $xoopsDB->fetchArray($result)) { - $counts_module[$myrow["tag_modid"]] = array("count_item" => $myrow["count_item"], "count_tag" => $myrow["count_tag"]); - } - if (!empty($counts_module)) { - $module_handler =& xoops_gethandler("module"); - $module_list = $module_handler->getList(new Criteria("mid", "(" . implode(", ", array_keys($counts_module)) . ")", "IN")); - } -} - -$indexAdmin->addInfoBox(TAG_AM_STATS) ; -$indexAdmin->addInfoBoxLine(TAG_AM_STATS, "<infolabel>" .TAG_AM_COUNT_TAG. "</infolabel>" , $count_tag) ; -$indexAdmin->addInfoBoxLine(TAG_AM_STATS, "<infolabel>" .TAG_AM_COUNT_ITEM. "</infolabel>" , $count_item ."<br /><br />") ; -$indexAdmin->addInfoBoxLine(TAG_AM_STATS, "<infolabel>" . TAG_AM_COUNT_MODULE. "</infolabel><infotext>" .TAG_AM_COUNT_MODULE_TITLE."</infotext>") ; - -foreach ($counts_module as $module => $count) { - $indexAdmin->addInfoBoxLine( TAG_AM_STATS,("<infolabel>" . $module_list[$module] . ":</infolabel><infotext>" . $count["count_tag"] . " / " . $count["count_item"] . " [<a href=\"" . XOOPS_URL . "/modules/tag/admin/admin.tag.php?modid={$module}\">" . TAG_AM_EDIT . "</a>] [<a href=\"" . XOOPS_URL . "/modules/tag/admin/syn.tag.php?modid={$module}\">" . TAG_AM_SYNCHRONIZATION . "</a>]</infotext> ")); -} - -echo $indexAdmin->addNavigation('index.php'); -echo $indexAdmin->renderIndex(); - -include 'admin_footer.php'; -//xoops_cp_footer(); +<?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. +*/ + +/** + * XOOPS tag management module + * + * @package tag + * @subpackage admin + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @author Taiwen Jiang <ph...@us...> + * @since 1.00 + * @version $Id$ + */ + +require_once __DIR__ . '/admin_header.php'; +xoops_cp_header(); +include $GLOBALS['xoops']->path("/modules/tag/include/vars.php"); + +$indexAdmin = new ModuleAdmin(); + +$tag_handler =& xoops_getmodulehandler("tag", $thisModuleDir); +$count_tag = $tag_handler->getCount(); + +$count_item = 0; +$sql = "SELECT COUNT(DISTINCT tl_id) FROM " . $GLOBALS['xoopsDB']->prefix("tag_link"); +if (false === ($result = $GLOBALS['xoopsDB']->query($sql))) { + xoops_error($GLOBALS['xoopsDB']->error()); +} else { + list($count_item) = $GLOBALS['xoopsDB']->fetchRow($result); +} + +$sql = "SELECT tag_modid, SUM(tag_count) AS count_item, COUNT(DISTINCT tag_id) AS count_tag"; +$sql .= " FROM " . $GLOBALS['xoopsDB']->prefix("tag_stats"); +$sql .= " GROUP BY tag_modid"; +$counts_module = array(); +if (false === ($result = $GLOBALS['xoopsDB']->query($sql))) { + xoops_error($GLOBALS['xoopsDB']->error()); +} else { + while ($myrow = $GLOBALS['xoopsDB']->fetchArray($result)) { + $counts_module[$myrow["tag_modid"]] = array("count_item" => $myrow["count_item"], "count_tag" => $myrow["count_tag"]); + } + if (!empty($counts_module)) { + $module_handler =& xoops_gethandler("module"); + $module_list = $module_handler->getList(new Criteria("mid", "(" . implode(", ", array_keys($counts_module)) . ")", "IN")); + } else { + + } +} + +$indexAdmin->addInfoBox(_AM_TAG_STATS) ; +$indexAdmin->addInfoBoxLine(_AM_TAG_STATS, "<infolabel>" . _AM_TAG_COUNT_TAG . "</infolabel>" , $count_tag) ; +$indexAdmin->addInfoBoxLine(_AM_TAG_STATS, "<infolabel>" . _AM_TAG_COUNT_ITEM . "</infolabel>" , $count_item ."<br /><br />") ; +$indexAdmin->addInfoBoxLine(_AM_TAG_STATS, "<infolabel>" . _AM_TAG_COUNT_MODULE . "</infolabel>" . "<infotext>" . _AM_TAG_COUNT_MODULE_TITLE . "</infotext>") ; + +foreach ($counts_module as $module => $count) { + $moduleStat = "<infolabel>" . $module_list[$module] . ":</infolabel>\n" + . "<infotext>" . $count["count_tag"] . " / " . $count["count_item"] . "\n" + . " [<a href='" . $GLOBALS['xoops']->url("www/modules/tag/admin/admin.tag.php?modid={$module}") . "'>" . _AM_TAG_EDIT . "</a>]\n" + . " [<a href='" . $GLOBALS['xoops']->url("www/modules/tag/admin/syn.tag.php?modid={$module}") . "'>" . _AM_TAG_SYNCHRONIZATION . "</a>]\n" + . "</infotext> \n"; + $indexAdmin->addInfoBoxLine( _AM_TAG_STATS, $moduleStat); +} + +if (empty($counts_module)) { // there aren't any so just display "none" + $moduleStat = "<infolabel>%s</infolabel><infotext>0 / 0</infotext> \n"; + $indexAdmin->addInfoBoxLine( _AM_TAG_STATS, $moduleStat, _NONE); +} + +echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->renderIndex(); + +include __DIR__ . '/admin_footer.php'; +//xoops_cp_footer(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/menu.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/menu.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/menu.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,51 +1,49 @@ -<?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. -*/ - -/** - * XOOPS tag management module - * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @since 1.0.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - * @package tag - */ - -defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); - -$module_handler =& xoops_gethandler('module'); -$xoopsModule =& XoopsModule::getByDirname('tag'); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathIcon32 = $moduleInfo->getInfo('icons32'); - -$adminmenu = array(); - -$i = 1; -$adminmenu[$i]["title"] = TAG_MI_ADMENU_INDEX; -$adminmenu[$i]["link"] = "admin/index.php"; -$adminmenu[$i]["desc"] = _TAG_ADMIN_HOME_DESC; -$adminmenu[$i]["icon"] = $pathIcon32.'/home.png'; -++$i; -$adminmenu[$i]["title"] = TAG_MI_ADMENU_EDIT; -$adminmenu[$i]["link"] = "admin/admin.tag.php"; -$adminmenu[$i]["desc"] = _TAG_ADMIN_ABOUT_DESC; -$adminmenu[$i]["icon"] = $pathIcon32.'/administration.png'; -++$i; -$adminmenu[$i]["title"] = TAG_MI_ADMENU_SYNCHRONIZATION; -$adminmenu[$i]["link"] = "admin/syn.tag.php"; -$adminmenu[$i]["desc"] = _TAG_ADMIN_HELP_DESC; -$adminmenu[$i]["icon"] = $pathIcon32.'/synchronized.png'; -++$i; -$adminmenu[$i]["title"] = _TAG_ADMIN_ABOUT; -$adminmenu[$i]["link"] = "admin/about.php"; -$adminmenu[$i]["desc"] = _TAG_ADMIN_ABOUT_DESC; -$adminmenu[$i]["icon"] = $pathIcon32.'/about.png'; +<?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. +*/ + +/** + * XOOPS tag management module + * + * @package tag + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @author Taiwen Jiang <ph...@us...> + * @since 1.00 + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') || exit('Restricted access'); + +$module_handler =& xoops_gethandler('module'); +$module =& XoopsModule::getByDirname('tag'); +$moduleInfo =& $module_handler->get($module->getVar('mid')); +$pathIcon32 = '../../' . $module->getInfo('icons32'); + +$adminmenu = array(array("title" => _MI_TAG_ADMENU_INDEX, + "link" => "admin/index.php", + "desc" => _MI_TAG_ADMIN_HOME_DESC, + "icon" => "{$pathIcon32}/home.png"), + + array("title" => _MI_TAG_ADMENU_EDIT, + "link" => "admin/admin.tag.php", + "desc" => _MI_TAG_ADMENU_EDIT_DESC, + "icon" => "{$pathIcon32}/administration.png"), + + array("title" => _MI_TAG_ADMENU_SYNCHRONIZATION, + "link" => "admin/syn.tag.php", + "desc" => _MI_TAG_HELP_DESC, + "icon" => "{$pathIcon32}/synchronized.png"), + + array("title" => _MI_TAG_ADMIN_ABOUT, + "link" => "admin/about.php", + "desc" => _MI_TAG_ADMIN_HELP_DESC, + "icon" => "{$pathIcon32}/about.png") +); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/syn.tag.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/syn.tag.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/admin/syn.tag.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,95 +1,90 @@ -<?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. -*/ - -/** - * XOOPS tag management module - * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @since 1.0.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - * @package tag - */ -include_once 'admin_header.php'; -require_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; -//include_once XOOPS_ROOT_PATH."/modules/" . $xoopsModule->getVar("dirname") . "/class/admin.php"; -$index_admin = new ModuleAdmin(); - -xoops_cp_header(); - -include XOOPS_ROOT_PATH . "/modules/tag/include/vars.php"; -//echo function_exists("loadModuleAdminMenu") ? loadModuleAdminMenu(2) : ""; - echo $index_admin->addNavigation('syn.tag.php'); - -$limit = 10; -$modid = intval( @$_GET['modid'] ); -$start = intval( @$_GET['start'] ); -$limit = isset($_GET['limit']) ? intval( $_GET['limit'] ) : 100; - -$sql = " SELECT tag_modid, COUNT(DISTINCT tag_id) AS count_tag"; -$sql .= " FROM " . $xoopsDB->prefix("tag_link"); -$sql .= " GROUP BY tag_modid"; -$counts_module = array(); -$module_list = array(); -if ( $result = $xoopsDB->query($sql)) { - while ($myrow = $xoopsDB->fetchArray($result)) { - $counts_module[$myrow["tag_modid"]] = $myrow["count_tag"]; - } - if (!empty($counts_module)) { - $module_handler =& xoops_gethandler("module"); - $module_list = $module_handler->getList(new Criteria("mid", "(" . implode(", ", array_keys($counts_module)) . ")", "IN")); - } -} - -$opform = new XoopsSimpleForm('', 'moduleform', xoops_getenv("PHP_SELF"), "get"); -$tray = new XoopsFormElementTray(''); -$mod_select = new XoopsFormSelect(_SELECT, 'modid', $modid); -$mod_select->addOption(-1, TAG_AM_GLOBAL); -$mod_select->addOption(0, TAG_AM_ALL); -foreach ($module_list as $module => $module_name) { - $mod_select->addOption($module, $module_name . " (" . $counts_module[$module] . ")"); -} -$tray->addElement($mod_select); -$num_select = new XoopsFormSelect(TAG_AM_NUM, 'limit', $limit); -foreach (array(10, 50, 100, 500) as $_num) { - $num_select->addOption($_num); -} -$num_select->addOption(0, _ALL); -$tray->addElement($num_select); -$tray->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); -$tray->addElement(new XoopsFormHidden("start", $start)); -$opform->addElement($tray); -$opform->display(); - -if ( isset($_GET['start']) ) { - - $tag_handler =& xoops_getmodulehandler("tag", $xoopsModule->getVar("dirname")); - - $criteria = new CriteriaCompo(); - $criteria->setStart($start); - $criteria->setLimit($limit); - if ($modid > 0) { - $criteria->add( new Criteria("l.tag_modid", $modid) ); - } - $tags = $tag_handler->getByLimit($criteria, false); - if (empty($tags)) { - echo "<h2>" . TAG_AM_FINISHED . "</h2>"; - } else { - - foreach (array_keys($tags) as $tag_id) { - $tag_handler->update_stats($tag_id, ( $modid == -1 ) ? 0 : $tags[$tag_id]["modid"]); - } - redirect_header("syn.tag.php?modid={$modid}&start=" . ($start + $limit) . "&limit={$limit}", 2, TAG_AM_IN_PROCESS); - } -} -include 'admin_footer.php'; -//xoops_cp_footer(); +<?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. +*/ + +/** + * XOOPS tag management module + * + * @package tag + * @copyright {@link http://sourceforge.net/projects/xoops/ The XOOPS Project} + * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} + * @author Taiwen Jiang <ph...@us...> + * @since 1.00 + * @version $Id$ + */ + +require_once __DIR__ . '/admin_header.php'; +require_once $GLOBALS['xoops']->path("/class/xoopsformloader.php"); +xoops_load('xoopsrequest'); +//include_once $GLOBALS['xoops']->path("/modules/" . $GLOBALS['xoopsModule']->getVar("dirname") . "/class/admin.php"); + +include $GLOBALS['xoops']->path("/modules/tag/include/vars.php"); + +xoops_cp_header(); + +$index_admin = new ModuleAdmin(); +echo $index_admin->addNavigation('syn.tag.php'); + +$modid = XoopsRequest::getInt('modid', TagConstants::DEFAULT_ID); +$start = XoopsRequest::getInt('start', TagConstants::BEGINNING); +$limit = XoopsRequest::getInt('limit', TagConstants::DEFAULT_LIMIT); + +$sql = "SELECT tag_modid, COUNT(DISTINCT tag_id) AS count_tag"; +$sql .= " FROM " . $GLOBALS['xoopsDB']->prefix("tag_link"); +$sql .= " GROUP BY tag_modid"; +$counts_module = array(); +$module_list = array(); +if ( $result = $GLOBALS['xoopsDB']->query($sql)) { + while ($myrow = $GLOBALS['xoopsDB']->fetchArray($result)) { + $counts_module[$myrow["tag_modid"]] = $myrow["count_tag"]; + } + if (!empty($counts_module)) { + $module_handler =& xoops_gethandler("module"); + $module_list = $module_handler->getList(new Criteria("mid", "(" . implode(", ", array_keys($counts_module)) . ")", "IN")); + } +} + +$opform = new XoopsSimpleForm('', 'moduleform', xoops_getenv("PHP_SELF"), "get"); +$tray = new XoopsFormElementTray(''); +$mod_select = new XoopsFormSelect(_SELECT, 'modid', $modid); +$mod_select->addOption(-1, _AM_TAG_GLOBAL); +$mod_select->addOption(0, _AM_TAG_ALL); +foreach ($module_list as $module => $module_name) { + $mod_select->addOption($module, $module_name . " (" . $counts_module[$module] . ")"); +} +$tray->addElement($mod_select); +$num_select = new XoopsFormSelect(_AM_TAG_NUM, 'limit', $limit); +$num_select->addOptionArray(array(0 => _ALL, 10 => 10, 50 => 50, 100 => 100, 500 => 500)); +$tray->addElement($num_select); +$tray->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); +$tray->addElement(new XoopsFormHidden("start", $start)); +$opform->addElement($tray); +$opform->display(); + +if (isset($_GET['start'])) { + $tag_handler =& xoops_getmodulehandler("tag", $thisModuleDir); + + $criteria = new CriteriaCompo(); + $criteria->setStart($start); + $criteria->setLimit($limit); + if ($modid > TagConstants::DEFAULT_ID) { + $criteria->add(new Criteria("l.tag_modid", $modid)); + } + $tags = $tag_handler->getByLimit($criteria, false); + if (empty($tags)) { + echo "<h2>" . _AM_TAG_FINISHED . "</h2>\n"; + } else { + foreach (array_keys($tags) as $tag_id) { + $tag_handler->update_stats($tag_id, (-1 == $modid) ? TagConstants::DEFAULT_ID : $tags[$tag_id]["modid"]); + } + redirect_header("syn.tag.php?modid={$modid}&start=" . ($start + $limit) . "&limit={$limit}", TagConstants::REDIRECT_DELAY_SHORT, _AM_TAG_IN_PROCESS); + } +} +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/css/index.html =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/css/index.html 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/css/index.html 2015-02-18 16:22:25 UTC (rev 12993) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/cumulus.swf =================================================================== (Binary files differ) Index: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/cumulus.swf =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/cumulus.swf 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/cumulus.swf 2015-02-18 16:22:25 UTC (rev 12993) Property changes on: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/cumulus.swf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/images/index.html =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/images/index.html 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/images/index.html 2015-02-18 16:22:25 UTC (rev 12993) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/index.html =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/index.html 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/index.html 2015-02-18 16:22:25 UTC (rev 12993) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/index.html =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/index.html 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/index.html 2015-02-18 16:22:25 UTC (rev 12993) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> Added: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/swfobject.js =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/swfobject.js (rev 0) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/assets/js/swfobject.js 2015-02-18 16:22:25 UTC (rev 12993) @@ -0,0 +1,133 @@ +/** + * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ + * + * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for + * legal reasons. + */ +if(typeof deconcept=="undefined"){var deconcept=new Object();} +if(typeof deconcept.util=="undefined"){deconcept.util=new Object();} +if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();} +deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){ +if(!document.createElement||!document.getElementById){return;} +this.DETECT_KEY=_b?_b:"detectflash"; +this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY); +this.params=new Object(); +this.variables=new Object(); +this.attributes=new Array(); +if(_1){this.setAttribute("swf",_1);} +if(id){this.setAttribute("id",id);} +if(w){this.setAttribute("width",w);} +if(h){this.setAttribute("height",h);} +if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));} +this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7); +if(c){this.addParam("bgcolor",c);} +var q=_8?_8:"high"; +this.addParam("quality",q); +this.setAttribute("useExpressInstall",_7); +this.setAttribute("doExpressInstall",false); +var _d=(_9)?_9:window.location; +this.setAttribute("xiRedirectUrl",_d); +this.setAttribute("redirectUrl",""); +if(_a){this.setAttribute("redirectUrl",_a);}}; +deconcept.SWFObject.prototype={setAttribute:function(_e,_f){ +this.attributes[_e]=_f; +},getAttribute:function(_10){ +return this.attributes[_10]; +},addParam:function(_11,_12){ +this.params[_11]=_12; +},getParams:function(){ +return this.params; +},addVariable:function(_13,_14){ +this.variables[_13]=_14; +},getVariable:function(_15){ +return this.variables[_15]; +},getVariables:function(){ +return this.variables; +},getVariablePairs:function(){ +var _16=new Array(); +var key; +var _18=this.getVariables(); +for(key in _18){ +_16.push(key+"="+_18[key]);} +return _16; +},getSWFHTML:function(){ +var _19=""; +if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){ +if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");} +_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\""; +_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" "; +var _1a=this.getParams(); +for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";} +var _1c=this.getVariablePairs().join("&"); +if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";} +_19+="/>"; +}else{ +if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} +_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">"; +_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />"; +var _1d=this.getParams(); +for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";} +var _1f=this.getVariablePairs().join("&"); +if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";} +_19+="</object>";} +return _19; +},write:function(_20){ +if(this.getAttribute("useExpressInstall")){ +var _21=new deconcept.PlayerVersion([6,0,65]); +if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ +this.setAttribute("doExpressInstall",true); +this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); +document.title=document.title.slice(0,47)+" - Flash Player Installation"; +this.addVariable("MMdoctitle",document.title);}} +if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ +var n=(typeof _20=="string")?document.getElementById(_20):_20; +n.innerHTML=this.getSWFHTML(); +return true; +}else{ +if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} +return false;}}; +deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){ +var _25=new deconcept.PlayerVersion([0,0,0]); +if(navigator.plugins&&navigator.mimeTypes.length){ +var x=navigator.plugins["Shockwave Flash"]; +if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} +}else{try{ +var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); +for(var i=3;axo!=null;i++){ +axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i); +_25=new deconcept.PlayerVersion([i,0,0]);}} +catch(e){} +if(_23&&_25.major>_23.major){return _25;} +if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){ +try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));} +catch(e){}}} +return _25;}; +deconcept.PlayerVersion=function(_29){ +this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0; +this.minor=parseInt(_29[1])||0; +this.rev=parseInt(_29[2])||0;}; +deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ +if(this.major<fv.major){return false;} +if(this.major>fv.major){return true;} +if(this.minor<fv.minor){return false;} +if(this.minor>fv.minor){return true;} +if(this.rev<fv.rev){return false;}return true;}; +deconcept.util={getRequestParameter:function(_2b){ +var q=document.location.search||document.location.hash; +if(q){ +var _2d=q.indexOf(_2b+"="); +var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length; +if(q.length>1&&_2d>-1){ +return q.substring(q.indexOf("=",_2d)+1,_2e); +}}return "";}}; +if(Array.prototype.push==null){ +Array.prototype.push=function(_2f){ +this[this.length]=_2f; +return this.length;};} +var getQueryParamValue=deconcept.util.getRequestParameter; +var FlashObject=deconcept.SWFObject; // for backwards compatibility +var SWFObject=deconcept.SWFObject; + Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/blocks/block.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/blocks/block.php 2015-02-18 15:50:59 UTC (rev 12992) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/tag/blocks/block.php 2015-02-18 16:22:25 UTC (rev 12993) @@ -1,305 +1,490 @@ -<?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. -*/ - -/** - * XOOPS tag management module - * - * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @since 1.0.0 - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - * @package tag - */ - -defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); -include XOOPS_ROOT_PATH . "/modules/tag/include/vars.php"; -include_once XOOPS_ROOT_PATH . "/modules/tag/include/functions.php"; - -xoops_loadLanguage("blocks", "tag"); - -/**#@+ - * Function to display tag cloud - * - * Developer guide: - * <ul> - * <li>Build your tag_block_cloud_show function, for example newbb_block_tag_cloud_show;</li> - * <li>Call the tag_block_cloud_show in your defined block function:<br /> - * <code> - * function newbb_block_tag_cloud_show($options) { - * $catid = $options[4]; // Not used by newbb, Only for demonstration - * if (!@include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php") { - * ... [truncated message content] |
From: <be...@us...> - 2015-02-18 15:51:09
|
Revision: 12992 http://sourceforge.net/p/xoops/svn/12992 Author: beckmi Date: 2015-02-18 15:50:59 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 2.38 RC 1 Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/xoops_version.php Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/docs/changelog.txt =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/docs/changelog.txt 2015-02-18 15:24:25 UTC (rev 12991) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/docs/changelog.txt 2015-02-18 15:50:59 UTC (rev 12992) @@ -1,462 +1,462 @@ -2.38 Beta 2 NOT RELEASD -=================================== -- moved all images, CSS, and JS files to /assets (mamba) -- renamed .html Smarty templates to .tpl (mamba) -- some changes to make it compatible with Angelo's templates for xBootstrap (mamba) - -2.38 Beta 1 2013/08/21 -=================================== -- added editor selection in Preferences for Admin and User (mamba) -- added checks if event was added/modified successfully (mamba) - -2.37 Final 2013/07/10 -=================================== -- small changes for PHP 5.4 -- fixed: removed today's events from "upcoming" block (chefry/mamba) - -2.37 RC6 2013/04/20 -=================================== -- modification of the English language files for Transifex (cesag) -- fixed: missing argument 6 for agenda_getCanevas() (cesag) -- fixed: missing phone column (Sabahan/Mamba) - -2.37 RC5 2013/01/29 -=================================== -- fixed: missing edit/delete icons for Admin in year/month/week/day view (mamba) -- fixed: missing print icons in week/day views (jcweb/mamba) -- fixed: date format in Agenda view (jcweb/mamba) -- fixed: search provides correct results (sabahan/mamba) -- added: recurring events in "Upcoming events" block (sabahan/mamba) -- changed time interval in Admin from 10 minutes to 15 minutes (playsome) - -2.37 RC4 2013/01/02 -=================================== -- fixed: removed list of events when showing first time the Search form (sabahan/mamba) -- fixed: if we disable tooltips , event title will be missing in from the calendar (sabahan/mamba) -- fixed: changed notice text when user/guest submit an event (sabahan/mamba) -- fixed: removed Price info from Print, if empty (sabahan/mamba) -- fixed: extCal didn't correctly count recurring events in Search (mamba) -- fixed: Agenda view reflects now start and end time set in Preferences (jcweb/mamba) - - -2.37 RC3 2013/01/01 -=================================== -- fixed: bug in setting recurring events for a x-day of the month, when 1st of the month is on the following day of the week. - E.g. if you select 3rd Thursday, and the first day of the month is on Friday, extCal would set the event on the 2nd Thursday -- fixed: added location info in Print, if not empty (sabahan/mamba) -- fixed: if not auto-approved, event is set as pending (sabahan/mamba) -- fixed: redirect after updating or creating an event (sabahan/mamba) - -2.37 RC2 2012/12/22 -=================================== -- fixed: attachment bug (JammerPro/mamba) -- fixed: past events not being visible consistently, when selected by user in Preferences (mamba) -- fixed: displaying the correct week in Week view when the first day of the week is Monday (mamba) -- updated: Highslide JS from version 4.1.8 to 4.1.13 (mamba) -- added: end date to blocks (sabahan/mamba) -- fixed: pagination for events in Admin (sabahan/mamba) -- fixed: Recent Activities showing all events, instead of only the particular user (sabahan/mamba) -- fixed: don't show empty Price and Organizer fields (sabahan/mamba) -- fixed: removed double edit icons (sabahan/mamba) -- fixed: removed Contact info from Print, if empty (sabahan/mamba) - -2.37 Beta 4 2012/04/02 -=================================== -- small code cleanups (mamba) -- - -2012/02/02: Version 2.37 (JJD.fr) -=================================== -- Ajout du champ icone dans la table event_event -- Ajout du chmp icone dans la table event_cat -- Affichage de l'icone de event/cat dans l'infobulle -- Mis à jour des constantes de langue -- Patch de mise à jour des tables - -2.36 (JJD.fr) 2012/01/31 -=================================== -- Fixed display -- Replacement of infobulle by another model more pro - -2.35 (JJD.fr) 2012/01/21 -=================================== -- Réintrégation file update extcal_2_34.php omitted in the previous version -- Fixed zoom in on photos to certeines -- Fixed default value of 0 in the table event_etablissement event -- Intancciation of extcalConfig <=> xoopsModuleConfig for blocks - -2.34 (JJD.fr) 2012/01/06 -=================================== - - Fixed handling of images of events and the establishment - - Fixed the RSS feed - - Fixed MOFIF regular expressions to validate dates - - Fixed link on the site of the facility - - Remove the newline before the currency in the form of the establishment - -=================================== -2011/12/30: Version 2.34 (JJD.fr) -=================================== - - Field "desc" table "establishment" renowned "description". - - Fixed template, admin and office are for schools - -2011/12/30: Version 2.33 (JJD.fr) (Google translation) -=================================== -- Re-write functions - bExtcalMinicalShow - bExtcalMinicaledit (using xoopsform) - bExtcalMinicalAddEventToArray (simplifications Code)) - -- Added a template for the xoops image display options with the mini calendar, - and knew ppression smarty code in the block miicalendrier. - -- Added constant 'CALENDAR_ROOT' file constantes.php - and removal of this statement in all the other files as - the file 'constantes.php is systematically included. - For aillerus this will ultimately move the library 'pear' - with other booksellers as jQuery, to provide for use with other modules, - library is without cete copy every time. - This library will remove the module in a future release. - It is already possible to gold and to change - define ('_EXTCAL_PEAR_CALENDAR' XOOPS_ROOT_PATH '. / modules / eXtCal / class / pear / Calendar'); - by - define ('_EXTCAL_PEAR_CALENDAR' XOOPS_PATH '. / pear / Calendar'); - If the library 'pear' is installed in the same place as jQuery. - -- Insurance for events and institutions category: - Added a link on the name to go directly to the page to change. - -- Divide the blocks in different files for easy reading and loading - Deletion of the block "excal_block.php" - Creation of blocks: - "Minical.php" - "Spotlight_events.php" - "Upcoming.php" - "Day_events.php" - "New_events.php" - "Random_events.php" - "Category_events.php" - -- Adding tabs in the data editing an event - -- Added the main menu on the left to access tabs visible - -- Pooling of lists of selection in the template "navbar" - -- Fixed CSS tooltips - Suppression of the class "*" and add the font size in "zone1" - -- Options of modules: - Added the display order of the tabs (also affects the sidebar) - Added option to position the module selection lists - -- Class event: if replacement functions below by the unique getEventOnPeriode - getEventDay, getEventWeek, getEventCalendarWeek, getEventCalendarMonth, - -- Added display of a clock flash with the mini-calendar - Adding template "clock" -Nouveau ! Cliquez sur les termes ci-dessus pour voir d'autres traductions. Ignorer -Google Traduction pour les entreprises :Google Translator ToolkitGadget TraductionOutil d'aide à l'export -Désactiver la traduction instantanéeÀ propos de Google TraductionMobileConfidentialitéAideEnvoyer des commentaires - - -=================================== -2011/10/21a: Version 2.32 (JJD.fr) -=================================== - - Fixed the "getSearchEvent" used by the search for Xoops; - It did not take into account only the first word of an expression. - In addition it has been adapted for a search from the module itself - with specific criteria (expression + category and then the month and year are expected). - The research was done on the fields 'EVENT_TITLE', 'event_desc', 'event_contact', 'EVENT_ADDRESS'. - The field 'cat_name' was added to allow the fields to search - to find words in the title of the category. - - - Added a view of research. - This allows for a wider search for a phrase, a category - over the year, month, ... - date has been changed to "DataTime" instead of int (11). - important: - Think in this tab to add those options visible in the modules. - -2011/10/21a: Version 2.31 (JJD.fr) -=================================== - - Fixed loading images in the front office - - Fixed currency and add exchange constants - define ('_MD_EXTCAL_DEVISE1', "Euro"); - define ('_MD_EXTCAL_DEVISE2', "Euros"); - define ('_MD_EXTCAL_DEVISE3', "€"); - - Changing the style sheet tooltips. - Remove the width of the class. "Tip-top" - To enable automatic resizing. - Adding attributes 'infoBulle_zone1', 'infoBulle_zone2' and 'infoBulle_zone3' - pemettre to display images and text. - 'InfoBulle_zone1': positioning the first balloon image or text - 'InfoBulle_zone2': 2nd positions the tooltip right of the first if there is an image - 'InfoBulle_zone3': 2nd positions the tool tip in the first if there is an image - To change the position of the second tooltip change 'infoBulle_zone2' - by 'infoBulle_zone3' extcal_infobulle.html in the template. - - Simplification of the template by adding generic templates - for tooltips and categories - -2011/10/21a: Version 2.30 (JJD.fr) -=================================== - - Added the removal by batch or by selection - in the administration page of events. - delete images related to the event. - -2011/09/04: Version 2.29 (JJD-fr) -==================================== -- Corrections by Trabis -- Module-wide tooltips new look in all views. -- Hiding the image seen in the "days" and "week" if it is not defined. -- Fixed formatting in views "day" and "week" and "month": " - adding the change of background color on line 10 2 - class = head for the header line, ... -- Language files "English" and "Spanish" complete -- Registration of an event on validation formular clone instead of click on the icon. -- Set the options of the module (nbeventsByPage) the number of events in the list of administration -- Add a block "Upcoming Events by category" - The block is bordered on the left and above each category by the color of the latter. - -==================================== -2011/08/22: Version 2.28 (JJD-fr) -==================================== -- Merging of "version 2.22 Plus" by Kraven with "2.27" - * Added table "etablisement" - * Entry Form for companies - * Added selection of the location of the event -- Fixed nbJours in calendar-day -- Added tooltips agenda_day in views-view-view and agenda_week -- Adjusting the input boxes of Events - -2011/08/07: Version 2.27 (Mamba) -================================= -- fixed bug with default for starting page (mamba) -- fixed event "title" for Agenda views (mamba) - -==================================== -2011/08/07: Version 2.26 (JJD-fr) -==================================== -- Fixed include constantes.php in xoops_version.php -- Fixed the block recovery xoopsModuleConfig minical -- Important: additional information in the file doc / install.txt -- Fixed language files -- Added a selection of tabs displayed in optins module. -- Correcion the link on the mini calendar. - Now shows view 'stat_page' set in options. - View 'start_page' should be visible. - -==================================== -2011/08/03: Version 2.25 (JJD-fr) -==================================== -- Added selection of tabs to display the options of the module. -- Fixed link on the mini calendar. - Now shows view 'stat_page' set in the options. - View 'start_page' should be visible. -- Add to calendar days in a grid: displays one or more days with time slots. - Events are displayed with a colored square with its title. -- Add to calendar weeks in a grid: displays one or more days with time slots. - Events are displayed with a square. - The title and start and end time are displayed in the tooltip on mouseover. - Provides a synthetic view of the week or a fortnight, for example. -- Added setting options for both views 'agenda' - * Start time of the day - * End time of the day - * Number of minutes per - * Number of days for each of the two views agenda. -- Rename all files and php template of views with the addition of the prefix 'view' for easy maintenance; -- Replacement of table '$ lang' in the template by the equivalent '$ smarty; const' -- Modification of functions and _getEventWeekCriteria getEventWeek. - addition of parameters to recover $ nbJours events on a beach - other than 7 days; '$ nbjours' must be> 0; attention to the display of more than 20 days - weeks in the calendar may not be practical. - These are the two parameters added to the options of the module; -- Added file 'agenda_fnc.php' which contains the functions for creating tables - to feed the agenda; -- Replacing the fill selection list for years, my days and categories, - by generic functions. -- Replacement of codes for the selection of views by constants (file 'constantes.php') -- Added option 'agenda_nb_years_before' and 'agenda_nb_years_after' to fill drop-down lists for selecting the year. - Can limit the previous year, for example. - - -============================ -2011/03/21: Version 2.24 -============================ - -+ Zend Coding Standard (Mamba) -+ Changed to standardized XOOPS Module GUI (mamba, Mage) -+ Spanish translation (josespi) -+ fix problem in upcoming events block (josespi) - -============================ -2008/10/09: Version 2.2.2 -============================ - -- Fix bug : Event not display in upcomming bloc if anonymous aren't allowed to view -- Fix bug : First occur for monthly reccur event could be not displayed -- Fix bug : Now, Date on RSS was replace by the event start date -- Add Flash slideshow on Minical block - - -Lang var change : - -blocks.php -_MB_EXTCAL_SS_WIDTH -_MB_EXTCAL_SS_HEIGHT -_MB_EXTCAL_SS_TRANS_TIME -_MB_EXTCAL_SS_PAUSE_TIME -_MB_EXTCAL_SS_NB_PHOTOS -_MB_EXTCAL_PX -_MB_EXTCAL_SECONDES - -============================ -2008/13/08: Version 2.2.1 -============================ - -- Fix bug : typo fix on the monthly reccur rule string -- Fix bug : 404 error when we update notifications -- Fix bug : Yearly "Same as event start date" recur option don't work. This option allow to set an event a the same day number in month as the start date. This allow to create reccuring event like birthday -- Fix bug : Member of Webmaster Group can't edit event if they aren't eXtCal edit permission -- Fix bug : Event in list view aren't sorted according to module preferences -- Fix bug : Navigation in weekly list view don't work if the first day of the week isn't Monday -- Fix bug : eXtCal upload directory isn't created when we make module update -- Fix bug : Who's not going don't work without new module install. The who's not going table isn't created when we make a module update -- Fix bug : Space in day's name on calendar pages -- Fix bug : Minical image aren't get random. -- Add Edit my event feature - - -Lang var change : - -admin.php -_AM_EXTCAL_CONFIRM_DELETE_EVENT -_AM_EXTCAL_EVENT_DELETED - -============================ -2008/14/06: Version 2.2.0 -============================ - -- Fix bug : Event year selection box don't work on year.php page -- Fix bug : Blank page when event is submitted with wrong date format -- Fix bug : Timezone offset bug on calendar pages and event page -- fix bug : Recurring bug on Monthly rule -- Fix bug : Translate error on minical day's letter - - -============================ -2008/21/05: Version 2.1.9 -============================ - -- Add tooltips box on all pages to display start and end date when mouse over the event name (need Mootools) -- Add list navig for event on admin side -- Fix bug : File isn't attached when event is submitted from admin side -- Fix bug : Timezone offset bug on block and pages - - -Lang var change : - -blocks.php -_MB_EXTCAL_DISPLAY -_MB_EXTCAL_EVENT -_MB_EXTCAL_TITLE_LENGTH - -Add mail_template directory - -============================ -2008/07/05: Version 2.1.8 -============================ - -- Add a feature to make a module update just by clicking on module admin side. The server will download, install files and update the module. -- Fix bug : User could submit event without perm by accessing directly to the submit page -- Fix bug : Recur rule aren't updated when an event is edited -- Fix bug : Timezone bug when user timezone is different than server timezone - - -============================ -2008/28/03: Version 2.1.7 -============================ - -- Fix bug : event_submitdate field wasn't created during upgrade from version before 2.0.4 -- Fix bug : wrong link when week start in month before the current view (stefan88) -- Add the send notification function -- Allow HTML for textarea fields -- Add the Comments system -- Add the Notifications system - - -============================ -2008/21/01: Version 2.1.6 -============================ - -- Fix error when submit an event from public side -- Fix Bug : Category perm are not respected to display event -- Fix Bug : Translation file isn't loaded -- Fix bug : An user could be in the who's going and who's not going list - - -============================ -2008/28/12: Version 2.1.5 -============================ - -- Add Reccuring rule description on event view -- Add the RSS page -- Extend the search function to address and contact field -- Set the update proc to upgrade from eXtCal 2.0.4 -- Add the navigation tab menu - - -============================ -2007/18/12: Version 2.1.4 -============================ - -- Add reccuring event feature - - -============================ -2007/10/07: Version 2.1.3 -============================ - -- Add a file attachement feature to the module -- Add a "who's not going" feature -- Add a version checker (display a message if a new version of the module is out) - - -============================ -2007/28/04: Version 2.1.2 -============================ - -- Add a preview feature on submit event page -- Fix a bug that disallow fresh install - - -============================ -2007/25/04: Version 2.1.1 -============================ - -- Add the "hide past event" feature - - -============================ -2007/22/04: Version 2.1.0 -============================ - -- Rewrite the module from scratch - - -============================ -2006/11/04: Version 2.0.4 RC2 -============================ - -- Add the possibility to display more than 1 event on spotlight bloc -- Bug fix : eXtCal don't work with XOOPS under 2.0.15 - - -============================ -2006/31/10: Version 2.0.4 RC1 -============================ - -- Add a "flat" monthly view -- Little display improvement -- Fix an error on pruning page -- Add property to event to set a maximum member limit per event -- Change the month template to display all event's infos +2.38 RC 1 NOT RELEASED +=================================== +- moved all images, CSS, and JS files to /assets (mamba) +- renamed .html Smarty templates to .tpl (mamba) +- some changes to make it compatible with Angelo's templates for xBootstrap (mamba) + +2.38 Beta 1 2013/08/21 +=================================== +- added editor selection in Preferences for Admin and User (mamba) +- added checks if event was added/modified successfully (mamba) + +2.37 Final 2013/07/10 +=================================== +- small changes for PHP 5.4 +- fixed: removed today's events from "upcoming" block (chefry/mamba) + +2.37 RC6 2013/04/20 +=================================== +- modification of the English language files for Transifex (cesag) +- fixed: missing argument 6 for agenda_getCanevas() (cesag) +- fixed: missing phone column (Sabahan/Mamba) + +2.37 RC5 2013/01/29 +=================================== +- fixed: missing edit/delete icons for Admin in year/month/week/day view (mamba) +- fixed: missing print icons in week/day views (jcweb/mamba) +- fixed: date format in Agenda view (jcweb/mamba) +- fixed: search provides correct results (sabahan/mamba) +- added: recurring events in "Upcoming events" block (sabahan/mamba) +- changed time interval in Admin from 10 minutes to 15 minutes (playsome) + +2.37 RC4 2013/01/02 +=================================== +- fixed: removed list of events when showing first time the Search form (sabahan/mamba) +- fixed: if we disable tooltips , event title will be missing in from the calendar (sabahan/mamba) +- fixed: changed notice text when user/guest submit an event (sabahan/mamba) +- fixed: removed Price info from Print, if empty (sabahan/mamba) +- fixed: extCal didn't correctly count recurring events in Search (mamba) +- fixed: Agenda view reflects now start and end time set in Preferences (jcweb/mamba) + + +2.37 RC3 2013/01/01 +=================================== +- fixed: bug in setting recurring events for a x-day of the month, when 1st of the month is on the following day of the week. + E.g. if you select 3rd Thursday, and the first day of the month is on Friday, extCal would set the event on the 2nd Thursday +- fixed: added location info in Print, if not empty (sabahan/mamba) +- fixed: if not auto-approved, event is set as pending (sabahan/mamba) +- fixed: redirect after updating or creating an event (sabahan/mamba) + +2.37 RC2 2012/12/22 +=================================== +- fixed: attachment bug (JammerPro/mamba) +- fixed: past events not being visible consistently, when selected by user in Preferences (mamba) +- fixed: displaying the correct week in Week view when the first day of the week is Monday (mamba) +- updated: Highslide JS from version 4.1.8 to 4.1.13 (mamba) +- added: end date to blocks (sabahan/mamba) +- fixed: pagination for events in Admin (sabahan/mamba) +- fixed: Recent Activities showing all events, instead of only the particular user (sabahan/mamba) +- fixed: don't show empty Price and Organizer fields (sabahan/mamba) +- fixed: removed double edit icons (sabahan/mamba) +- fixed: removed Contact info from Print, if empty (sabahan/mamba) + +2.37 Beta 4 2012/04/02 +=================================== +- small code cleanups (mamba) +- + +2012/02/02: Version 2.37 (JJD.fr) +=================================== +- Ajout du champ icone dans la table event_event +- Ajout du chmp icone dans la table event_cat +- Affichage de l'icone de event/cat dans l'infobulle +- Mis à jour des constantes de langue +- Patch de mise à jour des tables + +2.36 (JJD.fr) 2012/01/31 +=================================== +- Fixed display +- Replacement of infobulle by another model more pro + +2.35 (JJD.fr) 2012/01/21 +=================================== +- Réintrégation file update extcal_2_34.php omitted in the previous version +- Fixed zoom in on photos to certeines +- Fixed default value of 0 in the table event_etablissement event +- Intancciation of extcalConfig <=> xoopsModuleConfig for blocks + +2.34 (JJD.fr) 2012/01/06 +=================================== + - Fixed handling of images of events and the establishment + - Fixed the RSS feed + - Fixed MOFIF regular expressions to validate dates + - Fixed link on the site of the facility + - Remove the newline before the currency in the form of the establishment + +=================================== +2011/12/30: Version 2.34 (JJD.fr) +=================================== + - Field "desc" table "establishment" renowned "description". + - Fixed template, admin and office are for schools + +2011/12/30: Version 2.33 (JJD.fr) (Google translation) +=================================== +- Re-write functions + bExtcalMinicalShow + bExtcalMinicaledit (using xoopsform) + bExtcalMinicalAddEventToArray (simplifications Code)) + +- Added a template for the xoops image display options with the mini calendar, + and knew ppression smarty code in the block miicalendrier. + +- Added constant 'CALENDAR_ROOT' file constantes.php + and removal of this statement in all the other files as + the file 'constantes.php is systematically included. + For aillerus this will ultimately move the library 'pear' + with other booksellers as jQuery, to provide for use with other modules, + library is without cete copy every time. + This library will remove the module in a future release. + It is already possible to gold and to change + define ('_EXTCAL_PEAR_CALENDAR' XOOPS_ROOT_PATH '. / modules / eXtCal / class / pear / Calendar'); + by + define ('_EXTCAL_PEAR_CALENDAR' XOOPS_PATH '. / pear / Calendar'); + If the library 'pear' is installed in the same place as jQuery. + +- Insurance for events and institutions category: + Added a link on the name to go directly to the page to change. + +- Divide the blocks in different files for easy reading and loading + Deletion of the block "excal_block.php" + Creation of blocks: + "Minical.php" + "Spotlight_events.php" + "Upcoming.php" + "Day_events.php" + "New_events.php" + "Random_events.php" + "Category_events.php" + +- Adding tabs in the data editing an event + +- Added the main menu on the left to access tabs visible + +- Pooling of lists of selection in the template "navbar" + +- Fixed CSS tooltips + Suppression of the class "*" and add the font size in "zone1" + +- Options of modules: + Added the display order of the tabs (also affects the sidebar) + Added option to position the module selection lists + +- Class event: if replacement functions below by the unique getEventOnPeriode + getEventDay, getEventWeek, getEventCalendarWeek, getEventCalendarMonth, + +- Added display of a clock flash with the mini-calendar + Adding template "clock" +Nouveau ! Cliquez sur les termes ci-dessus pour voir d'autres traductions. Ignorer +Google Traduction pour les entreprises :Google Translator ToolkitGadget TraductionOutil d'aide à l'export +Désactiver la traduction instantanéeÀ propos de Google TraductionMobileConfidentialitéAideEnvoyer des commentaires + + +=================================== +2011/10/21a: Version 2.32 (JJD.fr) +=================================== + - Fixed the "getSearchEvent" used by the search for Xoops; + It did not take into account only the first word of an expression. + In addition it has been adapted for a search from the module itself + with specific criteria (expression + category and then the month and year are expected). + The research was done on the fields 'EVENT_TITLE', 'event_desc', 'event_contact', 'EVENT_ADDRESS'. + The field 'cat_name' was added to allow the fields to search + to find words in the title of the category. + + - Added a view of research. + This allows for a wider search for a phrase, a category + over the year, month, ... + date has been changed to "DataTime" instead of int (11). + important: + Think in this tab to add those options visible in the modules. + +2011/10/21a: Version 2.31 (JJD.fr) +=================================== + - Fixed loading images in the front office + - Fixed currency and add exchange constants + define ('_MD_EXTCAL_DEVISE1', "Euro"); + define ('_MD_EXTCAL_DEVISE2', "Euros"); + define ('_MD_EXTCAL_DEVISE3', "€"); + - Changing the style sheet tooltips. + Remove the width of the class. "Tip-top" + To enable automatic resizing. + Adding attributes 'infoBulle_zone1', 'infoBulle_zone2' and 'infoBulle_zone3' + pemettre to display images and text. + 'InfoBulle_zone1': positioning the first balloon image or text + 'InfoBulle_zone2': 2nd positions the tooltip right of the first if there is an image + 'InfoBulle_zone3': 2nd positions the tool tip in the first if there is an image + To change the position of the second tooltip change 'infoBulle_zone2' + by 'infoBulle_zone3' extcal_infobulle.html in the template. + - Simplification of the template by adding generic templates + for tooltips and categories + +2011/10/21a: Version 2.30 (JJD.fr) +=================================== + - Added the removal by batch or by selection + in the administration page of events. + delete images related to the event. + +2011/09/04: Version 2.29 (JJD-fr) +==================================== +- Corrections by Trabis +- Module-wide tooltips new look in all views. +- Hiding the image seen in the "days" and "week" if it is not defined. +- Fixed formatting in views "day" and "week" and "month": " + adding the change of background color on line 10 2 + class = head for the header line, ... +- Language files "English" and "Spanish" complete +- Registration of an event on validation formular clone instead of click on the icon. +- Set the options of the module (nbeventsByPage) the number of events in the list of administration +- Add a block "Upcoming Events by category" + The block is bordered on the left and above each category by the color of the latter. + +==================================== +2011/08/22: Version 2.28 (JJD-fr) +==================================== +- Merging of "version 2.22 Plus" by Kraven with "2.27" + * Added table "etablisement" + * Entry Form for companies + * Added selection of the location of the event +- Fixed nbJours in calendar-day +- Added tooltips agenda_day in views-view-view and agenda_week +- Adjusting the input boxes of Events + +2011/08/07: Version 2.27 (Mamba) +================================= +- fixed bug with default for starting page (mamba) +- fixed event "title" for Agenda views (mamba) + +==================================== +2011/08/07: Version 2.26 (JJD-fr) +==================================== +- Fixed include constantes.php in xoops_version.php +- Fixed the block recovery xoopsModuleConfig minical +- Important: additional information in the file doc / install.txt +- Fixed language files +- Added a selection of tabs displayed in optins module. +- Correcion the link on the mini calendar. + Now shows view 'stat_page' set in options. + View 'start_page' should be visible. + +==================================== +2011/08/03: Version 2.25 (JJD-fr) +==================================== +- Added selection of tabs to display the options of the module. +- Fixed link on the mini calendar. + Now shows view 'stat_page' set in the options. + View 'start_page' should be visible. +- Add to calendar days in a grid: displays one or more days with time slots. + Events are displayed with a colored square with its title. +- Add to calendar weeks in a grid: displays one or more days with time slots. + Events are displayed with a square. + The title and start and end time are displayed in the tooltip on mouseover. + Provides a synthetic view of the week or a fortnight, for example. +- Added setting options for both views 'agenda' + * Start time of the day + * End time of the day + * Number of minutes per + * Number of days for each of the two views agenda. +- Rename all files and php template of views with the addition of the prefix 'view' for easy maintenance; +- Replacement of table '$ lang' in the template by the equivalent '$ smarty; const' +- Modification of functions and _getEventWeekCriteria getEventWeek. + addition of parameters to recover $ nbJours events on a beach + other than 7 days; '$ nbjours' must be> 0; attention to the display of more than 20 days + weeks in the calendar may not be practical. + These are the two parameters added to the options of the module; +- Added file 'agenda_fnc.php' which contains the functions for creating tables + to feed the agenda; +- Replacing the fill selection list for years, my days and categories, + by generic functions. +- Replacement of codes for the selection of views by constants (file 'constantes.php') +- Added option 'agenda_nb_years_before' and 'agenda_nb_years_after' to fill drop-down lists for selecting the year. + Can limit the previous year, for example. + + +============================ +2011/03/21: Version 2.24 +============================ + ++ Zend Coding Standard (Mamba) ++ Changed to standardized XOOPS Module GUI (mamba, Mage) ++ Spanish translation (josespi) ++ fix problem in upcoming events block (josespi) + +============================ +2008/10/09: Version 2.2.2 +============================ + +- Fix bug : Event not display in upcomming bloc if anonymous aren't allowed to view +- Fix bug : First occur for monthly reccur event could be not displayed +- Fix bug : Now, Date on RSS was replace by the event start date +- Add Flash slideshow on Minical block + + +Lang var change : + +blocks.php +_MB_EXTCAL_SS_WIDTH +_MB_EXTCAL_SS_HEIGHT +_MB_EXTCAL_SS_TRANS_TIME +_MB_EXTCAL_SS_PAUSE_TIME +_MB_EXTCAL_SS_NB_PHOTOS +_MB_EXTCAL_PX +_MB_EXTCAL_SECONDES + +============================ +2008/13/08: Version 2.2.1 +============================ + +- Fix bug : typo fix on the monthly reccur rule string +- Fix bug : 404 error when we update notifications +- Fix bug : Yearly "Same as event start date" recur option don't work. This option allow to set an event a the same day number in month as the start date. This allow to create reccuring event like birthday +- Fix bug : Member of Webmaster Group can't edit event if they aren't eXtCal edit permission +- Fix bug : Event in list view aren't sorted according to module preferences +- Fix bug : Navigation in weekly list view don't work if the first day of the week isn't Monday +- Fix bug : eXtCal upload directory isn't created when we make module update +- Fix bug : Who's not going don't work without new module install. The who's not going table isn't created when we make a module update +- Fix bug : Space in day's name on calendar pages +- Fix bug : Minical image aren't get random. +- Add Edit my event feature + + +Lang var change : + +admin.php +_AM_EXTCAL_CONFIRM_DELETE_EVENT +_AM_EXTCAL_EVENT_DELETED + +============================ +2008/14/06: Version 2.2.0 +============================ + +- Fix bug : Event year selection box don't work on year.php page +- Fix bug : Blank page when event is submitted with wrong date format +- Fix bug : Timezone offset bug on calendar pages and event page +- fix bug : Recurring bug on Monthly rule +- Fix bug : Translate error on minical day's letter + + +============================ +2008/21/05: Version 2.1.9 +============================ + +- Add tooltips box on all pages to display start and end date when mouse over the event name (need Mootools) +- Add list navig for event on admin side +- Fix bug : File isn't attached when event is submitted from admin side +- Fix bug : Timezone offset bug on block and pages + + +Lang var change : + +blocks.php +_MB_EXTCAL_DISPLAY +_MB_EXTCAL_EVENT +_MB_EXTCAL_TITLE_LENGTH + +Add mail_template directory + +============================ +2008/07/05: Version 2.1.8 +============================ + +- Add a feature to make a module update just by clicking on module admin side. The server will download, install files and update the module. +- Fix bug : User could submit event without perm by accessing directly to the submit page +- Fix bug : Recur rule aren't updated when an event is edited +- Fix bug : Timezone bug when user timezone is different than server timezone + + +============================ +2008/28/03: Version 2.1.7 +============================ + +- Fix bug : event_submitdate field wasn't created during upgrade from version before 2.0.4 +- Fix bug : wrong link when week start in month before the current view (stefan88) +- Add the send notification function +- Allow HTML for textarea fields +- Add the Comments system +- Add the Notifications system + + +============================ +2008/21/01: Version 2.1.6 +============================ + +- Fix error when submit an event from public side +- Fix Bug : Category perm are not respected to display event +- Fix Bug : Translation file isn't loaded +- Fix bug : An user could be in the who's going and who's not going list + + +============================ +2008/28/12: Version 2.1.5 +============================ + +- Add Reccuring rule description on event view +- Add the RSS page +- Extend the search function to address and contact field +- Set the update proc to upgrade from eXtCal 2.0.4 +- Add the navigation tab menu + + +============================ +2007/18/12: Version 2.1.4 +============================ + +- Add reccuring event feature + + +============================ +2007/10/07: Version 2.1.3 +============================ + +- Add a file attachement feature to the module +- Add a "who's not going" feature +- Add a version checker (display a message if a new version of the module is out) + + +============================ +2007/28/04: Version 2.1.2 +============================ + +- Add a preview feature on submit event page +- Fix a bug that disallow fresh install + + +============================ +2007/25/04: Version 2.1.1 +============================ + +- Add the "hide past event" feature + + +============================ +2007/22/04: Version 2.1.0 +============================ + +- Rewrite the module from scratch + + +============================ +2006/11/04: Version 2.0.4 RC2 +============================ + +- Add the possibility to display more than 1 event on spotlight bloc +- Bug fix : eXtCal don't work with XOOPS under 2.0.15 + + +============================ +2006/31/10: Version 2.0.4 RC1 +============================ + +- Add a "flat" monthly view +- Little display improvement +- Fix an error on pruning page +- Add property to event to set a maximum member limit per event +- Change the month template to display all event's infos Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/xoops_version.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/xoops_version.php 2015-02-18 15:24:25 UTC (rev 12991) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/extcal/xoops_version.php 2015-02-18 15:50:59 UTC (rev 12992) @@ -35,7 +35,7 @@ //*************************************************************************************** //about -$modversion["module_status"] = "Beta 2"; +$modversion["module_status"] = "RC 1"; $modversion["release_date"] = "2014/04/23"; $modversion["module_website_url"] = "www.xoops.org/"; $modversion["module_website_name"] = "XOOPS"; |
From: <be...@us...> - 2015-02-18 15:24:30
|
Revision: 12991 http://sourceforge.net/p/xoops/svn/12991 Author: beckmi Date: 2015-02-18 15:24:25 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 4.33 RC8 Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.topic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/about.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_blocks.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_cat_manager.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_digest.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_manager.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_prune.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_reorder.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_groupmod.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_permissions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_report.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_synchronization.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_type_manager.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_votedata.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/list_topic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block_tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/digest.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/forum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/icon.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/moderate.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/newbbtree.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/online.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.forum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/plugin/userlog.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/rate.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/read.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/readforum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/readtopic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/report.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/stats.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/text.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/topic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/topic.renderer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/tree.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/type.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/uploader.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/user.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/userstats.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/xmlrss.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/xoopsformloader.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/delete.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/dl_attachment.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/edit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/display.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/form.forum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/form.post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.config.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.forum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.image.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.ini.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.language.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.read.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.recon.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.render.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.rpc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.session.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.stats.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.text.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.time.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.topic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.user.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.welcome.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/functions.welcome.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/images.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/module.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/notification.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/plugin.dist.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/plugin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/plugin.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/search.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/include/vars.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/english/modinfo.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/forum_newpost_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/forum_newthread_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/forum_report.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/global_digest_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/global_newforum_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/global_newfullpost_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/global_newpost_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/language/italian/mail_template/thread_newpost_notify.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/list.topic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/makepdf.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/moderate.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/newtopic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/notification_update.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/polls.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/print.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/ratethread.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/reply.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/report.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/rss.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/search.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/seo_url.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/css/language/english/style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/css/language/persian/style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/images/icon/pdf.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/newbb_index.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/newbb_thread.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/newbb_viewforum.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates/newbb_viewtopic.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates_fulldiv_opacity/css/language/english/style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates_fulldiv_opacity/newbb_index.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/templates_fulldiv_opacity/newbb_viewforum.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/topicmanager.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/update_type.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/view.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/viewforum.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/viewpost.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/viewtopic.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/votepolls.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/xoops_version.php Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.post.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.post.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.post.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -9,7 +9,7 @@ * @version $Id $ * @package module::newbb */ -include_once dirname(__FILE__) . "/header.php"; +include_once __DIR__ . "/header.php"; $topic_id = isset($_POST['topic_id']) ? intval($_POST['topic_id']) : 0; $post_id = !empty($_GET['post_id']) ? intval($_GET['post_id']) : 0; @@ -22,7 +22,6 @@ if ( empty($post_id) || empty($op)) { // irmtfan - issue with javascript:history.go(-1) redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_NORIGHTTOACCESS); - exit(); } $post_handler =& xoops_getmodulehandler('post', 'newbb'); @@ -39,7 +38,6 @@ if (!$isadmin) { redirect_header("index.php", 2, _MD_NORIGHTTOACCESS); - exit(); } switch ($op) { @@ -208,5 +206,5 @@ redirect_header(XOOPS_URL."/modules/newbb/viewpost.php?uid=$uid", 2, _MD_DBUPDATED); } // irmtfan move to footer.php -include_once dirname(__FILE__) . "/footer.php"; +include_once __DIR__ . "/footer.php"; include XOOPS_ROOT_PATH.'/footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.topic.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.topic.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/action.topic.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -9,7 +9,7 @@ * @version $Id $ * @package module::newbb */ -include_once dirname(__FILE__) . "/header.php"; +include_once __DIR__ . "/header.php"; $forum_id = isset($_POST['forum_id']) ? intval($_POST['forum_id']) : 0; $topic_id = !empty($_POST['topic_id']) ? $_POST['topic_id'] : null; @@ -19,7 +19,6 @@ if ( empty($topic_id) || empty($op)) { // irmtfan - issue with javascript:history.go(-1) redirect_header($_SERVER['HTTP_REFERER'], 2, _MD_NORIGHTTOACCESS); - exit(); } $topic_id = array_values($topic_id); @@ -30,7 +29,6 @@ if (!$isadmin) { redirect_header("index.php", 2, _MD_NORIGHTTOACCESS); - exit(); } switch ($op) { case "restore": @@ -172,5 +170,5 @@ redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED); } // irmtfan move to footer.php -include_once dirname(__FILE__) . "/footer.php"; +include_once __DIR__ . "/footer.php"; include XOOPS_ROOT_PATH.'/footer.php'; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/about.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/about.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/about.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -29,7 +29,7 @@ // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include( "admin_header.php" ); +include_once __DIR__ . '/admin_header.php'; xoops_cp_header(); if ($newXoopsModuleGui) { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_blocks.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_blocks.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_blocks.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -33,5 +33,5 @@ // - XOOPS block admin for each modules - // // GIJOE <http://www.peak.ne.jp/> // // ------------------------------------------------------------------------- // -include("admin_header.php"); +include_once __DIR__ . '/admin_header.php'; header("Location: ".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&selmod=".$xoopsModule->getVar("mid")); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_cat_manager.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_cat_manager.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_cat_manager.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include('admin_header.php'); +include_once __DIR__ . '/admin_header.php'; mod_loadFunctions("render", "newbb"); xoops_cp_header(); echo "<fieldset>"; @@ -71,7 +71,7 @@ $category_obj->setVar('cat_image', ''); $category_obj->setVar('cat_description', ''); $category_obj->setVar('cat_order', 0); - $category_obj->setVar('cat_url', 'http://www.simple-xoops.de newBB Support'); + $category_obj->setVar('cat_url', 'http://xoops.org newBB Support'); } $sform->addElement(new XoopsFormText(_AM_NEWBB_SETCATEGORYORDER, 'cat_order', 5, 10, $category_obj->getVar('cat_order')), false); @@ -159,7 +159,6 @@ $category_handler->applyPermissionTemplate($category_obj); } redirect_header("admin_cat_manager.php", 2, $message); - exit(); default: Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_digest.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_digest.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_digest.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -29,7 +29,7 @@ // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include('admin_header.php'); +include_once __DIR__ . '/admin_header.php'; include_once XOOPS_ROOT_PATH."/class/pagenav.php"; $op = !empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:"default"); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_manager.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_manager.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_manager.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include 'admin_header.php'; +include_once __DIR__ . '/admin_header.php'; include XOOPS_ROOT_PATH . "/class/xoopstree.php"; include_once XOOPS_ROOT_PATH . "/class/pagenav.php"; mod_loadFunctions("forum", "newbb"); @@ -71,7 +71,6 @@ } else { redirect_header('./admin_forum_manager.php?op=manage', 2, _AM_NEWBB_MSG_ERR_FORUM_MOVED); } - exit(); } else { $box = '<select name="dest_forum">'; $box .= '<option value=0 selected>' . _SELECT . '</option>'; @@ -126,7 +125,6 @@ } else { redirect_header('./admin_forum_manager.php?op=manage', 2, _AM_NEWBB_MSG_ERR_FORUM_MOVED); } - exit(); } else { $box = '<select name="dest_forum">'; @@ -193,10 +191,8 @@ } } redirect_header("admin_forum_manager.php", 2, $message); - exit(); } else { redirect_header("admin_forum_manager.php?op=mod&forum=" . $forum_obj->getVar('forum_id') . "", 2, _AM_NEWBB_FORUM_ERROR); - exit(); } case "mod": @@ -219,7 +215,6 @@ $forum_handler->delete($forum_obj); mod_clearCacheFile("forum", "newbb"); redirect_header("admin_forum_manager.php?op=manage", 1, _AM_NEWBB_FORUMREMOVED); - exit(); } break; @@ -291,7 +286,7 @@ $f_move_link = "<a href=\"admin_forum_manager.php?op=moveforum&forum=" . $f . "\">".newbb_displayImage('admin_move',_AM_NEWBB_MOVE)."</a>"; $f_merge_link = "<a href=\"admin_forum_manager.php?op=mergeforum&forum=" . $f . "\">".newbb_displayImage('admin_merge',_AM_NEWBB_MERGE)."</a>"; - $class = ((++$i)%2)?"odd":"even"; + $class = (($i++)%2)?"odd":"even"; $echo .= "<tr class='".$class."' align='left'><td></td>"; $echo .= "<td><strong>" . $f_link . "</strong></td>"; $echo .= "<td align='center'>" . $f_edit_link . "</td>"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_prune.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_prune.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_prune.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -24,7 +24,7 @@ // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // -include("admin_header.php"); +include_once __DIR__ . '/admin_header.php'; include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/class/xoopsformloader.php"; xoops_cp_header(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_reorder.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_reorder.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_forum_reorder.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include 'admin_header.php'; +include_once __DIR__ . '/admin_header.php'; if (isset($_POST['cat_orders'])) $cat_orders = $_POST['cat_orders']; if (isset($_POST['orders'])) $orders = $_POST['orders']; @@ -36,14 +36,14 @@ if (isset($_POST['forum'])) $forum = $_POST['forum']; if (!empty($_POST['submit'])) { - for ($i = 0; $i < count($cat_orders); $i++) { + for ($i = 0; $i < count($cat_orders); ++$i) { $sql = "update " . $xoopsDB->prefix("bb_categories") . " set cat_order = " . $cat_orders[$i] . " WHERE cat_id=$cat[$i]"; if (!$result = $xoopsDB->query($sql)) { redirect_header("admin_forum_reorder.php", 1, _AM_NEWBB_FORUM_ERROR); } } - for ($i = 0; $i < count($orders); $i++) { + for ($i = 0; $i < count($orders); ++$i) { $sql = "update " . $xoopsDB->prefix("bb_forums") . " set forum_order = " . $orders[$i] . " WHERE forum_id=".$forum[$i]; if (!$result = $xoopsDB->query($sql)) { redirect_header("admin_forum_reorder.php", 1, _AM_NEWBB_FORUM_ERROR); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_groupmod.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_groupmod.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_groupmod.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.mymyxoops.org/, http://simple-xoops.de/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include('admin_header.php'); +include_once __DIR__ . '/admin_header.php'; xoops_cp_header(); echo "<fieldset>"; include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/class/xoopsformloader.php"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_permissions.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_permissions.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_permissions.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include 'admin_header.php'; +include_once __DIR__ . '/admin_header.php'; include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/class/xoopsformloader.php"; include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; @@ -172,7 +172,7 @@ $ii = 0; $option_ids = array(); foreach ($perms as $perm) { - $ii++; + ++$ii; if ($ii % 5 ==0) { $ret_ele .= '</tr><tr>'; } @@ -209,13 +209,11 @@ } else { redirect_header("admin_permissions.php?action=template", 2, _AM_NEWBB_PERM_TEMPLATE_ERROR); } - exit(); case "apply": $perm_template = $newbbperm_handler->getTemplate(); if ($perm_template === null) { redirect_header("admin_permissions.php?action=template", 2, _AM_NEWBB_PERM_TEMPLATE); - exit(); } xoops_cp_header(); echo $indexAdmin->addNavigation('admin_permissions.php'); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_report.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_report.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_report.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -29,7 +29,7 @@ // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include('admin_header.php'); +include_once __DIR__ . '/admin_header.php'; include_once XOOPS_ROOT_PATH."/class/pagenav.php"; $op = !empty($_POST['submit']) ? "save" : ( !empty($_POST['delete']) ? "delete" : "default"); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_synchronization.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_synchronization.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_synchronization.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb */ // irmtfan - TODO - should be changed completly with Newbb new function newbb_synchronization -include 'admin_header.php'; +include_once __DIR__ . '/admin_header.php'; xoops_cp_header(); mod_loadFunctions("recon", "newbb"); $form = '<fieldset>'; @@ -28,7 +28,6 @@ $result = newbb_synchronization("forum"); if (!empty($result)) { redirect_header("admin_synchronization.php", 2, _AM_NEWBB_SYNC_TYPE_FORUM . "<br />" . _AM_NEWBB_DATABASEUPDATED); - exit(); } break; // irmtfan rewrite topic sync @@ -47,14 +46,12 @@ } $result = newbb_synchronization("topic"); redirect_header("admin_synchronization.php?type=topic&start=".($start+$limit)."&limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start+$limit)); - exit(); break; // irmtfan rewrite post sync case "post": $result = newbb_synchronization("post"); if (!empty($result)) { redirect_header("admin_synchronization.php", 2, _AM_NEWBB_SYNC_TYPE_POST . "<br />" . _AM_NEWBB_DATABASEUPDATED); - exit(); } break; // irmtfan - user is not in recon functions - only here @@ -94,7 +91,6 @@ } redirect_header("admin_synchronization.php?type=user&start=".($start+$limit)."&limit={$limit}", 2, _AM_NEWBB_SYNCHING." {$count}: {$start} - ".($start+$limit)); - exit(); break; // irmtfan rewrite stats reset case "stats": Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_type_manager.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_type_manager.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_type_manager.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -11,7 +11,7 @@ * @package module::newbb */ -include('admin_header.php'); +include_once __DIR__ . '/admin_header.php'; xoops_cp_header(); echo "<fieldset>"; echo "<br />"; @@ -83,7 +83,6 @@ $types_obj = $type_handler->getAll(); if (count($types_obj) ==0) { redirect_header(xoops_getenv("PHP_SELF"), 2, _AM_NEWBB_TYPE_ADD); - exit(); } echo "<a style='border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 1em; padding: 4px 8px; text-align:center;' href='".xoops_getenv("PHP_SELF")."?op=add'>"; @@ -150,7 +149,6 @@ case "apply": if (!$templates = mod_loadCacheFile("type_template")) { redirect_header(xoops_getenv("PHP_SELF")."?op=template", 2, _AM_NEWBB_TYPE_TEMPLATE); - exit(); } $category_handler =& xoops_getmodulehandler('category', 'newbb'); @@ -222,7 +220,6 @@ case "save_apply": if (!$templates = mod_loadCacheFile("type_template")) { redirect_header(xoops_getenv("PHP_SELF")."?op=template", 2, _AM_NEWBB_TYPE_TEMPLATE); - exit(); } foreach ($_POST["forums"] as $forum) { if ($forum < 1) continue; @@ -238,13 +235,11 @@ $categories = $category_handler->getList($criteria_category); if (empty($categories)) { redirect_header("admin_cat_manager.php", 2, _AM_NEWBB_CREATENEWCATEGORY); - exit(); } $forum_handler =& xoops_getmodulehandler('forum', 'newbb'); $forums = $forum_handler->getTree(array_keys($categories)); if (empty($forums)) { redirect_header("admin_forum_manager.php", 2, _AM_NEWBB_CREATENEWFORUM); - exit(); } foreach (array_keys($forums) as $c) { @@ -286,19 +281,16 @@ case "edit_forum": if (empty($_POST["forum"]) || $_POST["forum"] < 1) { redirect_header(xoops_getenv("PHP_SELF")."?op=forum", 2, _AM_NEWBB_TYPE_FORUM); - exit(); } $forum_handler =& xoops_getmodulehandler('forum', 'newbb'); if ( !$forum_obj = $forum_handler->get(intval($_POST["forum"])) ) { redirect_header(xoops_getenv("PHP_SELF")."?op=forum", 2, _AM_NEWBB_TYPE_FORUM); - exit(); } $types_obj = $type_handler->getAll(); if (count($types_obj) ==0) { redirect_header(xoops_getenv("PHP_SELF"), 2, _AM_NEWBB_TYPE_ADD); - exit(); } echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_ACTION . "</legend>"; @@ -364,7 +356,6 @@ case "save_forum": if (empty($_POST["forum"]) || $_POST["forum"] < 1) { redirect_header(xoops_getenv("PHP_SELF")."?op=forum", 2, _AM_NEWBB_TYPE_FORUM); - exit(); } $type_handler->updateByForum(intval($_POST["forum"]), $_POST["type_order"]); redirect_header(xoops_getenv("PHP_SELF")."?op=forum", 2, _MD_DBUPDATED); @@ -426,7 +417,7 @@ } echo "<tr><td colspan='4'>"; } else { - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < 10; ++$i) { echo "<tr class='odd' align='left'>"; echo "<td><input type='text' name='type_name[{$i}]' value='' size='10' /></td>"; if ($isColorpicker) { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_votedata.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_votedata.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/admin_votedata.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include 'admin_header.php'; +include_once __DIR__ . '/admin_header.php'; $op = !empty($_GET['op'])? $_GET['op'] : (!empty($_POST['op'])?$_POST['op']:""); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/index.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/index.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/index.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -include('admin_header.php'); +include_once __DIR__ . '/admin_header.php'; mod_loadFunctions("stats", "newbb"); $attach_path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/'; @@ -116,7 +116,6 @@ $res = newbb_admin_mkdir($path); $msg = ($res)?_AM_NEWBB_DIRCREATED:_AM_NEWBB_DIRNOTCREATED; redirect_header('index.php', 2, $msg . ': ' . $path); - exit(); break; case "setperm": @@ -124,7 +123,6 @@ $res = newbb_admin_chmod($path, 0777); $msg = ($res)?_AM_NEWBB_PERMSET:_AM_NEWBB_PERMNOTSET; redirect_header('index.php', 2, $msg . ': ' . $path); - exit(); break; case "senddigest": @@ -132,7 +130,6 @@ $res = $digest_handler->process(true); $msg = ($res)?_AM_NEWBB_DIGEST_FAILED:_AM_NEWBB_DIGEST_SENT; redirect_header('index.php', 2, $msg); - exit(); break; case "default": Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/menu.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/menu.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/admin/menu.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -38,48 +38,97 @@ $newModuleGui = true; } -$i=0; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_INDEX; -$adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/home.png' : "assets/images/menu/home.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_CATEGORY; -$adminmenu[$i]['link'] = "admin/admin_cat_manager.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/category.png' : "assets/images/menu/cat.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_FORUM; -$adminmenu[$i]['link'] = "admin/admin_forum_manager.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/forums.png' : "assets/images/menu/forum.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_PERMISSION; -$adminmenu[$i]['link'] = "admin/admin_permissions.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/permissions.png' : "assets/images/menu/permissions.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_ORDER; -$adminmenu[$i]['link'] = "admin/admin_forum_reorder.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/compfile.png' : "assets/images/menu/order.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_PRUNE; -$adminmenu[$i]['link'] = "admin/admin_forum_prune.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/update.png' : "assets/images/menu/prune.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_REPORT; -$adminmenu[$i]['link'] = "admin/admin_report.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/content.png' : "assets/images/menu/report.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_DIGEST; -$adminmenu[$i]['link'] = "admin/admin_digest.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/digest.png' : "assets/images/menu/digest.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_VOTE; -$adminmenu[$i]['link'] = "admin/admin_votedata.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/button_ok.png' : "assets/images/menu/votedata.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_TYPE; -$adminmenu[$i]['link'] = "admin/admin_type_manager.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/type.png' : "assets/images/menu/type.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_GROUPMOD; -$adminmenu[$i]['link'] = "admin/admin_groupmod.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/groupmod.png' : "assets/images/menu/groupmod.png"; + +$adminmenu[] = array( + 'title' => _AM_MODULEADMIN_HOME, + 'link' => 'admin/index.php', + 'icon' => $pathIcon32 . '/home.png' +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_INDEX, + 'link' => "admin/index.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/home.png' : "assets/images/menu/home.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_CATEGORY, + 'link' => "admin/admin_cat_manager.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/category.png' : "assets/images/menu/cat.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_FORUM, + 'link' => "admin/admin_forum_manager.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/forums.png' : "assets/images/menu/forum.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_PERMISSION, + 'link' => "admin/admin_permissions.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/permissions.png' : "assets/images/menu/permissions.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_ORDER, + 'link' => "admin/admin_forum_reorder.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/compfile.png' : "assets/images/menu/order.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_PRUNE, + 'link' => "admin/admin_forum_prune.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/update.png' : "assets/images/menu/prune.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_REPORT, + 'link' => "admin/admin_report.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/content.png' : "assets/images/menu/report.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_DIGEST, + 'link' => "admin/admin_digest.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/digest.png' : "assets/images/menu/digest.png", +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_VOTE, + 'link' => "admin/admin_votedata.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/button_ok.png' : "assets/images/menu/votedata.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_TYPE, + 'link' => "admin/admin_type_manager.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/type.png' : "assets/images/menu/type.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_GROUPMOD, + 'link' => "admin/admin_groupmod.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/groupmod.png' : "assets/images/menu/groupmod.png" +); + + if (!$newModuleGui) { - $adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_BLOCK; - $adminmenu[$i]['link'] = "admin/admin_blocks.php"; - $adminmenu[$i++]['icon'] = "assets/images/menu/blocks.png"; + $adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_BLOCK, + 'link' => "admin/admin_blocks.php", + 'icon' => "assets/images/menu/blocks.png" + ); } -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_SYNC; -$adminmenu[$i]['link'] = "admin/admin_synchronization.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/synchronized.png' : "assets/images/menu/synchronization.png"; -$adminmenu[$i]['title'] = _MI_NEWBB_ADMENU_ABOUT; -$adminmenu[$i]['link'] = "admin/about.php"; -$adminmenu[$i++]['icon'] = ($newModuleGui) ? '../../'.$pathIcon32.'/about.png' : "assets/images/menu/about.png"; + + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_SYNC, + 'link' => "admin/admin_synchronization.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/synchronized.png' : "assets/images/menu/synchronization.png" +); + +$adminmenu[] = array( + 'title' => _MI_NEWBB_ADMENU_ABOUT, + 'link' => "admin/about.php", + 'icon' => ($newModuleGui) ? '../../' . $pathIcon32 . '/about.png' : "assets/images/menu/about.png" +); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/list_topic.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/list_topic.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/list_topic.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -11,14 +11,14 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); if (defined('LIST_TOPIC_DEFINED')) return; define('LIST_TOPIC_DEFINED',true); -include_once dirname(dirname(__FILE__)) . "/include/functions.ini.php"; -require_once dirname(dirname(__FILE__)) . "/class/topic.renderer.php"; -include_once dirname(dirname(__FILE__)) . "/footer.php"; // to include js/style files like validate function +include_once dirname(__DIR__) . "/include/functions.ini.php"; +require_once dirname(__DIR__) . "/class/topic.renderer.php"; +include_once dirname(__DIR__) . "/footer.php"; // to include js/style files like validate function xoops_loadLanguage("main","newbb"); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -28,7 +28,7 @@ // URL: http://xoopsforge.com, http://xoops.org.cn // // Project: Article Project // // ------------------------------------------------------------------------ // -// defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); // irmtfan use full path because block maybe used outside newbb include_once XOOPS_ROOT_PATH . "/modules/newbb/include/functions.ini.php"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block_tag.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block_tag.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/blocks/newbb_block_tag.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb/tag */ -// defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); /**#@+ * Function to display tag cloud Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/category.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/category.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/category.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); class Category extends XoopsObject { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/digest.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/digest.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/digest.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -72,7 +72,7 @@ $content = ""; if ($digest_count > 0) { $linebreak = ($isHtml) ? "<br />" : "\n"; - for ($i = 0;$i < $digest_count;$i++) { + for ($i = 0;$i < $digest_count;++$i) { if ($isHtml) { $content .= ($i + 1) . ". <a href=" . $this->items[$i]['link'] . ">" . $this->items[$i]['title'] . "</a>"; } else { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/forum.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/forum.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/forum.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -17,7 +17,7 @@ * @version $Id$ */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); class Forum extends XoopsObject { @@ -286,7 +286,6 @@ if (!$result = $this->db->query($sql, $xoopsModuleConfig['topics_per_page'], $start)) { redirect_header('index.php', 2, _MD_ERROROCCURED); - exit(); } $sticky = 0; @@ -300,7 +299,7 @@ while ($myrow = $this->db->fetchArray($result)) { if ($myrow['topic_sticky']) { - $sticky++; + ++$sticky; } // ------------------------------------------------------ @@ -337,7 +336,7 @@ if ($totalpages > 1) { $topic_page_jump .= ' '; $append = false; - for ($i = 1; $i <= $totalpages; $i++) { + for ($i = 1; $i <= $totalpages; ++$i) { if ($i > 3 && $i < $totalpages) { if (!$append) { $topic_page_jump .= "..."; @@ -889,7 +888,7 @@ } $forums_obj = $this->getByPermission($cat_id, $perm_string, $tags); - require_once dirname(__FILE__) . "/tree.php"; + require_once __DIR__ . "/tree.php"; $forums_structured = array(); foreach (array_keys($forums_obj) as $key) { $forums_structured[$forums_obj[$key]->getVar("cat_id")][$key] =& $forums_obj[$key]; @@ -923,7 +922,7 @@ if (!is_array($tags) || count($tags)==0) $tags = array("forum_id", "parent_forum", "forum_name", "forum_order", "cat_id"); $forums_obj =& $this->getByPermission($cat_id, $perm_string, $tags); - require_once(dirname(__FILE__) . "/tree.php"); + require_once(__DIR__ . "/tree.php"); $forums_structured = array(); foreach (array_keys($forums_obj) as $key) { $forum_obj =& $forums_obj[$key]; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/icon.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/icon.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/icon.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); /** * Set forum image Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/moderate.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/moderate.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/moderate.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); /** * A handler for User moderation management @@ -85,7 +85,7 @@ $ip = empty($ip) ? newbb_getIP(true) : $ip; if (!empty($ip)) { $ip_segs = explode(".", $ip); - for ($i = 1 ; $i <= 4; $i++) { + for ($i = 1 ; $i <= 4; ++$i) { $ips[] = $this->db->quoteString(implode(".", array_slice($ip_segs, 0, $i))); } $ip_criteria = "ip IN(".implode(",", $ips).")"; @@ -128,7 +128,7 @@ $uid_criteria = empty($uid) ? "uid=0" : "uid=" . intval($uid); // irmtfan - uid=0 for anons if (!empty($ip)) { $ip_segs = explode(".", $ip); - for ($i = 1; $i <= 4; $i++) { + for ($i = 1; $i <= 4; ++$i) { $ips[] = $this->db->quoteString(implode(".", array_slice($ip_segs, 0, $i))); } $ip_criteria = "ip IN(".implode(",", $ips).")"; @@ -167,7 +167,7 @@ } else { $ip_segs = explode(".", $item); $segs = min(count($ip_segs), 4); - for ($i = 1; $i <= $segs; $i++) { + for ($i = 1; $i <= $segs; ++$i) { $ips[] = $this->db->quoteString(implode(".", array_slice($ip_segs, 0, $i))); } $criteria = "ip IN(".implode(",", $ips).")"; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/newbbtree.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/newbbtree.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/newbbtree.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -29,7 +29,7 @@ // Project: Article Project // // ------------------------------------------------------------------------ // -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); include_once XOOPS_ROOT_PATH . "/class/xoopstree.php"; class NewBBTree extends XoopsTree Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/online.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/online.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/online.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; @@ -89,14 +89,14 @@ $num_user = 0; $users_id = array(); $users_online = array(); - for ($i = 0; $i < $num_total; $i++) { + for ($i = 0; $i < $num_total; ++$i) { if (empty($users[$i]['online_uid'])) continue; $users_id[] = $users[$i]['online_uid']; $users_online[$users[$i]['online_uid']] = array( "link" => XOOPS_URL . "/userinfo.php?uid=" . $users[$i]['online_uid'], "uname" => $users[$i]['online_uname'], ); - $num_user ++; + ++$num_user; } $num_anonymous = $num_total - $num_user; $online = array(); @@ -147,14 +147,14 @@ $num_user = 0; $users_id = array(); $users_online = array(); - for ($i = 0; $i < $num_total; $i++) { + for ($i = 0; $i < $num_total; ++$i) { if (empty($users[$i]['online_uid'])) continue; $users_id[] = $users[$i]['online_uid']; $users_online[$users[$i]['online_uid']] = array( "link" => XOOPS_URL . "/userinfo.php?uid=" . $users[$i]['online_uid'], "uname" => $users[$i]['online_uname'], ); - $num_user ++; + ++$num_user; } $num_anonymous = $num_total - $num_user; $online = array(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.category.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.category.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.category.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,9 +10,9 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); -//defined("NEWBB_HANDLER_PERMISSION") || include dirname(__FILE__).'/permission.php'; +//defined("NEWBB_HANDLER_PERMISSION") || include __DIR__.'/permission.php'; //define("NEWBB_HANDLER_PERMISSION_CATEGORY", 1); class NewbbPermissionCategoryHandler extends NewbbPermissionHandler Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.forum.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.forum.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.forum.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,9 +10,9 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); -//defined("NEWBB_HANDLER_PERMISSION") || include dirname(__FILE__).'/permission.php'; +//defined("NEWBB_HANDLER_PERMISSION") || include __DIR__.'/permission.php'; //define("NEWBB_HANDLER_PERMISSION_FORUM", 1); if ( defined('FORUM_PERM_ITEMS') && class_exists("NewbbForumPermissionHandler") ) { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/permission.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -10,7 +10,7 @@ * @package module::newbb */ -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; define("NEWBB_HANDLER_PERMISSION", 1); @@ -38,7 +38,7 @@ function &_loadHandler($name) { if ( !isset($this->_handler[$name]) ) { - require_once dirname(__FILE__)."/permission.{$name}.php"; + require_once __DIR__."/permission.{$name}.php"; $className = "NewbbPermission".ucfirst($name)."Handler"; $this->_handler[$name] = new $className($this->db); } Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/plugin/userlog.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/plugin/userlog.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/plugin/userlog.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -20,7 +20,7 @@ * @version $Id$ */ -// defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); +// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); class NewbbUserlogPlugin extends Userlog_Module_Plugin_Abstract implements UserlogPluginInterface { Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/post.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/post.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/post.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -29,7 +29,7 @@ // Project: Article Project // // ------------------------------------------------------------------------ // -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; newbb_load_object(); @@ -370,7 +370,7 @@ $uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0; - $post_NO ++; + ++$post_NO; if (strtolower($order) == "desc") $post_no = $total_posts - ($start + $post_NO) + 1; else $post_no = $start + $post_NO; @@ -496,7 +496,7 @@ $thread_action = array(); // irmtfan add pdf permission - if (file_exists(XOOPS_ROOT_PATH."/Frameworks/tcpdf/tcpdf.php") && $topic_handler->getPermission($forum_id, $topic_status, "pdf") ) { + if (file_exists(XOOPS_PATH.'/vendor/tcpdf/tcpdf.php') && $topic_handler->getPermission($forum_id, $topic_status, "pdf") ) { $thread_action['pdf']['image'] = newbb_displayImage('pdf', _MD_PDF); $thread_action['pdf']['link'] = XOOPS_URL."/modules/newbb/makepdf.php?type=post&pageid=0"; $thread_action['pdf']['name'] = _MD_PDF; Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/rate.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/rate.php 2015-02-18 14:52:02 UTC (rev 12990) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/newbb/class/rate.php 2015-02-18 15:24:25 UTC (rev 12991) @@ -29,7 +29,7 @@ // Project: Article Project // // ------------------------------------------------------------------------ // -// defined("XOOPS_ROOT_PATH") || die("XOOPS root path not defined"); +// defined("XOOPS_ROOT_PATH") || exit("XOOPS root path not defined"); defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; newbb_load_object(); Modified: XoopsModules/modulepacks/... [truncated message content] |
From: <be...@us...> - 2015-02-18 14:52:17
|
Revision: 12990 http://sourceforge.net/p/xoops/svn/12990 Author: beckmi Date: 2015-02-18 14:52:02 +0000 (Wed, 18 Feb 2015) Log Message: ----------- 1.02 RC1 Modified Paths: -------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/about.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/admin_header.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/ams.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/cjaycontent.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/news.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/smartsection.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/wfsection.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xfsection.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/xnews.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/mimetypes.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pagewrap.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/permissions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/preferences.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pw_delete_file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/pw_upload_file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/archive.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/css/jquery.popeye.style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/css/publisher.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/loading3.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/behavior.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/funcs.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/rating.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/script.easing.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/author_items.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/backend.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/category_items_sel.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/date_to_date.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_columns.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_menu.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_new.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_random_item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_recent.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/items_spot.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/latest_files.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/latest_news.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/blocks/search.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/blockform.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/constants.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/form/category.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/form/file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/form/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/formdatetime.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/groupperm.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/highlighter.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/metagen.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/mimetype.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/permission.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/publisher.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/rating.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/session.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/themetabform.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/uploader.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/comment_delete.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/comment_edit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/comment_new.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/comment_post.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/comment_reply.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/docs/changelog.txt XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/file.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/footer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/ajax_rating.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/ajax_upload.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/comment_functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/common.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/media.textsanitizer.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/notification.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/plugin.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/search.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/seo.inc.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/seo_functions.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/index.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/item.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/language/english/admin.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/language/english/blocks.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/language/english/common.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/language/english/help/help.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/language/english/main.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/language/english/modinfo.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/list.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/makepdf.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/notification_update.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/pop.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/print.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/rate.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/search.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/submit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/blocks/publisher_category_items_sel.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/blocks/publisher_items_columns.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/blocks/publisher_items_new.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/blocks/publisher_items_spot.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/blocks/publisher_latest_news.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/blocks/publisher_search_block.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_addfile.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_archive.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_display_full.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_display_list.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_display_summary.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_display_wfsection.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_header.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_item.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_print.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_rss.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_search.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/templates/publisher_submit.tpl XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/thumb.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/view.tag.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/visit.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/xoops_version.php Added Paths: ----------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/fmcontent.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/css/jquery.popeye.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/css/style.css XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/logo.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/compact1.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/compact2.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/compact4.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/enlarge1.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/enlarge2.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/enlarge4.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/loading1.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/loading2.gif XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/next1.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/pause3.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/play3.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/popeye/prev1.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/jquery.popeye-2.1.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/jquery.popeye-2.1.min.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/class/utilities.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/config/ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/config/index.html XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/config.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/oninstall.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/onupdate.php Removed Paths: ------------- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/import/ams0.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/images/module_logo.png XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/assets/js/jquery.popeye-2.0.4.js XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/install.php XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/include/update.php Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/about.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/about.php 2015-02-17 18:44:11 UTC (rev 12989) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/about.php 2015-02-18 14:52:02 UTC (rev 12990) @@ -1,14 +1,14 @@ <?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. +/** + * 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. + */ - 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. -*/ - /** * Publisher * @@ -29,4 +29,11 @@ echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); +// if (version_compare(PHP_VERSION, '5.4.0') >= 0) { +// echo 'I am at least PHP version 5.4.0, my version: ' . PHP_VERSION . "\n"; +// } else { +// echo 'I am using PHP lower than 5.4, my version: ' . PHP_VERSION . "\n"; +// } + + xoops_cp_footer(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/admin_header.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/admin_header.php 2015-02-17 18:44:11 UTC (rev 12989) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/admin_header.php 2015-02-18 14:52:02 UTC (rev 12990) @@ -1,12 +1,12 @@ <?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. +/** + * 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. */ /** @@ -21,22 +21,19 @@ include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; include_once dirname(__DIR__) . '/include/common.php'; -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; +include_once $GLOBALS['xoops']->path('include/cp_header.php'); //xoops_loadLanguage('admin', PUBLISHER_DIRNAME); xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME); $imagearray = array( - 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />", + 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />", 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />", - 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />", - 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />", + 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />", + 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />", ); -if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) { - include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); -} else { - echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!'); -} +include_once $GLOBALS['xoops']->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php'); + /* $myts = MyTextSanitizer::getInstance(); Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php 2015-02-17 18:44:11 UTC (rev 12989) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/category.php 2015-02-18 14:52:02 UTC (rev 12990) @@ -21,30 +21,28 @@ include_once __DIR__ . '/admin_header.php'; -$op = XoopsRequest::getString('op'); +$op = XoopsRequest::getString('op', '', 'GET'); -$op = isset($_POST['editor']) ? 'mod' : $op; -if (isset($_POST['addcategory'])) { - $op = 'addcategory'; -} +$op = (XoopsRequest::getString('editor', '', 'POST')) ? 'mod' : $op; +$op = (XoopsRequest::getString('addcategory', '', 'POST')) ? 'addcategory' : $op; // Where do we start ? -$startcategory = XoopsRequest::getInt('startcategory'); -$categoryid = XoopsRequest::getInt('categoryid'); +$startcategory = XoopsRequest::getInt('startcategory', 0, 'GET'); +$categoryid = XoopsRequest::getInt('categoryid'); switch ($op) { case "del": $categoryObj = $publisher->getHandler('category')->get($categoryid); - $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0; - $name = (isset($_POST['name'])) ? $_POST['name'] : ''; + $confirm = XoopsRequest::getInt('confirm', '', 'POST'); + $name = XoopsRequest::getString('name', '', 'POST'); if ($confirm) { if (!$publisher->getHandler('category')->delete($categoryObj)) { redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR); - exit(); +// exit(); } redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name)); - exit(); +// exit(); } else { xoops_cp_header(); xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE); @@ -54,12 +52,12 @@ case "mod": //Added by fx2024 - $nb_subcats = isset($_POST['nb_subcats']) ? intval($_POST['nb_subcats']) : 0; - $nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4); + $nb_subcats = XoopsRequest::getInt('nb_subcats', 0, 'POST'); + $nb_subcats = $nb_subcats + (XoopsRequest::getInt('nb_sub_yet', 4, 'POST')); //end of fx2024 code - publisher_cpHeader(); - publisher_editCat(true, $categoryid, $nb_subcats); + publisherCpHeader(); + PublisherUtilities::editCategory(true, $categoryid, $nb_subcats); break; case "addcategory": @@ -75,136 +73,121 @@ // Uploading the image, if any // Retreive the filename to be uploaded - if (isset($_FILES['image_file']['name']) && $_FILES['image_file']['name'] != "") { - $filename = $_POST["xoops_upload_file"][0]; - if (!empty($filename) || $filename != "") { + if (($image_file = XoopsRequest::getArray('image_file', '', 'FILES')['name'])) { +// $filename = XoopsRequest::getArray('xoops_upload_file', array(), 'POST')[0]; + if ($filename = XoopsRequest::getArray('xoops_upload_file', array(), 'POST')[0]) { // TODO : implement publisher mimetype management - $max_size = $publisher->getConfig('maximum_filesize'); - $max_imgwidth = $publisher->getConfig('maximum_image_width'); - $max_imgheight = $publisher->getConfig('maximum_image_height'); - $allowed_mimetypes = publisher_getAllowedImagesTypes(); + $max_size = $publisher->getConfig('maximum_filesize'); + $max_imgwidth = $publisher->getConfig('maximum_image_width'); + $max_imgheight = $publisher->getConfig('maximum_image_height'); + $allowed_mimetypes = publisherGetAllowedImagesTypes(); - if ($_FILES[$filename]['tmp_name'] == "" || !is_readable($_FILES[$filename]['tmp_name'])) { + if (!($tmp_name = (XoopsRequest::getArray('filename', array(), 'FILES')['tmp_name'])) || !is_readable($tmp_name)) { redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR); - exit(); +// exit(); } xoops_load('XoopsMediaUploader'); - $uploader = new XoopsMediaUploader(publisher_getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight); + $uploader = new XoopsMediaUploader(publisherGetImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight); if ($uploader->fetchMedia($filename) && $uploader->upload()) { $categoryObj->setVar('image', $uploader->getSavedFileName()); } else { redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors()); - exit(); +// exit(); } } } else { - if (isset($_POST['image'])) { - $categoryObj->setVar('image', $_POST['image']); - } + $categoryObj->setVar('image', XoopsRequest::getString('image', '', 'POST')); } - $categoryObj->setVar('parentid', (isset($_POST['parentid'])) ? intval($_POST['parentid']) : 0); + $categoryObj->setVar('parentid', (XoopsRequest::getInt('parentid', 0, 'POST'))); - $applyall = isset($_POST['applyall']) ? intval($_POST['applyall']) : 0; - $categoryObj->setVar('weight', isset($_POST['weight']) ? intval($_POST['weight']) : 1); + $applyall = XoopsRequest::getInt('applyall', 0, 'POST'); + $categoryObj->setVar('weight', XoopsRequest::getInt('weight', 1, 'POST')); // Groups and permissions - $grpread = isset($_POST['groups_read']) ? $_POST['groups_read'] : array(); - $grpsubmit = isset($_POST['groups_submit']) ? $_POST['groups_submit'] : array(); - $grpmoderation = isset($_POST['groups_moderation']) ? $_POST['groups_moderation'] : array(); + $grpread = XoopsRequest::getArray('groupsRead', array(), 'POST'); + $grpsubmit = XoopsRequest::getArray('groupsSubmit', array(), 'POST'); + $grpmoderation = XoopsRequest::getArray('groupsModeration', array(), 'POST'); - $categoryObj->setVar('name', $_POST['name']); + $categoryObj->setVar('name', XoopsRequest::getString('name', '', 'POST')); //Added by skalpa: custom template support - if (isset($_POST['template'])) { - $categoryObj->setVar('template', $_POST['template']); - } + $categoryObj->setVar('template', XoopsRequest::getString('template', '', 'POST')); + $categoryObj->setVar('meta_description', XoopsRequest::getString('meta_description', '', 'POST')); + $categoryObj->setVar('meta_keywords', XoopsRequest::getString('meta_keywords', '', 'POST')); + $categoryObj->setVar('short_url', XoopsRequest::getString('short_url', '', 'POST')); + $categoryObj->setVar('moderator', XoopsRequest::getInt('moderator', 0, 'POST')); + $categoryObj->setVar('description', XoopsRequest::getString('description', '', 'POST')); + $categoryObj->setVar('header', XoopsRequest::getString('header', '', 'POST')); - if (isset($_POST['meta_description'])) { - $categoryObj->setVar('meta_description', $_POST['meta_description']); - } - if (isset($_POST['meta_keywords'])) { - $categoryObj->setVar('meta_keywords', $_POST['meta_keywords']); - } - if (isset($_POST['short_url'])) { - $categoryObj->setVar('short_url', $_POST['short_url']); - } - $categoryObj->setVar('moderator', intval($_POST['moderator'])); - $categoryObj->setVar('description', $_POST['description']); - - if (isset($_POST['header'])) { - $categoryObj->setVar('header', $_POST['header']); - } - if ($categoryObj->isNew()) { $redirect_msg = _AM_PUBLISHER_CATCREATED; - $redirect_to = 'category.php?op=mod'; + $redirect_to = 'category.php?op=mod'; } else { $redirect_msg = _AM_PUBLISHER_COLMODIFIED; - $redirect_to = 'category.php'; + $redirect_to = 'category.php'; } if (!$categoryObj->store()) { - redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors())); - exit; + redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisherFormatErrors($categoryObj->getErrors())); +// exit; } // TODO : put this function in the category class - publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read'); - publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit'); - publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation'); + publisherSaveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read'); + publisherSaveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit'); + publisherSaveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation'); //Added by fx2024 $parentCat = $categoryObj->categoryid(); - $sizeof = sizeof($_POST['scname']); + $sizeof = sizeof(XoopsRequest::getString('scname', '', 'POST')); for ($i = 0; $i < $sizeof; ++$i) { - if ($_POST['scname'][$i] != '') { + if (XoopsRequest::getArray('scname', array(), 'POST')[$i] != '') { $categoryObj = $publisher->getHandler('category')->create(); - $categoryObj->setVar('name', $_POST['scname'][$i]); + $categoryObj->setVar('name', XoopsRequest::getArray('scname', array(), 'POST')[$i]); $categoryObj->setVar('parentid', $parentCat); if (!$categoryObj->store()) { - redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors())); - exit; + redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisherFormatErrors($categoryObj->getErrors())); +// exit; } // TODO : put this function in the category class - publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read'); - publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit'); - publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation'); + publisherSaveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read'); + publisherSaveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit'); + publisherSaveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation'); } } //end of fx2024 code redirect_header($redirect_to, 2, $redirect_msg); - exit(); +// exit(); break; //Added by fx2024 case "addsubcats": $categoryid = 0; - $nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet']; + $nb_subcats = XoopsRequest::getInt('nb_subcats', 0, 'POST') + XoopsRequest::getInt('nb_sub_yet', 0, 'POST'); $categoryObj = $publisher->getHandler('category')->create(); - $categoryObj->setVar('name', $_POST['name']); - $categoryObj->setVar('description', $_POST['description']); - $categoryObj->setVar('weight', $_POST['weight']); + $categoryObj->setVar('name', XoopsRequest::getString('name', '', 'POST')); + $categoryObj->setVar('description', XoopsRequest::getString('description', '', 'POST')); + $categoryObj->setVar('weight', XoopsRequest::getInt('weight', 0, 'POST')); if (isset($parentCat)) { $categoryObj->setVar('parentid', $parentCat); } - publisher_cpHeader(); - publisher_editCat(true, $categoryid, $nb_subcats, $categoryObj); + publisherCpHeader(); + PublisherUtilities::editCategory(true, $categoryid, $nb_subcats, $categoryObj); exit(); - break; //end of fx2024 code case "cancel": redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, '')); - exit(); - +// exit(); + break; case "default": default: - publisher_cpHeader(); + publisherCpHeader(); //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES); echo "<br />\n"; @@ -216,7 +199,7 @@ // Creating the objects for top categories $categoriesObj = $publisher->getHandler('category')->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0); - publisher_openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC); + publisherOpenCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC); echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; echo "<tr>"; @@ -228,8 +211,9 @@ $totalCategories = $publisher->getHandler('category')->getCategoriesCount(0); if (count($categoriesObj) > 0) { foreach ($categoriesObj as $key => $thiscat) { - publisher_displayCategory($thiscat); + PublisherUtilities::displayCategory($thiscat); } + unset($key, $thiscat); } else { echo "<tr>"; echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOCAT . "</td>"; @@ -237,184 +221,14 @@ $categoryid = '0'; } echo "</table>\n"; - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + include_once $GLOBALS['xoops']->path('class/pagenav.php'); $pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory'); echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; echo "<br />"; - publisher_closeCollapsableBar('createdcategories', 'createdcategoriesicon'); + publisherCloseCollapsableBar('createdcategories', 'createdcategoriesicon'); echo "<br>"; //editcat(false); break; } xoops_cp_footer(); - -/** - * @param $categoryObj - * @param int $level - */ -function publisher_displayCategory($categoryObj, $level = 0) -{ - $publisher = PublisherPublisher::getInstance(); - - $description = $categoryObj->description(); - if (!XOOPS_USE_MULTIBYTES) { - if (strlen($description) >= 100) { - $description = substr($description, 0, (100 - 1)) . "..."; - } - } - $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "&parentid=" . $categoryObj->parentid() . "'><img src='" . PUBLISHER_URL . "/assets/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>"; - $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/assets/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "' /></a>"; - - $spaces = ''; - for ($j = 0; $j < $level; ++$j) { - $spaces .= ' '; - } - - echo "<tr>"; - echo "<td class='even' align='center'>" . $categoryObj->categoryid() . "</td>"; - echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/assets/images/links/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>"; - echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>"; - echo "<td class='even' align='center'> $modify $delete </td>"; - echo "</tr>"; - $subCategoriesObj = $publisher->getHandler('category')->getCategories(0, 0, $categoryObj->categoryid()); - if (count($subCategoriesObj) > 0) { - ++$level; - foreach ($subCategoriesObj as $key => $thiscat) { - publisher_displayCategory($thiscat, $level); - } - } - unset($categoryObj); -} - -/** - * @param bool $showmenu - * @param int $categoryid - * @param int $nb_subcats - * @param null $categoryObj - */ -function publisher_editCat($showmenu = false, $categoryid = 0, $nb_subcats = 4, $categoryObj = null) -{ - $publisher = PublisherPublisher::getInstance(); - - // if there is a parameter, and the id exists, retrieve data: we're editing a category - if ($categoryid != 0) { - // Creating the category object for the selected category - $categoryObj = $publisher->getHandler('category')->get($categoryid); - if ($categoryObj->notLoaded()) { - redirect_header("category.php", 1, _AM_PUBLISHER_NOCOLTOEDIT); - exit(); - } - } else { - if (!$categoryObj) { - $categoryObj = $publisher->getHandler('category')->create(); - } - } - - if ($categoryid != 0) { - if ($showmenu) { - //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_EDITING); - } - echo "<br />\n"; - publisher_openCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO); - } else { - if ($showmenu) { - //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_CREATINGNEW); - } - publisher_openCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO); - } - - $sform = $categoryObj->getForm($nb_subcats); - $sform->display(); - - if (!$categoryid) { - publisher_closeCollapsableBar('createtable', 'createtableicon'); - } else { - publisher_closeCollapsableBar('edittable', 'edittableicon'); - } - - //Added by fx2024 - if ($categoryid) { - $sel_cat = $categoryid; - - publisher_openCollapsableBar('subcatstable', 'subcatsicon', _AM_PUBLISHER_SUBCAT_CAT, _AM_PUBLISHER_SUBCAT_CAT_DSC); - // Get the total number of sub-categories - $categoriesObj = $publisher->getHandler('category')->get($sel_cat); - $totalsubs = $publisher->getHandler('category')->getCategoriesCount($sel_cat); - // creating the categories objects that are published - $subcatsObj = $publisher->getHandler('category')->getCategories(0, 0, $categoriesObj->categoryid()); - $totalSCOnPage = count($subcatsObj); - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; - echo "<tr>"; - echo "<td width='60' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATID . "</strong></td>"; - echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATCOLNAME . "</strong></td>"; - echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_SUBDESCRIPT . "</strong></td>"; - echo "<td width='60' class='bg3' align='right'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>"; - echo "</tr>"; - if ($totalsubs > 0) { - foreach ($subcatsObj as $subcat) { - $modify = "<a href='category.php?op=mod&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/assets/images/links/edit.gif' title='" . _AM_PUBLISHER_MODIFY . "' alt='" . _AM_PUBLISHER_MODIFY . "' /></a>"; - $delete = "<a href='category.php?op=del&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/assets/images/links/delete.png' title='" . _AM_PUBLISHER_DELETE . "' alt='" . _AM_PUBLISHER_DELETE . "' /></a>"; - echo "<tr>"; - echo "<td class='head' align='left'>" . $subcat->categoryid() . "</td>"; - echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/category.php?categoryid=" . $subcat->categoryid() . "&parentid=" . $subcat->parentid() . "'>" . $subcat->name() . "</a></td>"; - echo "<td class='even' align='left'>" . $subcat->description() . "</td>"; - echo "<td class='even' align='right'> {$modify} {$delete} </td>"; - echo "</tr>"; - } - } else { - echo "<tr>"; - echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOSUBCAT . "</td>"; - echo "</tr>"; - } - echo "</table>\n"; - echo "<br />\n"; - publisher_closeCollapsableBar('subcatstable', 'subcatsicon'); - - publisher_openCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC); - $startitem = XoopsRequest::getInt('startitem'); - // Get the total number of published ITEMS - $totalitems = $publisher->getHandler('item')->getItemsCount($sel_cat, array(PublisherConstants::_PUBLISHER_STATUS_PUBLISHED)); - // creating the items objects that are published - $itemsObj = $publisher->getHandler('item')->getAllPublished($publisher->getConfig('idxcat_perpage'), $startitem, $sel_cat); - $totalitemsOnPage = count($itemsObj); - $allcats = $publisher->getHandler('category')->getObjects(null, true); - echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; - echo "<tr>"; - echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . "</strong></td>"; - echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCOLNAME . "</strong></td>"; - echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMDESC . "</strong></td>"; - echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . "</strong></td>"; - echo "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>"; - echo "</tr>"; - if ($totalitems > 0) { - for ($i = 0; $i < $totalitemsOnPage; ++$i) { - $categoryObj = $allcats[$itemsObj[$i]->categoryid()]; - $modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/assets/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "' /></a>"; - $delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/assets/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'/></a>"; - echo "<tr>"; - echo "<td class='head' align='center'>" . $itemsObj[$i]->itemid() . "</td>"; - echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>"; - echo "<td class='even' align='left'>" . $itemsObj[$i]->getitemLink() . "</td>"; - echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub('s') . "</td>"; - echo "<td class='even' align='center'> $modify $delete </td>"; - echo "</tr>"; - } - } else { - $itemid = -1; - echo "<tr>"; - echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS . "</td>"; - echo "</tr>"; - } - echo "</table>\n"; - echo "<br />\n"; - $parentid = XoopsRequest::getInt('parentid'); - $pagenav_extra_args = "op=mod&categoryid=$sel_cat&parentid=$parentid"; - xoops_load('XoopsPageNav'); - $pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $startitem, 'startitem', $pagenav_extra_args); - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; - echo "<input type='button' name='button' onclick=\"location='item.php?op=mod&categoryid=" . $sel_cat . "'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> "; - echo "</div>"; - } - //end of fx2024 code -} Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php 2015-02-17 18:44:11 UTC (rev 12989) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/clone.php 2015-02-18 14:52:02 UTC (rev 12990) @@ -20,43 +20,43 @@ include_once __DIR__ . "/admin_header.php"; -publisher_cpHeader(); +publisherCpHeader(); //publisher_adminMenu(-1, _AM_PUBLISHER_CLONE); -publisher_openCollapsableBar('clone', 'cloneicon', _AM_PUBLISHER_CLONE, _AM_PUBLISHER_CLONE_DSC); +publisherOpenCollapsableBar('clone', 'cloneicon', _AM_PUBLISHER_CLONE, _AM_PUBLISHER_CLONE_DSC); -if (@$_POST['op'] == 'submit') { - +if ('submit' == XoopsRequest::getString('op', '', 'POST')) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('clone.php', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); - exit(); +// exit(); } - $clone = $_POST['clone']; +// $clone = $_POST['clone']; + $clone = XoopsRequest::getString('clone', '', 'POST'); //check if name is valid if (empty($clone) || preg_match('/[^a-zA-Z0-9\_\-]/', $clone)) { redirect_header('clone.php', 3, sprintf(_AM_PUBLISHER_CLONE_INVALIDNAME, $clone)); - exit(); +// exit(); } // Check wether the cloned module exists or not - if ($clone && is_dir(XOOPS_ROOT_PATH . '/modules/' . $clone)) { + if ($clone && is_dir($GLOBALS['xoops']->path('modules/' . $clone))) { redirect_header('clone.php', 3, sprintf(_AM_PUBLISHER_CLONE_EXISTS, $clone)); } $patterns = array( - strtolower(PUBLISHER_DIRNAME) => strtolower($clone), - strtoupper(PUBLISHER_DIRNAME) => strtoupper($clone), + strtolower(PUBLISHER_DIRNAME) => strtolower($clone), + strtoupper(PUBLISHER_DIRNAME) => strtoupper($clone), ucfirst(strtolower(PUBLISHER_DIRNAME)) => ucfirst(strtolower($clone)) ); - $patKeys = array_keys($patterns); + $patKeys = array_keys($patterns); $patValues = array_values($patterns); - publisher_cloneFileFolder(PUBLISHER_ROOT_PATH); - $logocreated = publisher_createLogo(strtolower($clone)); + PublisherClone::cloneFileFolder(PUBLISHER_ROOT_PATH); + $logocreated = PublisherClone::createLogo(strtolower($clone)); $msg = ""; - if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($clone))) { + if (is_dir($GLOBALS['xoops']->path('modules/' . strtolower($clone)))) { $msg .= sprintf(_AM_PUBLISHER_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin'>" . ucfirst(strtolower($clone)) . "</a>") . "<br />\n"; if (!$logocreated) { $msg .= _AM_PUBLISHER_CLONE_IMAGEFAIL; @@ -67,8 +67,8 @@ echo $msg; } else { - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; - $form = new XoopsThemeForm(sprintf(_AM_PUBLISHER_CLONE_TITLE, $publisher->getModule()->getVar('name', 'E')), 'clone', 'clone.php', 'post', true); + include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); + $form = new XoopsThemeForm(sprintf(_AM_PUBLISHER_CLONE_TITLE, $publisher->getModule()->getVar('name', 'E')), 'clone', 'clone.php', 'post', true); $clone = new XoopsFormText(_AM_PUBLISHER_CLONE_NAME, 'clone', 20, 20, ''); $clone->setDescription(_AM_PUBLISHER_CLONE_NAME_DSC); $form->addElement($clone, true); @@ -78,102 +78,106 @@ } // End of collapsable bar -publisher_closeCollapsableBar('clone', 'cloneicon'); +publisherCloseCollapsableBar('clone', 'cloneicon'); xoops_cp_footer(); // work around for PHP < 5.0.x +/* if (!function_exists('file_put_contents')) { - /** - * @param $filename - * @param $data - * @param bool $file_append - */ function file_put_contents($filename, $data, $file_append = false) { - if ($fp = fopen($filename, (!$file_append ? 'w+' : 'a+'))) { + if ($fp == fopen($filename, (!$file_append ? 'w+' : 'a+'))) { fputs($fp, $data); fclose($fp); } } } +*/ -// recursive clonning script /** - * @param $path + * Class PublisherClone */ -function publisher_cloneFileFolder($path) +class PublisherClone { + +// recursive clonning script + /** + * @param $path + */ + public static function cloneFileFolder($path) + { global $patKeys; global $patValues; - $newPath = str_replace($patKeys[0], $patValues[0], $path); + $newPath = str_replace($patKeys[0], $patValues[0], $path); - if (is_dir($path)) { - // create new dir - mkdir($newPath); + if (is_dir($path)) { + // create new dir + mkdir($newPath); - // check all files in dir, and process it - if ($handle = opendir($path)) { - while ($file = readdir($handle)) { - if ($file != '.' && $file != '..' && $file != '.svn') { - publisher_cloneFileFolder("{$path}/{$file}"); + // check all files in dir, and process it + if ($handle == opendir($path)) { + while (($file = readdir($handle)) !== false) { + if ($file != '.' && $file != '..' && $file != '.svn') { + self::cloneFileFolder("{$path}/{$file}"); + } } + closedir($handle); } - closedir($handle); - } - } else { - - if (preg_match('/(.jpg|.gif|.png|.zip)$/i', $path)) { - // image - copy($path, $newPath); } else { - // file, read it - $content = file_get_contents($path); - $content = str_replace($patKeys, $patValues, $content); - file_put_contents($newPath, $content); + if (preg_match('/(.jpg|.gif|.png|.zip)$/i', $path)) { + // image + copy($path, $newPath); + } else { + // file, read it + $content = file_get_contents($path); + $content = str_replace($patKeys, $patValues, $content); + file_put_contents($newPath, $content); + } } } -} -/** - * @param $dirname - * - * @return bool - */ -function publisher_createLogo($dirname) -{ - if (!extension_loaded("gd")) { - return false; - } else { - $required_functions = array("imagecreatetruecolor", "imagecolorallocate", "imagefilledrectangle", "imagejpeg", "imagedestroy", "imageftbbox"); - foreach ($required_functions as $func) { - if (!function_exists($func)) { - return false; + /** + * @param $dirname + * + * @return bool + */ + public static function createLogo($dirname) + { + if (!extension_loaded("gd")) { + return false; + } else { + $required_functions = array("imagecreatetruecolor", "imagecolorallocate", "imagefilledrectangle", "imagejpeg", "imagedestroy", "imageftbbox"); + foreach ($required_functions as $func) { + if (!function_exists($func)) { + return false; + } } + unset($func); } - } - if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/module_logo.png") || !file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/VeraBd.ttf")) { - return false; - } + if (!file_exists($imageBase = $GLOBALS['xoops']->path("/modules/" . $dirname . "/assets/images/module_logo.png")) || !file_exists($font = $GLOBALS['xoops']->path("/modules/" . $dirname . "/assets/images/VeraBd.ttf"))) { + return false; + } - $imageModule = imagecreatefrompng($imageBase); + $imageModule = imagecreatefrompng($imageBase); - //Erase old text - $grey_color = imagecolorallocate($imageModule, 237, 237, 237); - imagefilledrectangle($imageModule, 5, 35, 85, 46, $grey_color); + //Erase old text + $grey_color = imagecolorallocate($imageModule, 237, 237, 237); + imagefilledrectangle($imageModule, 5, 35, 85, 46, $grey_color); - // Write text - $text_color = imagecolorallocate($imageModule, 0, 0, 0); - $space_to_border = (80 - strlen($dirname) * 6.5) / 2; - imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($dirname), array()); + // Write text + $text_color = imagecolorallocate($imageModule, 0, 0, 0); + $space_to_border = (80 - strlen($dirname) * 6.5) / 2; + imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($dirname), array()); - // Set transparency color - $white = imagecolorallocatealpha($imageModule, 255, 255, 255, 127); - imagefill($imageModule, 0, 0, $white); - imagecolortransparent($imageModule, $white); - imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/assets/images/module_logo.png"); - imagedestroy($imageModule); + // Set transparency color + $white = imagecolorallocatealpha($imageModule, 255, 255, 255, 127); + imagefill($imageModule, 0, 0, $white); + imagecolortransparent($imageModule, $white); + imagepng($imageModule, $GLOBALS['xoops']->path("/modules/" . $dirname . "/assets/images/module_logo.png")); + imagedestroy($imageModule); - return true; + return true; + } } Modified: XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/file.php =================================================================== --- XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/file.php 2015-02-17 18:44:11 UTC (rev 12989) +++ XoopsModules/modulepacks/x257basicmodulepack/trunk/modules/publisher/admin/file.php 2015-02-18 14:52:02 UTC (rev 12990) @@ -25,23 +25,22 @@ /** * @param bool $showmenu - * @param int $fileid - * @param int $itemid + * @param int $fileid + * @param int $itemid */ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0) { $publisher = PublisherPublisher::getInstance(); - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); // if there is a parameter, and the id exists, retrieve data: we're editing a file if ($fileid != 0) { - // Creating the File object $fileObj = $publisher->getHandler('file')->get($fileid); if ($fileObj->notLoaded()) { redirect_header("javascript:history.go(-1)", 1, _AM_PUBLISHER_NOFILESELECTED); - exit(); +// exit(); } if ($showmenu) { @@ -51,7 +50,7 @@ echo "<br />\n"; echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 6px 0 0; '>" . _AM_PUBLISHER_FILE_EDITING . "</span>"; echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_FILE_EDITING_DSC . "</span>"; - publisher_openCollapsableBar('editfile', 'editfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); + publisherOpenCollapsableBar('editfile', 'editfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); } else { // there's no parameter, so we're adding an item $fileObj = $publisher->getHandler('file')->create(); @@ -61,7 +60,7 @@ } echo "<span style='color: #2F5376; font-weight: bold; font-size: 16px; margin: 6px 6px 0 0; '>" . _AM_PUBLISHER_FILE_ADDING . "</span>"; echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . _AM_PUBLISHER_FILE_ADDING_DSC . "</span>"; - publisher_openCollapsableBar('addfile', 'addfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); + publisherOpenCollapsableBar('addfile', 'addfileicon', _AM_PUBLISHER_FILE_INFORMATIONS); } // FILES UPLOAD FORM @@ -69,9 +68,9 @@ $files_form->display(); if ($fileid != 0) { - publisher_closeCollapsableBar('editfile', 'editfileicon'); + publisherCloseCollapsableBar('editfile', 'editfileicon'); } else { - publisher_closeCollapsableBar('addfile', 'addfileicon'); + publisherCloseCollapsableBar('addfile', 'addfileicon'); } } @@ -80,31 +79,31 @@ /* -- Available operations -- */ switch ($op) { case "uploadfile"; - publisher_uploadFile(false, true, $false); + publisherUploadFile(false, true, $false); exit; break; case "uploadanother"; - publisher_uploadFile(true, true, $false); + publisherUploadFile(true, true, $false); exit; break; case "mod": - $fileid = isset($_GET['fileid']) ? $_GET['fileid'] : 0; - $itemid = isset($_GET['itemid']) ? $_GET['itemid'] : 0; + $fileid = XoopsRequest::getInt('fileid', 0, 'GET'); + $itemid = XoopsRequest::getInt('itemid', 0, 'GET'); if (($fileid == 0) && ($itemid == 0)) { redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_NOITEMSELECTED); - exit(); +// exit(); } - publisher_cpHeader(); - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; + publisherCpHeader(); + include_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); publisher_editFile(true, $fileid, $itemid); break; case "modify": - $fileid = isset($_POST['fileid']) ? intval($_POST['fileid']) : 0; + $fileid = XoopsRequest::getInt('fileid', 0, 'POST'); // Creating the file object if ($fileid != 0) { @@ -114,43 +113,43 @@ } // Putting the values in the file object - $fileObj->setVar('name', $_POST['name']); - $fileObj->setVar('description', $_POST['description']); - $fileObj->setVar('status', intval($_POST['file_status'])); + $fileObj->setVar('name', XoopsRequest::getString('name', '', 'POST')); + $fileObj->setVar('description', XoopsRequest::getString('description', '', 'POST')); + $fileObj->setVar('status', XoopsRequest::getInt('status', 0, 'POST')); // Storing the file if (!$fileObj->store()) { - redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid(), 3, _AM_PUBLISHER_FILE_EDITING_ERROR . publisher_formatErrors($fileObj->getErrors())); - exit; + redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid(), 3, _AM_PUBLISHER_FILE_EDITING_ERROR . publisherFormatErrors($fileObj->getErrors())); +// exit; } redirect_header('item.php?op=mod&itemid=' . $fileObj->itemid(), 2, _AM_PUBLISHER_FILE_EDITING_SUCCESS); - exit(); +// exit(); break; case "del": - $fileid = isset($_POST['fileid']) ? intval($_POST['fileid']) : 0; - $fileid = isset($_GET['fileid']) ? intval($_GET['fileid']) : $fileid; + $fileid = XoopsRequest::getInt('fileid', 0, 'POST'); + $fileid = XoopsRequest::getInt('fileid', $fileid, 'GET'); $fileObj = $publisher->getHandler('file')->get($fileid); - $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; - $title = isset($_POST['title']) ? $_POST['title'] : ''; + $confirm = XoopsRequest::getInt('confirm', 0, 'POST'); + $title = XoopsRequest::getString('title', '', 'POST'); if ($confirm) { if (!$publisher->getHandler('file')->delete($fileObj)) { redirect_header('item.php', 2, _AM_PUBLISHER_FILE_DELETE_ERROR); - exit; +// exit; } redirect_header('item.php', 2, sprintf(_AM_PUBLISHER_FILEISDELETE... [truncated message content] |
From: <txm...@us...> - 2015-02-17 18:44:14
|
Revision: 12989 http://sourceforge.net/p/xoops/svn/12989 Author: txmodxoops Date: 2015-02-17 18:44:11 +0000 (Tue, 17 Feb 2015) Log Message: ----------- Minified xoops css Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops.min.css Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops.min.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops.min.css 2015-02-17 18:44:11 UTC (rev 12989) @@ -0,0 +1,3 @@ +/* $Id: xoops.min.css 12977 2015-02-09 10:08:01Z timgno $ */ + +table{width:100%;border-collapse:collapse;border-spacing:0}strong,b,dfn{font-weight:700}u{text-decoration:underline}i,em{font-style:italic}del{text-decoration:line-through}sup{vertical-align:text-top}sub{vertical-align:text-bottom}ins{text-decoration:none}img{border:0}img.center{text-align:center;margin:6px auto;display:block;margin-bottom:4px}img.left{text-align:left;float:left;margin:2px 6px 2px 0;clear:left}img.right{float:right;text-align:right;margin:2px 0 2px 6px;clear:right}acronym,abbr,dfn{cursor:help}pre{overflow:auto}#xoopsHiddenText{visibility:hidden;background-color:transparent;color:#000;font-weight:400;font-style:normal;text-decoration:none}.pagneutral{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/pagneutral.gif)}.pagact{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/pagact.gif)}.paginact{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/paginact.gif)}.xoops-form-element-caption .caption-marker{display:none}.xoops-form-element-caption-required .caption-marker{background-color:inherit;padding-left:2px;color:red}.xoops-form-element-help{font-size:.9em;padding-top:5px;font-weight:400}fieldset{border:0}input,textarea,select{background-color:#fff;color:#000}input[type=submit],input[type=reset],input[type=button],.xo-formbuttons,.formButton,button{background-color:#D3D2D6;color:#405A80;padding:3px}#xo-fixbanner a{display:block;position:absolute;z-index:102;width:468px;height:60px}div.jGrowl{margin-top:1em;padding:0;z-index:9999}body > div.jGrowl{position:fixed}body > div.jGrowl.top-right{right:25%;left:25%;top:2px}body > div.jGrowl.bottom-left{left:0;bottom:0}body > div.jGrowl.bottom-right{right:0;bottom:0}body > div.jGrowl.center{top:0;width:50%;left:25%}body > div.jGrowl.top-left{left:0;top:0}div.center div.jGrowl-notification,div.center div.jGrowl-closer{margin-left:auto;margin-right:auto}div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#EBFBFE;color:navy;width:100%;padding:.5em;margin-top:.5em;margin-bottom:.5em;font-family:Tahoma,Geneva,sans-serif;font-size:1.2em;text-align:center;border:1px solid #69F;display:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px}div.jGrowl div.jGrowl-notification{min-height:40px}div.jGrowl div.jGrowl-notification div.jGrowl-header{font-weight:700;font-size:10px}div.jGrowl div.jGrowl-notification div.jGrowl-close{float:right;font-weight:700;font-size:12px;cursor:pointer}div.jGrowl div.jGrowl-closer{height:15px;padding-top:4px;padding-bottom:4px;cursor:pointer;font-size:11px;font-weight:700;text-align:center}.floatleft{float:left;margin:0;padding-left:4px;border:0}.floatright{float:right;margin:0;padding:2px;border:0}.floatcenter0{margin:0 auto}.floatcenter1{margin:1em auto}.clear{clear:both;height:0;font-size:0;line-height:0}.clearleft{clear:left;height:0;font-size:0;line-height:0}.clearright{clear:right;height:0;font-size:0;line-height:0}.block{display:block}.inline{display:inline}.blockinline{display:inline-block}.left,.txtleft{text-align:left}.right,.txtright{text-align:right}.center,.txtcenter{text-align:center}.justify,.txtjustify{text-align:justify}.middle,.alignmiddle{vertical-align:middle}.top,.aligntop{vertical-align:top}.bottom,.alignbottom{vertical-align:bottom}.positop{margin-top:0;padding-top:0}.posibottom{margin-bottom:0;padding-bottom:0}.table{display:table}.tcaption1{display:block;width:100%}.tcaption2{display:block;width:200%}.tcaption3{display:block;width:300%}.tcaption4{display:block;width:400%}.tcaption5{display:block;width:500%}.tcaption6{display:block;width:600%}.tbody{display:table-row-group}.trow{display:table-row}.tcell{display:table-cell}.tfootend{width:auto}.collapse{border-collapse:collapse}.separate{border-collapse:separate}.bspacing1{border-spacing:1px}.bspacing2{border-spacing:2px}.bspacing3{border-spacing:3px}.bspacing4{border-spacing:4px}.bspacing5{border-spacing:5px}.bspacing10{border-spacing:10px}.widthauto{width:auto}.width100{width:100%}.width90{width:90%}.width80{width:80%}.width75{width:75%}.width70{width:70%}.width66{width:66.6%}.width60{width:60%}.width50{width:49%}.width45{width:45%}.width40{width:40%}.width33{width:33.3%}.width30{width:30%}.width25{width:25%}.width20{width:20%}.width15{width:15%}.width10{width:10%}.width5{width:5%}.width3{width:3%}.width2{width:2%}.width1{width:1%}.pad2{padding:2px}.pad3{padding:3px}.pad5{padding:5px}.pad7{padding:7px}.pad10{padding:10px}.marg2{margin:2px}.marg3{margin:3px}.marg5{margin:5px}.marg7{margin:8px}.marg10{margin:10px}.verysmall,.xx-small{font-size:.7em}.smallsmall,.x-small{font-size:.8em}.small{font-size:.92em}.normal{font-size:1em}.big{font-size:1.17em}.maxi{font-size:1.5em}.bold{font-weight:700}.bolder{font-weight:bolder}.lighter{font-weight:lighter}.normal{font-weight:400;font-style:normal}.italic{font-style:italic}.oblique{font-style:oblique}.underline{text-decoration:underline}.expanded{letter-spacing:.5em}.condensed{letter-spacing:-.1em}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.line100{line-height:1em}.line120{line-height:1.2em}.line140{line-height:1.4em}.line160{line-height:1.6em}.line170{line-height:1.7em}.line180{line-height:1.8em}.line200{line-height:2em}.line220{line-height:2.2em}.line240{line-height:2.4em}.red{background-color:transparent;color:red}.blue{background-color:transparent;color:#00f}.black{background-color:transparent;color:#000}.white{background-color:transparent;color:#fff}.yellow{background-color:transparent;color:#ff0}.orange{background-color:transparent;color:orange}.green{background-color:transparent;color:green}.silver{background-color:transparent;color:silver}.hide{display:none}.hidden{visibility:hidden;position:absolute;top:0;left:0}.spacer{padding:0 0 3px}.separator{clear:both;float:left;height:1px;width:100%}.cursordefault{cursor:default}.cursormove{cursor:move}.cursorpointer{cursor:pointer}.cursorhelp{cursor:help}.opac5{opacity:.5!important;filter:alpha(opacity=50)!important}.opac5:hover{opacity:1!important;filter:alpha(opacity=100)!important}.opac7{opacity:.7!important;filter:alpha(opacity=70)!important}.opac7:hover{opacity:1!important;filter:alpha(opacity=100)!important}.opac1{opacity:1!important;filter:alpha(opacity=100)!important}.opac1:hover{opacity:.5!important;filter:alpha(opacity=50)!important}.bradius3{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.bradius5{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px}.bradius10{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.bradius15{border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px}.bnone{border:0}.border{border:1px solid #000}.dotted{border:1px dotted #000}.dashed{border:1px dashed #000}.solidblack{border:1px solid #000}.solidwhite{border:1px solid #fff}.solidred{border:1px solid red}.solidyellow{border:1px solid #ff0}.solidblue{border:1px solid #00f}.solidorange{border:1px solid orange}.solidgreen{border:1px solid green}.solidbrown{border:1px solid #a52a2a}.solidsilver{border:1px solid silver}.dottedblack{border:1px dotted #000}.dottedwhite{border:1px dotted #fff}.dottedred{border:1px dotted red}.dottedyellow{border:1px dotted #ff0}.dottedblue{border:1px dotted #00f}.dottedorange{border:1px dotted orange}.dottedgreen{border:1px dotted green}.dottedbrown{border:1px dotted #a52a2a}.dottedsilver{border:1px dotted silver}.dashedblack{border:1px dashed #000}.dashedwhite{border:1px dashed #fff}.dashedred{border:1px dashed red}.dashedyellow{border:1px dashed #ff0}.dashedblue{border:1px dashed #00f}.dashedorange{border:1px dashed orange}.dashedgreen{border:1px dashed green}.dashedbrown{border:1px dashed #a52a2a}.dashedsilver{border:1px dashed silver}.doubleblack{border:4px double #000}.doublewhite{border:4px double #fff}.doublered{border:4px double red}.doubleyellow{border:4px double #ff0}.doubleblue{border:4px double #00f}.doubleorange{border:4px double orange}.doublegreen{border:4px double green}.doublebrown{border:4px double #a52a2a}.doublesilver{border:4px double silver}.grooveblack{border:3px groove #000}.groovewhite{border:3px groove #fff}.groovered{border:3px groove red}.grooveyellow{border:3px groove #ff0}.grooveblue{border:3px groove #00f}.grooveorange{border:3px groove orange}.groovegreen{border:3px groove green}.groovebrown{border:3px groove #a52a2a}.groovesilver{border:3px groove silver}.ridgeblack{border:3px ridge #000}.ridgewhite{border:3px ridge #fff}.ridgered{border:3px ridge red}.ridgeyellow{border:3px ridge #ff0}.ridgeblue{border:3px ridge #00f}.ridgeorange{border:3px ridge orange}.ridgegreen{border:3px ridge green}.ridgebrown{border:3px ridge #a52a2a}.ridgesilver{border:3px ridge silver}.insetblack1{border:1px inset #000}.insetblack{border:3px inset #000}.insetwhite1{border:1px inset #fff}.insetwhite{border:3px inset #fff}.insetred{border:3px inset red}.insetyellow{border:3px inset #ff0}.insetblue{border:3px inset #00f}.insetorange{border:3px inset orange}.insetgreen{border:3px inset green}.insetbrown{border:3px inset #a52a2a}.insetsilver1{border:1px inset silver}.insetsilver{border:3px inset silver}.outsetblack1{border:1px outset #000}.outsetblack{border:3px outset #000}.outsetwhite1{border:1px outset #fff}.outsetwhite{border:3px outset #fff}.outsetred{border:3px outset red}.outsetyellow{border:3px outset #ff0}.outsetblue{border:3px outset #00f}.outsetorange{border:3px outset orange}.outsetgreen{border:3px outset green}.outsetbrown{border:3px outset #a52a2a}.outsetsilver1{border:1px outset silver}.outsetsilver{border:3px outset silver}.arial{font-family:Arial,Helvetica,sans-serif}.courierNew{font-family:'Courier New',Courier,monospace}.georgia{font-family:Georgia,'Times New Roman',Times,serif}.lucidaConsole{font-family:'Lucida Console',Monaco,monospace}.lucidaSansUnicode{font-family:'Lucida Sans Unicode','Lucida Grande',sans-serif}.tahoma{font-family:Tahoma,Geneva,sans-serif}.times{font-family:'Times New Roman',Times,serif}.trebuchet{font-family:'Trebuchet MS',Helvetica,sans-serif}.verdana{font-family:Verdana,Geneva,sans-serif}.msSans{font-family:'MS Sans Serif',Geneva,sans-serif}.msSerif{font-family:'MS Serif','New York',serif}.helvetica{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif}.impact{font-family:Impact,Charcoal,sans-serif}.century{font-family:'Century Gothic','Lucida Grande','Lucida Sans Unicode',sans-serif}.shadow{text-shadow:2px 2px 3px #aaa}.shadowlight{text-shadow:1px 1px 2px #aaa}.boxshadow{box-shadow:1px 2px 3px rgba(0,0,0,0.5);-moz-box-shadow:1px 2px 3px rgba(0,0,0,0.5);-webkit-box-shadow:1px 2px 3px rgba(0,0,0,0.5)}.boxshadow1{box-shadow:0 0 20px #787878;-webkit-box-shadow:0 0 20px #787878;-moz-box-shadow:0 0 20px #787878;filter:progid:DXImageTransform.Microsoft.Shadow(color='#bbbbbb',Direction=135,Strength=5);zoom:1}.boxrelief{box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-moz-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-webkit-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset}.boxinset{box-shadow:0 3px 8px rgba(0,0,0,.24) inset;-moz-box-shadow:0 3px 8px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 3px 8px rgba(0,0,0,.4) inset}.twocolumn{column-count:2;column-gap:1.5em;-moz-column-count:2;-moz-column-gap:1.5em;-webkit-column-count:2;-webkit-column-gap:1.5em}.threecolumn{column-count:3;column-gap:1.2em;-moz-column-count:3;-moz-column-gap:1.2em;-webkit-column-count:3;-webkit-column-gap:1.2em}.forcolumn{column-count:4;column-gap:1.2em;-moz-column-count:4;-moz-column-gap:1.2em;-webkit-column-count:4;-webkit-column-gap:1.2em}.column10{column-width:10em;column-gap:1.2em;-moz-column-width:10em;-moz-column-gap:1.2em;-webkit-column-width:10em;-webkit-column-gap:1.2em}.column15{column-width:15em;column-gap:1.2em;-moz-column-width:15em;-moz-column-gap:1.2em;-webkit-column-width:15em;-webkit-column-gap:1.2em}.column20{column-width:20em;column-gap:1.2em;-moz-column-width:20em;-moz-column-gap:1.2em;-webkit-column-width:20em;-webkit-column-gap:1.2em}.column25{column-width:25em;column-gap:1.2em;-moz-column-width:25em;-moz-column-gap:1.2em;-webkit-column-width:25em;-webkit-column-gap:1.2em} \ No newline at end of file |
From: <be...@us...> - 2015-02-17 00:26:36
|
Revision: 12988 http://sourceforge.net/p/xoops/svn/12988 Author: beckmi Date: 2015-02-17 00:26:34 +0000 (Tue, 17 Feb 2015) Log Message: ----------- Adding hack for SystemInfo link (pre-Alpha, proof of concept) Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/readme.txt XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/systeminfo.jpg XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/class/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/class/XoopsSystemInfo.php XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ZeroClipboard.swf XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/index.html XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.js XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.min.js XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/xoopssysteminfo.js XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php_original XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/xotpl/ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/xotpl/xo_accordion.html XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/xotpl/xo_accordion.html_original Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/readme.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/readme.txt (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/readme.txt 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,43 @@ +Many times, we ask the users asking for support, to provide us with the info about their installation. + +To make it easier, this hack, requested by Jim Garrett (aka Zyspec), adds a link in the Admin (see the picture systeminfo.jpg in this directory). When you click it, it will extract the info about your configuration (see an example below), and place it in your clipboard. You just need to paste it in the XOOPS Forums, when you ask for help. + +This is right now a proof of concept, looking for testers. + +EXAMPLE that would be copied to your clipboard: +============= + +XOOPS 2.5.8_Beta1 +PHP Version: 5.6.5 +mySQL Version: 5.6.22 +Server API: apache2handler +OS: WINNT +safe_mode: Off +register_globals: Off +register_globals: Off +allow_url_fopen: On +fsockopen: On +allow_call_time_pass_reference: Off +post_max_size: 8M +max_input_time: 120 +output_buffering: 4096 +max_execution_time: 60 +memory_limit: 512M +file_uploads: On +upload_max_filesize: 2M + +Active Modules: +--------------- +eXtCal 2.38 +News 1.71 +Publisher 1.02 +System 2.11 +User Profile 1.86 +Wfdownloads 3.23 + +Deactivated Modules: +--------------- +Forum 4.33 +My Links 3.11 +Private Messaging 1.1 +Protector 3.52 Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/systeminfo.jpg =================================================================== (Binary files differ) Index: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/systeminfo.jpg =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/systeminfo.jpg 2015-02-16 22:27:26 UTC (rev 12987) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/systeminfo.jpg 2015-02-17 00:26:34 UTC (rev 12988) Property changes on: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/docs_hack/systeminfo.jpg ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/class/XoopsSystemInfo.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/class/XoopsSystemInfo.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/class/XoopsSystemInfo.php 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,152 @@ +<?php + +/* +if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { + include_once $GLOBALS['xoops']->path("/class/theme.php"); + $GLOBALS['xoTheme'] = new xos_opal_Theme(); +} + +$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); +$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.zclip.js'); +*/ + +/** + * Class XoopsSystemInfo + */ +class XoopsSystemInfo +{ + + function __construct() + { + } + + public function getSystemInfoValues() + { + //<{$lang_php_vesion}> +// $moduleVersion = $wfdownloads->getModule()->getInfo('version'); + $systemInformation = ''; + $systemInformation .= $GLOBALS['xoopsTpl']->get_template_vars('xoops_version') . '\n'; + $systemInformation .= _OXYGEN_VERSION_PHP . ': ' . PHP_VERSION . '\n'; + $systemInformation .= _OXYGEN_VERSION_MYSQL . ': ' . mysql_get_server_info() . ' \n'; + $systemInformation .= _OXYGEN_Server_API . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('lang_server_api') . ' \n'; + $systemInformation .= _OXYGEN_OS . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('lang_os_name') . ' \n'; + $systemInformation .= 'safe_mode' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('safe_mode') . ' \n'; + $systemInformation .= 'register_globals' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('register_globals') . ' \n'; + $systemInformation .= 'register_globals' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('magic_quotes_gpc') . ' \n'; + $systemInformation .= 'allow_url_fopen' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('allow_url_fopen') . ' \n'; + $systemInformation .= 'fsockopen' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('fsockopen') . ' \n'; + $systemInformation .= 'allow_call_time_pass_reference' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('allow_call_time_pass_reference') . ' \n'; + $systemInformation .= 'post_max_size' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('post_max_size') . ' \n'; + $systemInformation .= 'max_input_time' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('max_input_time') . ' \n'; + $systemInformation .= 'output_buffering' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('output_buffering') . ' \n'; + $systemInformation .= 'max_execution_time' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('max_execution_time') . ' \n'; + $systemInformation .= 'memory_limit' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('memory_limit') . ' \n'; + $systemInformation .= 'file_uploads' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('file_uploads') . ' \n'; + $systemInformation .= 'upload_max_filesize' . ': ' . $GLOBALS['xoopsTpl']->get_template_vars('upload_max_filesize') . ' \n'; +//$systemInformation = 'Module ' . $wfdownloads->getModule()->getInfo('name') . ' ' . $wfdownloads->getModule()->getInfo('version') . '\n'; + return $systemInformation; + } + + public function getSystemInfoLabels() + { + } + + public function getSystemInfoLabelsAndValues() + { + } + + public function assignSystemInfoValuesToSmarty($tpl) + { + //$tpl->assign('lang_xoops_version', XOOPS_VERSION); + $tpl->assign('lang_php_vesion', PHP_VERSION); + $tpl->assign('lang_mysql_version', mysql_get_server_info()); + $tpl->assign('lang_server_api', PHP_SAPI); + $tpl->assign('lang_os_name', PHP_OS); + $tpl->assign('safe_mode', ini_get('safe_mode') ? 'On' : 'Off'); + $tpl->assign('register_globals', ini_get('register_globals') ? 'On' : 'Off'); + $tpl->assign('magic_quotes_gpc', ini_get('magic_quotes_gpc') ? 'On' : 'Off'); + $tpl->assign('allow_url_fopen', ini_get('allow_url_fopen') ? 'On' : 'Off'); + $tpl->assign('fsockopen', function_exists('fsockopen') ? 'On' : 'Off'); + $tpl->assign('allow_call_time_pass_reference', ini_get('allow_call_time_pass_reference') ? 'On' : 'Off'); + $tpl->assign('post_max_size', ini_get('post_max_size')); + $tpl->assign('max_input_time', ini_get('max_input_time')); + $tpl->assign('output_buffering', ini_get('output_buffering')); + $tpl->assign('max_execution_time', ini_get('max_execution_time')); + $tpl->assign('memory_limit', ini_get('memory_limit')); + $tpl->assign('file_uploads', ini_get('file_uploads') ? 'On' : 'Off'); + $tpl->assign('upload_max_filesize', ini_get('upload_max_filesize')); + $tpl->assign('xoops_sitename', $GLOBALS['xoopsConfig']['sitename']); + } + + public function getActiveModules() + { + $module_handler = xoops_gethandler('module'); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('isactive', 1)); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + +// $tempModulesList = $module_handler->getList($criteria); + $tempModulesObj = $module_handler->getObjects($criteria); + +// sort($tempModulesList); + $activeModules = array(); + foreach ($tempModulesObj as $moduleObj) { + $activeModules[] = $moduleObj->getVar('name') . ' ' . round($moduleObj->getVar('version') / 100, 2); + } + + //sort the array + natcasesort($activeModules); + return $activeModules; + } + + public function getNonActiveModules() + { + $module_handler = xoops_gethandler('module'); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('isactive', 0)); + $criteria->setSort('name'); + $criteria->setOrder('ASC'); + +// $tempModulesList = $module_handler->getList($criteria); + $tempModulesObj = $module_handler->getObjects($criteria); + +// sort($tempModulesList); + $nonActiveModules = array(); + foreach ($tempModulesObj as $moduleObj) { + $nonActiveModules[] = $moduleObj->getVar('name') . ' ' . round($moduleObj->getVar('version') / 100, 2); + } + + //sort the array + natcasesort($nonActiveModules); + return $nonActiveModules; + } + + public function getActiveModulesList() + { + $activeModulesList = ''; + $activeModulesList .= ' \n'; + $activeModulesList .= 'Active Modules:' . ' \n'; + $activeModulesList .= '---------------' . ' \n'; + $activeModules = $this->getActiveModules(); + foreach ($activeModules as $key => $value) { + $activeModulesList .= $value . ' \n'; + } + return $activeModulesList; + } + + public function getNonActiveModulesList() + { + $nonActiveModulesList = ''; + $nonActiveModulesList .= ' \n'; + $nonActiveModulesList .= 'Deactivated Modules:' . ' \n'; + $nonActiveModulesList .= '---------------' . ' \n'; + $nonActiveModules = $this->getNonActiveModules(); + foreach ($nonActiveModules as $key => $value) { + $nonActiveModulesList .= $value . ' \n'; + } + return $nonActiveModulesList; + } + + +} Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ZeroClipboard.swf =================================================================== (Binary files differ) Index: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ZeroClipboard.swf =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ZeroClipboard.swf 2015-02-16 22:27:26 UTC (rev 12987) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ZeroClipboard.swf 2015-02-17 00:26:34 UTC (rev 12988) Property changes on: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/ZeroClipboard.swf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/index.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/index.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/index.html 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.js 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,495 @@ +/* + * zClip :: jQuery ZeroClipboard v1.1.1 + * http://steamdev.com/zclip + * + * Copyright 2011, SteamDev + * Released under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + * Date: Wed Jun 01, 2011 + */ + + +(function ($) { + + $.fn.zclip = function (params) { + + if (typeof params == "object" && !params.length) { + + var settings = $.extend({ + + path: 'ZeroClipboard.swf', + copy: null, + beforeCopy: null, + afterCopy: null, + clickAfter: true, + setHandCursor: true, + setCSSEffects: true + + }, params); + + + return this.each(function () { + + var o = $(this); + + if (o.is(':visible') && (typeof settings.copy == 'string' || $.isFunction(settings.copy))) { + + ZeroClipboard.setMoviePath(settings.path); + var clip = new ZeroClipboard.Client(); + + if($.isFunction(settings.copy)){ + o.bind('zClip_copy',settings.copy); + } + if($.isFunction(settings.beforeCopy)){ + o.bind('zClip_beforeCopy',settings.beforeCopy); + } + if($.isFunction(settings.afterCopy)){ + o.bind('zClip_afterCopy',settings.afterCopy); + } + + clip.setHandCursor(settings.setHandCursor); + clip.setCSSEffects(settings.setCSSEffects); + clip.addEventListener('mouseOver', function (client) { + o.trigger('mouseenter'); + }); + clip.addEventListener('mouseOut', function (client) { + o.trigger('mouseleave'); + }); + clip.addEventListener('mouseDown', function (client) { + + o.trigger('mousedown'); + + if(!$.isFunction(settings.copy)){ + clip.setText(settings.copy); + } else { + clip.setText(o.triggerHandler('zClip_copy')); + } + + if ($.isFunction(settings.beforeCopy)) { + o.trigger('zClip_beforeCopy'); + } + + }); + + clip.addEventListener('complete', function (client, text) { + + if ($.isFunction(settings.afterCopy)) { + + o.trigger('zClip_afterCopy'); + + } else { + if (text.length > 500) { + text = text.substr(0, 500) + "...\n\n(" + (text.length - 500) + " characters not shown)"; + } + + o.removeClass('hover'); + alert("Copied text to clipboard:\n\n " + text); + } + + if (settings.clickAfter) { + o.trigger('click'); + } + + }); + + + clip.glue(o[0], o.parent()[0]); + + $(window).bind('load resize',function(){clip.reposition();}); + + + } + + }); + + } else if (typeof params == "string") { + + return this.each(function () { + + var o = $(this); + + params = params.toLowerCase(); + var zclipId = o.data('zclipId'); + var clipElm = $('#' + zclipId + '.zclip'); + + if (params == "remove") { + + clipElm.remove(); + o.removeClass('active hover'); + + } else if (params == "hide") { + + clipElm.hide(); + o.removeClass('active hover'); + + } else if (params == "show") { + + clipElm.show(); + + } + + }); + + } + + } + + + +})(jQuery); + + + + + + + +// ZeroClipboard +// Simple Set Clipboard System +// Author: Joseph Huckaby +var ZeroClipboard = { + + version: "1.0.7", + clients: {}, + // registered upload clients on page, indexed by id + moviePath: 'ZeroClipboard.swf', + // URL to movie + nextId: 1, + // ID of next movie + $: function (thingy) { + // simple DOM lookup utility function + if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); + if (!thingy.addClass) { + // extend element with a few useful methods + thingy.hide = function () { + this.style.display = 'none'; + }; + thingy.show = function () { + this.style.display = ''; + }; + thingy.addClass = function (name) { + this.removeClass(name); + this.className += ' ' + name; + }; + thingy.removeClass = function (name) { + var classes = this.className.split(/\s+/); + var idx = -1; + for (var k = 0; k < classes.length; k++) { + if (classes[k] == name) { + idx = k; + k = classes.length; + } + } + if (idx > -1) { + classes.splice(idx, 1); + this.className = classes.join(' '); + } + return this; + }; + thingy.hasClass = function (name) { + return !!this.className.match(new RegExp("\\s*" + name + "\\s*")); + }; + } + return thingy; + }, + + setMoviePath: function (path) { + // set path to ZeroClipboard.swf + this.moviePath = path; + }, + + dispatch: function (id, eventName, args) { + // receive event from flash movie, send to client + var client = this.clients[id]; + if (client) { + client.receiveEvent(eventName, args); + } + }, + + register: function (id, client) { + // register new client to receive events + this.clients[id] = client; + }, + + getDOMObjectPosition: function (obj, stopObj) { + // get absolute coordinates for dom element + var info = { + left: 0, + top: 0, + width: obj.width ? obj.width : obj.offsetWidth, + height: obj.height ? obj.height : obj.offsetHeight + }; + + if (obj && (obj != stopObj)) { + info.left += obj.offsetLeft; + info.top += obj.offsetTop; + } + + return info; + }, + + Client: function (elem) { + // constructor for new simple upload client + this.handlers = {}; + + // unique ID + this.id = ZeroClipboard.nextId++; + this.movieId = 'ZeroClipboardMovie_' + this.id; + + // register client with singleton to receive flash events + ZeroClipboard.register(this.id, this); + + // create movie + if (elem) this.glue(elem); + } +}; + +ZeroClipboard.Client.prototype = { + + id: 0, + // unique ID for us + ready: false, + // whether movie is ready to receive events or not + movie: null, + // reference to movie object + clipText: '', + // text to copy to clipboard + handCursorEnabled: true, + // whether to show hand cursor, or default pointer cursor + cssEffects: true, + // enable CSS mouse effects on dom container + handlers: null, + // user event handlers + glue: function (elem, appendElem, stylesToAdd) { + // glue to DOM element + // elem can be ID or actual DOM element object + this.domElement = ZeroClipboard.$(elem); + + // float just above object, or zIndex 99 if dom element isn't set + var zIndex = 99; + if (this.domElement.style.zIndex) { + zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; + } + + if (typeof(appendElem) == 'string') { + appendElem = ZeroClipboard.$(appendElem); + } else if (typeof(appendElem) == 'undefined') { + appendElem = document.getElementsByTagName('body')[0]; + } + + // find X/Y position of domElement + var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem); + + // create floating DIV above element + this.div = document.createElement('div'); + this.div.className = "zclip"; + this.div.id = "zclip-" + this.movieId; + $(this.domElement).data('zclipId', 'zclip-' + this.movieId); + var style = this.div.style; + style.position = 'absolute'; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + style.width = '' + box.width + 'px'; + style.height = '' + box.height + 'px'; + style.zIndex = zIndex; + + if (typeof(stylesToAdd) == 'object') { + for (addedStyle in stylesToAdd) { + style[addedStyle] = stylesToAdd[addedStyle]; + } + } + + // style.backgroundColor = '#f00'; // debug + appendElem.appendChild(this.div); + + this.div.innerHTML = this.getHTML(box.width, box.height); + }, + + getHTML: function (width, height) { + // return HTML for movie + var html = ''; + var flashvars = 'id=' + this.id + '&width=' + width + '&height=' + height; + + if (navigator.userAgent.match(/MSIE/)) { + // IE gets an OBJECT tag + var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; + html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + protocol + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + flashvars + '"/><param name="wmode" value="transparent"/></object>'; + } else { + // all other browsers get an EMBED tag + html += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + flashvars + '" wmode="transparent" />'; + } + return html; + }, + + hide: function () { + // temporarily hide floater offscreen + if (this.div) { + this.div.style.left = '-2000px'; + } + }, + + show: function () { + // show ourselves after a call to hide() + this.reposition(); + }, + + destroy: function () { + // destroy control and floater + if (this.domElement && this.div) { + this.hide(); + this.div.innerHTML = ''; + + var body = document.getElementsByTagName('body')[0]; + try { + body.removeChild(this.div); + } catch (e) {; + } + + this.domElement = null; + this.div = null; + } + }, + + reposition: function (elem) { + // reposition our floating div, optionally to new container + // warning: container CANNOT change size, only position + if (elem) { + this.domElement = ZeroClipboard.$(elem); + if (!this.domElement) this.hide(); + } + + if (this.domElement && this.div) { + var box = ZeroClipboard.getDOMObjectPosition(this.domElement); + var style = this.div.style; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + } + }, + + setText: function (newText) { + // set text to be copied to clipboard + this.clipText = newText; + if (this.ready) { + this.movie.setText(newText); + } + }, + + addEventListener: function (eventName, func) { + // add user event listener for event + // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + if (!this.handlers[eventName]) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(func); + }, + + setHandCursor: function (enabled) { + // enable hand cursor (true), or default arrow cursor (false) + this.handCursorEnabled = enabled; + if (this.ready) { + this.movie.setHandCursor(enabled); + } + }, + + setCSSEffects: function (enabled) { + // enable or disable CSS effects on DOM container + this.cssEffects = !! enabled; + }, + + receiveEvent: function (eventName, args) { + // receive event from flash + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + + // special behavior for certain events + switch (eventName) { + case 'load': + // movie claims it is ready, but in IE this isn't always the case... + // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function + this.movie = document.getElementById(this.movieId); + if (!this.movie) { + var self = this; + setTimeout(function () { + self.receiveEvent('load', null); + }, 1); + return; + } + + // firefox on pc needs a "kick" in order to set these in certain cases + if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { + var self = this; + setTimeout(function () { + self.receiveEvent('load', null); + }, 100); + this.ready = true; + return; + } + + this.ready = true; + try { + this.movie.setText(this.clipText); + } catch (e) {} + try { + this.movie.setHandCursor(this.handCursorEnabled); + } catch (e) {} + break; + + case 'mouseover': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('hover'); + if (this.recoverActive) { + this.domElement.addClass('active'); + } + + + } + + + break; + + case 'mouseout': + if (this.domElement && this.cssEffects) { + this.recoverActive = false; + if (this.domElement.hasClass('active')) { + this.domElement.removeClass('active'); + this.recoverActive = true; + } + this.domElement.removeClass('hover'); + + } + break; + + case 'mousedown': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('active'); + } + break; + + case 'mouseup': + if (this.domElement && this.cssEffects) { + this.domElement.removeClass('active'); + this.recoverActive = false; + } + break; + } // switch eventName + if (this.handlers[eventName]) { + for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { + var func = this.handlers[eventName][idx]; + + if (typeof(func) == 'function') { + // actual function reference + func(this, args); + } else if ((typeof(func) == 'object') && (func.length == 2)) { + // PHP style object + method, i.e. [myObject, 'myMethod'] + func[0][func[1]](this, args); + } else if (typeof(func) == 'string') { + // name of function + window[func](this, args); + } + } // foreach event handler defined + } // user defined handler for event + } + +}; + Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.min.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.min.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/jquery.zclip.min.js 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,12 @@ +/* + * zClip :: jQuery ZeroClipboard v1.1.1 + * http://steamdev.com/zclip + * + * Copyright 2011, SteamDev + * Released under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + * Date: Wed Jun 01, 2011 + */ + +(function(a){a.fn.zclip=function(c){if(typeof c=="object"&&!c.length){var b=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:true,setHandCursor:true,setCSSEffects:true},c);return this.each(function(){var e=a(this);if(e.is(":visible")&&(typeof b.copy=="string"||a.isFunction(b.copy))){ZeroClipboard.setMoviePath(b.path);var d=new ZeroClipboard.Client();if(a.isFunction(b.copy)){e.bind("zClip_copy",b.copy)}if(a.isFunction(b.beforeCopy)){e.bind("zClip_beforeCopy",b.beforeCopy)}if(a.isFunction(b.afterCopy)){e.bind("zClip_afterCopy",b.afterCopy)}d.setHandCursor(b.setHandCursor);d.setCSSEffects(b.setCSSEffects);d.addEventListener("mouseOver",function(f){e.trigger("mouseenter")});d.addEventListener("mouseOut",function(f){e.trigger("mouseleave")});d.addEventListener("mouseDown",function(f){e.trigger("mousedown");if(!a.isFunction(b.copy)){d.setText(b.copy)}else{d.setText(e.triggerHandler("zClip_copy"))}if(a.isFunction(b.beforeCopy)){e.trigger("zClip_beforeCopy")}});d.addEventListener("complete",function(f,g){if(a.isFunction(b.afterCopy)){e.trigger("zClip_afterCopy")}else{if(g.length>500){g=g.substr(0,500)+"...\n\n("+(g.length-500)+" characters not shown)"}e.removeClass("hover");alert("Copied text to clipboard:\n\n "+g)}if(b.clickAfter){e.trigger("click")}});d.glue(e[0],e.parent()[0]);a(window).bind("load resize",function(){d.reposition()})}})}else{if(typeof c=="string"){return this.each(function(){var f=a(this);c=c.toLowerCase();var e=f.data("zclipId");var d=a("#"+e+".zclip");if(c=="remove"){d.remove();f.removeClass("active hover")}else{if(c=="hide"){d.hide();f.removeClass("active hover")}else{if(c=="show"){d.show()}}}})}}}})(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c<e.length;c++){if(e[c]==d){b=c;c=e.length}}if(b>-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};if(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id="zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,f){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;try{this.movie.setText(this.clipText)}catch(h){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(h){}break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b<a;b++){var g=this.handlers[d][b];if(typeof(g)=="function"){g(this,f)}else{if((typeof(g)=="object")&&(g.length==2)){g[0][g[1]](this,f)}else{if(typeof(g)=="string"){window[g](this,f)}}}}}}}; \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/xoopssysteminfo.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/xoopssysteminfo.js (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/js/systeminfo/xoopssysteminfo.js 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,23 @@ +/** + * Created by mamba on 2015-02-16. + * source: http://www.steamdev.com/zclip + */ +$(document).ready(function () { + + $("a#copy-callbacks").zclip({ + path: 'modules/system/js/systeminfo/ZeroClipboard.swf', +// copy:$('#callback-paragraph').text(), + + copy: systemInformation, + + beforeCopy: function () { + $('#callback-paragraph').css('background', 'yellow'); + $(this).css('color', 'orange'); + }, + afterCopy: function () { + $('#callback-paragraph').css('background', 'green'); + $(this).css('color', 'purple'); + $(this).next('.check').show(); + } + }); +}); Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,339 @@ +<?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. + */ + +xoops_load('gui', 'system'); + +/* + * Xoops Cpanel default GUI class + * + * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org) + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package system + * @usbpackage GUI + * @since 2.4 + * @author Mamba XXXXXXXXXXXXXXXXXXX + * @author Mojtabajml <jam...@gm...> + * @author Voltan <djv...@gm...> + * @author BitC3R0 <Bi...@gm...> + * @author trabis <lus...@gm...> + * @version 1.2 + * @version $Id: default.php 12852 2014-11-17 03:34:31Z rgriffith $ + */ + +/** + * Class XoopsGuiDefault + */ + +class XoopsGuiDefault extends XoopsSystemGui +{ + + /** + * + */ + function __construct() + { + } + + function XoopsGuiDefault() + { + $this->__construct(); + } + + /** + * @return bool + */ + function validate() + { + return true; + } + + function header() + { + parent::header(); + + global $xoopsConfig, $xoopsUser, $xoopsModule, $xoTheme, $xoopsTpl; + $tpl =& $this->template; + + $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/styleswitch.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/formenu.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/menu.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tooltip.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tabs.jquery.tools.min.js'); + + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css' ); + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/dark.css', array('title' => 'dark', 'media' => 'screen')); + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/silver.css', array('title' => 'silver', 'media' => 'screen')); + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/orange.css', array('title' => 'orange', 'media' => 'screen')); + + $tpl->assign('lang_cp', _CPHOME); + //start system overview + +//mamba ------------- start ----------------- + + include_once __DIR__ . '/../../class/XoopsSystemInfo.php'; + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/../js/systeminfo/jquery.zclip.min.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/../js/systeminfo/xoopssysteminfo.js'); + + $systemInfo = new XoopsSystemInfo; + $systemInfo->assignSystemInfoValuesToSmarty($tpl); + $systemInformation = $systemInfo->getSystemInfoValues(); + $systemInformation .= $systemInfo->getActiveModulesList(); + $systemInformation .= $systemInfo->getNonActiveModulesList(); + ?> + <script type="text/javascript"> + var systemInformation = "<?php echo $systemInformation ?>"; + </script> + <?php + + + //$tpl->assign('lang_xoops_version', XOOPS_VERSION); + +// $tpl->assign('lang_php_vesion', PHP_VERSION); +// $tpl->assign('lang_mysql_version', mysql_get_server_info()); +// $tpl->assign('lang_server_api', PHP_SAPI); +// $tpl->assign('lang_os_name', PHP_OS); +// $tpl->assign('safe_mode', ini_get( 'safe_mode' ) ? 'On' : 'Off'); +// $tpl->assign('register_globals', ini_get( 'register_globals' ) ? 'On' : 'Off'); +// $tpl->assign('magic_quotes_gpc', ini_get( 'magic_quotes_gpc' ) ? 'On' : 'Off'); +// $tpl->assign('allow_url_fopen', ini_get( 'allow_url_fopen' ) ? 'On' : 'Off'); +// $tpl->assign('fsockopen', function_exists( 'fsockopen' ) ? 'On' : 'Off'); +// $tpl->assign('allow_call_time_pass_reference', ini_get( 'allow_call_time_pass_reference' ) ? 'On' : 'Off'); +// $tpl->assign('post_max_size', ini_get( 'post_max_size' )); +// $tpl->assign('max_input_time', ini_get( 'max_input_time' )); +// $tpl->assign('output_buffering', ini_get( 'output_buffering' )); +// $tpl->assign('max_execution_time', ini_get( 'max_execution_time' )); +// $tpl->assign('memory_limit', ini_get( 'memory_limit' )); +// $tpl->assign('file_uploads', ini_get( 'file_uploads' ) ? 'On' : 'Off'); +// $tpl->assign('upload_max_filesize', ini_get( 'upload_max_filesize' )); +// $tpl->assign('xoops_sitename', $xoopsConfig['sitename']); + +//mamba ------------- end ----------------- + + + // ADD MENU ***************************************** + + //Add CONTROL PANEL Menu items + $menu = array(); + $menu[0]['link'] = XOOPS_URL; + $menu[0]['title'] = _YOURHOME; + $menu[0]['absolute'] = 1; + $menu[1]['link'] = XOOPS_URL . '/admin.php?xoopsorgnews=1'; + $menu[1]['title'] = _OXYGEN_NEWS; + $menu[1]['absolute'] = 1; + $menu[1]['icon'] = XOOPS_ADMINTHEME_URL . '/default/images/xoops.png'; + $menu[2]['link'] = XOOPS_URL . '/user.php?op=logout'; + $menu[2]['title'] = _LOGOUT; + $menu[2]['absolute'] = 1; + $menu[2]['icon'] = XOOPS_ADMINTHEME_URL . '/default/images/logout.png'; + $tpl->append('navitems', array('link' => XOOPS_URL . '/admin.php', 'text' => _CPHOME, 'menu' => $menu)); + + //add SYSTEM Menu items + include __DIR__ . '/menu.php'; + if (empty($xoopsModule) || 'system' == $xoopsModule->getVar('dirname', 'n')) { + $modpath = XOOPS_URL . '/admin.php'; + $modname = _OXYGEN_SYSOPTIONS; + $modid = 1; + $moddir = 'system'; + + $mod_options = $adminmenu; + foreach (array_keys($mod_options) as $item) { + $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? XOOPS_URL . '/modules/'.$moddir.'/' . $mod_options[$item]['link'] : $mod_options[$item]['link']; + $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : XOOPS_ADMINTHEME_URL . '/default/' . $mod_options[$item]['icon']; + unset($mod_options[$item]['icon_small']); + } + } else { + $moddir = $xoopsModule->getVar('dirname', 'n'); + $modpath = XOOPS_URL . '/modules/' . $moddir; + $modname = $xoopsModule->getVar('name'); + $modid = $xoopsModule->getVar('mid'); + + $mod_options = $xoopsModule->getAdminMenu(); + foreach (array_keys($mod_options) as $item) { + $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link']; + $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon']; + } + } + + $tpl->assign('mod_options', $mod_options); + $tpl->assign('modpath', $modpath); + $tpl->assign('modname', $modname); + $tpl->assign('modid', $modid); + $tpl->assign('moddir', $moddir); + + // add MODULES Menu items + $module_handler =& xoops_gethandler('module'); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('hasadmin', 1)); + $criteria->add(new Criteria('isactive', 1)); + $criteria->setSort('mid'); + $mods = $module_handler->getObjects($criteria); + + $menu = array(); + $moduleperm_handler =& xoops_gethandler('groupperm'); + foreach ($mods as $mod) { + $rtn = array(); + $modOptions = array(); //add for sub menus + $sadmin = $moduleperm_handler->checkRight('module_admin', $mod->getVar('mid'), $xoopsUser->getGroups()); + if ($sadmin) { + $info = $mod->getInfo(); + if (!empty($info['adminindex'])) { + $rtn['link'] = XOOPS_URL . '/modules/'. $mod->getVar('dirname', 'n') . '/' . $info['adminindex']; + } else { + $rtn['link'] = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->getVar('mid'); + } + $rtn['title'] = htmlspecialchars($mod->name(), ENT_QUOTES); + $rtn['absolute'] = 1; + $rtn['url'] = XOOPS_URL . '/modules/'. $mod->getVar('dirname', 'n') . '/'; //add for sub menus + $modOptions = $mod->getAdminMenu(); //add for sub menus + $rtn['options'] = $modOptions; //add for sub menus + + if (isset($info['icon']) && $info['icon'] != '' ) { + $rtn['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info['icon']; + } + $menu[] = $rtn; + } + + } + $tpl->append('navitems', array('link' => XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin', + 'text' => _AM_SYSTEM_MODULES, 'dir' => $mod->getVar('dirname', 'n'), 'menu' => $menu)); + + // add preferences menu + $menu = array(); + + $OPT = array(); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=1', + 'title' => _OXYGEN_GENERAL, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=2', + 'title' => _OXYGEN_USERSETTINGS, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=3', + 'title' => _OXYGEN_METAFOOTER, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=4', + 'title' => _OXYGEN_CENSOR, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=5', + 'title' => _OXYGEN_SEARCH, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=6', + 'title' => _OXYGEN_MAILER, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=show&confcat_id=7', + 'title' => _OXYGEN_AUTHENTICATION, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + $OPT[] = array( + 'link' => 'admin.php?fct=preferences&op=showmod&mod=1', + 'title' => _OXYGEN_MODULESETTINGS, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/icons/prefs_small.png'); + + $menu[] = array( + 'link' => XOOPS_URL . '/modules/system/admin.php?fct=preferences', + 'title' => _OXYGEN_SYSOPTIONS, + 'absolute' => 1, + 'url' => XOOPS_URL . '/modules/system/', + 'options' => $OPT); + + foreach ($mods as $mod) { + $rtn = array(); + $sadmin = $moduleperm_handler->checkRight('module_admin', $mod->getVar('mid'), $xoopsUser->getGroups()); + if ($sadmin && ($mod->getVar('hasnotification') || is_array($mod->getInfo('config')) || is_array($mod->getInfo('comments')))) { + $rtn['link'] = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->getVar('mid'); + $rtn['title'] = htmlspecialchars($mod->name(), ENT_QUOTES); + $rtn['absolute'] = 1; + $rtn['icon'] = XOOPS_ADMINTHEME_URL . '/gui/oxygen/icons/prefs_small.png'; + $menu[] = $rtn; + } + } + $tpl->append('navitems', array('link' => XOOPS_URL . '/modules/system/admin.php?fct=preferences', 'text' => _OXYGEN_SITEPREF, 'dir' => $mod->getVar('dirname', 'n'), 'menu' => $menu)); + + //add OPTIONS/Links Menu Items + $menu = array(); + $menu[] = array( + 'link' => 'http://sourceforge.net/projects/xoops/', + 'title' => _OXYGEN_XOOPSPROJECT, + 'absolute' => 1); + $menu[] = array( + 'link' => 'http://xoops.org', + 'title' => _OXYGEN_WEBSITE, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/images/xoops.png'); + $menu[] = array( + 'link' => 'http://www.xoops.org/modules/repository/', + 'title' => _OXYGEN_XOOPSMODULES, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/images/xoops.png'); + $menu[] = array( + 'link' => 'http://www.xoops.org/modules/extgallery/', + 'title' => _OXYGEN_XOOPSTHEMES, + 'absolute' => 1, + 'icon' => XOOPS_ADMINTHEME_URL . '/default/images/tweb.png'); + + $tpl->append('navitems', array('link' => XOOPS_URL . '/admin.php','text' => _OXYGEN_INTERESTSITES, 'menu' => $menu)); + + //add OPTIONS/links for local support + if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/default/language/' . $xoopsConfig['language'] . '/localsupport.php' )) { + $links = include XOOPS_ADMINTHEME_PATH . '/default/language/' . $xoopsConfig['language'] . '/localsupport.php'; + if ( count($links) > 0 ) { + $tpl->append('navitems', array('link' => XOOPS_URL . '/admin.php','text' => _OXYGEN_LOCALSUPPORT, 'menu' => $links)); + } + } + + if (is_object($xoopsModule) || !empty($_GET['xoopsorgnews'])) { + if (is_object($xoopsModule) && file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/' . $xoopsModule->getInfo('adminmenu'))) { + include $file; + } + + return; + } + + foreach ($mods as $mod) { + + $sadmin = $moduleperm_handler->checkRight ( 'module_admin', $mod->getVar ( 'mid' ), $xoopsUser->getGroups () ); + if ($sadmin) { + $rtn = array (); + $info = $mod->getInfo (); + if (! empty ( $info ['adminindex'] )) { + $rtn ['link'] = XOOPS_URL . '/modules/' . $mod->getVar ( 'dirname', 'n' ) . '/' . $info ['adminindex']; + } else { + $rtn ['link'] = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mod->getVar ( 'mid' ); + } + $rtn ['title'] = htmlspecialchars($mod->getVar ('name'), ENT_QUOTES); + $rtn ['description'] = $mod->getInfo('description'); + $rtn ['absolute'] = 1; + if (isset ( $info ['icon_big'] )) { + $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar ( 'dirname', 'n' ) . '/' . $info ['icon_big']; + } elseif (isset ( $info ['image'] )) { + $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar ( 'dirname', 'n' ) . '/' . $info ['image']; + } + + $tpl->append ( 'modules', $rtn ); + } + + } + } +} Added: XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php_original =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php_original (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_hack_systeminfo/htdocs/modules/system/themes/default/default.php_original 2015-02-17 00:26:34 UTC (rev 12988) @@ -0,0 +1,315 @@ +<?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. + */ + +xoops_load('gui', 'system'); + +/* + * Xoops Cpanel default GUI class + * + * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org) + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @package system + * @usbpackage GUI + * @since 2.4 + * @author Mamba XXXXXXXXXXXXXXXXXXX + * @author Mojtabajml <jam...@gm...> + * @author Voltan <djv...@gm...> + * @author BitC3R0 <Bi...@gm...> + * @author trabis <lus...@gm...> + * @version 1.2 + * @version $Id: default.php 12852 2014-11-17 03:34:31Z rgriffith $ + */ + +/** + * Class XoopsGuiDefault + */ +class XoopsGuiDefault extends XoopsSystemGui +{ + + /** + * + */ + function __construct() + { + } + + function XoopsGuiDefault() + { + $this->__construct(); + } + + /** + * @return bool + */ + function validate() + { + return true; + } + + function header() + { + parent::header(); + + global $xoopsConfig, $xoopsUser, $xoopsModule, $xoTheme, $xoopsTpl; + $tpl =& $this->template; + + $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/styleswitch.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/formenu.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/menu.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tooltip.js'); + $xoTheme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tabs.jquery.tools.min.js'); + + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css' ); + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/dark.css', array('title' => 'dark', 'media' => 'screen')); + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/silver.css', array('title' => 'silver', 'media' => 'screen')); + $xoTheme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/orange.css', array('title' => 'orange', 'media' => 'screen')); + + $tpl->assign('lang_cp', _CPHOME); + //start system overview + //$tpl->assign('lang_xoops_version', XOOPS_VERSION); + $tpl->assign('lang_php_vesion', PHP_VERSION); + $tpl->assign('lang_mysql_version', mysql_get_server_info()); + $tpl->assign('lang_server_api', PHP_SAPI); + $tpl->assign('lang_os_name', PHP_OS); + $tpl->assign('safe_mode', ini_get( 'safe_mode' ) ? 'On' : 'Off'); + $tpl->assign('register_globals', ini_get( 'register_globals' ) ? 'On' : 'Off'); + $tpl->assign('magic_quotes_gpc', ini_get( 'magic_quotes_gpc' ) ? 'On' : 'Off'); + $tpl->assign('allow_url_fopen', ini_get( 'allow_url_fopen' ) ? 'On' : 'Off'); + $tpl->assign('fsockopen', function_exists( 'fsockopen' ) ? 'On' : 'Off'); + $tpl->assign('allow_call_time_pass_reference', ini_get( 'allow_call_time_pass_reference' ) ? ... [truncated message content] |
From: <txm...@us...> - 2015-02-16 22:27:34
|
Revision: 12987 http://sourceforge.net/p/xoops/svn/12987 Author: txmodxoops Date: 2015-02-16 22:27:26 +0000 (Mon, 16 Feb 2015) Log Message: ----------- Pagination with bootstrap 3.3.2 in ul tag and not in div tag Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_pagenav.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/system_pagenav.html Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php 2015-02-16 19:20:02 UTC (rev 12986) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php 2015-02-16 22:27:26 UTC (rev 12987) @@ -47,6 +47,8 @@ $xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/admin.css'); $xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); // Define scripts +$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.min.js'); +$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery-ui.min.js'); $xoTheme->addScript('modules/system/js/admin.js'); // Define Breadcrumb and tips $xoBreadCrumb->addLink( _AM_SYSTEM_USERS_NAV_MAIN, system_adminVersion('users', 'adminpath') ); @@ -321,11 +323,11 @@ default: // Search and Display // Define scripts - $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); - $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); + //$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); + //$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); //table sorting does not work with select boxes //$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.tablesorter.js'); - $xoTheme->addScript('modules/system/js/admin.js'); + //$xoTheme->addScript('modules/system/js/admin.js'); //Recherche approfondie if (isset($_REQUEST['complet_search'])) { Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_pagenav.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_pagenav.html 2015-02-16 19:20:02 UTC (rev 12986) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_pagenav.html 2015-02-16 22:27:26 UTC (rev 12987) @@ -1,6 +1,6 @@ <{if $pagination_nav}> -<div class="pagination<{$size}><{$align}>"> - <ul> +<div class="pull-right"> + <ul class="pagination"> <{if $prev_text}> <li class="previous"><a href="<{$prev_url}>"><{$prev_text}></a></li> <{/if}> @@ -26,7 +26,7 @@ </div> <{/if}> <{if $pagination_select}> -<div class="pagination<{$align}>"> +<div class="pull-right"> <form class="form-inline" action="" name="pagenavform"> <{if $showbutton == 1}> <div class="input-append"> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/system_pagenav.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/system_pagenav.html 2015-02-16 19:20:02 UTC (rev 12986) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/system_pagenav.html 2015-02-16 22:27:26 UTC (rev 12987) @@ -1,6 +1,6 @@ <{if $pagination_nav}> -<div class="pagination<{$size}><{$align}>"> - <ul> +<div class="pull-right"> + <ul class="pagination"> <{if $prev_text}> <li class="previous"><a href="<{$prev_url}>"><{$prev_text}></a></li> <{/if}> @@ -26,7 +26,7 @@ </div> <{/if}> <{if $pagination_select}> -<div class="pagination<{$align}>"> +<div class="pull-right"> <form class="form-inline" action="" name="pagenavform"> <{if $showbutton == 1}> <div class="input-append"> |
From: <txm...@us...> - 2015-02-16 19:20:04
|
Revision: 12986 http://sourceforge.net/p/xoops/svn/12986 Author: txmodxoops Date: 2015-02-16 19:20:02 +0000 (Mon, 16 Feb 2015) Log Message: ----------- Updated Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/extras/ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/system_filemanager.html XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/index.html Added: XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/index.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/index.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/index.html 2015-02-16 19:20:02 UTC (rev 12986) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/index.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/index.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/index.html 2015-02-16 19:20:02 UTC (rev 12986) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/system_filemanager.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/system_filemanager.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/admin/system_filemanager.html 2015-02-16 19:20:02 UTC (rev 12986) @@ -0,0 +1,74 @@ +<!-- Filemanager --> +<{includeq file="db:system_header.html"}> +<{if $index}> +<br /><div class="ui-tabs ui-widget ui-widget-content ui-corner-all"> + <table class="table table-bordered"> + <thead> + <tr> + <th><{$smarty.const._AM_SYSTEM_FILEMANAGER_DIRECTORY}></th> + <th><{$smarty.const._AM_SYSTEM_FILEMANAGER_FILES}></th> + </tr> + </thead> + <tbody> + <tr> + <td class="aligntop width10"> + <div id="fileTree" class="display_folder"></div> + </td> + <td class="aligntop"> + <div class="edit_file" id="edit_file"></div> + <div class="upload_file" id="upload_file"></div> + <div id='loading' align="center" style="display:none;"><br /><br /><img src="./images/loading.gif" title="Loading" alt="Loading" /></div> + <div class="display_file" id="display_file"> + <div class="xo-btn-actions"> + <div class="xo-buttons"> + <button class="ui-corner-all" type="button" onclick="filemanager_load_tree();filemanager_display_file('', 0)" title="<{$smarty.const._AM_SYSTEM_FILEMANAGER_HOME}>"> + <img src="<{xoAdminIcons home.png}>" alt="<{$smarty.const._AM_SYSTEM_FILEMANAGER_HOME}>" /> + </button> + <button class="ui-corner-all" type="button" onclick="filemanager_add_directory('')" title="<{$smarty.const._AM_SYSTEM_FILEMANAGER_ADDDIR}>"> + <img src="<{xoAdminIcons folder_add.png}>" alt="<{$smarty.const._AM_SYSTEM_FILEMANAGER_ADDDIR}>" /> + </button> + <button class="ui-corner-all" type="button" onclick="filemanager_add_file('')" title="<{$smarty.const._AM_SYSTEM_FILEMANAGER_ADDFILE}>"> + <img src="<{xoAdminIcons add.png}>" alt="<{$smarty.const._AM_SYSTEM_FILEMANAGER_ADDFILE}>" /> + </button> + <button class="ui-corner-all" type="button" onclick="filemanager_upload('')" title="<{$smarty.const._AM_SYSTEM_FILEMANAGER_UPLOAD}>"> + <img src="<{xoAdminIcons upload.png}>" alt="<{$smarty.const._AM_SYSTEM_FILEMANAGER_UPLOAD}>" /> + </button> + </div> + <div class="clear"> </div> + </div> + <table class="table table-bordered"> + <tbody> + <tr> + <{foreach item=files from=$files}> + <td align="center" width="<{$width}>%"> + <div style="border: 1px solid #cccccc; "> + <table class="table table-striped"> + <tbody> + <tr class="odd"> + <td align="left"><{$files.chmod}></td> + <td align="right"><{if $files.edit}><img class='cursorpointer' src="<{xoAdminIcons edit.png}>" onclick='filemanager_edit_file("<{$files.path_file}>", "<{$files.path}>", "<{$files.file}>", "<{$files.extension}>");' width='16' alt='edit' /><{/if}> <img class='cursorpointer' src="<{xoAdminIcons delete.png}>" onclick='filemanager_confirm_delete_file("<{$files.path_file}>", "<{$files.path}>", "<{$files.file}>");' width='16' alt='delete' /></td> + </tr> + <tr> + <td colspan="2" class="center" height="60px"><br /><{$files.img}><br /><span title="<{$files.file}>">Mouse Hover</span><br /></td> + </tr> + </tbody> + </table> + </div> + </td> + <{if $files.newline}> + </tr> + <tr> + <{/if}> + <{/foreach}> + </tr> + </tbody> + </table> + </div><br /> + <div id='confirm_delete' align="center" style="display:none;"></div> + </td> + </tr> + </tbody> + </table> + <br class="clear"> +</div> +<{/if}> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/index.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/index.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/extras/modules/system/templates/index.html 2015-02-16 19:20:02 UTC (rev 12986) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html 2015-02-16 19:07:35 UTC (rev 12985) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html 2015-02-16 19:20:02 UTC (rev 12986) @@ -86,7 +86,8 @@ </div> </a> <ul class="dropdown-menu dropdown-user"> - <li><a href="<{xoAppUrl modules/profile/admin/user.php}>"><i class="fa fa-user fa-fw"></i> User Profile</a></li> + <li><a href="<{xoAppUrl /}>"><i class="fa fa-home fa-fw"></i> Home Page</a></li> + <li><a href="<{xoAppUrl modules/profile/admin/user.php}>"><i class="fa fa-user fa-fw"></i> User Profile</a></li> <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=2}>"><i class="fa fa-gear fa-fw"></i> Settings</a></li> <li class="divider"></li> <li><a href="<{xoAppUrl user.php?op=logout}>"><i class="fa fa-sign-out fa-fw"></i> Logout</a></li> |
From: <luc...@us...> - 2015-02-16 19:07:52
|
Revision: 12985 http://sourceforge.net/p/xoops/svn/12985 Author: luciorota Date: 2015-02-16 19:07:35 +0000 (Mon, 16 Feb 2015) Log Message: ----------- update PHPMailer update html2text fixed bug in text decoding Modified Paths: -------------- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/accounts.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/letter.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/template.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.task.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/html2text.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/PHPMailerAutoload.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/class.phpmailer.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/class.pop3.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/class.smtp.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/extras/EasyPeasyICS.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/extras/README.md XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/extras/htmlfilter.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/extras/ntlm_sasl_client.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ar.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-be.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-br.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ca.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ch.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-cz.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-de.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-dk.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-el.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-eo.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-es.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-et.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-fa.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-fi.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-fo.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-fr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-gl.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-he.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-hr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-hu.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-it.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ja.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ka.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-lt.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-lv.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-nl.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-no.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-pl.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-pt.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ro.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ru.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-se.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-sk.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-sr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-tr.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-uk.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-vi.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-zh.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-zh_cn.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/letter.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/xoops_version.php Added Paths: ----------- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/README.md XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2Text.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2TextException.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-az.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-id.php XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/language/phpmailer.lang-ms.php Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/accounts.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/accounts.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/accounts.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -200,6 +200,7 @@ imap_close($mbox); } echo "</table>"; + include_once __DIR__ . '/admin_footer.php'; break; case 'list': Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/letter.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/letter.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/letter.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -98,7 +98,7 @@ echo $htmlBody; echo "</div>"; echo "<div style='padding:10px; margin:0px; border:1px solid black; font-family: monospace;'>"; - echo nl2br(utf8_encode($textBody)); + echo nl2br(utf8_decode($textBody)); echo "</div>"; echo "</div>"; include_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/template.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/template.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/admin/template.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -87,7 +87,7 @@ echo $htmlBody; echo "</div>"; echo "<div style='padding:10px;border:1px solid black; font-family: monospace;'>"; - echo nl2br(utf8_encode($textBody)); + echo nl2br(utf8_decode($textBody)); echo "</div>"; echo "</div>"; include_once __DIR__ . '/admin_footer.php'; Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -555,7 +555,7 @@ $htmlBody = $letterTpl->fetch($template); } $textBody = xnewsletter_html2text($htmlBody); // new from v1.3 - //$textBody = mb_convert_encoding($textBody, 'ISO-8859-1', _CHARSET); // "text/plain; charset=us-ascii" [http://www.w3.org/Protocols/rfc1341/7_1_Text.html] + $textBody = mb_convert_encoding($textBody, 'ISO-8859-1', _CHARSET); // "text/plain; charset=us-ascii" [http://www.w3.org/Protocols/rfc1341/7_1_Text.html] // get letter attachments as attachment $attachmentAsAttachmentCriteria = new CriteriaCompo(); @@ -591,7 +591,7 @@ $mail->Subject = html_entity_decode($letter_title, ENT_QUOTES); $mail->AddAddress($letterObj->getVar('letter_email_test'), _AM_XNEWSLETTER_SUBSCR_FIRSTNAME_PREVIEW . " " . _AM_XNEWSLETTER_SUBSCR_LASTNAME_PREVIEW); - $mail->MsgHTML($htmlBody); // $mail->Body = $htmlBody; + $mail->Body = $htmlBody; $mail->AltBody = $textBody; foreach ($attachmentsPath as $attachmentPath) { Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.task.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.task.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/functions.task.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -373,10 +373,10 @@ $htmlBody = $letterTpl->fetch($template); } $textBody = xnewsletter_html2text($htmlBody); // new from v1.3 - //$textBody = mb_convert_encoding($textBody, 'ISO-8859-1', _CHARSET); // "text/plain; charset=us-ascii" [http://www.w3.org/Protocols/rfc1341/7_1_Text.html] + $textBody = mb_convert_encoding($textBody, 'ISO-8859-1', _CHARSET); // "text/plain; charset=us-ascii" [http://www.w3.org/Protocols/rfc1341/7_1_Text.html] $mail->AddAddress($recipient['address'], $recipient['firstname'] . ' ' . $recipient['lastname']); - $mail->MsgHTML($htmlBody); // $mail->Body = $htmlBody; + $mail->Body = $htmlBody; $mail->AltBody = $textBody; foreach ($attachmentsPath as $attachmentPath) { Added: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/README.md =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/README.md (rev 0) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/README.md 2015-02-16 19:07:35 UTC (rev 12985) @@ -0,0 +1,71 @@ +html2text +========= + +html2text is a very simple script that uses PHP's DOM methods to load from HTML, and then iterates over the resulting DOM to correctly output plain text. For example: + +```html +<html> +<title>Ignored Title</title> +<body> + <h1>Hello, World!</h1> + + <p>This is some e-mail content. + Even though it has whitespace and newlines, the e-mail converter + will handle it correctly. + + <p>Even mismatched tags.</p> + + <div>A div</div> + <div>Another div</div> + <div>A div<div>within a div</div></div> + + <a href="http://foo.com">A link</a> + +</body> +</html> +``` + +Will be converted into: + +```text +Hello, World! + +This is some e-mail content. Even though it has whitespace and newlines, the e-mail converter will handle it correctly. + +Even mismatched tags. +A div +Another div +A div +within a div +[A link](http://foo.com) +``` + +See the [original blog post](http://journals.jevon.org/users/jevon-phd/entry/19818) or the related [StackOverflow answer](http://stackoverflow.com/a/2564472/39531). + +## Installing + +You can use [Composer](http://getcomposer.org/) to add the [package](https://packagist.org/packages/soundasleep/html2text) to your project: + +```json +{ + "require": { + "soundasleep/html2text": "~0.2" + } +} +``` + +And then use it quite simply: + +```php +$text = Html2Text\Html2Text::convert($html); +``` + +You can also include the supplied `html2text.php` and use `$text = convert_html_to_text($html);` instead. + +## Tests + +Some very basic tests are provided in the `tests/` directory. Run them with `composer install --dev && vendor/bin/phpunit`. + +## License + +`html2text` is dual licensed under both [EPL v1.0](https://www.eclipse.org/legal/epl-v10.html) and [LGPL v3.0](http://www.gnu.org/licenses/lgpl.html), making it suitable for both Eclipse and GPL projects. Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/html2text.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/html2text.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/html2text.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -6,262 +6,27 @@ * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * + * or + * + * LGPL which is available at http://www.gnu.org/licenses/lgpl.html + * + * * Contributors: * Jevon Wright - initial API and implementation ****************************************************************************/ /** - * Tries to convert the given HTML into a plain text format - best suited for - * e-mail display, etc. - * - * <p>In particular, it tries to maintain the following features: - * <ul> - * <li>Links are maintained, with the 'href' copied over - * <li>Information in the <head> is lost - * </ul> - * - * @param the $html - * - * @throws Html2TextException - * @internal param \the $html input HTML - * @return the HTML converted, as best as possible, to text + * This file is available if you still want to use functions rather than + * autoloading classes. */ -function convert_html_to_text($html) -{ - $html = fix_newlines($html); - $doc = new DOMDocument(); - if (!$doc->loadHTML($html)) { - throw new Html2TextException("Could not load HTML - badly formed?", $html); - } +require_once(__DIR__ . "/src/Html2Text.php"); +require_once(__DIR__ . "/src/Html2TextException.php"); - $output = iterate_over_node($doc); - - // remove leading and trailing spaces on each line - $output = preg_replace("/[ \t]*\n[ \t]*/im", "\n", $output); - - // remove leading and trailing whitespace - $output = trim($output); - - return $output; +function convert_html_to_text($html) { + return Html2Text\Html2Text::convert($html); } -/** - * Unify newlines; in particular, \r\n becomes \n, and - * then \r becomes \n. This means that all newlines (Unix, Windows, Mac) - * all become \ns. - * - * @param text text with any number of \r, \r\n and \n combinations - * - * @return the fixed text - */ -function fix_newlines($text) -{ - // replace \r\n to \n - $text = str_replace("\r\n", "\n", $text); - // remove \rs - $text = str_replace("\r", "\n", $text); - - return $text; +function fix_newlines($text) { + return Html2Text\Html2Text::fixNewlines($text); } - -/** - * @param $node - * - * @return null|string - */ -function next_child_name($node) -{ - // get the next child - $nextNode = $node->nextSibling; - while ($nextNode != null) { - if ($nextNode instanceof DOMElement) { - break; - } - $nextNode = $nextNode->nextSibling; - } - $nextName = null; - if ($nextNode instanceof DOMElement && $nextNode != null) { - $nextName = strtolower($nextNode->nodeName); - } - - return $nextName; -} - -/** - * @param $node - * - * @return null|string - */ -function prev_child_name($node) -{ - // get the previous child - $nextNode = $node->previousSibling; - while ($nextNode != null) { - if ($nextNode instanceof DOMElement) { - break; - } - $nextNode = $nextNode->previousSibling; - } - $nextName = null; - if ($nextNode instanceof DOMElement && $nextNode != null) { - $nextName = strtolower($nextNode->nodeName); - } - - return $nextName; -} - -/** - * @param $node - * - * @return string - */ -function iterate_over_node($node) -{ - if ($node instanceof DOMText) { - return preg_replace("/\\s+/im", " ", $node->wholeText); - } - if ($node instanceof DOMDocumentType) { - // ignore - return ""; - } - - $nextName = next_child_name($node); - $prevName = prev_child_name($node); - - $name = strtolower($node->nodeName); - - // start whitespace - switch ($name) { - case "hr": - return "------\n"; - - case "style": - case "head": - case "title": - case "meta": - case "script": - // ignore these tags - return ""; - - case "h1": - case "h2": - case "h3": - case "h4": - case "h5": - case "h6": - // add two newlines - $output = "\n"; - break; - - case "p": - case "div": - // add one line - $output = "\n"; - break; - - default: - // print out contents of unknown tags - $output = ""; - break; - } - - // debug - //$output .= "[$name,$nextName]"; - - for ($i = 0; $i < $node->childNodes->length; ++$i) { - $n = $node->childNodes->item($i); - - $text = iterate_over_node($n); - - $output .= $text; - } - - // end whitespace - switch ($name) { - case "style": - case "head": - case "title": - case "meta": - case "script": - // ignore these tags - return ""; - - case "h1": - case "h2": - case "h3": - case "h4": - case "h5": - case "h6": - $output .= "\n"; - break; - - case "p": - case "br": - // add one line - if ($nextName != "div") { - $output .= "\n"; - } - break; - - case "div": - // add one line only if the next child isn't a div - if ($nextName != "div" && $nextName != null) { - $output .= "\n"; - } - break; - - case "a": - // links are returned in [text](link) format - $href = $node->getAttribute("href"); - if ($href == null) { - // it doesn't link anywhere - if ($node->getAttribute("name") != null) { - $output = "[$output]"; - } - } else { - if ($href == $output) { - // link to the same address: just use link - $output; - } else { - // replace it - $output = "[$output]($href)"; - } - } - - // does the next node require additional whitespace? - switch ($nextName) { - case "h1": - case "h2": - case "h3": - case "h4": - case "h5": - case "h6": - $output .= "\n"; - break; - } - - default: - // do nothing - } - - return $output; -} - -/** - * Class Html2TextException - */ -class Html2TextException extends Exception -{ - var $more_info; - - /** - * @param string $message - * @param string $more_info - */ - public function __construct($message = "", $more_info = "") - { - parent::__construct($message); - $this->more_info = $more_info; - } -} Added: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2Text.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2Text.php (rev 0) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2Text.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -0,0 +1,240 @@ +<?php +/****************************************************************************** + * Copyright (c) 2010 Jevon Wright and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * or + * + * LGPL which is available at http://www.gnu.org/licenses/lgpl.html + * + * + * Contributors: + * Jevon Wright - initial API and implementation + ****************************************************************************/ + +namespace Html2Text; + +class Html2Text { + + /** + * Tries to convert the given HTML into a plain text format - best suited for + * e-mail display, etc. + * + * <p>In particular, it tries to maintain the following features: + * <ul> + * <li>Links are maintained, with the 'href' copied over + * <li>Information in the <head> is lost + * </ul> + * + * @param string html the input HTML + * @return string the HTML converted, as best as possible, to text + * @throws Html2TextException if the HTML could not be loaded as a {@link DOMDocument} + */ + static function convert($html) { + $html = static::fixNewlines($html); + + $doc = new \DOMDocument(); + if (!$doc->loadHTML($html)) { + throw new Html2TextException("Could not load HTML - badly formed?", $html); + } + + $output = static::iterateOverNode($doc); + + // remove leading and trailing spaces on each line + $output = preg_replace("/[ \t]*\n[ \t]*/im", "\n", $output); + + // remove leading and trailing whitespace + $output = trim($output); + + return $output; + } + + /** + * Unify newlines; in particular, \r\n becomes \n, and + * then \r becomes \n. This means that all newlines (Unix, Windows, Mac) + * all become \ns. + * + * @param string text text with any number of \r, \r\n and \n combinations + * @return string the fixed text + */ + static function fixNewlines($text) { + // replace \r\n to \n + $text = str_replace("\r\n", "\n", $text); + // remove \rs + $text = str_replace("\r", "\n", $text); + + return $text; + } + + static function nextChildName($node) { + // get the next child + $nextNode = $node->nextSibling; + while ($nextNode != null) { + if ($nextNode instanceof \DOMElement) { + break; + } + $nextNode = $nextNode->nextSibling; + } + $nextName = null; + if ($nextNode instanceof \DOMElement && $nextNode != null) { + $nextName = strtolower($nextNode->nodeName); + } + + return $nextName; + } + + static function prevChildName($node) { + // get the previous child + $nextNode = $node->previousSibling; + while ($nextNode != null) { + if ($nextNode instanceof \DOMElement) { + break; + } + $nextNode = $nextNode->previousSibling; + } + $nextName = null; + if ($nextNode instanceof \DOMElement && $nextNode != null) { + $nextName = strtolower($nextNode->nodeName); + } + + return $nextName; + } + + static function iterateOverNode($node) { + if ($node instanceof \DOMText) { + // Replace whitespace characters with a space (equivilant to \s) + return preg_replace("/[\\t\\n\\f\\r ]+/im", " ", $node->wholeText); + } + if ($node instanceof \DOMDocumentType) { + // ignore + return ""; + } + + $nextName = static::nextChildName($node); + $prevName = static::prevChildName($node); + + $name = strtolower($node->nodeName); + + // start whitespace + switch ($name) { + case "hr": + return "------\n"; + + case "style": + case "head": + case "title": + case "meta": + case "script": + // ignore these tags + return ""; + + case "h1": + case "h2": + case "h3": + case "h4": + case "h5": + case "h6": + // add two newlines, second line is added below + $output = "\n"; + break; + + case "td": + case "th": + // add tab char to separate table fields + $output = "\t"; + break; + + case "tr": + case "p": + case "div": + // add one line + $output = "\n"; + break; + + default: + // print out contents of unknown tags + $output = ""; + break; + } + + // debug + //$output .= "[$name,$nextName]"; + + if (isset($node->childNodes)) { + for ($i = 0; $i < $node->childNodes->length; $i++) { + $n = $node->childNodes->item($i); + + $text = static::iterateOverNode($n); + + $output .= $text; + } + } + + // end whitespace + switch ($name) { + case "style": + case "head": + case "title": + case "meta": + case "script": + // ignore these tags + return ""; + + case "h1": + case "h2": + case "h3": + case "h4": + case "h5": + case "h6": + $output .= "\n"; + break; + + case "p": + case "br": + // add one line + if ($nextName != "div") + $output .= "\n"; + break; + + case "div": + // add one line only if the next child isn't a div + if ($nextName != "div" && $nextName != null) + $output .= "\n"; + break; + + case "a": + // links are returned in [text](link) format + $href = $node->getAttribute("href"); + if ($href == null) { + // it doesn't link anywhere + if ($node->getAttribute("name") != null) { + $output = "[$output]"; + } + } else { + if ($href == $output || $href == "mailto:$output" || $href == "http://$output" || $href == "https://$output") { + // link to the same address: just use link + $output; + } else { + // replace it + $output = "[$output]($href)"; + } + } + + // does the next node require additional whitespace? + switch ($nextName) { + case "h1": case "h2": case "h3": case "h4": case "h5": case "h6": + $output .= "\n"; + break; + } + + default: + // do nothing + } + + return $output; + } + +} Added: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2TextException.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2TextException.php (rev 0) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/html2text/src/Html2TextException.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -0,0 +1,28 @@ +<?php + +/****************************************************************************** + * Copyright (c) 2010 Jevon Wright and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * or + * + * LGPL which is available at http://www.gnu.org/licenses/lgpl.html + * + * + * Contributors: + * Jevon Wright - initial API and implementation + ****************************************************************************/ + +namespace Html2Text; + +class Html2TextException extends \Exception { + var $more_info; + + public function __construct($message = "", $more_info = "") { + parent::__construct($message); + $this->more_info = $more_info; + } +} Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/PHPMailerAutoload.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/PHPMailerAutoload.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/PHPMailerAutoload.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -2,31 +2,29 @@ /** * PHPMailer SPL autoloader. * PHP Version 5 - * - * @package PHPMailer - * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project - * @author Marcus Bointon (Synchro/coolbru) <php...@sy...> - * @author Jim Jagielski (jimjag) <ji...@gm...> - * @author Andy Prevost (codeworxtech) <cod...@us...> - * @author Brent R. Matzelle (original founder) + * @package PHPMailer + * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project + * @author Marcus Bointon (Synchro/coolbru) <php...@sy...> + * @author Jim Jagielski (jimjag) <ji...@gm...> + * @author Andy Prevost (codeworxtech) <cod...@us...> + * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2014 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. */ /** * PHPMailer SPL autoloader. - * * @param string $classname The name of the class to load */ function PHPMailerAutoload($classname) { - //Can't use __DIR__ as it's only in PHP 5.3+ - $filename = __DIR__ . DIRECTORY_SEPARATOR . 'class.' . strtolower($classname) . '.php'; + //Can't use __DIR__ as it's only in PHP 5.3+ + $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; if (is_readable($filename)) { require $filename; } @@ -42,7 +40,6 @@ } else { /** * Fall back to traditional autoload for old PHP versions - * * @param string $classname The name of the class to load */ function __autoload($classname) Modified: XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/class.phpmailer.php =================================================================== --- XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/class.phpmailer.php 2015-02-16 19:00:46 UTC (rev 12984) +++ XoopsModules/xnewsletter/branches/luciorota/xnewsletter/include/phpmailer/class.phpmailer.php 2015-02-16 19:07:35 UTC (rev 12985) @@ -2,58 +2,52 @@ /** * PHPMailer - PHP email creation and transport class. * PHP Version 5 - * - * @package PHPMailer - * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project - * @author Marcus Bointon (Synchro/coolbru) <php...@sy...> - * @author Jim Jagielski (jimjag) <ji...@gm...> - * @author Andy Prevost (codeworxtech) <cod...@us...> - * @author Brent R. Matzelle (original founder) + * @package PHPMailer + * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project + * @author Marcus Bointon (Synchro/coolbru) <php...@sy...> + * @author Jim Jagielski (jimjag) <ji...@gm...> + * @author Andy Prevost (codeworxtech) <cod...@us...> + * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2014 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. */ /** * PHPMailer - PHP email creation and transport class. - * * @package PHPMailer - * @author Marcus Bointon (Synchro/coolbru) <php...@sy...> - * @author Jim Jagielski (jimjag) <ji...@gm...> - * @author Andy Prevost (codeworxtech) <cod...@us...> - * @author Brent R. Matzelle (original founder) + * @author Marcus Bointon (Synchro/coolbru) <php...@sy...> + * @author Jim Jagielski (jimjag) <ji...@gm...> + * @author Andy Prevost (codeworxtech) <cod...@us...> + * @author Brent R. Matzelle (original founder) */ class PHPMailer { /** * The PHPMailer Version number. - * * @type string */ - public $Version = '5.2.8'; + public $Version = '5.2.9'; /** * Email priority. * Options: 1 = High, 3 = Normal, 5 = low. - * * @type integer */ public $Priority = 3; /** * The character set of the message. - * * @type string */ public $CharSet = 'iso-8859-1'; /** * The MIME Content-type of the message. - * * @type string */ public $ContentType = 'text/plain'; @@ -61,28 +55,24 @@ /** * The message encoding. * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". - * * @type string */ public $Encoding = '8bit'; /** * Holds the most recent mailer error message. - * * @type string */ public $ErrorInfo = ''; /** * The From email address for the message. - * * @type string */ public $From = 'root@localhost'; /** * The From name of the message. - * * @type string */ public $FromName = 'Root User'; @@ -90,7 +80,6 @@ /** * The Sender email (Return-Path) of the message. * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. - * * @type string */ public $Sender = ''; @@ -98,17 +87,15 @@ /** * The Return-Path of the message. * If empty, it will be set to either From or Sender. - * * @type string * @deprecated Email senders should never set a return-path header; - * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. - * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference + * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. + * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference */ public $ReturnPath = ''; /** * The Subject of the message. - * * @type string */ public $Subject = ''; @@ -116,7 +103,6 @@ /** * An HTML or plain text message body. * If HTML then call isHTML(true). - * * @type string */ public $Body = ''; @@ -126,7 +112,6 @@ * This body can be read by mail clients that do not have HTML email * capability such as mutt & Eudora. * Clients that can read HTML will view the normal Body. - * * @type string */ public $AltBody = ''; @@ -135,7 +120,6 @@ * An iCal message part body. * Only supported in simple alt or alt_inline message types * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator - * * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ * @link http://kigkonsult.se/iCalcreator/ * @type string @@ -144,7 +128,6 @@ /** * The complete compiled MIME message body. - * * @access protected * @type string */ @@ -152,7 +135,6 @@ /** * The complete compiled MIME message headers. - * * @type string * @access protected */ @@ -160,7 +142,6 @@ /** * Extra headers that createHeader() doesn't fold in. - * * @type string * @access protected */ @@ -168,7 +149,7 @@ /** * Word-wrap the message body to this number of chars. - * + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. * @type integer */ public $WordWrap = 0; @@ -176,14 +157,12 @@ /** * Which method to use to send mail. * Options: "mail", "sendmail", or "smtp". - * * @type string */ public $Mailer = 'mail'; /** * The path to the sendmail program. - * * @type string */ public $Sendmail = '/usr/sbin/sendmail'; @@ -191,7 +170,6 @@ /** * Whether mail() uses a fully sendmail-compatible MTA. * One which supports sendmail's "-oi -f" options. - * * @type boolean */ public $UseSendmailOptions = true; @@ -199,7 +177,6 @@ /** * Path to PHPMailer plugins. * Useful if the SMTP class is not in the PHP include path. - * * @type string * @deprecated Should not be needed now there is an autoloader. */ @@ -207,7 +184,6 @@ /** * The email address that a reading confirmation should be sent to. - * * @type string */ public $ConfirmReadingTo = ''; @@ -217,7 +193,6 @@ * and as default HELO string. * If empty, the value returned * by SERVER_NAME is used or 'localhost.localdomain'. - * * @type string */ public $Hostname = ''; @@ -225,7 +200,6 @@ /** * An ID to be used in the Message-Id header. * If empty, a unique id will be generated. - * * @type string */ public $MessageID = ''; @@ -233,7 +207,6 @@ /** * The message Date to be used in the Date header. * If empty, the current date will be added. - * * @type string */ public $MessageDate = ''; @@ -247,14 +220,12 @@ * You can also specify encryption type, for example: * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). * Hosts will be tried in order. - * * @type string */ public $Host = 'localhost'; /** * The default SMTP server port. - * * @type integer * @TODO Why is this needed when the SMTP class takes care of it? */ @@ -263,7 +234,6 @@ /** * The SMTP HELO of the message. * Default is $Hostname. - * * @type string * @see PHPMailer::$Hostname */ @@ -272,7 +242,6 @@ /** * The secure connection prefix. * Options: "", "ssl" or "tls" - * * @type string */ public $SMTPSecure = ''; @@ -280,7 +249,6 @@ /** * Whether to use SMTP authentication. * Uses the Username and Password properties. - * * @type boolean * @see PHPMailer::$Username * @see PHPMailer::$Password @@ -289,14 +257,12 @@ /** * SMTP username. - * * @type string */ public $Username = ''; /** * SMTP password. - * * @type string */ public $Password = ''; @@ -304,7 +270,6 @@ /** * SMTP auth type. * Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5 - * * @type string */ public $AuthType = ''; @@ -312,7 +277,6 @@ /** * SMTP realm. * Used for NTLM auth - * * @type string */ public $Realm = ''; @@ -320,17 +284,16 @@ /** * SMTP workstation. * Used for NTLM auth - * * @type string */ public $Workstation = ''; /** * The SMTP server timeout in seconds. - * + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 * @type integer */ - public $Timeout = 10; + public $Timeout = 300; /** * SMTP class debug output mode. @@ -341,7 +304,6 @@ * * `2` Data and commands * * `3` As 2 plus connection status * * `4` Low-level data output - * * @type integer * @see SMTP::$do_debug */ @@ -358,7 +320,6 @@ * <code> * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; * </code> - * * @type string|callable * @see SMTP::$Debugoutput */ @@ -368,7 +329,6 @@ * Whether to keep SMTP connection open after each message. * If this is set to true then to close the connection * requires an explicit call to smtpClose(). - * * @type boolean */ public $SMTPKeepAlive = false; @@ -376,14 +336,12 @@ /** * Whether to split multiple to addresses into multiple messages * or send them all in one message. - * * @type boolean */ public $SingleTo = false; /** * Storage for addresses when SingleTo is enabled. - * * @type array * @TODO This should really not be public */ @@ -392,7 +350,6 @@ /** * Whether to generate VERP addresses on send. * Only applicable when sending via SMTP. - * * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path * @link http://www.postfix.org/VERP_README.html Postfix VERP info * @type boolean @@ -401,15 +358,13 @@ /** * Whether to allow sending messages with an empty body. - * * @type boolean */ public $AllowEmpty = false; /** * The default line ending. - * - * @note The default remains "\n". We force CRLF where we know + * @note The default remains "\n". We force CRLF where we know * it must be used via self::CRLF. * @type string */ @@ -417,7 +372,6 @@ /** * DKIM selector. - * * @type string */ public $DKIM_selector = ''; @@ -425,7 +379,6 @@ /** * DKIM Identity. * Usually the email address used as the source of the email - * * @type string */ public $DKIM_identity = ''; @@ -433,14 +386,12 @@ /** * DKIM passphrase. * Used if your key is encrypted. - * * @type string */ public $DKIM_passphrase = ''; /** * DKIM signing domain name. - * * @example 'example.com' * @type string */ @@ -448,7 +399,6 @@ /** * DKIM private key file path. - * * @type string */ public $DKIM_private = ''; @@ -469,22 +419,19 @@ * string $subject the subject * string $body the email body * string $from email address of sender - * * @type string */ public $action_function = ''; /** - * What to use in the X-Mailer header. - * Options: null for default, whitespace for none, or a string to use - * + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace for none, or a string to use * @type string */ public $XMailer = ''; /** * An instance of the SMTP sender class. - * * @type SMTP * @access protected */ @@ -492,7 +439,6 @@ /** * The array of 'to' addresses. - * * @type array * @access protected */ @@ -500,7 +446,6 @@ /** * The array of 'cc' addresses. - * * @type array * @access protected */ @@ -508,7 +453,6 @@ /** * The array of 'bcc' addresses. - * * @type array * @access protected */ @@ -516,7 +460,6 @@ /** * The array of reply-to names and addresses. - * * @type array * @access protected */ @@ -525,7 +468,6 @@ /** * An array of all kinds of addresses. * Includes all of $to, $cc, $bcc, $replyto - * * @type array * @access protected */ @@ -533,7 +475,6 @@ /** * The array of attachments. - * * @type array * @access protected */ @@ -541,7 +482,6 @@ /** * The array of custom headers. - * * @type array * @access protected */ @@ -549,7 +489,6 @@ /** * The most recent Message-ID (including angular brackets). - * * @type string * @access protected */ @@ -557,7 +496,6 @@ /** * The message's MIME type. - * * @type string * @access protected */ @@ -565,7 +503,6 @@ /** * The array of MIME boundary strings. - * * @type array * @access protected */ @@ -573,7 +510,6 @@ /** * The array of available languages. - * * @type array * @access protected */ @@ -581,7 +517,6 @@ /** * The number of errors encountered. - * * @type integer * @access protected */ @@ -589,7 +524,6 @@ /** * The S/MIME certificate file path. - * * @type string * @access protected */ @@ -597,7 +531,6 @@ /** * The S/MIME key file path. - * * @type string * @access protected */ @@ -606,7 +539,6 @@ /** * The S/MIME password for the key. * Used only if the key is encrypted. - * * @type string * @access protected */ @@ -614,7 +546,6 @@ /** * Whether to throw exceptions for errors. - * * @type boolean * @access protected */ @@ -642,19 +573,11 @@ /** * Constructor. - * * @param boolean $exceptions Should we throw external exceptions? */ public function __construct($exceptions = false) { - $this->exceptions = ($exceptions == true); - //Make sure our autoloader is loaded - if (version_compare(PHP_VERSION, '5.1.2', '>=')) { - $autoload = spl_autoload_functions(); - if ($autoload === false or !in_array('PHPMailerAutoload', $autoload)) { - require 'PHPMailerAutoload.php'; - } - } + $this->exceptions = (boolean)$exceptions; } /** @@ -672,13 +595,11 @@ * Also, unless sendmail_path points to sendmail (or something that * claims to be sendmail), don't pass params (not a perfect fix, * but it will do) - * - * @param string $to To + * @param string $to To * @param string $subject Subject - * @param string $body Message Body - * @param string $header Additional Header(s) - * @param string $params Params - * + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string $params Params * @access private * @return boolean */ @@ -695,17 +616,14 @@ } else { $result = @mail($to, $subject, $body, $header, $params); } - return $result; } /** * Output debugging info via user-defined method. * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). - * * @see PHPMailer::$Debugoutput * @see PHPMailer::$SMTPDebug - * * @param string $str */ protected function edebug($str) @@ -713,9 +631,9 @@ if ($this->SMTPDebug <= 0) { return; } - if (is_callable($this->Debugoutput)) { + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { call_user_func($this->Debugoutput, $str, $this->SMTPDebug); - return; } switch ($this->Debugoutput) { @@ -726,28 +644,27 @@ case 'html': //Cleans up output a bit for a better looking, HTML-safe output echo htmlentities( - preg_replace('/[\r\n]+/', '', $str), - ENT_QUOTES, - 'UTF-8' - ) . "<br>\n"; + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ) + . "<br>\n"; break; case 'echo': default: //Normalize line breaks $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - ) . "\n"; + "\n", + "\n \t ", + trim($str) + ) . "\n"; } } /** * Sets message type to HTML or plain. - * * @param boolean $isHtml True for HTML mode. - * * @return void */ public function isHTML($isHtml = true) @@ -761,7 +678,6 @@ /** * Send messages using SMTP. - * * @return void */ public function isSMTP() @@ -771,7 +687,6 @@ /** * Send messages using PHP's mail() function. - * * @return void */ public function isMail() @@ -781,7 +696,6 @@ /** * Send messages using $Sendmail. - * * @return void */ public function isSendmail() @@ -798,7 +712,6 @@ /** * Send messages using qmail. - * * @return void */ public function isQmail() @@ -815,10 +728,8 @@ /** * Add a "To" address. - * * @param string $address * @param string $name - * * @return boolean true on success, false if address already used */ public function addAddress($address, $name = '') @@ -828,12 +739,9 @@ /** * Add a "CC" address. - * * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * * @param string $address * @param string $name - * * @return boolean true on success, false if address already used */ public function addCC($address, $name = '') @@ -843,12 +751,9 @@ /** * Add a "BCC" address. - * * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. - * * @param string $address * @param string $name - * * @return boolean true on success, false if address already used */ public function addBCC($address, $name = '') @@ -858,10 +763,8 @@ /** * Add a "Reply-to" address. - * * @param string $address * @param string $name - * * @return boolean */ public function addReplyTo($address, $name = '') @@ -872,13 +775,11 @@ /** * Add an address to one of the recipient arrays. * Addresses that have been added already return false, but do not throw exceptions - * - * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' + * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' * @param string $address The email address to send to * @param string $name - * * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way + * @return boolean true on success, false if address already used or invalid in some way * @access protected */ protected function addAnAddress($kind, $address, $name = '') @@ -889,69 +790,60 @@ if ($this->exceptions) { throw new phpmailerException('Invalid recipient array: ' . $kind); } - return false; } $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim if (!$this->validateAddress($address)) { $this->setError($this->lang('invalid_address') . ': ' . $address); $this->edebug($this->lang('invalid_address') . ': ' . $address); if ($this->exceptions) { throw new phpmailerException($this->lang('invalid_address') . ': ' . $address); } - return false; } if ($kind != 'Reply-To') { if (!isset($this->all_recipients[strtolower($address)])) { array_push($this->$kind, array($address, $name)); $this->all_recipients[strtolower($address)] = true; - return true; } } else { if (!array_key_exists(strtolower($address), $this->ReplyTo)) { $this->ReplyTo[strtolower($address)] = array($address, $name); - return true; } } - return false; } /** * Set the From and FromName properties. - * - * @param string $address - * @param string $name - * @param boolean $auto Whether to also set the Sender address, defaults to true - * + * @param string $address + * @param string $name + * @param boolean $auto Whether to also set the Sender address, defaults to true * @throws phpmailerException * @return boolean */ public function setFrom($address, $name = '', $auto = true) { $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim if (!$this->validateAddress($address)) { $this->setError($this->lang('invalid_address') . ': ' . $address); $this->edebug($this->lang('invalid_address') . ': ' . $address); if ($this->exceptions) { throw new phpmailerException($this->lang('invalid_address') . ': ' . $address); } - return false; } - $this->From = $address; + $this->From = $address; $this->FromName = $name; if ($auto) { if (empty($this->Sender)) { $this->Sender = $address; } } - return true; } @@ -960,7 +852,6 @@ * Technically this is the value from the last time the headers were created, * but it's also the message ID of the last sent message except in * pathological cases. - * * @return string */ public function getLastMessageID() @@ -970,16 +861,14 @@ /** * Check that a string looks like an email address. - * - * @param string $address The email address to check + * @param string $address The email address to check * @param string $patternselect A selector for the validation pattern to use : - * * `auto` Pick strictest one automatically; - * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; - * * `pcre` Use old PCRE implementation; - * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; same as pcre8 but does not allow 'dotless' domains; - * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. - * * `noregex` Don't use a regex: super fast, really dumb. - * + * * `auto` Pick strictest one automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; same as pcre8 but does not allow 'dotless' domains; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. * @return boolean * @static * @access public @@ -1012,48 +901,53 @@ case 'pcre8': /** * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. - * - * @link http://squiloople.com/2009/12/20/email-address-validation/ + * @link http://squiloople.com/2009/12/20/email-address-validation/ * @copyright 2009-2010 Michael Rushton - * Feel free to use and redistribute this code. But please keep this copyright notice. + * Feel free to use and redistribute this code. But please keep this copyright notice. */ - return (boolean)preg_match( - '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' - . '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' - . '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' - . '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' - . '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' - . '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' - . '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address ); case 'pcre': //An older regex that doesn't need a recent PCRE return (boolean)preg_match( - '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' - . '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' - . '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' - . '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' - . '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' - . '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))... [truncated message content] |
From: <luc...@us...> - 2015-02-16 19:00:49
|
Revision: 12984 http://sourceforge.net/p/xoops/svn/12984 Author: luciorota Date: 2015-02-16 19:00:46 +0000 (Mon, 16 Feb 2015) Log Message: ----------- code cleanup in templates/wfdownloads_singlefile.tpl update Magnific Plugin move Magnific Plugin from php script to template Modified Paths: -------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/main.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/newlist.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/singlefile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_categorieslist.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_newlistindex.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_singlefile.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.tpl XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js 2015-02-16 14:09:28 UTC (rev 12983) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js 2015-02-16 19:00:46 UTC (rev 12984) @@ -1,430 +1,4 @@ -/*! Magnific Popup - v0.9.9 - 2013-12-27 - * http://dimsemenov.com/plugins/magnific-popup/ - * Copyright (c) 2013 Dmitry Semenov; */ -(function (e) { - var t, n, i, o, r, a, s, l = "Close", c = "BeforeClose", d = "AfterClose", u = "BeforeAppend", p = "MarkupParse", f = "Open", m = "Change", g = "mfp", h = "." + g, v = "mfp-ready", C = "mfp-removing", y = "mfp-prevent-close", w = function () { - }, b = !!window.jQuery, I = e(window), x = function (e, n) { - t.ev.on(g + e + h, n) - }, k = function (t, n, i, o) { - var r = document.createElement("div"); - return r.className = "mfp-" + t, i && (r.innerHTML = i), o ? n && n.appendChild(r) : (r = e(r), n && r.appendTo(n)), r - }, T = function (n, i) { - t.ev.triggerHandler(g + n, i), t.st.callbacks && (n = n.charAt(0).toLowerCase() + n.slice(1), t.st.callbacks[n] && t.st.callbacks[n].apply(t, e.isArray(i) ? i : [i])) - }, E = function (n) { - return n === s && t.currTemplate.closeBtn || (t.currTemplate.closeBtn = e(t.st.closeMarkup.replace("%title%", t.st.tClose)), s = n), t.currTemplate.closeBtn - }, _ = function () { - e.magnificPopup.instance || (t = new w, t.init(), e.magnificPopup.instance = t) - }, S = function () { - var e = document.createElement("p").style, t = ["ms", "O", "Moz", "Webkit"]; - if (void 0 !== e.transition)return!0; - for (; t.length;)if (t.pop() + "Transition"in e)return!0; - return!1 - }; - w.prototype = {constructor: w, init: function () { - var n = navigator.appVersion; - t.isIE7 = -1 !== n.indexOf("MSIE 7."), t.isIE8 = -1 !== n.indexOf("MSIE 8."), t.isLowIE = t.isIE7 || t.isIE8, t.isAndroid = /android/gi.test(n), t.isIOS = /iphone|ipad|ipod/gi.test(n), t.supportsTransition = S(), t.probablyMobile = t.isAndroid || t.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), o = e(document), t.popupsCache = {} - }, open : function (n) { - i || (i = e(document.body)); - var r; - if (n.isObj === !1) { - t.items = n.items.toArray(), t.index = 0; - var s, l = n.items; - for (r = 0; l.length > r; r++)if (s = l[r], s.parsed && (s = s.el[0]), s === n.el[0]) { - t.index = r; - break - } - } else t.items = e.isArray(n.items) ? n.items : [n.items], t.index = n.index || 0; - if (t.isOpen)return t.updateItemHTML(), void 0; - t.types = [], a = "", t.ev = n.mainEl && n.mainEl.length ? n.mainEl.eq(0) : o, n.key ? (t.popupsCache[n.key] || (t.popupsCache[n.key] = {}), t.currTemplate = t.popupsCache[n.key]) : t.currTemplate = {}, t.st = e.extend(!0, {}, e.magnificPopup.defaults, n), t.fixedContentPos = "auto" === t.st.fixedContentPos ? !t.probablyMobile : t.st.fixedContentPos, t.st.modal && (t.st.closeOnContentClick = !1, t.st.closeOnBgClick = !1, t.st.showCloseBtn = !1, t.st.enableEscapeKey = !1), t.bgOverlay || (t.bgOverlay = k("bg").on("click" + h, function () { - t.close() - }), t.wrap = k("wrap").attr("tabindex", -1).on("click" + h, function (e) { - t._checkIfClose(e.target) && t.close() - }), t.container = k("container", t.wrap)), t.contentContainer = k("content"), t.st.preloader && (t.preloader = k("preloader", t.container, t.st.tLoading)); - var c = e.magnificPopup.modules; - for (r = 0; c.length > r; r++) { - var d = c[r]; - d = d.charAt(0).toUpperCase() + d.slice(1), t["init" + d].call(t) - } - T("BeforeOpen"), t.st.showCloseBtn && (t.st.closeBtnInside ? (x(p, function (e, t, n, i) { - n.close_replaceWith = E(i.type) - }), a += " mfp-close-btn-in") : t.wrap.append(E())), t.st.alignTop && (a += " mfp-align-top"), t.fixedContentPos ? t.wrap.css({overflow: t.st.overflowY, overflowX: "hidden", overflowY: t.st.overflowY}) : t.wrap.css({top: I.scrollTop(), position: "absolute"}), (t.st.fixedBgPos === !1 || "auto" === t.st.fixedBgPos && !t.fixedContentPos) && t.bgOverlay.css({height: o.height(), position: "absolute"}), t.st.enableEscapeKey && o.on("keyup" + h, function (e) { - 27 === e.keyCode && t.close() - }), I.on("resize" + h, function () { - t.updateSize() - }), t.st.closeOnContentClick || (a += " mfp-auto-cursor"), a && t.wrap.addClass(a); - var u = t.wH = I.height(), m = {}; - if (t.fixedContentPos && t._hasScrollBar(u)) { - var g = t._getScrollbarSize(); - g && (m.marginRight = g) - } - t.fixedContentPos && (t.isIE7 ? e("body, html").css("overflow", "hidden") : m.overflow = "hidden"); - var C = t.st.mainClass; - return t.isIE7 && (C += " mfp-ie7"), C && t._addClassToMFP(C), t.updateItemHTML(), T("BuildControls"), e("html").css(m), t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo || i), t._lastFocusedEl = document.activeElement, setTimeout(function () { - t.content ? (t._addClassToMFP(v), t._setFocus()) : t.bgOverlay.addClass(v), o.on("focusin" + h, t._onFocusIn) - }, 16), t.isOpen = !0, t.updateSize(u), T(f), n - }, close : function () { - t.isOpen && (T(c), t.isOpen = !1, t.st.removalDelay && !t.isLowIE && t.supportsTransition ? (t._addClassToMFP(C), setTimeout(function () { - t._close() - }, t.st.removalDelay)) : t._close()) - }, _close : function () { - T(l); - var n = C + " " + v + " "; - if (t.bgOverlay.detach(), t.wrap.detach(), t.container.empty(), t.st.mainClass && (n += t.st.mainClass + " "), t._removeClassFromMFP(n), t.fixedContentPos) { - var i = {marginRight: ""}; - t.isIE7 ? e("body, html").css("overflow", "") : i.overflow = "", e("html").css(i) - } - o.off("keyup" + h + " focusin" + h), t.ev.off(h), t.wrap.attr("class", "mfp-wrap").removeAttr("style"), t.bgOverlay.attr("class", "mfp-bg"), t.container.attr("class", "mfp-container"), !t.st.showCloseBtn || t.st.closeBtnInside && t.currTemplate[t.currItem.type] !== !0 || t.currTemplate.closeBtn && t.currTemplate.closeBtn.detach(), t._lastFocusedEl && e(t._lastFocusedEl).focus(), t.currItem = null, t.content = null, t.currTemplate = null, t.prevHeight = 0, T(d) - }, updateSize : function (e) { - if (t.isIOS) { - var n = document.documentElement.clientWidth / window.innerWidth, i = window.innerHeight * n; - t.wrap.css("height", i), t.wH = i - } else t.wH = e || I.height(); - t.fixedContentPos || t.wrap.css("height", t.wH), T("Resize") - }, updateItemHTML : function () { - var n = t.items[t.index]; - t.contentContainer.detach(), t.content && t.content.detach(), n.parsed || (n = t.parseEl(t.index)); - var i = n.type; - if (T("BeforeChange", [t.currItem ? t.currItem.type : "", i]), t.currItem = n, !t.currTemplate[i]) { - var o = t.st[i] ? t.st[i].markup : !1; - T("FirstMarkupParse", o), t.currTemplate[i] = o ? e(o) : !0 - } - r && r !== n.type && t.container.removeClass("mfp-" + r + "-holder"); - var a = t["get" + i.charAt(0).toUpperCase() + i.slice(1)](n, t.currTemplate[i]); - t.appendContent(a, i), n.preloaded = !0, T(m, n), r = n.type, t.container.prepend(t.contentContainer), T("AfterChange") - }, appendContent : function (e, n) { - t.content = e, e ? t.st.showCloseBtn && t.st.closeBtnInside && t.currTemplate[n] === !0 ? t.content.find(".mfp-close").length || t.content.append(E()) : t.content = e : t.content = "", T(u), t.container.addClass("mfp-" + n + "-holder"), t.contentContainer.append(t.content) - }, parseEl : function (n) { - var i, o = t.items[n]; - if (o.tagName ? o = {el: e(o)} : (i = o.type, o = {data: o, src: o.src}), o.el) { - for (var r = t.types, a = 0; r.length > a; a++)if (o.el.hasClass("mfp-" + r[a])) { - i = r[a]; - break - } - o.src = o.el.attr("data-mfp-src"), o.src || (o.src = o.el.attr("href")) - } - return o.type = i || t.st.type || "inline", o.index = n, o.parsed = !0, t.items[n] = o, T("ElementParse", o), t.items[n] - }, addGroup : function (e, n) { - var i = function (i) { - i.mfpEl = this, t._openClick(i, e, n) - }; - n || (n = {}); - var o = "click.magnificPopup"; - n.mainEl = e, n.items ? (n.isObj = !0, e.off(o).on(o, i)) : (n.isObj = !1, n.delegate ? e.off(o).on(o, n.delegate, i) : (n.items = e, e.off(o).on(o, i))) - }, _openClick : function (n, i, o) { - var r = void 0 !== o.midClick ? o.midClick : e.magnificPopup.defaults.midClick; - if (r || 2 !== n.which && !n.ctrlKey && !n.metaKey) { - var a = void 0 !== o.disableOn ? o.disableOn : e.magnificPopup.defaults.disableOn; - if (a)if (e.isFunction(a)) { - if (!a.call(t))return!0 - } else if (a > I.width())return!0; - n.type && (n.preventDefault(), t.isOpen && n.stopPropagation()), o.el = e(n.mfpEl), o.delegate && (o.items = i.find(o.delegate)), t.open(o) - } - }, updateStatus : function (e, i) { - if (t.preloader) { - n !== e && t.container.removeClass("mfp-s-" + n), i || "loading" !== e || (i = t.st.tLoading); - var o = {status: e, text: i}; - T("UpdateStatus", o), e = o.status, i = o.text, t.preloader.html(i), t.preloader.find("a").on("click", function (e) { - e.stopImmediatePropagation() - }), t.container.addClass("mfp-s-" + e), n = e - } - }, _checkIfClose : function (n) { - if (!e(n).hasClass(y)) { - var i = t.st.closeOnContentClick, o = t.st.closeOnBgClick; - if (i && o)return!0; - if (!t.content || e(n).hasClass("mfp-close") || t.preloader && n === t.preloader[0])return!0; - if (n === t.content[0] || e.contains(t.content[0], n)) { - if (i)return!0 - } else if (o && e.contains(document, n))return!0; - return!1 - } - }, _addClassToMFP : function (e) { - t.bgOverlay.addClass(e), t.wrap.addClass(e) - }, _removeClassFromMFP : function (e) { - this.bgOverlay.removeClass(e), t.wrap.removeClass(e) - }, _hasScrollBar : function (e) { - return(t.isIE7 ? o.height() : document.body.scrollHeight) > (e || I.height()) - }, _setFocus : function () { - (t.st.focus ? t.content.find(t.st.focus).eq(0) : t.wrap).focus() - }, _onFocusIn : function (n) { - return n.target === t.wrap[0] || e.contains(t.wrap[0], n.target) ? void 0 : (t._setFocus(), !1) - }, _parseMarkup : function (t, n, i) { - var o; - i.data && (n = e.extend(i.data, n)), T(p, [t, n, i]), e.each(n, function (e, n) { - if (void 0 === n || n === !1)return!0; - if (o = e.split("_"), o.length > 1) { - var i = t.find(h + "-" + o[0]); - if (i.length > 0) { - var r = o[1]; - "replaceWith" === r ? i[0] !== n[0] && i.replaceWith(n) : "img" === r ? i.is("img") ? i.attr("src", n) : i.replaceWith('<img src="' + n + '" class="' + i.attr("class") + '" />') : i.attr(o[1], n) - } - } else t.find(h + "-" + e).html(n) - }) - }, _getScrollbarSize : function () { - if (void 0 === t.scrollbarSize) { - var e = document.createElement("div"); - e.id = "mfp-sbm", e.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(e), t.scrollbarSize = e.offsetWidth - e.clientWidth, document.body.removeChild(e) - } - return t.scrollbarSize - }}, e.magnificPopup = {instance: null, proto: w.prototype, modules: [], open: function (t, n) { - return _(), t = t ? e.extend(!0, {}, t) : {}, t.isObj = !0, t.index = n || 0, this.instance.open(t) - }, close : function () { - return e.magnificPopup.instance && e.magnificPopup.instance.close() - }, registerModule : function (t, n) { - n.options && (e.magnificPopup.defaults[t] = n.options), e.extend(this.proto, n.proto), this.modules.push(t) - }, defaults : {disableOn: 0, key: null, midClick: !1, mainClass: "", preloader: !0, focus: "", closeOnContentClick: !1, closeOnBgClick: !0, closeBtnInside: !0, showCloseBtn: !0, enableEscapeKey: !0, modal: !1, alignTop: !1, removalDelay: 0, prependTo: null, fixedContentPos: "auto", fixedBgPos: "auto", overflowY: "auto", closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', tClose: "Close (Esc)", tLoading: "Loading..."}}, e.fn.magnificPopup = function (n) { - _(); - var i = e(this); - if ("string" == typeof n)if ("open" === n) { - var o, r = b ? i.data("magnificPopup") : i[0].magnificPopup, a = parseInt(arguments[1], 10) || 0; - r.items ? o = r.items[a] : (o = i, r.delegate && (o = o.find(r.delegate)), o = o.eq(a)), t._openClick({mfpEl: o}, i, r) - } else t.isOpen && t[n].apply(t, Array.prototype.slice.call(arguments, 1)); else n = e.extend(!0, {}, n), b ? i.data("magnificPopup", n) : i[0].magnificPopup = n, t.addGroup(i, n); - return i - }; - var P, O, z, M = "inline", B = function () { - z && (O.after(z.addClass(P)).detach(), z = null) - }; - e.magnificPopup.registerModule(M, {options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"}, proto: {initInline: function () { - t.types.push(M), x(l + "." + M, function () { - B() - }) - }, getInline : function (n, i) { - if (B(), n.src) { - var o = t.st.inline, r = e(n.src); - if (r.length) { - var a = r[0].parentNode; - a && a.tagName && (O || (P = o.hiddenClass, O = k(P), P = "mfp-" + P), z = r.after(O).detach().removeClass(P)), t.updateStatus("ready") - } else t.updateStatus("error", o.tNotFound), r = e("<div>"); - return n.inlineElement = r, r - } - return t.updateStatus("ready"), t._parseMarkup(i, {}, n), i - }}}); - var F, H = "ajax", L = function () { - F && i.removeClass(F) - }, A = function () { - L(), t.req && t.req.abort() - }; - e.magnificPopup.registerModule(H, {options: {settings: null, cursor: "mfp-ajax-cur", tError: '<a href="%url%">The content</a> could not be loaded.'}, proto: {initAjax: function () { - t.types.push(H), F = t.st.ajax.cursor, x(l + "." + H, A), x("BeforeChange." + H, A) - }, getAjax : function (n) { - F && i.addClass(F), t.updateStatus("loading"); - var o = e.extend({url: n.src, success: function (i, o, r) { - var a = {data: i, xhr: r}; - T("ParseAjax", a), t.appendContent(e(a.data), H), n.finished = !0, L(), t._setFocus(), setTimeout(function () { - t.wrap.addClass(v) - }, 16), t.updateStatus("ready"), T("AjaxContentAdded") - }, error : function () { - L(), n.finished = n.loadError = !0, t.updateStatus("error", t.st.ajax.tError.replace("%url%", n.src)) - }}, t.st.ajax.settings); - return t.req = e.ajax(o), "" - }}}); - var j, N = function (n) { - if (n.data && void 0 !== n.data.title)return n.data.title; - var i = t.st.image.titleSrc; - if (i) { - if (e.isFunction(i))return i.call(t, n); - if (n.el)return n.el.attr(i) || "" - } - return"" - }; - e.magnificPopup.registerModule("image", {options: {markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>', cursor: "mfp-zoom-out-cur", titleSrc: "title", verticalFit: !0, tError: '<a href="%url%">The image</a> could not be loaded.'}, proto: {initImage: function () { - var e = t.st.image, n = ".image"; - t.types.push("image"), x(f + n, function () { - "image" === t.currItem.type && e.cursor && i.addClass(e.cursor) - }), x(l + n, function () { - e.cursor && i.removeClass(e.cursor), I.off("resize" + h) - }), x("Resize" + n, t.resizeImage), t.isLowIE && x("AfterChange", t.resizeImage) - }, resizeImage : function () { - var e = t.currItem; - if (e && e.img && t.st.image.verticalFit) { - var n = 0; - t.isLowIE && (n = parseInt(e.img.css("padding-top"), 10) + parseInt(e.img.css("padding-bottom"), 10)), e.img.css("max-height", t.wH - n) - } - }, _onImageHasSize : function (e) { - e.img && (e.hasSize = !0, j && clearInterval(j), e.isCheckingImgSize = !1, T("ImageHasSize", e), e.imgHidden && (t.content && t.content.removeClass("mfp-loading"), e.imgHidden = !1)) - }, findImageSize : function (e) { - var n = 0, i = e.img[0], o = function (r) { - j && clearInterval(j), j = setInterval(function () { - return i.naturalWidth > 0 ? (t._onImageHasSize(e), void 0) : (n > 200 && clearInterval(j), n++, 3 === n ? o(10) : 40 === n ? o(50) : 100 === n && o(500), void 0) - }, r) - }; - o(1) - }, getImage : function (n, i) { - var o = 0, r = function () { - n && (n.img[0].complete ? (n.img.off(".mfploader"), n === t.currItem && (t._onImageHasSize(n), t.updateStatus("ready")), n.hasSize = !0, n.loaded = !0, T("ImageLoadComplete")) : (o++, 200 > o ? setTimeout(r, 100) : a())) - }, a = function () { - n && (n.img.off(".mfploader"), n === t.currItem && (t._onImageHasSize(n), t.updateStatus("error", s.tError.replace("%url%", n.src))), n.hasSize = !0, n.loaded = !0, n.loadError = !0) - }, s = t.st.image, l = i.find(".mfp-img"); - if (l.length) { - var c = document.createElement("img"); - c.className = "mfp-img", n.img = e(c).on("load.mfploader", r).on("error.mfploader", a), c.src = n.src, l.is("img") && (n.img = n.img.clone()), c = n.img[0], c.naturalWidth > 0 ? n.hasSize = !0 : c.width || (n.hasSize = !1) - } - return t._parseMarkup(i, {title: N(n), img_replaceWith: n.img}, n), t.resizeImage(), n.hasSize ? (j && clearInterval(j), n.loadError ? (i.addClass("mfp-loading"), t.updateStatus("error", s.tError.replace("%url%", n.src))) : (i.removeClass("mfp-loading"), t.updateStatus("ready")), i) : (t.updateStatus("loading"), n.loading = !0, n.hasSize || (n.imgHidden = !0, i.addClass("mfp-loading"), t.findImageSize(n)), i) - }}}); - var W, R = function () { - return void 0 === W && (W = void 0 !== document.createElement("p").style.MozTransform), W - }; - e.magnificPopup.registerModule("zoom", {options: {enabled: !1, easing: "ease-in-out", duration: 300, opener: function (e) { - return e.is("img") ? e : e.find("img") - }}, proto : {initZoom: function () { - var e, n = t.st.zoom, i = ".zoom"; - if (n.enabled && t.supportsTransition) { - var o, r, a = n.duration, s = function (e) { - var t = e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), i = "all " + n.duration / 1e3 + "s " + n.easing, o = {position: "fixed", zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden"}, r = "transition"; - return o["-webkit-" + r] = o["-moz-" + r] = o["-o-" + r] = o[r] = i, t.css(o), t - }, d = function () { - t.content.css("visibility", "visible") - }; - x("BuildControls" + i, function () { - if (t._allowZoom()) { - if (clearTimeout(o), t.content.css("visibility", "hidden"), e = t._getItemToZoom(), !e)return d(), void 0; - r = s(e), r.css(t._getOffset()), t.wrap.append(r), o = setTimeout(function () { - r.css(t._getOffset(!0)), o = setTimeout(function () { - d(), setTimeout(function () { - r.remove(), e = r = null, T("ZoomAnimationEnded") - }, 16) - }, a) - }, 16) - } - }), x(c + i, function () { - if (t._allowZoom()) { - if (clearTimeout(o), t.st.removalDelay = a, !e) { - if (e = t._getItemToZoom(), !e)return; - r = s(e) - } - r.css(t._getOffset(!0)), t.wrap.append(r), t.content.css("visibility", "hidden"), setTimeout(function () { - r.css(t._getOffset()) - }, 16) - } - }), x(l + i, function () { - t._allowZoom() && (d(), r && r.remove(), e = null) - }) - } - }, _allowZoom : function () { - return"image" === t.currItem.type - }, _getItemToZoom : function () { - return t.currItem.hasSize ? t.currItem.img : !1 - }, _getOffset : function (n) { - var i; - i = n ? t.currItem.img : t.st.zoom.opener(t.currItem.el || t.currItem); - var o = i.offset(), r = parseInt(i.css("padding-top"), 10), a = parseInt(i.css("padding-bottom"), 10); - o.top -= e(window).scrollTop() - r; - var s = {width: i.width(), height: (b ? i.innerHeight() : i[0].offsetHeight) - a - r}; - return R() ? s["-moz-transform"] = s.transform = "translate(" + o.left + "px," + o.top + "px)" : (s.left = o.left, s.top = o.top), s - }}}); - var Z = "iframe", q = "//about:blank", D = function (e) { - if (t.currTemplate[Z]) { - var n = t.currTemplate[Z].find("iframe"); - n.length && (e || (n[0].src = q), t.isIE8 && n.css("display", e ? "block" : "none")) - } - }; - e.magnificPopup.registerModule(Z, {options: {markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', srcAction: "iframe_src", patterns: {youtube: {index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1"}, vimeo: {index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1"}, gmaps: {index: "//maps.google.", src: "%id%&output=embed"}}}, proto: {initIframe: function () { - t.types.push(Z), x("BeforeChange", function (e, t, n) { - t !== n && (t === Z ? D() : n === Z && D(!0)) - }), x(l + "." + Z, function () { - D() - }) - }, getIframe : function (n, i) { - var o = n.src, r = t.st.iframe; - e.each(r.patterns, function () { - return o.indexOf(this.index) > -1 ? (this.id && (o = "string" == typeof this.id ? o.substr(o.lastIndexOf(this.id) + this.id.length, o.length) : this.id.call(this, o)), o = this.src.replace("%id%", o), !1) : void 0 - }); - var a = {}; - return r.srcAction && (a[r.srcAction] = o), t._parseMarkup(i, a, n), t.updateStatus("ready"), i - }}}); - var K = function (e) { - var n = t.items.length; - return e > n - 1 ? e - n : 0 > e ? n + e : e - }, Y = function (e, t, n) { - return e.replace(/%curr%/gi, t + 1).replace(/%total%/gi, n) - }; - e.magnificPopup.registerModule("gallery", {options: {enabled: !1, arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', preload: [0, 2], navigateByImgClick: !0, arrows: !0, tPrev: "Previous (Left arrow key)", tNext: "Next (Right arrow key)", tCounter: "%curr% of %total%"}, proto: {initGallery: function () { - var n = t.st.gallery, i = ".mfp-gallery", r = Boolean(e.fn.mfpFastClick); - return t.direction = !0, n && n.enabled ? (a += " mfp-gallery", x(f + i, function () { - n.navigateByImgClick && t.wrap.on("click" + i, ".mfp-img", function () { - return t.items.length > 1 ? (t.next(), !1) : void 0 - }), o.on("keydown" + i, function (e) { - 37 === e.keyCode ? t.prev() : 39 === e.keyCode && t.next() - }) - }), x("UpdateStatus" + i, function (e, n) { - n.text && (n.text = Y(n.text, t.currItem.index, t.items.length)) - }), x(p + i, function (e, i, o, r) { - var a = t.items.length; - o.counter = a > 1 ? Y(n.tCounter, r.index, a) : "" - }), x("BuildControls" + i, function () { - if (t.items.length > 1 && n.arrows && !t.arrowLeft) { - var i = n.arrowMarkup, o = t.arrowLeft = e(i.replace(/%title%/gi, n.tPrev).replace(/%dir%/gi, "left")).addClass(y), a = t.arrowRight = e(i.replace(/%title%/gi, n.tNext).replace(/%dir%/gi, "right")).addClass(y), s = r ? "mfpFastClick" : "click"; - o[s](function () { - t.prev() - }), a[s](function () { - t.next() - }), t.isIE7 && (k("b", o[0], !1, !0), k("a", o[0], !1, !0), k("b", a[0], !1, !0), k("a", a[0], !1, !0)), t.container.append(o.add(a)) - } - }), x(m + i, function () { - t._preloadTimeout && clearTimeout(t._preloadTimeout), t._preloadTimeout = setTimeout(function () { - t.preloadNearbyImages(), t._preloadTimeout = null - }, 16) - }), x(l + i, function () { - o.off(i), t.wrap.off("click" + i), t.arrowLeft && r && t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(), t.arrowRight = t.arrowLeft = null - }), void 0) : !1 - }, next : function () { - t.direction = !0, t.index = K(t.index + 1), t.updateItemHTML() - }, prev : function () { - t.direction = !1, t.index = K(t.index - 1), t.updateItemHTML() - }, goTo : function (e) { - t.direction = e >= t.index, t.index = e, t.updateItemHTML() - }, preloadNearbyImages : function () { - var e, n = t.st.gallery.preload, i = Math.min(n[0], t.items.length), o = Math.min(n[1], t.items.length); - for (e = 1; (t.direction ? o : i) >= e; e++)t._preloadItem(t.index + e); - for (e = 1; (t.direction ? i : o) >= e; e++)t._preloadItem(t.index - e) - }, _preloadItem : function (n) { - if (n = K(n), !t.items[n].preloaded) { - var i = t.items[n]; - i.parsed || (i = t.parseEl(n)), T("LazyLoad", i), "image" === i.type && (i.img = e('<img class="mfp-img" />').on("load.mfploader", function () { - i.hasSize = !0 - }).on("error.mfploader", function () { - i.hasSize = !0, i.loadError = !0, T("LazyLoadError", i) - }).attr("src", i.src)), i.preloaded = !0 - } - }}}); - var U = "retina"; - e.magnificPopup.registerModule(U, {options: {replaceSrc: function (e) { - return e.src.replace(/\.\w+$/, function (e) { - return"@2x" + e - }) - }, ratio : 1}, proto: {initRetina: function () { - if (window.devicePixelRatio > 1) { - var e = t.st.retina, n = e.ratio; - n = isNaN(n) ? n() : n, n > 1 && (x("ImageHasSize." + U, function (e, t) { - t.img.css({"max-width": t.img[0].naturalWidth / n, width: "100%"}) - }), x("ElementParse." + U, function (t, i) { - i.src = e.replaceSrc(i, n) - })) - } - }}}), function () { - var t = 1e3, n = "ontouchstart"in window, i = function () { - I.off("touchmove" + r + " touchend" + r) - }, o = "mfpFastClick", r = "." + o; - e.fn.mfpFastClick = function (o) { - return e(this).each(function () { - var a, s = e(this); - if (n) { - var l, c, d, u, p, f; - s.on("touchstart" + r, function (e) { - u = !1, f = 1, p = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0], c = p.clientX, d = p.clientY, I.on("touchmove" + r, function (e) { - p = e.originalEvent ? e.originalEvent.touches : e.touches, f = p.length, p = p[0], (Math.abs(p.clientX - c) > 10 || Math.abs(p.clientY - d) > 10) && (u = !0, i()) - }).on("touchend" + r, function (e) { - i(), u || f > 1 || (a = !0, e.preventDefault(), clearTimeout(l), l = setTimeout(function () { - a = !1 - }, t), o()) - }) - }) - } - s.on("click" + r, function () { - a || o() - }) - }) - }, e.fn.destroyMfpFastClick = function () { - e(this).off("touchstart" + r + " click" + r), n && I.off("touchmove" + r + " touchend" + r) - } - }(), _() -})(window.jQuery || window.Zepto); +/*! Magnific Popup - v1.0.0 - 2015-01-03 +* http://dimsemenov.com/plugins/magnific-popup/ +* Copyright (c) 2015 Dmitry Semenov; */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); \ No newline at end of file Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css 2015-02-16 14:09:28 UTC (rev 12983) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css 2015-02-16 19:00:46 UTC (rev 12984) @@ -1,219 +1,182 @@ /* Magnific Popup CSS */ .mfp-bg { - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1042; - overflow: hidden; - position: fixed; - background: #0b0b0b; - opacity: 0.8; - filter: alpha(opacity=80); -} + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1042; + overflow: hidden; + position: fixed; + background: #0b0b0b; + opacity: 0.8; + filter: alpha(opacity=80); } .mfp-wrap { - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1043; - position: fixed; - outline: none !important; - -webkit-backface-visibility: hidden; -} + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1043; + position: fixed; + outline: none !important; + -webkit-backface-visibility: hidden; } .mfp-container { - text-align: center; - position: absolute; - width: 100%; - height: 100%; - left: 0; - top: 0; - padding: 0 8px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} + text-align: center; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + padding: 0 8px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } .mfp-container:before { - content: ''; - display: inline-block; - height: 100%; - vertical-align: middle; -} + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; } .mfp-align-top .mfp-container:before { - display: none; -} + display: none; } .mfp-content { - position: relative; - display: inline-block; - vertical-align: middle; - margin: 0 auto; - text-align: left; - z-index: 1045; -} + position: relative; + display: inline-block; + vertical-align: middle; + margin: 0 auto; + text-align: left; + z-index: 1045; } .mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { - width: 100%; - cursor: auto; -} + width: 100%; + cursor: auto; } .mfp-ajax-cur { - cursor: progress; -} + cursor: progress; } .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { - cursor: -moz-zoom-out; - cursor: -webkit-zoom-out; - cursor: zoom-out; -} + cursor: -moz-zoom-out; + cursor: -webkit-zoom-out; + cursor: zoom-out; } .mfp-zoom { - cursor: pointer; - cursor: -webkit-zoom-in; - cursor: -moz-zoom-in; - cursor: zoom-in; -} + cursor: pointer; + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; } .mfp-auto-cursor .mfp-content { - cursor: auto; -} + cursor: auto; } .mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } .mfp-loading.mfp-figure { - display: none; -} + display: none; } .mfp-hide { - display: none !important; -} + display: none !important; } .mfp-preloader { - color: #cccccc; - position: absolute; - top: 50%; - width: auto; - text-align: center; - margin-top: -0.8em; - left: 8px; - right: 8px; - z-index: 1044; -} + color: #CCC; + position: absolute; + top: 50%; + width: auto; + text-align: center; + margin-top: -0.8em; + left: 8px; + right: 8px; + z-index: 1044; } + .mfp-preloader a { + color: #CCC; } + .mfp-preloader a:hover { + color: #FFF; } -.mfp-preloader a { - color: #cccccc; -} - -.mfp-preloader a:hover { - color: white; -} - .mfp-s-ready .mfp-preloader { - display: none; -} + display: none; } .mfp-s-error .mfp-content { - display: none; -} + display: none; } button.mfp-close, button.mfp-arrow { - overflow: visible; - cursor: pointer; - background: transparent; - b... [truncated message content] |
From: <txm...@us...> - 2015-02-16 14:09:38
|
Revision: 12983 http://sourceforge.net/p/xoops/svn/12983 Author: txmodxoops Date: 2015-02-16 14:09:28 +0000 (Mon, 16 Feb 2015) Log Message: ----------- Updated cpanel theme Added and modfied more files Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/menu.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/navigation.html Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/breadcrumb.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.bootstrap,min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.responsive.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/morris.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/timeline.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/avatar.jpg Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/breadcrumb.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/breadcrumb.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/breadcrumb.php 2015-02-16 14:09:28 UTC (rev 12983) @@ -0,0 +1,115 @@ +<?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. +*/ + +/** + * BreadCrumb Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @package system + * @version $Id: breadcrumb.php 12360 2014-03-08 09:46:59Z beckmi $ + */ + +class SystemBreadcrumb +{ + /* Variables */ + var $_directory; + var $_bread = array(); + var $_help; + var $_tips; + + /** + * @param $directory + */ + function __construct( $directory ) + { + $this->_directory = $directory; + } + + /** + * Add link to breadcrumb + * + */ + function addLink( $title='', $link='', $home=false ) + { + $this->_bread[] = array( + 'link' => $link, + 'title' => $title, + 'home' => $home + ); + } + + /** + * Add Help link + * + */ + function addHelp( $link = '') + { + $this->_help = $link; + } + + /** + * Add Tips + * + */ + function addTips($value) + { + $this->_tips = $value; + } + + /** + * Render System BreadCrumb + * + */ + function render() + { + if (isset($GLOBALS['xoopsTpl'])) { + $GLOBALS['xoopsTpl']->assign('xo_sys_breadcrumb', $this->_bread); + $GLOBALS['xoopsTpl']->assign('xo_sys_help', $this->_help); + if ($this->_tips) { + if (xoops_getModuleOption('usetips', 'system')) { + $GLOBALS['xoopsTpl']->assign('xo_sys_tips', $this->_tips); + } + } + // Call template + if ( file_exists( XOOPS_ROOT_PATH . '/modules/system/language/' . $GLOBALS['xoopsConfig']['language'] . '/help/' . $this->_directory . '.html' ) ) { + $GLOBALS['xoopsTpl']->assign( 'help_content', XOOPS_ROOT_PATH . '/modules/system/language/' . $GLOBALS['xoopsConfig']['language'] . '/help/' . $this->_directory . '.html' ); + } else { + if ( file_exists( XOOPS_ROOT_PATH . '/modules/system/language/english/help/' . $this->_directory . '.html' ) ) { + $GLOBALS['xoopsTpl']->assign( 'help_content', XOOPS_ROOT_PATH.'/modules/system/language/english/help/' . $this->_directory . '.html' ); + } else { + $GLOBALS['xoopsTpl']->assign('load_error', 1); + } + } + } else { + $out = $menu = '<style type="text/css" media="screen">@import ' . XOOPS_URL . '/modules/system/css/menu.css;</style>'; + $out .= '<ul class="breadcrumb">'; + foreach ($this->_bread as $menu) { + if ($menu['home']) { + $out .= '<li><a href="' . $menu['link'] . '" title="' . $menu['title'] . '"><img src="images/home.png" alt="' . $menu['title'] . '" class="home" /></a></li>'; + } else { + if ($menu['link'] != '') { + $out .= '<li><a href="' . $menu['link'] . '" title="' . $menu['title'] . '">' . $menu['title'] . '</a></li>'; + } else { + $out .= '<li>' . $menu['title'] . '</li>'; + } + } + } + $out .= '</ul>'; + if ($this->_tips) { + $out .= '<div class="tips">' . $this->_tips . '</div>'; + } + echo $out; + } + } + +} Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/menu.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/menu.php 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/menu.php 2015-02-16 14:09:28 UTC (rev 12983) @@ -178,16 +178,16 @@ } $breadcrumb = $menuItems[$currentoption]; $menuItems[$currentoption] = 'current'; - $menu = "<div id='buttontop_mod'>"; + $menu = "<div id='buttontop'>"; $menu .= "<table class=\"table table-bordered\">\n<tr>"; - $menu .= "<td style='font-size: 12px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; + $menu .= "<td><ul class=\"nav nav-pills\">"; foreach ($this->_menutop as $k => $v) { - $menu .= " <a href=\"$k\">$v</a> |"; + $menu .= "<li role=\"presentation\"><a href=\"$k\">$v</a>"; } $menu = substr($menu, 0, -1); - $menu .= "</td>"; - $menu .= "<td style='text-align: right;'><strong>" . $this->_obj->getVar( 'name' ) . "</strong> : " . $breadcrumb . "</td>"; + $menu .= "</ul></td>"; + $menu .= "<td style='text-align: right; padding-top: 18px;'><strong>" . $this->_obj->getVar( 'name' ) . "</strong> : " . $breadcrumb . "</td>"; $menu .= "</tr>\n</table>\n"; $menu .= "</div>\n"; $menu .= "<ul class=\"nav nav-tabs\">"; Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.bootstrap,min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.bootstrap,min.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.bootstrap,min.css 2015-02-16 14:09:28 UTC (rev 12983) @@ -0,0 +1,5 @@ +/* + * dateTable Bootstrap minified css file by Txmod Xoops http://www.txmodxoops.org +*/ + +div.dataTables_length label{font-weight:400;text-align:left;white-space:nowrap}div.dataTables_length select{width:75px;display:inline-block}div.dataTables_filter{text-align:right}div.dataTables_filter label{font-weight:400;white-space:nowrap;text-align:left}div.dataTables_filter input{margin-left:.5em;display:inline-block}div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}@media screen and (max-width: 767px){div.dataTables_length,div.dataTables_filter,div.dataTables_info,div.dataTables_paginate{text-align:center}}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable{clear:both;margin-top:6px!important;margin-bottom:6px!important;max-width:none!important}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer}table.dataTable thead .sorting{background:url(../assets/img/tables/sort_both.png) no-repeat center right}table.dataTable thead .sorting_asc{background:url(../assets/img/tables/sort_asc.png) no-repeat center right}table.dataTable thead .sorting_desc{background:url(../assets/img/tables/sort_desc.png) no-repeat center right}table.dataTable thead .sorting_asc_disabled{background:url(../assets/img/tables/sort_asc_disabled.png) no-repeat center right}table.dataTable thead .sorting_desc_disabled{background:url(../assets/img/tables/sort_desc_disabled.png) no-repeat center right}table.dataTable thead > tr > th{padding-left:18px;padding-right:18px}table.dataTable th:active{outline:none}div.dataTables_scrollHead table{margin-bottom:0!important;border-bottom-left-radius:0;border-bottom-right-radius:0}div.dataTables_scrollHead table thead tr:last-child th:first-child,div.dataTables_scrollHead table thead tr:last-child td:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.dataTables_scrollBody table{border-top:none;margin-top:0!important;margin-bottom:0!important}div.dataTables_scrollBody tbody tr:first-child th,div.dataTables_scrollBody tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0!important;border-top:none}table.table-bordered.dataTable{border-collapse:separate!important}table.table-bordered thead th,table.table-bordered thead td{border-left-width:0;border-top-width:0}table.table-bordered tbody th,table.table-bordered tbody td{border-left-width:0;border-bottom-width:0}table.table-bordered th:last-child,table.table-bordered td:last-child{border-right-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}.table.dataTable tbody tr.active td,.table.dataTable tbody tr.active th{background-color:#08C;color:#fff}.table.dataTable tbody tr.active:hover td,.table.dataTable tbody tr.active:hover th{background-color:#0075b0!important}.table.dataTable tbody tr.active th > a,.table.dataTable tbody tr.active td > a{color:#fff}.table-striped.dataTable tbody tr.active:nth-child(odd) td,.table-striped.dataTable tbody tr.active:nth-child(odd) th{background-color:#017ebc}table.DTTT_selectable tbody tr{cursor:pointer}div.DTTT .btn:hover{text-decoration:none!important}ul.DTTT_dropdown.dropdown-menu{z-index:2003}ul.DTTT_dropdown.dropdown-menu a{color:#333!important}ul.DTTT_dropdown.dropdown-menu li{position:relative}ul.DTTT_dropdown.dropdown-menu li:hover a{background-color:#08c;color:#fff!important}div.DTTT_collection_background{z-index:2002}div.DTTT_print_info{position:fixed;top:50%;left:50%;width:400px;height:150px;margin-left:-200px;margin-top:-75px;text-align:center;color:#333;padding:10px 30px;opacity:.95;background-color:#fff;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.5);box-shadow:0 3px 7px rgba(0,0,0,0.5)}div.DTTT_print_info h6{font-weight:400;font-size:28px;line-height:28px;margin:1em}div.DTTT_print_info p{font-size:14px;line-height:20px}div.dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:60px;margin-left:-50%;margin-top:-25px;padding-top:20px;padding-bottom:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0%,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,0.9)),color-stop(75%,rgba(255,255,255,0.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%)}div.DTFC_LeftHeadWrapper table,div.DTFC_LeftFootWrapper table,div.DTFC_RightHeadWrapper table,div.DTFC_RightFootWrapper table,table.DTFC_Cloned tr.even{background-color:#fff;margin-bottom:0}div.DTFC_RightHeadWrapper table,div.DTFC_LeftHeadWrapper table{border-bottom:none!important;margin-bottom:0!important;border-top-right-radius:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_RightBodyWrapper table,div.DTFC_LeftBodyWrapper table{border-top:none;margin:0!important}div.DTFC_RightBodyWrapper tbody tr:first-child th,div.DTFC_RightBodyWrapper tbody tr:first-child td,div.DTFC_LeftBodyWrapper tbody tr:first-child th,div.DTFC_LeftBodyWrapper tbody tr:first-child td{border-top:none}div.DTFC_RightFootWrapper table,div.DTFC_LeftFootWrapper table{border-top:none;margin-top:0!important}div.FixedHeader_Cloned table{margin:0!important} \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.responsive.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.responsive.min.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.responsive.min.css 2015-02-16 14:09:28 UTC (rev 12983) @@ -0,0 +1,5 @@ +/* + * dateTable Responsive minified css file by Txmod Xoops http://www.txmodxoops.org +*/ + +table.dataTable.dtr-inline.collapsed tbody td:first-child,table.dataTable.dtr-inline.collapsed tbody th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed tbody td:first-child:before,table.dataTable.dtr-inline.collapsed tbody th:first-child:before{top:8px;left:4px;height:16px;width:16px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:16px;text-align:center;line-height:14px;box-shadow:0 0 3px #444;box-sizing:content-box;content:'+';background-color:#31b131}table.dataTable.dtr-inline.collapsed tbody td:first-child.dataTables_empty:before,table.dataTable.dtr-inline.collapsed tbody th:first-child.dataTables_empty:before{display:none}table.dataTable.dtr-inline.collapsed tbody tr.parent td:first-child:before,table.dataTable.dtr-inline.collapsed tbody tr.parent th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed tbody tr.child td:before{display:none}table.dataTable.dtr-column tbody td.control,table.dataTable.dtr-column tbody th.control{position:relative;cursor:pointer}table.dataTable.dtr-column tbody td.control:before,table.dataTable.dtr-column tbody th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:16px;text-align:center;line-height:14px;box-shadow:0 0 3px #444;box-sizing:content-box;content:'+';background-color:#31b131}table.dataTable.dtr-column tbody tr.parent td.control:before,table.dataTable.dtr-column tbody tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable tr.child{padding:.5em 1em}table.dataTable tr.child:hover{background:transparent!important}table.dataTable tr.child ul{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable tr.child ul li{border-bottom:1px solid #efefef;padding:.5em 0;white-space:nowrap}table.dataTable tr.child ul li:first-child{padding-top:0}table.dataTable tr.child ul li:last-child{border-bottom:none}table.dataTable tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:700} \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/morris.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/morris.min.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/morris.min.css 2015-02-16 14:09:28 UTC (rev 12983) @@ -0,0 +1,2 @@ +.morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0} +.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0} Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/timeline.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/timeline.min.css (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/timeline.min.css 2015-02-16 14:09:28 UTC (rev 12983) @@ -0,0 +1,5 @@ +/* + * Timeline minified css file by Txmod Xoops http://www.txmodxoops.org +*/ + +.timeline{position:relative;padding:20px 0;list-style:none}.timeline:before{content:" ";position:absolute;top:0;bottom:0;left:50%;width:3px;margin-left:-1.5px;background-color:#eee}.timeline > li{position:relative;margin-bottom:20px}.timeline > li:before,.timeline > li:after{content:" ";display:table}.timeline > li:after{clear:both}.timeline > li:before,.timeline > li:after{content:" ";display:table}.timeline > li:after{clear:both}.timeline > li > .timeline-panel{float:left;position:relative;width:46%;padding:20px;border:1px solid #d4d4d4;border-radius:2px;-webkit-box-shadow:0 1px 6px rgba(0,0,0,0.175);box-shadow:0 1px 6px rgba(0,0,0,0.175)}.timeline > li > .timeline-panel:before{content:" ";display:inline-block;position:absolute;top:26px;right:-15px;border-top:15px solid transparent;border-right:0 solid #ccc;border-bottom:15px solid transparent;border-left:15px solid #ccc}.timeline > li > .timeline-panel:after{content:" ";display:inline-block;position:absolute;top:27px;right:-14px;border-top:14px solid transparent;border-right:0 solid #fff;border-bottom:14px solid transparent;border-left:14px solid #fff}.timeline > li > .timeline-badge{z-index:100;position:absolute;top:16px;left:50%;width:50px;height:50px;margin-left:-25px;border-radius:50% 50% 50% 50%;text-align:center;font-size:1.4em;line-height:50px;color:#fff;background-color:#999}.timeline > li.timeline-inverted > .timeline-panel{float:right}.timeline > li.timeline-inverted > .timeline-panel:before{right:auto;left:-15px;border-right-width:15px;border-left-width:0}.timeline > li.timeline-inverted > .timeline-panel:after{right:auto;left:-14px;border-right-width:14px;border-left-width:0}.timeline-badge.primary{background-color:#2e6da4!important}.timeline-badge.success{background-color:#3f903f!important}.timeline-badge.warning{background-color:#f0ad4e!important}.timeline-badge.danger{background-color:#d9534f!important}.timeline-badge.info{background-color:#5bc0de!important}.timeline-title{margin-top:0;color:inherit}.timeline-body > p,.timeline-body > ul{margin-bottom:0}.timeline-body > p + p{margin-top:5px}@media(max-width:767px){ul.timeline:before{left:40px}ul.timeline > li > .timeline-panel{width:calc(100% - 90px);width:-moz-calc(100% - 90px);width:-webkit-calc(100% - 90px)}ul.timeline > li > .timeline-badge{top:16px;left:15px;margin-left:0}ul.timeline > li > .timeline-panel{float:right}ul.timeline > li > .timeline-panel:before{right:auto;left:-15px;border-right-width:15px;border-left-width:0}ul.timeline > li > .timeline-panel:after{right:auto;left:-14px;border-right-width:14px;border-left-width:0}} \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css 2015-02-16 14:09:28 UTC (rev 12983) @@ -89,8 +89,43 @@ .navbar-top-links .dropdown-user { right: 0; left: auto; + margin-top: 20px; } +.navbar-top-links a.account { + margin-bottom: -20px; + padding: 5px 0 5px 10px; + height: 50px; + line-height: 18px; +} + +.navbar-top-links .avatar { + width: 40px; + float: left; + margin-right: 5px; +} + +.navbar-top-links .avatar > img { + width:40px; + height:40px; + border: 1px solid #F8F8F8; +} + +.navbar-top-links .avatar > img i.fa.fa-caret-down.pull-right { + margin-top: 50px; +} + +.navbar-top-links .user-mini > span { + display: block; + font-size: 12px; + color:#363636; + margin-bottom: -4px; +} +.navbar-top-links .user-mini > span.welcome { + font-weight: bold; + margin-top: 2px; +} + .sidebar .sidebar-nav.navbar-collapse { padding-right: 0; padding-left: 0; @@ -240,27 +275,27 @@ clear: both; } -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc, -table.dataTable thead .sorting_asc_disabled, -table.dataTable thead .sorting_desc_disabled { +table.dataTable thead.sorting, +table.dataTable thead.sorting_asc, +table.dataTable thead.sorting_desc, +table.dataTable thead.sorting_asc_disabled, +table.dataTable thead.sorting_desc_disabled { background: 0 0; } -table.dataTable thead .sorting_asc:after { +table.dataTable thead.sorting_asc:after { content: "\f0de"; float: right; font-family: fontawesome; } -table.dataTable thead .sorting_desc:after { +table.dataTable thead.sorting_desc:after { content: "\f0dd"; float: right; font-family: fontawesome; } -table.dataTable thead .sorting:after { +table.dataTable thead.sorting:after { content: "\f0dc"; float: right; font-family: fontawesome; @@ -439,14 +474,27 @@ margin: -5px -15px -15px -15px; } -ul.thumbnails li.module-icon { +ul.thumbnails li.box-icon { display: inline-block; } -ul.thumbnails li.module-icon a.thumbnail { +ul.thumbnails li.box-icon a.thumbnail { padding: 5px; } +ul.list-inline { + list-style-type: none; + margin: -5px -15px -15px -15px; +} + +ul.list-inline li.box-icon { + display: inline-block; +} + +ul.list-inline li.box-icon a.thumbnail { + padding: 5px; +} + .row.row-preferences { margin: 20px 0 0 10px; } \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css 2015-02-16 14:09:28 UTC (rev 12983) @@ -1,7 +1,7 @@ /*! - * XNewage Bootstrap CPanel Xoops Theme (http://www.txmodxoops.org) + * XNewage Bootstrap Admin Xoops Theme (http://www.txmodxoops.org) * Licensed under the GNU License v2.0. * For details, see http://www.gnu.org/licenses/gpl-3.0.html */ -body{background-color:#f8f8f8}ul.line-type{list-style-type:none;padding:0;margin:0 0 0 15px}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media(min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-top-links{margin-right:0}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links .dropdown-menu li{display:block}.navbar-top-links.dropdown-menu li:last-child{margin-right:0}.navbar-top-links.dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links .dropdown-menu li a div{white-space:normal}.navbar-top-links.dropdown-messages,.navbar-top-links .dropdown-tasks,.navbar-top-links.dropdown-alerts{width:310px;min-width:0}.navbar-top-links .dropdown-messages{margin-left:5px}.navbar-top-links .dropdown-tasks{margin-left:-59px}.navbar-top-links .dropdown-alerts{margin-left:-123px}.navbar-top-links.dropdown-user{right:0;left:auto}.sidebar .sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar .sidebar-search{padding:15px}.sidebar ul li{border-bottom:1px solid #e7e7e7}.sidebar ul li a.active{background-color:#eee}.sidebar .arrow{float:right}.sidebar .fa.arrow:before{content:"\f104"}.sidebar .active>a>.fa.arrow:before{content:"\f107"}.sidebar.nav-second-level li,.sidebar.nav-third-level li,.sidebar.nav-fourth-level li{border-bottom:0!important}.sidebar.nav-second-level li a{padding-left:37px}.sidebar .nav-third-level li a{padding-left:52px}.sidebar.nav-fourth-level li a{padding-left:67px}@media(min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links .dropdown-messages,.navbar-top-links.dropdown-tasks,.navbar-top-links .dropdown-alerts{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all .5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-info.btn-outline:hover,.btn-warning.btn-outline:hover,.btn-danger.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left .chat-body{margin-left:60px}.chat li.right .chat-body{margin-right:60px}.chat li.chat-body p{margin:0}.panel.slidedown.glyphicon,.chat.glyphicon{margin-right:5px}.chat-panel.panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}.dataTables_wrapper{position:relative;clear:both}table.dataTable thead.sorting,table.dataTable thead.sorting_asc,table.dataTable thead.sorting_desc,table.dataTable thead.sorting_asc_disabled,table.dataTable thead.sorting_desc_disabled{background:0 0}table.dataTable thead.sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table.dataTable thead.sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table.dataTable thead.sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green .panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red.panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow.panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13}#accordion{border:1px solid #f5f5f5;background-color:#f0f0f0;color:#333;width:100%;box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-moz-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-webkit-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-khtml-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset}#accordion h5{padding:5px 10px;cursor:pointer;position:relative;margin:1px;background:inherit!important;color:#000;border:1px solid #FFF;font-weight:700}#accordion h5.current{cursor:default;background-color:#f7f7f7}#accordion .pane{display:none;padding:10px;font-size:12px;line-height:120%}.xgiftshop{text-align:center!important}#xokeytitle{padding:2px;font-size:13px;font-weight:700;color:#333}#xokeynumber{text-align:center;padding-top:5px;padding-bottom:5px;font-size:13px;font-weight:700;color:#92EF2C}#xolicenses{padding:5px 18px!important}#xolicenses a{color:#45C5DF}#xolicenses a:hover{color:red;text-decoration:none}ul.thumbnails{list-style-type:none;margin:-5px -15px -15px}ul.thumbnails li.box-icon{display:inline-block}ul.thumbnails li.box-icon a.thumbnail{padding:5px}ul.list-inline{list-style-type:none;margin:-5px -15px -15px}ul.list-inline li.box-icon{display:inline-block}ul.list-inline li.box-icon a.thumbnail{padding:5px}.row.row-preferences{margin: 20px 0 0 10px;} \ No newline at end of file +body{background-color:#f8f8f8}ul.line-type{list-style-type:none;padding:0;margin:0 0 0 15px}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media(min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-top-links{margin-right:0}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links.dropdown-menu li{display:block}.navbar-top-links.dropdown-menu li:last-child{margin-right:0}.navbar-top-links.dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links.dropdown-menu li a div{white-space:normal}.navbar-top-links.dropdown-messages,.navbar-top-links.dropdown-tasks,.navbar-top-links.dropdown-alerts{width:310px;min-width:0}.navbar-top-links.dropdown-messages{margin-left:5px}.navbar-top-links.dropdown-tasks{margin-left:-59px}.navbar-top-links.dropdown-alerts{margin-left:-123px}.navbar-top-links.dropdown-user{right:0;left:auto;margin-top:20px}.navbar-top-links a.account{margin-bottom:-20px;padding:5px 0 5px 10px;height:50px;line-height:18px}.navbar-top-links.avatar{width:40px;float:left;margin-right:5px}.navbar-top-links.avatar > img{width:40px;height:40px;border:1px solid #F8F8F8}.navbar-top-links.avatar > img i.fa.fa-caret-down.pull-right{margin-top:50px}.navbar-top-links.user-mini > span{display:block;font-size:12px;color:#363636;margin-bottom:-4px}.navbar-top-links.user-mini > span.welcome{font-weight:700;margin-top:2px}.sidebar.sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar.sidebar-search{padding:15px}.sidebar ul li{border-bottom:1px solid #e7e7e7}.sidebar ul li a.active{background-color:#eee}.sidebar.arrow{float:right}.sidebar.fa.arrow:before{content:"\f104"}.sidebar.active>a>.fa.arrow:before{content:"\f107"}.sidebar.nav-second-level li,.sidebar.nav-third-level li,.sidebar.nav-fourth-level li{border-bottom:0!important}.sidebar.nav-second-level li a{padding-left:37px}.sidebar.nav-third-level li a{padding-left:52px}.sidebar.nav-fourth-level li a{padding-left:67px}@media(min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links.dropdown-messages,.navbar-top-links.dropdown-tasks,.navbar-top-links.dropdown-alerts{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all.5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-info.btn-outline:hover,.btn-warning.btn-outline:hover,.btn-danger.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left.chat-body{margin-left:60px}.chat li.right.chat-body{margin-right:60px}.chat li.chat-body p{margin:0}.panel.slidedown.glyphicon,.chat.glyphicon{margin-right:5px}.chat-panel.panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}.dataTables_wrapper{position:relative;clear:both}table.dataTable thead.sorting,table.dataTable thead.sorting_asc,table.dataTable thead.sorting_desc,table.dataTable thead.sorting_asc_disabled,table.dataTable thead.sorting_desc_disabled{background:0 0}table.dataTable thead.sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table.dataTable thead.sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table.dataTable thead.sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green.panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red.panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow.panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13}#accordion{border:1px solid #f5f5f5;background-color:#f0f0f0;color:#333;width:100%;box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-moz-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-webkit-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-khtml-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset}#accordion h5{padding:5px 10px;cursor:pointer;position:relative;margin:1px;background:inherit!important;color:#000;border:1px solid #FFF;font-weight:700}#accordion h5.current{cursor:default;background-color:#f7f7f7}#accordion.pane{display:none;padding:10px;font-size:12px;line-height:120%}.xgiftshop{text-align:center!important}#xokeytitle{padding:2px;font-size:13px;font-weight:700;color:#333}#xokeynumber{text-align:center;padding-top:5px;padding-bottom:5px;font-size:13px;font-weight:700;color:#92EF2C}#xolicenses{padding:5px 18px!important}#xolicenses a{color:#45C5DF}#xolicenses a:hover{color:red;text-decoration:none}ul.thumbnails{list-style-type:none;margin:-5px -15px -15px}ul.thumbnails li.box-icon{display:inline-block}ul.thumbnails li.box-icon a.thumbnail{padding:5px}ul.list-inline{list-style-type:none;margin:-5px -15px -15px}ul.list-inline li.box-icon{display:inline-block}ul.list-inline li.box-icon a.thumbnail{padding:5px}.row.row-preferences{margin:20px 0 0 10px} \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/avatar.jpg =================================================================== (Binary files differ) Index: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/avatar.jpg =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/avatar.jpg 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/avatar.jpg 2015-02-16 14:09:28 UTC (rev 12983) Property changes on: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/avatar.jpg ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.js 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.js 2015-02-16 14:09:28 UTC (rev 12983) @@ -1,6 +1,8 @@ //Load Metis Menu $(function() { - $('#side-menu').metisMenu(); + $('#side-menu').metisMenu({ + doubleTapToGo: true + }); }); //Loads the correct sidebar on window load, @@ -28,7 +30,7 @@ var url = window.location; var element = $('ul.nav a').filter(function() { return this.href == url || url.href.indexOf(this.href) == 0; - }).addClass('active').parent().parent().parent().addClass('in').parent(); + }).addClass('active').parent().addClass('in').parent(); if (element.is('li')) { element.addClass('active'); } @@ -57,3 +59,10 @@ responsive: true }); }); +// perform Bootstrap tab +$(function() { + $('li a:first').click(function (e) { + e.preventDefault(), + $(this).tab('show') + }); +}); \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.min.js =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.min.js 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.min.js 2015-02-16 14:09:28 UTC (rev 12983) @@ -2,4 +2,4 @@ // By Timgno (http://www.txmodxoops.org) // GNU Licenze // -$(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,width<768?($("div.sidebar-nav.navbar-collapse").addClass("collapse"),topOffset=150):$("div.sidebar-nav.navbar-collapse").removeClass("collapse"),height=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1,height-=topOffset,height<1&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")});var i=window.location,e=$("ul.nav a").filter(function(){return this.href==i||0==i.href.indexOf(this.href)}).addClass("active").parent().parent().parent().addClass("in").parent();e.is("li")&&e.addClass("active")}),$(function(){$("#accordion > h5").bind("click",function(){$(".pane").slideUp("fast"),$(this).hasClass("current")?$(this).removeClass("current"):($("#accordion > h5").removeClass("current"),$(this).addClass("current"),$(this).next().slideDown("fast"))})}),$(function(){$("ul.tabs").tabs("div.panes > div")}),$(function(){$("#dataTables").DataTable({responsive:!0})}); \ No newline at end of file +$(function(){$("#side-menu").metisMenu({doubleTapToGo: true})}),$(function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,width<768?($("div.sidebar-nav.navbar-collapse").addClass("collapse"),topOffset=150):$("div.sidebar-nav.navbar-collapse").removeClass("collapse"),height=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1,height-=topOffset,height<1&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")});var i=window.location,e=$("ul.nav a").filter(function(){return this.href==i||0==i.href.indexOf(this.href)}).addClass("active").parent().parent().parent().addClass("in").parent();e.is("li")&&e.addClass("active")}),$(function(){$("#accordion > h5").bind("click",function(){$(".pane").slideUp("fast"),$(this).hasClass("current")?$(this).removeClass("current"):($("#accordion > h5").removeClass("current"),$(this).addClass("current"),$(this).next().slideDown("fast"))})}),$(function(){$("ul.tabs").tabs("div.panes > div")}),$(function(){$("#dataTables").DataTable({responsive:!0})});$(function(){$('li a:first').click(function(e){e.preventDefault(),$(this).tab('show')});}); \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html 2015-02-16 14:09:28 UTC (rev 12983) @@ -75,8 +75,15 @@ </li> <{* /.dropdown *}> <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#"> - <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i> + <a href="#" class="dropdown-toggle account" data-toggle="dropdown"> + <div class="avatar"> + <img src="<{xoImgUrl assets/img/avatar.jpg}>" class="img-rounded" alt="avatar" /> + </div> + <i class="fa fa-caret-down pull-right"></i> + <div class="user-mini pull-right"> + <span class="welcome">Welcome,</span> + <span>Admin</span> + </div> </a> <ul class="dropdown-menu dropdown-user"> <li><a href="<{xoAppUrl modules/profile/admin/user.php}>"><i class="fa fa-user fa-fw"></i> User Profile</a></li> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html 2015-02-16 14:09:28 UTC (rev 12983) @@ -1,6 +1,6 @@ <ul class="thumbnails"> <{foreach item=mod from=$modules}> - <li class="module-icon text-center"><a class="thumbnail" href="<{$mod.link}>" title="<{$mod.title}> - <{$mod.description}>"> + <li class="box-icon text-center"><a class="thumbnail" href="<{$mod.link}>" title="<{$mod.title}> - <{$mod.description}>"> <img src='<{$mod.icon|default:"$theme_img/modules.png"}>' alt="<{$mod.title}>" /> <{* <span><{$mod.title}></span> *}> </a></li> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/navigation.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/navigation.html 2015-02-16 08:00:36 UTC (rev 12982) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/navigation.html 2015-02-16 14:09:28 UTC (rev 12983) @@ -6,9 +6,7 @@ <div class="input-group custom-search-form"> <input type="text" class="form-control" placeholder="Search..."> <span class="input-group-btn"> - <button class="btn btn-default" type="button"> - <i class="fa fa-search"></i> - </button> + <button class="btn btn-default" type="button"><i class="fa fa-search"></i></button> </span> </div> </form> @@ -18,16 +16,16 @@ <a href="<{xoAppUrl admin.php}>"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a> </li> <li class="dropdown-first-menu"> - <a href="#"><i class="fa fa-sitemap fa-fw"></i> Dropdown Menu<span class="fa arrow"></span></a> + <a href="#" class="dropdown-toggle"><i class="fa fa-sitemap fa-fw"></i> Dropdown Menu<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <{foreach item=item from=$navitems}> <li class="dropdown-second-menu"> - <a href="<{$item.link}>"><{$item.text}> <span class="fa arrow"></a> + <a href="<{$item.link}>" class="dropdown-toggle"><{$item.text}> <span class="fa arrow"></a> <ul class="nav nav-third-level"> <{foreach item=sub from=$item.menu}> <li class="dropdown-third-menu"> <{if $sub.options != 0}> - <a class="sub" href="<{$sub.link}>" title="<{$sub.title}>"><{$sub.title}> <span class="fa arrow"></a> + <a class="dropdown-toggle" href="<{$sub.link}>" title="<{$sub.title}>"><{$sub.title}> <span class="fa arrow"></a> <ul class="nav nav-fourth-level"> <{foreach item=option from=$sub.options}> <li class="dropdown-fourth-menu"><a href="<{$sub.url}><{$option.link}>"><{$option.title}></a></li> |
From: <txm...@us...> - 2015-02-16 08:00:39
|
Revision: 12982 http://sourceforge.net/p/xoops/svn/12982 Author: txmodxoops Date: 2015-02-16 08:00:36 +0000 (Mon, 16 Feb 2015) Log Message: ----------- Adaptive cpanel theme in admin profile module Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_categorylist.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_fieldlist.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_steplist.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_visibility.html Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_categorylist.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_categorylist.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_categorylist.html 2015-02-16 08:00:36 UTC (rev 12982) @@ -0,0 +1,19 @@ +<table class="table table-bordered"> + <tr> + <th><{$smarty.const._PROFILE_AM_TITLE}></th> + <th><{$smarty.const._PROFILE_AM_DESCRIPTION}></th> + <th><{$smarty.const._PROFILE_AM_WEIGHT}></th> + <th><{$smarty.const._PROFILE_AM_ACTION}></th> + </tr> + <{foreach item=category from=$categories}> + <tr class="<{cycle values='odd, even'}>"> + <td><{$category.cat_title}></td> + <td><{$category.cat_description}></td> + <td align= "center"><{$category.cat_weight}></td> + <td align= "center"> + <a href="category.php?id=<{$category.cat_id}>" title="<{$smarty.const._EDIT}>"><img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a> + <a href="category.php?op=delete&id=<{$category.cat_id}>" title="<{$smarty.const._DELETE}>"><img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>"</a> + </td> + </tr> + <{/foreach}> +</table> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_fieldlist.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_fieldlist.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_fieldlist.html 2015-02-16 08:00:36 UTC (rev 12982) @@ -0,0 +1,57 @@ +<form action="field.php" method="post" id="fieldform"> + <table class="table table-bordered"> + <th><{$smarty.const._PROFILE_AM_NAME}></th> + <th><{$smarty.const._PROFILE_AM_TITLE}></th> + <th><{$smarty.const._PROFILE_AM_DESCRIPTION}></th> + <th><{$smarty.const._PROFILE_AM_TYPE}></th> + <th><{$smarty.const._PROFILE_AM_CATEGORY}></th> + <th><{$smarty.const._PROFILE_AM_WEIGHT}></th> + <th><{$smarty.const._PROFILE_AM_REQUIRED}></th> + <th><{$smarty.const._PROFILE_AM_ACTION}></th> + <{foreach item=category from=$fieldcategories}> + <{foreach item=field from=$category}> + <tr class="<{cycle values='odd, even'}>"> + <td><{$field.field_name}></td> + <td><{$field.field_title}></td> + <td><{$field.field_description}></td> + <td><{$field.fieldtype}></td> + <td> + <{if $field.canEdit}> + <select name="category[<{$field.field_id}>]"><{html_options options=$categories selected=$field.cat_id}></select> + <{/if}> + </td> + <td> + <{if $field.canEdit}> + <input type="text" name="weight[<{$field.field_id}>]" size="5" maxlength="5" value="<{$field.field_weight}>" /> + <{/if}> + </td> + <td align="center"> + <{if $field.canEdit}> + <a href="field.php?op=toggle&field_required=<{$field.field_required}>&field_id=<{$field.field_id}>"><img src="<{xoModuleIcons16}><{$field.field_required}>.png" title="<{$smarty.const._PROFILE_AM_REQUIRED_TOGGLE}>" alt="<{$smarty.const._PROFILE_AM_REQUIRED_TOGGLE}>" /></a> + <{/if}> + </td> + <td align= "center"> + <{if $field.canEdit}> + <input type="hidden" name="oldweight[<{$field.field_id}>]" value="<{$field.field_weight}>" /> + <input type="hidden" name="oldcat[<{$field.field_id}>]" value="<{$field.cat_id}>" /> + <input type="hidden" name="field_ids[]" value="<{$field.field_id}>" /> + <a href="field.php?id=<{$field.field_id}>" title="<{$smarty.const._EDIT}>"><img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a> + <{/if}> + <{if $field.canDelete}> + <a href="field.php?op=delete&id=<{$field.field_id}>" title="<{$smarty.const._DELETE}>"><img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>"</a> + <{/if}> + </td> + </tr> + <{/foreach}> + <{/foreach}> + <tr class="<{cycle values='odd, even'}>"> + <td colspan="5"> </td> + <td> + <{$token}> + <input type="hidden" name="op" value="reorder" /> + <input type="submit" name="submit" class="btn btn-default" value="<{$smarty.const._SUBMIT}>" /> + </td> + <td colspan="2"> </td> + </tr> + </table> +</form> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_steplist.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_steplist.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_steplist.html 2015-02-16 08:00:36 UTC (rev 12982) @@ -0,0 +1,19 @@ +<table class="table table-bordered"> + <th><{$smarty.const._PROFILE_AM_STEPNAME}></th> + <th><{$smarty.const._PROFILE_AM_STEPORDER}></th> + <th><{$smarty.const._PROFILE_AM_STEPSAVE}></th> + <th><{$smarty.const._PROFILE_AM_ACTION}></th> + <{foreach item=step from=$steps}> + <tr class="<{cycle values='odd, even'}>"> + <td><{$step.step_name}></td> + <td align= "center"><{$step.step_order}></td> + <td align="center"> + <a href="step.php?op=toggle&step_save=<{$step.step_save}>&step_id=<{$step.step_id}>"><img src="<{xoModuleIcons16}><{$step.step_save}>.png" title="<{$smarty.const._PROFILE_AM_SAVESTEP_TOGGLE}>" alt="<{$smarty.const._PROFILE_AM_SAVESTEP_TOGGLE}>" /></a> + </td> + <td align= "center"> + <a href="step.php?id=<{$step.step_id}>" title="<{$smarty.const._EDIT}>"><img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a> + <a href="step.php?op=delete&id=<{$step.step_id}>" title="<{$smarty.const._DELETE}>"><img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>"</a> + </td> + </tr> + <{/foreach}> +</table> \ No newline at end of file Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_visibility.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_visibility.html (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/profile/templates/profile_admin_visibility.html 2015-02-16 08:00:36 UTC (rev 12982) @@ -0,0 +1,35 @@ +<br /> +<div class="head"> + <form id="<{$addform.name}>" method="<{$addform.method}>" action="<{$addform.action}>"> + <{foreach item=element from=$addform.elements}> + <{$element.caption}> <{$element.body}> + <{/foreach}> + </form> +</div> + +<table class="table table-bordered"> + <{foreach item=field from=$fields key=field_id}> + <tr class="<{cycle values='odd,even'}>"> + <td class="width20"><{$field}></td> + <td> + <{if isset($visibilities.$field_id)}> + <ul> + <{foreach item=visibility from=$visibilities.$field_id}> + <{assign var=user_gid value=$visibility.user_group}> + <{assign var=profile_gid value=$visibility.profile_group}> + <li> + <{$smarty.const._PROFILE_AM_FIELDVISIBLEFOR}> <{$groups.$user_gid}> + <{$smarty.const._PROFILE_AM_FIELDVISIBLEON}> <{$groups.$profile_gid}> + <a href="visibility.php?op=del&field_id=<{$field_id}>&ug=<{$user_gid}>&pg=<{$profile_gid}>" title="<{$smarty.const._DELETE}>"> + <img src="<{$xoops_url}>/modules/profile/images/no.png" alt="<{$smarty.const._DELETE}>" /> + </a> + </li> + <{/foreach}> + </ul> + <{else}> + <{$smarty.const._PROFILE_AM_FIELDNOTVISIBLE}> + <{/if}> + </td> + </tr> + <{/foreach}> +</table> \ No newline at end of file |
From: <txm...@us...> - 2015-02-15 15:23:29
|
Revision: 12981 http://sourceforge.net/p/xoops/svn/12981 Author: txmodxoops Date: 2015-02-15 15:23:22 +0000 (Sun, 15 Feb 2015) Log Message: ----------- Updated Added calendar icon for datepcker Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextdateselect.php Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/calendar.png Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextdateselect.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextdateselect.php 2015-02-15 10:32:18 UTC (rev 12980) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextdateselect.php 2015-02-15 15:23:22 UTC (rev 12981) @@ -59,15 +59,18 @@ if (!$included) { $included = true; $GLOBALS['xoTheme']->addScript('','', ' - $(function() { - $( ".datepicker" ).datepicker({ $.datepicker.regional[ "'. _LANGCODE .'" ] }); - $( ".datepicker" ).datepicker({ + $(function() { + $( ".datepicker" ).datepicker({ + showOn: "button", + buttonImage: "'.XOOPS_URL.'/images/calendar.png", + buttonImageOnly: true, + buttonText: "Select date", showWeek: true, firstDay: 1, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true - }); + }).regional[ "'. _LANGCODE .'" ]; }); '); } Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/calendar.png =================================================================== (Binary files differ) Index: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/calendar.png =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/calendar.png 2015-02-15 10:32:18 UTC (rev 12980) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/calendar.png 2015-02-15 15:23:22 UTC (rev 12981) Property changes on: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/images/calendar.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property |
From: <txm...@us...> - 2015-02-15 10:32:27
|
Revision: 12980 http://sourceforge.net/p/xoops/svn/12980 Author: txmodxoops Date: 2015-02-15 10:32:18 +0000 (Sun, 15 Feb 2015) Log Message: ----------- Added minified css xnewage.min.css file Modifieds Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_header.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_preferences.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_header.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_header.html 2015-02-15 10:02:48 UTC (rev 12979) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_header.html 2015-02-15 10:32:18 UTC (rev 12980) @@ -1,3 +1,4 @@ +<{* <{if $help_content}> <div class="hide" id="xo-system-help"> <{includeq file="$help_content"}> @@ -3,8 +4,9 @@ </div> <{/if}> +*}> <{if $xo_sys_tips}> -<div class="ui-corner-all"> - <img class="floatleft" src="<{xoAdminIcons tips.png}>" alt="<{$smarty.const._AM_SYSTEM_TIPS}>" title="<{$smarty.const._AM_SYSTEM_TIPS}>" /> - <div class="floatleft"><{$xo_sys_tips}></div> +<div class="row"> + <img class="pull-left" src="<{xoAdminIcons tips.png}>" alt="<{$smarty.const._AM_SYSTEM_TIPS}>" title="<{$smarty.const._AM_SYSTEM_TIPS}>" /> + <div class="pull-left"><{$xo_sys_tips}></div> <div class="clear"> </div> </div> Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_preferences.html =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_preferences.html 2015-02-15 10:02:48 UTC (rev 12979) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_preferences.html 2015-02-15 10:32:18 UTC (rev 12980) @@ -3,20 +3,19 @@ <{/if}> <!--Preferences--> <{if $menu}> -<ul class="list-inline"> - <{foreach item=preferences from=$preferences}> - <li class="box-icon text-center"><a class="thumbnail" href="admin.php?fct=preferences&op=show&confcat_id=<{$preferences.id}>" title="<{$preferences.name}>"> - <img class="img-rounded" src="<{$preferences.image}>" alt="<{$preferences.name}>" /> - <span><{$preferences.name}></span> - </a></li> - <{/foreach}> - <li class="box-icon text-center"><a class="thumbnail" href="admin.php?fct=preferences&op=showmod&mod=1" title="<{$smarty.const._AM_SYSTEM_PREFERENCES_SETTINGS}>"> - <img class="img-rounded" src="<{xoAdminIcons xoops/system_mods.png}>" alt="<{$smarty.const._AM_SYSTEM_PREFERENCES_SETTINGS}>" /> - <span><{$smarty.const._AM_SYSTEM_PREFERENCES_SETTINGS}></span> - </a></li> -</ul> +<div class="row row-preferences"> + <ul class="list-inline"> + <{foreach item=preferences from=$preferences}> + <li class="box-icon text-center"><a class="thumbnail" href="admin.php?fct=preferences&op=show&confcat_id=<{$preferences.id}>" title="<{$preferences.name}>"> + <img class="img-rounded" src="<{$preferences.image}>" alt="<{$preferences.name}>" /> + <span><{$preferences.name}></span> + </a></li> + <{/foreach}> + <li class="box-icon text-center"><a class="thumbnail" href="admin.php?fct=preferences&op=showmod&mod=1" title="<{$smarty.const._AM_SYSTEM_PREFERENCES_SETTINGS}>"> + <img class="img-rounded" src="<{xoAdminIcons xoops/system_mods.png}>" alt="<{$smarty.const._AM_SYSTEM_PREFERENCES_SETTINGS}>" /> + <span><{$smarty.const._AM_SYSTEM_PREFERENCES_SETTINGS}></span> + </a></li> + </ul> +</div> <{/if}> -<div class="clear"> </div> -<br /> - - +<div class="clear"> </div> \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css 2015-02-15 10:02:48 UTC (rev 12979) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css 2015-02-15 10:32:18 UTC (rev 12980) @@ -1,7 +1,7 @@ /*! - * XNewage Bootstrap Admin Xoops Theme (http://www.txmodxoops.org) + * XNewage Bootstrap CPanel Xoops Theme (http://www.txmodxoops.org) * Licensed under the GNU License v2.0. - * For details, see http://www.apache.org/licenses/LICENSE-2.0. + * For details, see http://www.gnu.org/licenses/gpl-3.0.html */ body { @@ -445,4 +445,8 @@ ul.thumbnails li.module-icon a.thumbnail { padding: 5px; +} + +.row.row-preferences { + margin: 20px 0 0 10px; } \ No newline at end of file Modified: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css 2015-02-15 10:02:48 UTC (rev 12979) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css 2015-02-15 10:32:18 UTC (rev 12980) @@ -1,7 +1,7 @@ /*! - * XNewage Bootstrap Admin Xoops Theme (http://www.txmodxoops.org) + * XNewage Bootstrap CPanel Xoops Theme (http://www.txmodxoops.org) * Licensed under the GNU License v2.0. * For details, see http://www.gnu.org/licenses/gpl-3.0.html */ -body{background-color:#f8f8f8}ul.line-type{list-style-type:none;padding:0;margin:0 0 0 15px}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media(min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-top-links{margin-right:0}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links .dropdown-menu li{display:block}.navbar-top-links.dropdown-menu li:last-child{margin-right:0}.navbar-top-links.dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links .dropdown-menu li a div{white-space:normal}.navbar-top-links.dropdown-messages,.navbar-top-links .dropdown-tasks,.navbar-top-links.dropdown-alerts{width:310px;min-width:0}.navbar-top-links .dropdown-messages{margin-left:5px}.navbar-top-links .dropdown-tasks{margin-left:-59px}.navbar-top-links .dropdown-alerts{margin-left:-123px}.navbar-top-links.dropdown-user{right:0;left:auto}.sidebar .sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar .sidebar-search{padding:15px}.sidebar ul li{border-bottom:1px solid #e7e7e7}.sidebar ul li a.active{background-color:#eee}.sidebar .arrow{float:right}.sidebar .fa.arrow:before{content:"\f104"}.sidebar .active>a>.fa.arrow:before{content:"\f107"}.sidebar.nav-second-level li,.sidebar.nav-third-level li,.sidebar.nav-fourth-level li{border-bottom:0!important}.sidebar.nav-second-level li a{padding-left:37px}.sidebar .nav-third-level li a{padding-left:52px}.sidebar.nav-fourth-level li a{padding-left:67px}@media(min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links .dropdown-messages,.navbar-top-links.dropdown-tasks,.navbar-top-links .dropdown-alerts{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all .5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-info.btn-outline:hover,.btn-warning.btn-outline:hover,.btn-danger.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left .chat-body{margin-left:60px}.chat li.right .chat-body{margin-right:60px}.chat li.chat-body p{margin:0}.panel.slidedown.glyphicon,.chat.glyphicon{margin-right:5px}.chat-panel.panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}.dataTables_wrapper{position:relative;clear:both}table.dataTable thead.sorting,table.dataTable thead.sorting_asc,table.dataTable thead.sorting_desc,table.dataTable thead.sorting_asc_disabled,table.dataTable thead.sorting_desc_disabled{background:0 0}table.dataTable thead.sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table.dataTable thead.sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table.dataTable thead.sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green .panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red.panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow.panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13}#accordion{border:1px solid #f5f5f5;background-color:#f0f0f0;color:#333;width:100%;box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-moz-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-webkit-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-khtml-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset}#accordion h5{padding:5px 10px;cursor:pointer;position:relative;margin:1px;background:inherit!important;color:#000;border:1px solid #FFF;font-weight:700}#accordion h5.current{cursor:default;background-color:#f7f7f7}#accordion .pane{display:none;padding:10px;font-size:12px;line-height:120%}.xgiftshop{text-align:center!important}#xokeytitle{padding:2px;font-size:13px;font-weight:700;color:#333}#xokeynumber{text-align:center;padding-top:5px;padding-bottom:5px;font-size:13px;font-weight:700;color:#92EF2C}#xolicenses{padding:5px 18px!important}#xolicenses a{color:#45C5DF}#xolicenses a:hover{color:red;text-decoration:none}ul.thumbnails{list-style-type:none;margin:-5px -15px -15px}ul.thumbnails li.box-icon{display:inline-block}ul.thumbnails li.box-icon a.thumbnail{padding:5px}ul.list-inline{list-style-type:none;margin:-5px -15px -15px}ul.list-inline li.box-icon{display:inline-block}ul.list-inline li.box-icon a.thumbnail{padding:5px} \ No newline at end of file +body{background-color:#f8f8f8}ul.line-type{list-style-type:none;padding:0;margin:0 0 0 15px}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media(min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-top-links{margin-right:0}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links .dropdown-menu li{display:block}.navbar-top-links.dropdown-menu li:last-child{margin-right:0}.navbar-top-links.dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links .dropdown-menu li a div{white-space:normal}.navbar-top-links.dropdown-messages,.navbar-top-links .dropdown-tasks,.navbar-top-links.dropdown-alerts{width:310px;min-width:0}.navbar-top-links .dropdown-messages{margin-left:5px}.navbar-top-links .dropdown-tasks{margin-left:-59px}.navbar-top-links .dropdown-alerts{margin-left:-123px}.navbar-top-links.dropdown-user{right:0;left:auto}.sidebar .sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar .sidebar-search{padding:15px}.sidebar ul li{border-bottom:1px solid #e7e7e7}.sidebar ul li a.active{background-color:#eee}.sidebar .arrow{float:right}.sidebar .fa.arrow:before{content:"\f104"}.sidebar .active>a>.fa.arrow:before{content:"\f107"}.sidebar.nav-second-level li,.sidebar.nav-third-level li,.sidebar.nav-fourth-level li{border-bottom:0!important}.sidebar.nav-second-level li a{padding-left:37px}.sidebar .nav-third-level li a{padding-left:52px}.sidebar.nav-fourth-level li a{padding-left:67px}@media(min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links .dropdown-messages,.navbar-top-links.dropdown-tasks,.navbar-top-links .dropdown-alerts{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all .5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-info.btn-outline:hover,.btn-warning.btn-outline:hover,.btn-danger.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left .chat-body{margin-left:60px}.chat li.right .chat-body{margin-right:60px}.chat li.chat-body p{margin:0}.panel.slidedown.glyphicon,.chat.glyphicon{margin-right:5px}.chat-panel.panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}.dataTables_wrapper{position:relative;clear:both}table.dataTable thead.sorting,table.dataTable thead.sorting_asc,table.dataTable thead.sorting_desc,table.dataTable thead.sorting_asc_disabled,table.dataTable thead.sorting_desc_disabled{background:0 0}table.dataTable thead.sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table.dataTable thead.sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table.dataTable thead.sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green .panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red.panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow.panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13}#accordion{border:1px solid #f5f5f5;background-color:#f0f0f0;color:#333;width:100%;box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-moz-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-webkit-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-khtml-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset}#accordion h5{padding:5px 10px;cursor:pointer;position:relative;margin:1px;background:inherit!important;color:#000;border:1px solid #FFF;font-weight:700}#accordion h5.current{cursor:default;background-color:#f7f7f7}#accordion .pane{display:none;padding:10px;font-size:12px;line-height:120%}.xgiftshop{text-align:center!important}#xokeytitle{padding:2px;font-size:13px;font-weight:700;color:#333}#xokeynumber{text-align:center;padding-top:5px;padding-bottom:5px;font-size:13px;font-weight:700;color:#92EF2C}#xolicenses{padding:5px 18px!important}#xolicenses a{color:#45C5DF}#xolicenses a:hover{color:red;text-decoration:none}ul.thumbnails{list-style-type:none;margin:-5px -15px -15px}ul.thumbnails li.box-icon{display:inline-block}ul.thumbnails li.box-icon a.thumbnail{padding:5px}ul.list-inline{list-style-type:none;margin:-5px -15px -15px}ul.list-inline li.box-icon{display:inline-block}ul.list-inline li.box-icon a.thumbnail{padding:5px}.row.row-preferences{margin: 20px 0 0 10px;} \ No newline at end of file |
From: <txm...@us...> - 2015-02-15 10:02:51
|
Revision: 12979 http://sourceforge.net/p/xoops/svn/12979 Author: txmodxoops Date: 2015-02-15 10:02:48 +0000 (Sun, 15 Feb 2015) Log Message: ----------- Updated Added and modifed more files Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_preferences.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_templates.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_users.html Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/jquery.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/main.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.min.css Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/jquery.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/jquery.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/jquery.php 2015-02-15 10:02:48 UTC (rev 12979) @@ -0,0 +1,155 @@ +<?php +/** + * Template Manager + * Manage all templates: theme and module + * + * 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) + * @author Maxime Cointin (AKA Kraven30) + * @package system + * @version $Id: jquery.php 12104 2013-09-28 21:37:53Z beckmi $ + */ + +include dirname( dirname( dirname( __FILE__ ) ) ) . '/header.php'; + +if (!defined('XOOPS_ROOT_PATH')) { die('Error'); } + +if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) exit( _NOPERM ); + +error_reporting(0); +$GLOBALS['xoopsLogger']->activated = false; + +if ( file_exists('./../../language/'.$xoopsConfig['language'].'"/admin/tplsets.php') ) { + include_once './../../language/'.$xoopsConfig['language'].'/admin/tplsets.php'; +} else { + include_once './../../language/english/admin/tplsets.php'; +} + +if (isset($_REQUEST["op"])) { + $op = $_REQUEST["op"]; +} else { + @$op = "default"; +} + +$GLOBALS['xoopsLogger']->usePopup = true; + +switch ($op) { + // Display tree folder + case "tpls_display_folder": + $_REQUEST['dir'] = urldecode($_REQUEST['dir']); + $root = XOOPS_THEME_PATH; + if ( file_exists($root . $_REQUEST['dir']) ) { + $files = scandir($root . $_REQUEST['dir']); + natcasesort($files); + if ( count($files) > 2 ) { /* The 2 accounts for . and .. */ + echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">"; + // All dirs + foreach ($files as $file) { + + if ( file_exists($root . $_REQUEST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_REQUEST['dir'] . $file) ) { + //retirer .svn + $file_no_valid = array('.svn', 'icons', 'img', 'images', 'language'); + + if (!in_array($file, $file_no_valid)) { + echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_REQUEST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>"; + } + } + } + // All files + foreach ($files as $file) { + if ( file_exists($root . $_REQUEST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_REQUEST['dir'] . $file) && $file != 'index.html' ) { + $ext = preg_replace('/^.*\./', '', $file); + + $extensions = array('.html', '.htm', '.css'); + $extension_verif = strrchr($file, '.'); + + if (in_array($extension_verif, $extensions)) { + echo "<li class=\"file ext_$ext\"><a href=\"#\" onclick=\"tpls_edit_file('".htmlentities($_REQUEST['dir'].$file)."', '".htmlentities($_REQUEST['dir'])."', '".htmlentities($file)."', '".$ext."');\" rel=\"tpls_edit_file('".htmlentities($_REQUEST['dir'].$file)."', '".htmlentities($_REQUEST['dir'])."', '".htmlentities($file)."', '".$ext."');\">" . htmlentities($file) . "</a></li>"; + } else { + //echo "<li class=\"file ext_$ext\">" . htmlentities($file) . "</li>"; + } + + } + } + echo "</ul>"; + } + } + break; + // Edit File + case 'tpls_edit_file': + $path_file = realpath(XOOPS_ROOT_PATH.'/themes'.trim($_REQUEST['path_file'])); + $path_file = str_replace('\\','/',$path_file); + + //Button restore + if (file_exists($path_file.'.back')) { + $restore = '<button class="btn btn-default" type="button" onclick="tpls_restore(\''.$path_file.'\')" value="'._AM_SYSTEM_TEMPLATES_RESTORE.'" title="'._AM_SYSTEM_TEMPLATES_RESTORE.'"> + <img src="'.system_AdminIcons('revert.png').'" alt="'._AM_SYSTEM_TEMPLATES_RESTORE.'" /> + </button>'; + } else { + $restore = ''; + } + xoops_load('XoopsFile'); + XoopsFile::load('file'); + + $file = XoopsFile::getHandler('file', $path_file); + $content = $file->read(); + if (empty($content)) { + echo _AM_SYSTEM_TEMPLATES_EMPTY_FILE; + } + $ext = preg_replace('/^.*\./', '', $_REQUEST['path_file']); + + echo '<form name="back" action="admin.php?fct=tplsets&op=tpls_save" method="POST"> + <table border="0"> + <tr> + <td> + <div class="xo-btn-actions"> + <div class="xo-buttons"> + <button class="btn btn-default" type="submit" value="'._AM_SYSTEM_TEMPLATES_SAVE.'" title="'._AM_SYSTEM_TEMPLATES_SAVE.'"> + <img src="'.system_AdminIcons('save.png').'" alt="'._AM_SYSTEM_TEMPLATES_SAVE.'" /> + </button> + '.$restore.' + <button class="btn btn-default" type="button" onclick="$(\'#display_contenu\').hide();$(\'#display_form\').fadeIn(\'fast\');" title="'._AM_SYSTEM_TEMPLATES_CANCEL.'"> + <img src="'.system_AdminIcons('cancel.png').'" alt="'._AM_SYSTEM_TEMPLATES_CANCEL.'" /> + </button> + <div class="clear"></div> + </div> + </div> + </td> + </tr> + <tr> + <td><textarea id="code_mirror" name="templates" rows=24 cols=110>'.$content.'</textarea></td> + </tr> + </table>'; + echo '<input type="hidden" name="path_file" value="'.$path_file.'"><input type="hidden" name="file" value="'.trim($_REQUEST['file']).'"><input type="hidden" name="ext" value="'.$ext.'"></form>'; + break; + + // Restore backup file + case 'tpls_restore': + $extensions = array('.html', '.htm', '.css'); + + //check if the file is inside themes directory + $valid_dir = stristr(realpath($_REQUEST['path_file']), realpath(XOOPS_ROOT_PATH . '/themes')); + + $old_file = $_REQUEST['path_file'].'.back'; + $new_file = $_REQUEST['path_file']; + + $extension_verif = strrchr($new_file, '.'); + if ($valid_dir && in_array($extension_verif, $extensions) && file_exists($old_file) && file_exists($new_file) ) { + if (unlink($new_file)) { + if (rename($old_file, $new_file)) { + xoops_result(_AM_SYSTEM_TEMPLATES_RESTORE_OK); + exit(); + } + } + } + xoops_error(_AM_SYSTEM_TEMPLATES_RESTORE_NOTOK); + break; + +} Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/main.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/main.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/tplsets/main.php 2015-02-15 10:02:48 UTC (rev 12979) @@ -0,0 +1,371 @@ +<?php +// $Id: main.php 12036 2013-09-14 04:58:55Z beckmi $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// 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 2 of the License, or // +// (at your option) any later version. // +// // +// 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. 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, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Kazumi Ono (AKA onokazu) // +// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +// Check users rights +if ( !is_object($GLOBALS['xoopsUser']) || !is_object($GLOBALS['xoopsModule']) || !$GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) exit( _NOPERM ); + +// Get Action type +$op = system_CleanVars ( $_REQUEST, 'op', 'default', 'string' ); + +// Define main template +$xoopsOption['template_main'] = 'system_templates.html'; +// Call Header +xoops_cp_header(); +// Define scripts +$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); +$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); +$xoTheme->addScript('modules/system/js/jquery.easing.js'); +$xoTheme->addScript('modules/system/js/jqueryFileTree.js'); +$xoTheme->addScript('modules/system/js/admin.js'); +$xoTheme->addScript('modules/system/js/templates.js'); +$xoTheme->addScript('modules/system/js/code_mirror/codemirror.js'); +// Define Stylesheet +$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/admin.css'); +$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/code_mirror/docs.css'); +// Define Breadcrumb and tips +$xoBreadCrumb->addLink( _AM_SYSTEM_TEMPLATES_NAV_MAIN, system_adminVersion('tplsets', 'adminpath') ); + +switch ($op) { + //index + default: + // Assign Breadcrumb menu + $xoBreadCrumb->addHelp( system_adminVersion('tplsets', 'help') ); + $xoBreadCrumb->addTips( _AM_SYSTEM_TEMPLATES_NAV_TIPS ); + $xoBreadCrumb->render(); + + $GLOBALS['xoopsTpl']->assign('index', true); + + $form = new XoopsThemeForm(_AM_SYSTEM_TEMPLATES_GENERATE, "form", 'admin.php?fct=tplsets', "post", true); + + $ele = new XoopsFormSelect(_AM_SYSTEM_TEMPLATES_SET, 'tplset', $GLOBALS['xoopsConfig']['template_set']); + $tplset_handler =& xoops_gethandler('tplset'); + $tplsetlist = $tplset_handler->getList(); + asort($tplsetlist); + foreach ($tplsetlist as $key => $name) { + $ele->addOption($key, $name); + } + $form->addElement($ele); + $form->addElement(new XoopsFormSelectTheme(_AM_SYSTEM_TEMPLATES_SELECT_THEME, 'select_theme', 1, 5), true); + $form->addElement(new XoopsFormRadioYN(_AM_SYSTEM_TEMPLATES_FORCE_GENERATED, 'force_generated', 0, _YES, _NO), true); + + $modules = new XoopsFormSelect(_AM_SYSTEM_TEMPLATES_SELECT_MODULES, 'select_modules'); + $module_handler =& xoops_gethandler('module'); + $criteria = new CriteriaCompo(new Criteria('isactive', 1)); + $moduleslist = $module_handler->getList($criteria, true); + $modules->addOption(0, _AM_SYSTEM_TEMPLATES_ALL_MODULES); + $modules->addOptionArray($moduleslist); + $form->addElement($modules, true); + + $form->addElement(new XoopsFormHidden("active_templates", "0")); + $form->addElement(new XoopsFormHidden("active_modules", "0")); + $form->addElement(new XoopsFormHidden("op", "tpls_generate_surcharge")); + $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); + $xoopsTpl->assign('form', $form->render()); + break; + + //generate surcharge + case 'tpls_generate_surcharge': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('admin.php?fct=tplsets', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + // Assign Breadcrumb menu + $xoBreadCrumb->addHelp( system_adminVersion('tplsets', 'help') . '#override' ); + $xoBreadCrumb->addLink( _AM_SYSTEM_TEMPLATES_NAV_FILE_GENERATED ); + $xoBreadCrumb->render(); + + if ($_REQUEST['select_modules'] == '0' || $_REQUEST['active_modules'] == '1') { + //Generate modules + if (isset($_REQUEST['select_theme']) && isset($_REQUEST['force_generated'])) { + //on verifie si le dossier module existe + $theme_surcharge = XOOPS_THEME_PATH.'/'.$_REQUEST['select_theme'].'/modules'; + $indexFile = XOOPS_ROOT_PATH."/modules/system/include/index.html"; + $verif_write = false; + $text = ''; + + if (!is_dir($theme_surcharge)) { + //Creation du dossier modules + + if(!is_dir($theme_surcharge)) + mkdir($theme_surcharge, 0777); + chmod($theme_surcharge, 0777); + copy($indexFile, $theme_surcharge."/index.html"); + } + + $tplset = system_CleanVars($POST, 'tplset', 'default', 'string' ); + + //on cr�e uniquement les templates qui n'existent pas + $module_handler = xoops_gethandler('module'); + $tplset_handler = xoops_gethandler('tplset'); + $tpltpl_handler = xoops_gethandler('tplfile'); + + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('tplset_name', $tplset)); + $tplsets_arr = $tplset_handler->getObjects(); + $tcount = $tplset_handler->getCount(); + + + $tpltpl_handler = xoops_gethandler('tplfile'); + $installed_mods = $tpltpl_handler->getModuleTplCount($tplset); + + //all templates or only one template + if ($_REQUEST['active_templates'] == 0) { + foreach (array_keys($tplsets_arr) as $i) { + $tplsetname = $tplsets_arr[$i]->getVar('tplset_name'); + $tplstats = $tpltpl_handler->getModuleTplCount($tplsetname); + + if (count($tplstats) > 0) { + foreach ($tplstats as $moddir => $filecount) { + $module =& $module_handler->getByDirname($moddir); + if (is_object($module)) { + // create module folder + if (!is_dir($theme_surcharge.'/'.$module->getVar('dirname'))) { + mkdir($theme_surcharge.'/'.$module->getVar('dirname'), 0777); + chmod($theme_surcharge.'/'.$module->getVar('dirname'), 0777); + copy($indexFile, $theme_surcharge.'/'.$module->getVar('dirname').'/index.html'); + } + + // create block folder + if (!is_dir($theme_surcharge.'/'.$module->getVar('dirname').'/blocks')) { + if(!is_dir($theme_surcharge.'/'.$module->getVar('dirname').'/blocks')) + mkdir($theme_surcharge.'/'.$module->getVar('dirname').'/blocks', 0777); + chmod($theme_surcharge.'/'.$module->getVar('dirname').'/blocks', 0777); + copy($indexFile, $theme_surcharge.'/'.$module->getVar('dirname').'/blocks'.'/index.html'); + } + + $class = "odd"; + $text .= '<table class="table table-bordered"><thead><tr><th colspan="3" align="center">'._AM_SYSTEM_TEMPLATES_MODULES.ucfirst($module->getVar('dirname')).'</th></tr><tr><th align="center">'._AM_SYSTEM_TEMPLATES_TYPES.'</th><th align="center">'._AM_SYSTEM_TEMPLATES_FILES.'</th><th>'._AM_SYSTEM_TEMPLATES_STATUS.'</th></tr></thead><tbody>'; + // create template + $templates =& $tpltpl_handler->find($tplsetname, 'module', null, $moddir); + for ($j=0; $j<count($templates); $j++) { + $filename = $templates[$j]->getVar('tpl_file'); + if ($tplsetname == $tplset) { + $physical_file = XOOPS_THEME_PATH.'/'.$_REQUEST['select_theme'].'/modules/'.$moddir.'/'.$filename; + + $tplfile =& $tpltpl_handler->get($templates[$j]->getVar('tpl_id'), true); + + if (is_object($tplfile)) { + if (!file_exists($physical_file) || $_REQUEST['force_generated'] == 1) { + $open = fopen("".$physical_file."","w+"); + if (fwrite($open, "".$tplfile->getVar('tpl_source', 'n'))) { + $text .= '<tr class="'.$class.'"><td align="center">'._AM_SYSTEM_TEMPLATES_TEMPLATES.'</td><td>'.$physical_file.'</td><td align="center">'; + if (file_exists($physical_file)) { + $text .= '<img width="16" src="'.system_AdminIcons('success.png').'" /></td></tr>'; + } else { + $text .= '<img width="16" src="'.system_AdminIcons('cancel.png').'" /></td></tr>'; + } + $verif_write = true; + } + fclose($open); + $class = ($class == "even") ? "odd" : "even"; + } + } + } + } + + // create block template + $btemplates =& $tpltpl_handler->find($tplsetname, 'block', null, $moddir); + for ($k = 0; $k < count($btemplates); $k++) { + $filename = $btemplates[$k]->getVar('tpl_file'); + if ($tplsetname == $tplset) { + $physical_file = XOOPS_THEME_PATH.'/'.$_REQUEST['select_theme'].'/modules/'.$moddir.'/blocks/'.$filename; + $btplfile =& $tpltpl_handler->get($btemplates[$k]->getVar('tpl_id'), true); + + if (is_object($btplfile)) { + if (!file_exists($physical_file) || $_REQUEST['force_generated'] == 1) { + $open = fopen($physical_file,"w+"); + if (fwrite($open, $btplfile->getVar('tpl_source', 'n'))) { + $text .= '<tr class="'.$class.'"><td align="center">'._AM_SYSTEM_TEMPLATES_BLOCKS.'</td><td>'.$physical_file.'</td><td align="center">'; + if (file_exists($physical_file)) { + $text .= '<img width="16" src="'.system_AdminIcons('success.png').'" /></td></tr>'; + } else { + $text .= '<img width="16" src="'.system_AdminIcons('cancel.png').'" /></td></tr>'; + } + $verif_write = true; + } + fclose($open); + $class = ($class == "even") ? "odd" : "even"; + } + } + } + } + $text .= '</tbody></table>'; + } + } + unset($module); + } + } + } else { + foreach (array_keys($tplsets_arr) as $i) { + $tplsetname = $tplsets_arr[$i]->getVar('tplset_name'); + $tplstats = $tpltpl_handler->getModuleTplCount($tplsetname); + + if (count($tplstats) > 0) { + $moddir = $_REQUEST['select_modules']; + $module =& $module_handler->getByDirname($moddir); + if (is_object($module)) { + // create module folder + if (!is_dir($theme_surcharge.'/'.$module->getVar('dirname'))) { + mkdir($theme_surcharge.'/'.$module->getVar('dirname'), 0777); + chmod($theme_surcharge.'/'.$module->getVar('dirname'), 0777); + copy($indexFile, $theme_surcharge.'/'.$module->getVar('dirname').'/index.html'); + } + + // create block folder + if (!is_dir($theme_surcharge.'/'.$module->getVar('dirname').'/blocks')) { + if(!is_dir($theme_surcharge.'/'.$module->getVar('dirname').'/blocks')) + mkdir($theme_surcharge.'/'.$module->getVar('dirname').'/blocks', 0777); + chmod($theme_surcharge.'/'.$module->getVar('dirname').'/blocks', 0777); + copy($indexFile, $theme_surcharge.'/'.$module->getVar('dirname').'/blocks'.'/index.html'); + } + + $class = "odd"; + $text .= '<table class="table table-bordered"><thead><tr><th colspan="3" align="center">'._AM_SYSTEM_TEMPLATES_MODULES.ucfirst($module->getVar('dirname')).'</th></tr><tr><th align="center">'._AM_SYSTEM_TEMPLATES_TYPES.'</th><th align="center">'._AM_SYSTEM_TEMPLATES_FILES.'</th><th>'._AM_SYSTEM_TEMPLATES_STATUS.'</th></tr></thead><tbody>'; + $select_templates_modules = $_REQUEST['select_templates_modules']; + for ($l=0; $l<count($_REQUEST['select_templates_modules']); $l++) { + // create template + $templates =& $tpltpl_handler->find($tplsetname, 'module', null, $moddir); + for ($j=0; $j<count($templates); $j++) { + $filename = $templates[$j]->getVar('tpl_file'); + if ($tplsetname == $tplset) { + $physical_file = XOOPS_THEME_PATH.'/'.$_REQUEST['select_theme'].'/modules/'.$moddir.'/'.$filename; + + $tplfile =& $tpltpl_handler->get($templates[$j]->getVar('tpl_id'), true); + + if (is_object($tplfile)) { + if (!file_exists($physical_file) || $_REQUEST['force_generated'] == 1) { + if ($select_templates_modules[$l] == $filename) { + $open = fopen("".$physical_file."","w+"); + if (fwrite($open, "".$tplfile->getVar('tpl_source', 'n'))) { + $text .= '<tr class="'.$class.'"><td align="center">'._AM_SYSTEM_TEMPLATES_TEMPLATES.'</td><td>'.$physical_file.'</td><td align="center">'; + if (file_exists($physical_file)) { + $text .= '<img width="16" src="'.system_AdminIcons('success.png').'" /></td></tr>'; + } else { + $text .= '<img width="16" src="'.system_AdminIcons('cancel.png').'" /></td></tr>'; + } + $verif_write = true; + } + fclose($open); + } + $class = ($class == "even") ? "odd" : "even"; + } + } + } + } + + // create block template + $btemplates =& $tpltpl_handler->find($tplsetname, 'block', null, $moddir); + for ($k = 0; $k < count($btemplates); $k++) { + $filename = $btemplates[$k]->getVar('tpl_file'); + if ($tplsetname == $tplset) { + $physical_file = XOOPS_THEME_PATH.'/'.$_REQUEST['select_theme'].'/modules/'.$moddir.'/blocks/'.$filename; + $btplfile =& $tpltpl_handler->get($btemplates[$k]->getVar('tpl_id'), true); + + if (is_object($btplfile)) { + if (!file_exists($physical_file) || $_REQUEST['force_generated'] == 1) { + if ($select_templates_modules[$l] == $filename) { + $open = fopen("".$physical_file."","w+"); + if (fwrite($open, "".$btplfile->getVar('tpl_source', 'n')."")) { + $text .= '<tr class="'.$class.'"><td align="center">'._AM_SYSTEM_TEMPLATES_BLOCKS.'</td><td>'.$physical_file.'</td><td align="center">'; + if (file_exists($physical_file)) { + $text .= '<img width="16" src="'.system_AdminIcons('success.png').'" /></td></tr>'; + } else { + $text .= '<img width="16" src="'.system_AdminIcons('cancel.png').'" /></td></tr>'; + } + $verif_write = true; + } + fclose($open); + } + $class = ($class == "even") ? "odd" : "even"; + } + } + } + } + } + $text .= '</tbody></table>'; + } + unset($module); + } + } + } + $xoopsTpl->assign('infos', $text); + $xoopsTpl->assign('verif', $verif_write); + } else { + redirect_header("admin.php?fct=tplsets", 2, _AM_SYSTEM_TEMPLATES_SAVE); + } + } else { + // Generate one module + $GLOBALS['xoopsTpl']->assign('index', true); + + $tplset = system_CleanVars($POST, 'tplset', 'default', 'string' ); + + $form = new XoopsThemeForm(_AM_SYSTEM_TEMPLATES_SELECT_TEMPLATES, "form", 'admin.php?fct=tplsets', "post", true); + + $tpltpl_handler =& xoops_gethandler('tplfile'); + $templates_arr =& $tpltpl_handler->find($tplset, '', null, $_REQUEST['select_modules']); + + $modules = new XoopsFormSelect(_AM_SYSTEM_TEMPLATES_SELECT_TEMPLATES, 'select_templates_modules', null, 10, true); + foreach (array_keys($templates_arr) as $i) { + $modules->addOption($templates_arr[$i]->getVar('tpl_file')); + } + $form->addElement($modules); + + $form->addElement(new XoopsFormHidden("active_templates", "1")); + $form->addElement(new XoopsFormHidden("force_generated", $_REQUEST['force_generated'])); + $form->addElement(new XoopsFormHidden("select_modules", $_REQUEST['select_modules'])); + $form->addElement(new XoopsFormHidden("active_modules", "1")); + $form->addElement(new XoopsFormHidden("select_theme", $_REQUEST['select_theme'])); + $form->addElement(new XoopsFormHidden("op", "tpls_generate_surcharge")); + $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); + $xoopsTpl->assign('form', $form->render()); + } + break; + + // save + case 'tpls_save': + $path_file = $_REQUEST['path_file']; + if (isset($path_file)) { + // copy file + $copy_file = $path_file; + copy($copy_file, $path_file.'.back'); + // Save modif + if (isset($_REQUEST['templates'])) { + $open = fopen("".$path_file."","w+"); + if (!fwrite($open, utf8_encode(stripslashes($_REQUEST['templates'])))) { + redirect_header("admin.php?fct=tplsets", 2, _AM_SYSTEM_TEMPLATES_ERROR); + } + fclose($open); + } + } + redirect_header("admin.php?fct=tplsets", 2, _AM_SYSTEM_TEMPLATES_SAVE); + break; +} +// Call Footer +xoops_cp_footer(); Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/users/main.php 2015-02-15 10:02:48 UTC (rev 12979) @@ -0,0 +1,865 @@ +<?php +// $Id: main.php 12036 2013-09-14 04:58:55Z beckmi $ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// 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 2 of the License, or // +// (at your option) any later version. // +// // +// 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. 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, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: Kazumi Ono (AKA onokazu) // +// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // +// Project: The XOOPS Project // +// ------------------------------------------------------------------------- // + +// Check users rights +if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) exit( _NOPERM ); + +include_once XOOPS_ROOT_PATH . "/modules/system/admin/users/users.php"; +// Get Action type +$op = system_CleanVars ( $_REQUEST, 'op', 'default', 'string' ); + +$member_handler =& xoops_gethandler('member', 'system'); +// Define main template +$xoopsOption['template_main'] = 'system_users.html'; +// Call Header +xoops_cp_header(); + +$myts =& MyTextSanitizer::getInstance(); +// Define Stylesheet +$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/admin.css'); +$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); +// Define scripts +$xoTheme->addScript('modules/system/js/admin.js'); +// Define Breadcrumb and tips +$xoBreadCrumb->addLink( _AM_SYSTEM_USERS_NAV_MAIN, system_adminVersion('users', 'adminpath') ); + +$uid = system_CleanVars($_REQUEST, 'uid', 0); +switch ($op) { + + // Edit user + case 'users_edit': + // Assign Breadcrumb menu + $xoBreadCrumb->addHelp( system_adminVersion('users', 'help') . '#edit' ); + $xoBreadCrumb->addLink( _AM_SYSTEM_USERS_NAV_EDIT_USER ); + $xoBreadCrumb->render(); + form_user(false, $uid); + break; + + // Add user + case 'users_add': + // Assign Breadcrumb menu + $xoBreadCrumb->addHelp( system_adminVersion('users', 'help') . '#add' ); + $xoBreadCrumb->addLink( _AM_SYSTEM_USERS_NAV_ADD_USER ); + $xoBreadCrumb->render(); + form_user(true); + break; + + // Delete user + case 'users_delete': + $xoBreadCrumb->render(); + $user =& $member_handler->getUser($uid); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header("admin.php?fct=users", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + + $groups = $user->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups)) { + xoops_error( sprintf( _AM_SYSTEM_USERS_NO_ADMINSUPP, $user->getVar("uname")) ); + } elseif (!$member_handler->deleteUser($user)) { + xoops_error( sprintf( _AM_SYSTEM_USERS_NO_SUPP, $user->getVar("uname")) ); + } else { + $online_handler =& xoops_gethandler('online'); + $online_handler->destroy($uid); + // RMV-NOTIFY + xoops_notification_deletebyuser($uid); + redirect_header("admin.php?fct=users",1,_AM_SYSTEM_DBUPDATED); + } + } else { + //Assign Breadcrumb menu + $xoBreadCrumb->addHelp( system_adminVersion('users', 'help') . '#delete' ); + $xoBreadCrumb->addLink( _AM_SYSTEM_USERS_NAV_DELETE_USER ); + $xoBreadCrumb->render(); + xoops_confirm(array('ok' => 1, 'uid' => $uid, 'op' => 'users_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_SYSTEM_USERS_FORM_SURE_DEL, $user->getVar('uname'))); + } + break; + + // Delete users + case "action_group": + if ((@isset($_REQUEST['memberslist_id']) || @$_REQUEST['memberslist_id'] != '')) { + $xoBreadCrumb->render(); + $error = ''; + foreach ($_REQUEST['memberslist_id'] as $del) { + $del = intval($del); + $user =& $member_handler->getUser($del); + $groups = $user->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups)) { + $error .= sprintf( _AM_SYSTEM_USERS_NO_ADMINSUPP, $user->getVar("uname")); + } elseif (!$member_handler->deleteUser($user)) { + $error .= sprintf( _AM_SYSTEM_USERS_NO_SUPP, $user->getVar("uname")); + } else { + $online_handler =& xoops_gethandler('online'); + $online_handler->destroy($del); + // RMV-NOTIFY + xoops_notification_deletebyuser($del); + } + } + if ($error != '') { + redirect_header("admin.php?fct=users", 3, sprintf( _AM_SYSTEM_USERS_ERROR,$error ) ); + } else { + redirect_header("admin.php?fct=users", 1, _AM_SYSTEM_DBUPDATED); + } + } + break; + + // Save user + case "users_save": + global $xoopsConfig, $xoopsModule, $xoopsUser; + + if (isset($_REQUEST['uid'])) { + //Update user + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header("admin.php?fct=users", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + // RMV-NOTIFY + $user_avatar = $theme = null; + if ( !isset( $_REQUEST['attachsig'] ) ) $attachsig = null; + if ( !isset( $_REQUEST['user_viewemail'] ) ) $user_viewemail = null; + + $edituser =& $member_handler->getUser($uid); + if ($edituser->getVar('uname', 'n') != $_REQUEST['username'] && $member_handler->getUserCount(new Criteria('uname', $myts->addSlashes($_REQUEST['username']))) > 0) { + xoops_cp_header(); + xoops_error( sprintf( _AM_SYSTEM_USERS_PSEUDO_ERROR, htmlspecialchars($_REQUEST['username'])) ); + xoops_cp_footer(); + } elseif ( $edituser->getVar('email', 'n') != $_REQUEST['email'] && $member_handler->getUserCount( new Criteria( 'email', $myts->addSlashes($_REQUEST['email']) ) ) > 0 ) { + xoops_cp_header(); + xoops_error( sprintf( _AM_SYSTEM_USERS_MAIL_ERROR, htmlspecialchars($_REQUEST['email'])) ); + xoops_cp_footer(); + } else { + $edituser->setVar("name", $_REQUEST['name']); + $edituser->setVar("uname", $_REQUEST['username']); + $edituser->setVar("email", $_REQUEST['email']); + $url = isset( $_REQUEST['url'] ) ? formatURL( $_REQUEST['url'] ) : ''; + $edituser->setVar( "url", $url ); + $edituser->setVar("user_icq", $_REQUEST['user_icq']); + $edituser->setVar("user_from", $_REQUEST['user_from']); + $edituser->setVar("user_sig", $_REQUEST['user_sig']); + $user_viewemail = (isset($_REQUEST['user_viewemail']) && $_REQUEST['user_viewemail'] == 1) ? 1 : 0; + $edituser->setVar("user_viewemail", $user_viewemail); + $edituser->setVar("user_aim", $_REQUEST['user_aim']); + $edituser->setVar("user_yim", $_REQUEST['user_yim']); + $edituser->setVar("user_msnm", $_REQUEST['user_msnm']); + $attachsig = ( isset( $_REQUEST['attachsig'] ) && $_REQUEST['attachsig'] == 1 ) ? 1 : 0; + $edituser->setVar("attachsig", $attachsig); + $edituser->setVar("timezone_offset", $_REQUEST['timezone_offset']); + $edituser->setVar("uorder", $_REQUEST['uorder']); + $edituser->setVar("umode", $_REQUEST['umode']); + // RMV-NOTIFY + $edituser->setVar("notify_method", $_REQUEST['notify_method']); + $edituser->setVar("notify_mode", $_REQUEST['notify_mode']); + $edituser->setVar("bio", $_REQUEST['bio']); + $edituser->setVar("rank", $_REQUEST['rank']); + $edituser->setVar("user_occ", $_REQUEST['user_occ']); + $edituser->setVar("user_intrest", $_REQUEST['user_intrest']); + $edituser->setVar('user_mailok', $_REQUEST['user_mailok']); + if ($_REQUEST['pass2'] != "") { + if ($_REQUEST['password'] != $_REQUEST['pass2']) { + xoops_cp_header(); + echo " + <strong>"._AM_SYSTEM_USERS_STNPDNM."</strong>"; + xoops_cp_footer(); + exit(); + } + $edituser->setVar("pass", md5($_REQUEST['password'])); + } + if (!$member_handler->insertUser($edituser)) { + xoops_cp_header(); + echo $edituser->getHtmlErrors(); + xoops_cp_footer(); + } else { + if ($_REQUEST['groups'] != array()) { + global $xoopsUser; + $oldgroups = $edituser->getGroups(); + //If the edited user is the current user and the current user WAS in the webmaster's group and is NOT in the new groups array + if ($edituser->getVar('uid') == $xoopsUser->getVar('uid') && (in_array(XOOPS_GROUP_ADMIN, $oldgroups)) && !(in_array(XOOPS_GROUP_ADMIN, $_REQUEST['groups']))) { + //Add the webmaster's group to the groups array to prevent accidentally removing oneself from the webmaster's group + array_push($_REQUEST['groups'], XOOPS_GROUP_ADMIN); + } + $member_handler =& xoops_gethandler('member'); + foreach ($oldgroups as $groupid) { + $member_handler->removeUsersFromGroup($groupid, array($edituser->getVar('uid'))); + } + foreach ($_REQUEST['groups'] as $groupid) { + $member_handler->addUserToGroup($groupid, $edituser->getVar('uid')); + } + } + redirect_header("admin.php?fct=users",1,_AM_SYSTEM_DBUPDATED); + } + } + exit(); + } else { + //Add user + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header("admin.php?fct=users", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + } + if (!$_REQUEST['username'] || !$_REQUEST['email'] || !$_REQUEST['password']) { + $adduser_errormsg = _AM_SYSTEM_USERS_YMCACF; + } else { + $member_handler =& xoops_gethandler('member'); + // make sure the username doesnt exist yet + if ($member_handler->getUserCount(new Criteria('uname', $myts->addSlashes($_REQUEST['username']))) > 0) { + $adduser_errormsg = 'User name '. htmlspecialchars($_REQUEST['username']) .' already exists'; + } else { + $newuser =& $member_handler->createUser(); + if ( isset($user_viewemail) ) { + $newuser->setVar("user_viewemail",$_REQUEST['user_viewemail']); + } + if ( isset($attachsig) ) { + $newuser->setVar("attachsig",$_REQUEST['attachsig']); + } + $newuser->setVar("name", $_REQUEST['name']); + $newuser->setVar("uname", $_REQUEST['username']); + $newuser->setVar("email", $_REQUEST['email']); + $newuser->setVar("url", formatURL($_REQUEST['url'])); + $newuser->setVar("user_avatar",'blank.gif'); + $newuser->setVar('user_regdate', time()); + $newuser->setVar("user_icq", $_REQUEST['user_icq']); + $newuser->setVar("user_from", $_REQUEST['user_from']); + $newuser->setVar("user_sig", $_REQUEST['user_sig']); + $newuser->setVar("user_aim", $_REQUEST['user_aim']); + $newuser->setVar("user_yim", $_REQUEST['user_yim']); + $newuser->setVar("user_msnm", $_REQUEST['user_msnm']); + if ($_REQUEST['pass2'] != "") { + if ($_REQUEST['password'] != $_REQUEST['pass2']) { + xoops_cp_header(); + echo "<strong>" . _AM_SYSTEM_USERS_STNPDNM . "</strong>"; + xoops_cp_footer(); + exit(); + } + $newuser->setVar("pass", md5($_REQUEST['password'])); + } + $newuser->setVar("timezone_offset", $_REQUEST['timezone_offset']); + $newuser->setVar("uorder", $_REQUEST['uorder']); + $newuser->setVar("umode", $_REQUEST['umode']); + // RMV-NOTIFY + $newuser->setVar("notify_method", $_REQUEST['notify_method']); + $newuser->setVar("notify_mode", $_REQUEST['notify_mode']); + $newuser->setVar("bio", $_REQUEST['bio']); + $newuser->setVar("rank", $_REQUEST['rank']); + $newuser->setVar("level", 1); + $newuser->setVar("user_occ", $_REQUEST['user_occ']); + $newuser->setVar("user_intrest", $_REQUEST['user_intrest']); + $newuser->setVar('user_mailok', $_REQUEST['user_mailok']); + if (!$member_handler->insertUser($newuser)) { + $adduser_errormsg = _AM_SYSTEM_USERS_CNRNU; + } else { + $groups_failed = array(); + foreach ($_REQUEST['groups'] as $group) { + $group = intval($group); + if (!$member_handler->addUserToGroup($group, $newuser->getVar('uid'))) { + $groups_failed[] = $group; + } + } + if (!empty($groups_failed)) { + $group_names = $member_handler->getGroupList(new Criteria('groupid', "(".implode(", ", $groups_failed).")", 'IN')); + $adduser_errormsg = sprintf(_AM_SYSTEM_USERS_CNRNU2, implode(", ", $group_names)); + } else { + xoops_load("XoopsUserUtility"); + XoopsUserUtility::sendWelcome($newuser); + redirect_header("admin.php?fct=users", 1, _AM_SYSTEM_DBUPDATED); + exit(); + } + } + } + } + xoops_error($adduser_errormsg); + } + break; + + // Activ member + case 'users_active': + if (isset($_REQUEST["uid"])) { + $obj =& $member_handler->getUser($uid); + //echo $_REQUEST["uid"]; + //print_r($obj); + } + $obj->setVar("level", 1); + if ($member_handler->insertUser($obj, true)) { + redirect_header("admin.php?fct=users", 1, _AM_SYSTEM_DBUPDATED); + } + echo $obj->getHtmlErrors(); + break; + + // Synchronize + case 'users_synchronize': + if (isset($_REQUEST['status']) && $_REQUEST['status'] == 1) { + synchronize($$uid, 'user'); + } elseif (isset($_REQUEST['status']) && $_REQUEST['status'] == 2) { + synchronize( '', 'all users'); + } + redirect_header("admin.php?fct=users", 1, _AM_SYSTEM_DBUPDATED); + break; + + default: + // Search and Display + // Define scripts + $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); + $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); + //table sorting does not work with select boxes + //$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.tablesorter.js'); + $xoTheme->addScript('modules/system/js/admin.js'); + //Recherche approfondie + + if (isset($_REQUEST['complet_search'])) { + // Assign Breadcrumb menu + $xoBreadCrumb->addLink( _AM_SYSTEM_USERS_NAV_ADVANCED_SEARCH ); + $xoBreadCrumb->addHelp( system_adminVersion('users', 'help') ); + $xoBreadCrumb->addTips( _AM_SYSTEM_USERS_NAV_TIPS ); + $xoBreadCrumb->render(); + + $acttotal = $member_handler->getUserCount(new Criteria('level', 0, '>')); + $inacttotal = $member_handler->getUserCount(new Criteria('level', 0)); + + //$group_select = new XoopsFormSelectGroup(_AM_SYSTEM_USERS_GROUPS, "selgroups", null, false, 1, false); + $group_select = new XoopsFormSelect(_AM_SYSTEM_USERS_GROUPS, "selgroups"); + + $group_handler =& xoops_gethandler('group'); + $group_arr = $group_handler->getObjects(); + $group_select->addOption("", "--------------"); + foreach (array_keys($group_arr) as $i) { + if($group_arr[$i]->getVar("groupid") != 3) + $group_select->addOption("".$group_arr[$i]->getVar("groupid")."", "".$group_arr[$i]->getVar("name").""); + } + + + $uname_text = new XoopsFormText("", "user_uname", 30, 60); + $uname_match = new XoopsFormSelectMatchOption("", "user_uname_match"); + $uname_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_UNAME, " "); + $uname_tray->addElement($uname_match); + $uname_tray->addElement($uname_text); + $name_text = new XoopsFormText("", "user_name", 30, 60); + $name_match = new XoopsFormSelectMatchOption("", "user_name_match"); + $name_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_REALNAME, " "); + $name_tray->addElement($name_match); + $name_tray->addElement($name_text); + $email_text = new XoopsFormText("", "user_email", 30, 60); + $email_match = new XoopsFormSelectMatchOption("", "user_email_match"); + $email_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_EMAIL, " "); + $email_tray->addElement($email_match); + $email_tray->addElement($email_text); + $url_text = new XoopsFormText(_AM_SYSTEM_USERS_URLC, "user_url", 30, 100); + $icq_text = new XoopsFormText("", "user_icq", 30, 100); + $icq_match = new XoopsFormSelectMatchOption("", "user_icq_match"); + $icq_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_ICQ, " "); + $icq_tray->addElement($icq_match); + $icq_tray->addElement($icq_text); + $aim_text = new XoopsFormText("", "user_aim", 30, 100); + $aim_match = new XoopsFormSelectMatchOption("", "user_aim_match"); + $aim_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_AIM, " "); + $aim_tray->addElement($aim_match); + $aim_tray->addElement($aim_text); + $yim_text = new XoopsFormText("", "user_yim", 30, 100); + $yim_match = new XoopsFormSelectMatchOption("", "user_yim_match"); + $yim_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_YIM, " "); + $yim_tray->addElement($yim_match); + $yim_tray->addElement($yim_text); + $msnm_text = new XoopsFormText("", "user_msnm", 30, 100); + $msnm_match = new XoopsFormSelectMatchOption("", "user_msnm_match"); + $msnm_tray = new XoopsFormElementTray(_AM_SYSTEM_USERS_MSNM, " "); + $msnm_tray->addElement($msnm_match); + $msnm_tray->addElement($msnm_text); + $location_text = new XoopsFormText(_AM_SYSTEM_USERS_LOCATIONC, "user_from", 30, 100); + $occupation_text = new XoopsFormText(_AM_SYSTEM_USERS_OCCUPATIONC, "user_occ", 30, 100); + $interest_text = new XoopsFormText(_AM_SYSTEM_USERS_INTERESTC, "user_intrest", 30, 100); + + $lastlog_more = new XoopsFormText(_AM_SYSTEM_USERS_LASTLOGMORE, "user_lastlog_more", 10, 5); + $lastlog_less = new XoopsFormText(_AM_SYSTEM_USERS_LASTLOGLESS, "user_lastlog_less", 10, 5); + $reg_more = new XoopsFormText(_AM_SYSTEM_USERS_REGMORE, "user_reg_more", 10, 5); + $reg_less = new XoopsFormText(_AM_SYSTEM_USERS_REGLESS, "user_reg_less", 10, 5); + $posts_more = new XoopsFormText(_AM_SYSTEM_USERS_POSTSMORE, "user_posts_more", 10, 5); + $posts_less = new XoopsFormText(_AM_SYSTEM_USERS_POSTSLESS, "user_posts_less", 10, 5); + $mailok_radio = new XoopsFormRadio(_AM_SYSTEM_USERS_SHOWMAILOK, "user_mailok", "both"); + $mailok_radio->addOptionArray(array("mailok"=>_AM_SYSTEM_USERS_MAILOK, "mailng"=>_AM_SYSTEM_USERS_MAILNG, "both"=>_AM_SYSTEM_USERS_BOTH)); + $type_radio = new XoopsFormRadio(_AM_SYSTEM_USERS_SHOWTYPE, "user_type", "actv"); + $type_radio->addOptionArray(array("actv"=>_AM_SYSTEM_USERS_ACTIVE, "inactv"=>_AM_SYSTEM_USERS_INACTIVE, "both"=>_AM_SYSTEM_USERS_BOTH)); + $sort_select = new XoopsFormSelect(_AM_SYSTEM_USERS_SORT, "user_sort"); + $sort_select->addOptionArray(array("uname"=>_AM_SYSTEM_USERS_UNAME,"email"=>_AM_SYSTEM_USERS_EMAIL,"last_login"=>_AM_SYSTEM_USERS_LASTLOGIN,"user_regdate"=>_AM_SYSTEM_USERS_REGDATE,"posts"=>_AM_SYSTEM_USERS_POSTS)); + $order_select = new XoopsFormSelect(_AM_SYSTEM_USERS_ORDER, "user_order"); + $order_select->addOptionArray(array("ASC"=>_AM_SYSTEM_USERS_ASC,"DESC"=>_AM_SYSTEM_USERS_DESC)); + $limit_text = new XoopsFormText(_AM_SYSTEM_USERS_LIMIT, "user_limit", 6, 2, 20); + $submit_button = new XoopsFormButton("", "user_submit", _SUBMIT, "submit"); + + $form = new XoopsThemeForm(_AM_SYSTEM_USERS_FINDUS, "uesr_findform", "admin.php?fct=users", 'post', true); + $form->addElement($uname_tray); + $form->addElement($name_tray); + $form->addElement($email_tray); + $form->addElement($group_select); + $form->addElement($icq_tray); + $form->addElement($aim_tray); + $form->addElement($yim_tray); + $form->addElement($msnm_tray); + $form->addElement($url_text); + $form->addElement($location_text); + $form->addElement($occupation_text); + $form->addElement($interest_text); + $form->addElement($lastlog_more); + $form->addElement($lastlog_less); + $form->addElement($reg_more); + $form->addElement($reg_less); + $form->addElement($posts_more); + $form->addElement($posts_less); + $form->addElement($mailok_radio); + $form->addElement($type_radio); + $form->addElement($sort_select); + $form->addElement($order_select); + $form->addElement($fct_hidden); + $form->addElement($limit_text); + $form->addElement($op_hidden); + + // if this is to find users for a specific group + if ( !empty($_GET['group']) && intval($_GET['group']) > 0 ) { + $group_hidden = new XoopsFormHidden("group", intval($_GET['group'])); + $form->addElement($group_hidden); + } + $form->addElement($submit_button); + $form->display(); + } else { + //Display data + // Assign Breadcrumb menu + $xoBreadCrumb->addHelp( system_adminVersion('users', 'help') ); + $xoBreadCrumb->addTips( _AM_SYSTEM_USERS_NAV_TIPS ); + $xoBreadCrumb->render(); + + $requete_search = '<br /><br /><strong>See search request: </strong><br /><br />'; + $requete_pagenav = ''; + + $criteria = new CriteriaCompo(); + if ( !empty($_REQUEST['user_uname']) ) { + $match = (!empty($_REQUEST['user_uname_match'])) ? intval($_REQUEST['user_uname_match']) : XOOPS_MATCH_START; + switch ($match) { + case XOOPS_MATCH_START: + $criteria->add(new Criteria('uname', $myts->addSlashes(trim($_REQUEST['user_uname'])).'%', 'LIKE')); + ... [truncated message content] |
From: <txm...@us...> - 2015-02-14 15:51:55
|
Revision: 12978 http://sourceforge.net/p/xoops/svn/12978 Author: txmodxoops Date: 2015-02-14 15:51:50 +0000 (Sat, 14 Feb 2015) Log Message: ----------- New cpanel theme xnewage in beta tester Modified system module and core files Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/theme.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/default/default.php 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.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/bootstrap/js/bootstrap.min.js Added Paths: ----------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/moduleclasses/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/moduleclasses/moduleadmin/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/pagenav.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formbutton.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formbuttontray.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formcheckbox.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formradio.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formselect.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/simpleform.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/tableform.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/include/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/include/functions.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/preferences/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/maintenance.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/class/menu.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/language/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/language/english/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/language/english/admin/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/language/english/admin/blocksadmin.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_avatars.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_banners.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_blocks.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_blocks_item.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_comments.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_groups.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_header.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_help.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_images.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_mailusers.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_maintenance.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_modules.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_modules_confirm.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_pagenav.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_preferences.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_smilies.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_templates.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_userrank.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/admin/system_users.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/templates/system_pagenav.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/bootstrap-theme.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/bootstrap.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dark.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.bootstrap.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/dataTables.responsive.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/font-awesome.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/metisMenu.min.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/morris.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/orange.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/silver.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/timeline.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/css/xnewage.css XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/FontAwesome.otf XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/fontawesome-webfont.eot XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/fontawesome-webfont.svg XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/fontawesome-webfont.ttf XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/fontawesome-webfont.woff XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/glyphicons-halflings-regular.eot XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/glyphicons-halflings-regular.svg XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/glyphicons-halflings-regular.ttf XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/glyphicons-halflings-regular.woff XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/glyphicons-halflings-regular.woff2 XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/fonts/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/avatar.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/avatar_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/banners.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/banners_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/blocks.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/blocks_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/check.gif XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/comments.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/comments_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/configuration.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/configuration_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/edituser.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/edituser_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/filemanager.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/filemanager_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/finduser.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/finduser_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/groups.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/groups_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/help.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/help_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/icon_options.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/icon_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/images.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/images_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/item.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/mailuser.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/mailuser_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/maintenance.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/maintenance_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/modules.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/modules_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/newuser.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/prefs.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/prefs_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/smilies.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/smilies_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/tpls.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/tpls_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/userrank.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/userrank_small.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/icons/waiting.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/logo.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/Sorting icons.psd XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/back_disabled.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/back_enabled.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/back_enabled_hover.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/favicon.ico XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/forward_disabled.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/forward_enabled.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/forward_enabled_hover.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/sort_asc.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/sort_asc_disabled.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/sort_both.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/sort_desc.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/img/tables/sort_desc_disabled.png XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/bootstrap.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/dataTables.bootstrap.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/dataTables.responsive.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/flot-data.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/formenu.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/holder.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/jquery.dataTables.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/menu.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/metisMenu.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/morris-data.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/morris.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/raphael-min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/styleswitch.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/tabs.jquery.tools.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/tooltip.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/assets/js/xnewage.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/english/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/english/admin.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/english/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/english/localsupport.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/italian/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/italian/admin.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/italian/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/language/italian/localsupport.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/menu.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/theme.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xnewage.php XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/accordion.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/footer.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/header.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/icons.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/index.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/metas.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/modules.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/navigation.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/page.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/scripts.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/modules/system/themes/xnewage/xotpl/tabs.html XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/jquery/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/jquery/jquery.min.js XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/jquery/plugins/ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery-ui.min.js Removed Paths: ------------- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/xoops_lib/jquery/ Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2015-02-14 15:51:50 UTC (rev 12978) @@ -0,0 +1,583 @@ +<?php +/** + * Frameworks Module Admin + * + * 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 Grégory Mage (Aka Mage) + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Grégory Mage (Aka Mage) + */ + +class ModuleAdmin +{ + + var $_itemButton = array(); + var $_itemInfoBox = array(); + var $_itemInfoBoxLine = array(); + var $_itemConfigBoxLine = array(); + var $_obj = array(); + + /** + * Constructor + */ + function __construct() + { + //global $xoopsModule, $xoTheme; + global $xoopsModule; + $this->_obj =& $xoopsModule; + echo "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/Frameworks/moduleclasses/moduleadmin/css/admin.css\";</style>"; + //$xoTheme->addStylesheet("Frameworks/moduleclasses/moduleadmin/css/admin.css"); + $this -> loadLanguage(); + } + + /** + * @return array + */ + function getInfo() + { + $infoArray = array(); + if (!isset($infoArray) or empty($infoArray)) { + $infoArray = array(); + $infoArray['version'] = $this->getVersion(); + $infoArray['releasedate'] = $this->getReleaseDate(); + $infoArray['methods'] = $this->getClassMethods(); + } + + return $infoArray; + } + + /** + * Return the Module Admin class version number + * return string version + **/ + function getVersion() + { + /** + * version is rev of this class + */ + Include_once 'xoops_version.php'; + $version = XOOPS_FRAMEWORKS_MODULEADMIN_VERSION; + + return $version; + } + + /** + * Return the Module Admin class release date + * return string version + **/ + function getReleaseDate() + { + /** + * version is rev of this class + */ + Include_once 'xoops_version.php'; + $releasedate = XOOPS_FRAMEWORKS_MODULEADMIN_RELEASEDATE; + + return $releasedate; + } + + /** + * Return the available methods for the class + * + * @return array methods supported by this class + */ + function getClassMethods() + { + $myMethods = get_class_methods(__CLASS__); + + return $myMethods; + } + + //****************************************************************************************************************** + // loadLanguage + //****************************************************************************************************************** + // Loaf the language file. + //****************************************************************************************************************** + /** + * @return bool|mixed + */ + function loadLanguage() + { + $language = $GLOBALS['xoopsConfig']['language']; + if ( !file_exists($fileinc = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/moduleadmin/language/{$language}/main.php" )) { + if ( !file_exists($fileinc = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/moduleadmin/language/english/main.php" )) { + return false; + } + } + $ret = include_once $fileinc; + + return $ret; + } + //****************************************************************************************************************** + // renderMenuIndex + //****************************************************************************************************************** + // Creating a menu icon in the index + //****************************************************************************************************************** + /** + * @return string + */ + function renderMenuIndex() + { + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; + $pathsystem = XOOPS_URL . "/modules/system/"; + $this->_obj->loadAdminMenu(); + $ret = "<div class=\"rmmenuicon\">\n"; + foreach (array_keys( $this->_obj->adminmenu) as $i) { + if ($this->_obj->adminmenu[$i]['link'] != 'admin/index.php') { + $ret .= "<a href=\"../" . $this->_obj->adminmenu[$i]['link'] . "\" title=\"" . (isset($this->_obj->adminmenu[$i]['desc']) ? $this->_obj->adminmenu[$i]['desc'] : '') . "\">"; + $ret .= "<img src=\"" . $path . $this->_obj->adminmenu[$i]['icon']. "\" alt=\"" . $this->_obj->adminmenu[$i]['title'] . "\" />"; + $ret .= "<span>" . $this->_obj->adminmenu[$i]['title'] . "</span>"; + $ret .= "</a>"; + } + } + if ($this->_obj->getInfo('help')) { + if (substr(XOOPS_VERSION, 0, 9) >= 'XOOPS 2.5') { + $ret .= "<a href=\"" . $pathsystem . "help.php?mid=" . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help') . "\" title=\"" . _AM_SYSTEM_HELP . "\">"; + $ret .= "<img width=\"32px\" src=\"" . XOOPS_URL . "/Frameworks/moduleclasses/icons/32/help.png\" alt=\"" . _AM_SYSTEM_HELP . "\" /> "; + $ret .= "<span>" . _AM_SYSTEM_HELP . "</span>"; + $ret .= "</a>"; + } + } + $ret .= "</div>\n<div style=\"clear: both;\"></div>\n"; + + return $ret; + } + //****************************************************************************************************************** + // renderButton + //****************************************************************************************************************** + // Creating button + //****************************************************************************************************************** + /** + * @param string $position + * @param string $delimeter + * + * @return string + */ + function renderButton($position = "right", $delimeter = " ") + { + $path = XOOPS_URL . "/Frameworks/moduleclasses/icons/32/"; + switch ($position) { + default: + case "right": + $ret = "<div class=\"pull-right\">\n"; + break; + + case "left": + $ret = "<div class=\"pull-left\">\n"; + break; + + case "center": + $ret = "<div class=\"text-center\">\n"; + } + $ret .= "<div class=\"xo-buttons\">\n"; + foreach (array_keys( $this -> _itemButton) as $i) { + $ret .= "<a class='ui-corner-all' 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>\n"; + $ret .= $delimeter; + } + $ret .= "</div>\n</div>\n"; + $ret .= "<br /> <br /><br />"; + + return $ret; + } + + /** + * @param $title + * @param $link + * @param string $icon + * @param string $extra + * + * @return bool + */ + function addItemButton($title, $link, $icon = 'add', $extra = '') + { + $ret['title'] = $title; + $ret['link'] = $link; + $ret['icon'] = $icon . '.png'; + $ret['extra'] = $extra; + $this -> _itemButton[] = $ret; + + return true; + + } + //****************************************************************************************************************** + // addConfigBoxLine + //****************************************************************************************************************** + // $value: value + // $type: type of config: 1- "default": Just a line with value. + // 2- "folder": check if this is an folder. + // 3- "chmod": check if this is the good chmod. + // For this type ("chmod"), the value is an array: array(path, chmod) + //****************************************************************************************************************** + /** + * @param string $value + * @param string $type + * + * @return bool + */ + function addConfigBoxLine($value = '', $type = 'default') + { + $line = ""; + $path = XOOPS_URL . "/Frameworks/moduleclasses/icons/16/"; + switch ($type) { + default: + case "default": + $line .= "<span>" . $value . "</span>"; + break; + + case "folder": + if (!is_dir($value)) { + $line .= "<span style='color : red; font-weight : bold;'>"; + $line .= "<img src='" . $path . "0.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value); + $line .= "</span>\n"; + } else { + $line .= "<span style='color : green;'>"; + $line .= "<img src='" . $path . "1.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value); + $line .= "</span>\n"; + } + break; + + case "chmod": + if (is_dir($value[0])) { + if (substr(decoct(fileperms($value[0])),2) != $value[1]) { + $line .= "<span style='color : red; font-weight : bold;'>"; + $line .= "<img src='" . $path . "0.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2)); + $line .= "</span>\n"; + } else { + $line .= "<span style='color : green;'>"; + $line .= "<img src='" . $path . "1.png' >"; + $line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2)); + $line .= "</span>\n"; + } + } + break; + } + $this -> _itemConfigBoxLine[] = $line; + + return true; + } + //****************************************************************************************************************** + // renderIndex + //****************************************************************************************************************** + // Creating an index + //****************************************************************************************************************** + /** + * @return string + */ + function renderIndex() + { + $ret = "<table class=\"table table-stripped\">\n<tr>\n"; + $ret .= "<td width=\"auto\">\n"; + $ret .= $this -> renderMenuIndex(); + $ret .= "</td>\n"; + $ret .= "<td width=\"auto\">\n"; + $ret .= $this -> renderInfoBox(); + $ret .= "</td>\n"; + $ret .= "</tr>\n"; + // If you use a config label + if ($this->_obj->getInfo('min_php') || $this->_obj->getInfo('min_xoops') || !empty($this -> _itemConfigBoxLine)) { + $ret .= "<tr>\n"; + $ret .= "<td colspan=\"2\">\n"; + $ret .= "<fieldset><legend class=\"label\">"; + $ret .= _AM_MODULEADMIN_CONFIG; + $ret .= "</legend>\n"; + + // php version + $path = XOOPS_URL . "/Frameworks/moduleclasses/icons/16/"; + if ($this->_obj->getInfo('min_php')) { + if (version_compare(phpversion(), $this->_obj->getInfo('min_php'), '<')) { + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n"; + } else { + $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n"; + } + $ret .= "<br />"; + } + + // Database version + $path = XOOPS_URL . "/Frameworks/moduleclasses/icons/16/"; + $dbarray=$this->_obj->getInfo('min_db'); + + if ($dbarray[XOOPS_DB_TYPE]) { + // changes from redheadedrod to use connector specific version info + switch (XOOPS_DB_TYPE) { + // server should be the same in both cases + case "mysql": + case "mysqli": + global $xoopsDB; + $dbCurrentVersion= $xoopsDB->getServerVersion(); + break; + //case "pdo": + // global $xoopsDB; + // $dbCurrentVersion = $xoopsDB->getAttribute(PDO::ATTR_SERVER_VERSION); + // break; + default: // don't really support anything other than mysql + $dbCurrentVersion = '0'; + break; + } + $currentVerParts = explode('.', (string) $dbCurrentVersion); + $iCurrentVerParts = array_map('intval', $currentVerParts); + $dbRequiredVersion = $dbarray[XOOPS_DB_TYPE]; + $reqVerParts = explode('.', (string) $dbRequiredVersion); + $iReqVerParts = array_map('intval', $reqVerParts); + $icount = $j = count($iReqVerParts); + $reqVer = $curVer = 0; + for ($i=0; $i<$icount; $i++) { + $j--; + $reqVer += $iReqVerParts[$i] * pow(10, $j); + if (isset($iCurrentVerParts[$i])) { + $curVer += $iCurrentVerParts[$i] * pow(10, $j); + } else { + $curVer = $curVer * pow(10, $j); + } + } + if ($reqVer > $curVer) { + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(XOOPS_DB_TYPE.' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n"; + } else { + $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(strtoupper(XOOPS_DB_TYPE).' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n"; + } + } + + // xoops version + if ($this->_obj->getInfo('min_xoops')) { + if (substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6) < $this->_obj->getInfo('min_xoops')) { + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n"; + } else { + $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n"; + } + $ret .= "<br />"; + } + + // ModuleAdmin version + if ($this->_obj->getInfo('min_admin')) { + if ($this->getVersion() < $this->_obj->getInfo('min_admin')) { + $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_ADMIN, $this->_obj->getInfo('min_admin'), $this->getVersion()) . "</span>\n"; + } else { + $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_ADMIN, $this->_obj->getInfo('min_admin'), $this->getVersion()) . "</span>\n"; + } + $ret .= "<br />"; + } + if (!empty($this -> _itemConfigBoxLine)) { + foreach (array_keys( $this -> _itemConfigBoxLine) as $i) { + $ret .= $this -> _itemConfigBoxLine[$i]; + $ret .= "<br />"; + } + } + $ret .= "</fieldset>\n"; + $ret .= "</td>\n"; + $ret .= "</tr>\n"; + } + $ret .= "</table>\n"; + + return $ret; + } + //****************************************************************************************************************** + // addInfoBox + //****************************************************************************************************************** + // $title: title of an InfoBox + //****************************************************************************************************************** + /** + * @param $title + * + * @return bool + */ + function addInfoBox($title) + { + $ret['title'] = $title; + $this -> _itemInfoBox[] = $ret; + + return true; + } + //****************************************************************************************************************** + // addInfoBoxLine + //****************************************************************************************************************** + // $label: title of InfoBox Line + // $text: + // $type: type of config: 1- "default": Just a line with value. + // 2- "information": check if this is an folder. + // 3- "chmod": check if this is the good chmod. + // For this type ("chmod"), the value is an array: array(path, chmod) + //****************************************************************************************************************** + /** + * @param $label + * @param $text + * @param string $value + * @param string $color + * @param string $type + * + * @return bool + */ + function addInfoBoxLine($label, $text, $value = '', $color = 'inherit', $type = 'default') + { + $ret['label'] = $label; + $line = ""; + switch ($type) + { + default: + case "default": + $line .= sprintf($text, "<span style='color : " . $color . "; font-weight : bold;'>" . $value . "</span>"); + break; + + case "information": + $line .= $text; + break; + } + $ret['line'] = $line; + $this -> _itemInfoBoxLine[] = $ret; + + return true; + } + + /** + * @return string + */ + function renderInfoBox() + { + $ret = ""; + foreach (array_keys( $this -> _itemInfoBox) as $i) { + $ret .= "<fieldset><legend class=\"label\">"; + $ret .= $this -> _itemInfoBox[$i]['title']; + $ret .= "</legend>\n"; + foreach (array_keys( $this -> _itemInfoBoxLine) as $k) { + if ($this -> _itemInfoBoxLine[$k]['label'] == $this -> _itemInfoBox[$i]['title']) { + $ret .= $this -> _itemInfoBoxLine[$k]['line']; + $ret .= "<br />"; + } + } + $ret .= "</fieldset>\n"; + $ret .= "<br/>\n"; + } + + return $ret; + } + + /** + * @param string $paypal + * @param bool $logo_xoops + * + * @return string + */ + function renderAbout($paypal = '', $logo_xoops = true) + { + $path = XOOPS_URL . "/Frameworks/moduleclasses/icons/32/"; + + $ret = "<table class=\"table table-bordered\">\n<tr>\n"; + $ret .= "<td width=\"50%\">\n"; + $date = explode('/',$this->_obj->getInfo('release_date')); + $author = explode(',',$this->_obj->getInfo('author')); + $nickname = explode(',',$this->_obj->getInfo('nickname')); + $release_date = formatTimestamp(mktime(0, 0, 0, $date[1], $date[2], $date[0]), 's'); + $module_info = '<div id="about"><label>' . _AM_MODULEADMIN_ABOUT_DESCRIPTION . '</label><text>' . $this->_obj->getInfo("description") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_UPDATEDATE . '</label><text class="bold">' . formatTimestamp($this->_obj->getVar("last_update"),"m") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_MODULESTATUS . '</label><text>' . $this->_obj->getInfo("module_status") . '</text><br /> + <label>' . _AM_MODULEADMIN_ABOUT_WEBSITE . '</label><text><a class="tooltip" href="http://' . $this->_obj->getInfo("module_website_url") . '" rel="external" title="'. $this->_obj->getInfo("module_website_name") . ' - ' . $this->_obj->getInfo("module_website_url") . '"> + ' . $this->_obj->getInfo("module_website_name") . '</a></text></div>'; + $ret .= "<table class=\"table table-bordered\">\n<tr>\n<td width=\"100px\">\n"; + $ret .= "<img src='" . XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->getInfo('image') . "' alt='" . $this->_obj->getVar('name') . "' style='float: left; margin-right: 10px;' />\n"; + $ret .= "</td><td>\n"; + $ret .= "<div style='margin-top: 1px; margin-bottom: 4px; font-size: 18px; line-height: 18px; color: #2F5376; font-weight: bold;'>\n"; + $ret .= $this->_obj->getInfo('name') . " " . $this->_obj->getInfo('version') . " " . $this->_obj->getInfo('module_status') . " (" . $release_date . ")\n"; + $ret .= "<br />\n"; + $ret .= "</div>\n"; + $ret .= "<div style='line-height: 16px; font-weight: bold;'>\n"; + $ret .= "by "; + foreach (array_keys($author) as $i) { + $ret .= $author[$i]; + if (isset($nickname[$i]) && $nickname[$i] !='') { + $ret .= " (" . $nickname[$i] . "), "; + } else { + $ret .= ", "; + } + } + $ret = substr($ret,0,-2); + $ret .= "</div>\n"; + $ret .= "<div style='line-height: 16px;'>\n"; + $ret.= "<a href=\"http://" . $this->_obj->getInfo('license_url'). "\" target=\"_blank\" >" . $this->_obj->getInfo('license'). "</a>\n"; + $ret .= "<br />\n"; + $ret .= "<a href=\"http://" . $this->_obj->getInfo('website') . "\" target=\"_blank\" >" . $this->_obj->getInfo('website') . "</a>\n"; + $ret .= "<br />\n"; + $ret .= "<br />\n"; + if ($paypal != '') { + $ret .= '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> + <input type="hidden" name="cmd" value="_s-xclick"> + <input type="hidden" name="hosted_button_id" value="' . $paypal . '"> + <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> + <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1"> + </form>'; + } + $ret .= "</div>\n"; + $ret .= "</td>\n</tr>\n</table>\n"; + $this -> addInfoBox(_AM_MODULEADMIN_ABOUT_MODULEINFO); + $this -> addInfoBoxLine(_AM_MODULEADMIN_ABOUT_MODULEINFO, $module_info, '', '', 'information'); + $ret .= $this -> renderInfoBox(); + $ret .= "</td>\n"; + $ret .= "<td width=\"50%\">\n"; + $ret .= "<fieldset><legend class=\"label\">\n"; + $ret .= _AM_MODULEADMIN_ABOUT_CHANGELOG; + $ret .= "</legend><br/>\n"; + $ret .= "<div class=\"txtchangelog\">\n"; + $language = $GLOBALS['xoopsConfig']['language']; + if ( !is_file( XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt" ) ) { + $language = 'english'; + } + $language = empty($language) ? $GLOBALS['xoopsConfig']['language'] : $language; + $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; + if ( is_readable( $file ) ) { + $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; + } else { + $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/docs/changelog.txt"; + if ( is_readable( $file ) ) { + $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; + } + } + $ret .= "</div>\n"; + $ret .= "</fieldset>\n"; + $ret .= "</td>\n"; + $ret .= "</tr>\n"; + $ret .= "</table>\n"; + if ($logo_xoops == true) { + $ret .= "<div align=\"center\">"; + $ret .= "<a href=\"http://www.xoops.org\" target=\"_blank\"><img src=\"" . $path . "xoopsmicrobutton.gif\" alt=\"XOOPS\" title=\"XOOPS\"></a>"; + $ret .= "</div>"; + } + + return $ret; + } + + /** + * @param string $menu + * + * @return string + */ + function addNavigation($menu = '') + { + $ret = ""; + $navigation = ""; + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/"; + $this->_obj->loadAdminMenu(); + foreach (array_keys( $this->_obj->adminmenu) as $i) { + if ($this->_obj->adminmenu[$i]['link'] == "admin/" . $menu) { + $navigation .= $this->_obj->adminmenu[$i]['title'] . " | "; + $ret = "<div class=\"CPbigTitle\" style=\"background-image: url(" . $path . $this->_obj->adminmenu[$i]['icon'] . "); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"> + <strong>" . $this->_obj->adminmenu[$i]['title'] . "</strong></div><br />"; + } else { + $navigation .= "<a href = '../" . $this->_obj->adminmenu[$i]['link'] . "'>" . $this->_obj->adminmenu[$i]['title'] . "</a> | "; + } + } + if (substr(XOOPS_VERSION, 0, 9) < 'XOOPS 2.5') { + $navigation .= "<a href = '../../system/admin.php?fct=preferences&op=showmod&mod=" . $this->_obj->getVar('mid') . "'>" . _MI_SYSTEM_ADMENU6 . "</a>"; + $ret = $navigation . "<br /><br />" . $ret; + } + + return $ret; + } +} Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/pagenav.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/pagenav.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/pagenav.php 2015-02-14 15:51:50 UTC (rev 12978) @@ -0,0 +1,218 @@ +<?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. +*/ + +/** + * XOOPS page navigation + * + * @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 class + * @since 2.5.6 + * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) + * @author Gregory Mage (AKA Mage) + * @version $Id: pagenav.php 11791 2013-06-28 10:13:50Z timgno $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class XoopsPageNav +{ + /** + * *#@+ + * + * @access private + */ + /** + * @var int + */ + private $total; + + /** + * @var int + */ + private $perpage; + + /** + * @var int + */ + private $current; + + /** + * @var string + */ + private $url; + /** + * *#@- + */ + + /** + * Constructor + * + * @param int $total_items Total number of items + * @param int $items_perpage Number of items per page + * @param int $current_start First item on the current page + * @param string $start_name Name for "start" or "offset" + * @param string $extra_arg Additional arguments to pass in the URL + */ + public function __construct($total_items, $items_perpage, $current_start, $start_name = "start", $extra_arg = "") + { + $this->total = intval($total_items); + $this->perpage = intval($items_perpage); + $this->current = intval($current_start); + $this->extra = $extra_arg; + if ($extra_arg != '' && (substr($extra_arg, - 5) != '&' || substr($extra_arg, - 1) != '&')) { + $this->extra = '&' . $extra_arg; + } + $this->url = $_SERVER['PHP_SELF'] . '?' . trim($start_name) . '='; + } + + /** + * Create text navigation + * + * @param integer $offset + * @param string $size of pagination(Value: 'large', '', 'small', 'mini') + * @param string $align of pagination(Value: 'right', 'centered') + * @param string $prev_text text for previous + * @param string $next_text text for next + * @return string + */ + public function renderNav($offset = 4, $size = "", $align = "right", $prev_text = "«", $next_text = "»") + { + $xoopsTpl = new XoopsTpl(); + $ret = ''; + $nav = array(); + if ($this->total <= $this->perpage) { + return $ret; + } + if(($this->total != 0) && ($this->perpage != 0)) { + $total_pages = ceil($this->total / $this->perpage); + if ($total_pages > 1) { + $prev = $this->current - $this->perpage; + if ($prev >= 0) { + $xoopsTpl->assign('prev_text', $prev_text); + $xoopsTpl->assign('prev_url', $this->url . $prev . $this->extra); + } + $last = 0; + $last_text = ''; + $last_url = ''; + $first = 0; + $first_text = ''; + $first_url = ''; + $counter = 1; + $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); + while ($counter <= $total_pages) { + if ($counter == $current_page) { + $nav['text'] = $counter; + $nav['url'] = ''; + $nav['active'] = 0; + } elseif (($counter > $current_page - $offset && $counter < $current_page + $offset) || $counter == 1 || $counter == $total_pages) { + if ($counter == $total_pages && $current_page < $total_pages - $offset) { + $nav['text'] = '...'; + $nav['url'] = ''; + $nav['active'] = 0; + $last = 1; + $last_text = $counter; + $last_url = $this->url . (($counter - 1) * $this->perpage) . $this->extra; + } else { + $nav['text'] = $counter; + $nav['url'] = $this->url . (($counter - 1) * $this->perpage) . $this->extra; + $nav['active'] = 1; + } + if ($counter == 1 && $current_page > 1 + $offset){ + $nav['text'] = '...'; + $nav['url'] = ''; + $nav['active'] = 0; + $first = 1; + $first_text = $counter; + $first_url = $this->url . (($counter - 1) * $this->perpage) . $this->extra; + } + } + $xoopsTpl->append_by_ref('xo_nav', $nav); + unset($nav); + $counter ++; + } + $xoopsTpl->assign('last', $last); + $xoopsTpl->assign('last_text', $last_text); + $xoopsTpl->assign('last_url', $last_url); + $xoopsTpl->assign('first', $first); + $xoopsTpl->assign('first_text', $first_text); + $xoopsTpl->assign('first_url', $first_url); + + $next = $this->current + $this->perpage; + if ($this->total > $next) { + $xoopsTpl->assign('next_text', $next_text); + $xoopsTpl->assign('next_url', $this->url . $next . $this->extra); + } + } + } + if ($size != ''){ + $size = ' pagination-' . $size; + } + $xoopsTpl->assign('size', $size); + $xoopsTpl->assign('align', ' pagination-' . $align); + $xoopsTpl->assign('pagination_nav', true); + $ret = $xoopsTpl->fetch('db:system_pagenav.html'); + $xoopsTpl->clear_assign('xo_nav'); + return $ret; + } + + /** + * Create a navigational dropdown list + * + * @param boolean $showbutton Show the "Go" button? + * @return string|false + */ + public function renderSelect($align = "right", $showbutton = false) + { + $xoopsTpl = new XoopsTpl(); + $ret = ''; + if ($this->total < $this->perpage) { + return $ret; + } + $total_pages = ceil($this->total / $this->perpage); + if ($total_pages > 1) { + $counter = 1; + $current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); + while ($counter <= $total_pages) { + $select['text'] = $counter; + $select['value'] = $this->url . (($counter - 1) * $this->perpage) . $this->extra; + if ($counter == $current_page) { + $select['selected'] = 1; + } else { + $select['selected'] = 0; + } + $xoopsTpl->append_by_ref('xo_select', $select); + unset($select); + $counter ++; + } + } + $xoopsTpl->assign('onchange', "location=this.options[this.options.selectedIndex].value;"); + $xoopsTpl->assign('pagination_select', true); + $xoopsTpl->assign('showbutton', $showbutton); + $xoopsTpl->assign('align', ' pagination-' . $align); + $ret = $xoopsTpl->fetch('db:system_pagenav.html'); + $xoopsTpl->clear_assign('xo_select'); + return $ret; + } + + /** + * Create navigation with images + * + * @param integer $offset + * @return string|false + */ + public function renderImageNav($offset = 4) + { + $xoopsTpl = new XoopsTpl(); + $xoopsTpl->deprecated('renderImageNav() is deprecated since 2.6.0. Please use renderNav()'); + return $this->renderNav($offset); + } +} \ No newline at end of file Modified: 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 2015-02-14 10:36:50 UTC (rev 12977) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/theme.php 2015-02-14 15:51:50 UTC (rev 12978) @@ -9,14 +9,14 @@ * 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) + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @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 $ + * @version $Id: theme.php 12537 2014-05-19 14:19:33Z beckmi $ */ defined('XOOPS_ROOT_PATH') || die('Restricted access'); Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formbutton.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formbutton.php (rev 0) +++ XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formbutton.php 2015-02-14 15:51:50 UTC (rev 12978) @@ -0,0 +1,117 @@ +<?php +/** + * XOOPS form element of button + * + * 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: formbutton.php 12537 2014-05-19 14:19:33Z beckmi $ + */ +defined('XOOPS_ROOT_PATH') || die("XOOPS root path not defined"); + +xoops_load('XoopsFormElement'); + +/** + * + * + * @package kernel + * @subpackage form + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +/** + * A button + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + * + * @package kernel + * @subpackage form + */ +class XoopsFormButton extends XoopsFormElement +{ + + /** + * Value + * @var string + * @access private + */ + var $_value; + + /** + * Type of the button. This could be either "button", "submit", or "reset" + * @var string + * @access private + */ + var $_type; + + /** + * Constructor + * + * @param string $caption Caption + * @param string $name + * @param string $value + * @param string $type Type of the button. Potential values: "button", "submit", or "reset" + */ + function XoopsFormButton($caption, $name, $value = "", $type = "button") + { + $this->setCaption($caption); + $this->setName($name); + $this->_type = $type; + $this->setValue($value); + } + + /** + * Get the initial value + * + * @param bool $encode To sanitizer the text? + * @return string + */ + function getValue($encode = false) + { + return $encode ? htmlspecialchars($this->_value, ENT_QUOTES) : $this->_value; + } + + /** + * Set the initial value + * + * @param $value + * + * @return string + */ + function setValue($value) + { + $this->_value = $value; + } + + /** + * Get the type + * + * @return string + */ + function getType() + { + return in_array( strtolower($this->_type), array("button", "submit", "reset") ) ? $this->_type : "button"; + } + + /** + * prepare HTML for output + * + * @return string + */ + function render() + { + return "<input type='" . $this->getType() . "' class='btn btn-default' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' title='" . $this->getValue() . "'" . $this->getExtra() . " />"; + } +} Added: XoopsCore/branches/2.5.x/2.5.8_timgno/htdocs/class/xoopsform/formbuttontray.php ======================================... [truncated message content] |