From onokazu ¡÷ users.sourceforge.jp Wed Jun 1 14:30:13 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 1 Jun 2005 14:30:13 +0900 Subject: [xoops-cvslog 56] CVS update: xoops2jp/html/include Message-ID: <20050601053013.260572AC00E@users.sourceforge.jp> Index: xoops2jp/html/include/calendarjs.php diff -u xoops2jp/html/include/calendarjs.php:1.1.6.3 xoops2jp/html/include/calendarjs.php:1.1.6.4 --- xoops2jp/html/include/calendarjs.php:1.1.6.3 Tue May 31 15:39:25 2005 +++ xoops2jp/html/include/calendarjs.php Wed Jun 1 14:30:12 2005 @@ -32,7 +32,7 @@ if (calendar != null) { calendar.hide(); } else { - var cal = new Calendar(true, , selected, closeHandler); + var cal = new Calendar(true, , selected, closeHandler); calendar = cal; cal.setRange(2000, 2015); calendar.create(); From onokazu ¡÷ users.sourceforge.jp Wed Jun 1 19:17:22 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 1 Jun 2005 19:17:22 +0900 Subject: [xoops-cvslog 57] CVS update: xoops2jp/html/class Message-ID: <20050601101722.DE6692AC014@users.sourceforge.jp> Index: xoops2jp/html/class/token.php diff -u xoops2jp/html/class/token.php:1.1.2.7 xoops2jp/html/class/token.php:1.1.2.8 --- xoops2jp/html/class/token.php:1.1.2.7 Fri May 27 21:24:50 2005 +++ xoops2jp/html/class/token.php Wed Jun 1 19:17:22 2005 @@ -1,5 +1,5 @@ _name_ = $name; @@ -74,12 +76,12 @@ } - /** - * Returns random string for token's string. - * - * @access protected - * @return string - */ + /** + * Returns random string for token's string. + * + * @access protected + * @return string + */ function _generateToken() { srand(microtime()*100000); @@ -88,7 +90,7 @@ /** * Returns this token's name. - * + * * @access public * @return string */ @@ -99,32 +101,32 @@ /** * Returns this token's string. - * + * * @access public - * @return string + * @return string */ function getTokenValue() { return $this->_token_; } - /** - * Set this token's serial number. - * + /** + * Set this token's serial number. + * * @access public - * @param $serial_number serial number - */ + * @param $serial_number serial number + */ function setSerialNumber($serial_number) { $this->_number_ = $serial_number; } - /** - * Returns this token's serial number. - * + /** + * Returns this token's serial number. + * * @access public - * @return int - */ + * @return int + */ function getSerialNumber() { return $this->_number_; @@ -133,9 +135,9 @@ /** * Returns hidden tag string that includes this token. you can use it * for
tag's member. - * + * * @access public - * @return string + * @return string */ function getHtml() { @@ -145,8 +147,8 @@ /** * Returns url string that includes this token. you can use it for * hyper link. - * - * @return string + * + * @return string */ function getUrl() { @@ -155,8 +157,8 @@ /** * If $token equals this token's string, true is returened. - * - * @return bool + * + * @return bool */ function validate($token=null) { @@ -166,27 +168,27 @@ /** * This class express ticket agent and ticket collector. this publishes - * token, keeps a token to server to check it later(next request). - * + * token, keeps a token to server to check it later(next request). + * * You can create various agents by extending the derivative class. see * default(sample) classes. */ class XoopsTokenHandler { - /** - * @access private - */ + /** + * @access private + */ var $_prefix =""; - /** - * Create XoopsToken instance, regist(keep to server), and returns it. - * - * @access public - * @param $name this token's name string. - * @param $timeout effective time(if $timeout equal 0, this token will become unlimited) - */ - function &create($name,$timeout = XOOPS_TOKEN_TIMEOUT) + /** + * Create XoopsToken instance, regist(keep to server), and returns it. + * + * @access public + * @param $name this token's name string. + * @param $timeout effective time(if $timeout equal 0, this token will become unlimited) + */ + function &create($name,$timeout = XOOPS_TOKEN_TIMEOUT) { $token = new XoopsToken($name,$timeout); $this->register($token); @@ -197,7 +199,7 @@ * Fetches from server side, and returns it. * * @access public - * @param $name token's name string. + * @param $name token's name string. * @return XoopsToken */ function &fetch($name) @@ -210,44 +212,44 @@ } } - /** - * Register token to session. - */ + /** + * Register token to session. + */ function register(&$token) { $_SESSION[XOOPS_TOKEN_SESSION_STRING][$this->_prefix.$token->_name_] = $token; } - /** - * Unregister token to session. - */ + /** + * Unregister token to session. + */ function unregister(&$token) { unset($_SESSION[XOOPS_TOKEN_SESSION_STRING][$this->_prefix.$token->_name_]); } - /** - * If a token of the name that equal $name is registered on session, - * this method will return true. - * - * @access public - * @param $name token's name string. - * @return bool - */ + /** + * If a token of the name that equal $name is registered on session, + * this method will return true. + * + * @access public + * @param $name token's name string. + * @return bool + */ function isRegistered($name) { return isset($_SESSION[XOOPS_TOKEN_SESSION_STRING][$this->_prefix.$name]); } - /** - * This method takes out token's string from Request, and validate - * token with it. if it passed validation, this method will return true. - * - * @access public - * @param $token XoopsToken - * @param $clearIfValid If token passed validation, $token will be unregistered. - * @return bool - */ + /** + * This method takes out token's string from Request, and validate + * token with it. if it passed validation, this method will return true. + * + * @access public + * @param $token XoopsToken + * @param $clearIfValid If token passed validation, $token will be unregistered. + * @return bool + */ function validate(&$token,$clearIfValid) { $req_token = isset($_REQUEST[ $token->getTokenName() ]) ? @@ -274,7 +276,7 @@ return false; } - /** + /** * static method. * This method was created for quick protection of default modules. * this method will be deleted in the near future. @@ -379,7 +381,7 @@ /** * @param $name string - * @return int + * @return int */ function getRequestNumber($name) { From onokazu ¡÷ users.sourceforge.jp Wed Jun 1 19:18:33 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 1 Jun 2005 19:18:33 +0900 Subject: [xoops-cvslog 58] CVS update: xoops2jp/html/include Message-ID: <20050601101833.112AC2AC019@users.sourceforge.jp> Index: xoops2jp/html/include/functions.php diff -u xoops2jp/html/include/functions.php:1.2.6.10 xoops2jp/html/include/functions.php:1.2.6.11 --- xoops2jp/html/include/functions.php:1.2.6.10 Mon May 30 19:39:32 2005 +++ xoops2jp/html/include/functions.php Wed Jun 1 19:18:32 2005 @@ -1,5 +1,5 @@ getHtml(); } echo ' @@ -149,7 +149,7 @@ function xoops_confirm_validate() { - return XoopsMultiTokenHandler::quickValidate('xoops_confirm'); + return XoopsMultiTokenHandler::quickValidate(XOOPS_TOKEN_DEFAULT); } function xoops_refcheck($docheck=1) From onokazu ¡÷ users.sourceforge.jp Wed Jun 1 19:30:04 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 1 Jun 2005 19:30:04 +0900 Subject: [xoops-cvslog 59] CVS update: xoops2jp/html/class/xoopsform Message-ID: <20050601103004.B39AD2AC01E@users.sourceforge.jp> Index: xoops2jp/html/class/xoopsform/formhiddentoken.php diff -u xoops2jp/html/class/xoopsform/formhiddentoken.php:1.1.4.9 xoops2jp/html/class/xoopsform/formhiddentoken.php:1.1.4.10 --- xoops2jp/html/class/xoopsform/formhiddentoken.php:1.1.4.9 Fri May 13 20:08:34 2005 +++ xoops2jp/html/class/xoopsform/formhiddentoken.php Wed Jun 1 19:30:04 2005 @@ -1,5 +1,5 @@ // @@ -47,10 +47,10 @@ */ function XoopsFormHiddenToken($name = null, $timeout = 360){ if (empty($name)) { - $token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_XOOPSORG); + $token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_DEFAULT); $name = $token->getTokenName(); } else { - $token =& XoopsSingleTokenHandler::quickCreate(XOOPS_TOKEN_XOOPSORG); + $token =& XoopsSingleTokenHandler::quickCreate(XOOPS_TOKEN_DEFAULT); } $this->XoopsFormHidden($name, $token->getTokenValue()); } From onokazu ¡÷ users.sourceforge.jp Wed Jun 1 19:30:04 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 1 Jun 2005 19:30:04 +0900 Subject: [xoops-cvslog 60] CVS update: xoops2jp/html/class Message-ID: <20050601103004.01BCA2AC02B@users.sourceforge.jp> Index: xoops2jp/html/class/xoopssecurity.php diff -u xoops2jp/html/class/xoopssecurity.php:1.1.2.7 xoops2jp/html/class/xoopssecurity.php:1.1.2.8 --- xoops2jp/html/class/xoopssecurity.php:1.1.2.7 Tue May 17 15:10:16 2005 +++ xoops2jp/html/class/xoopssecurity.php Wed Jun 1 19:30:04 2005 @@ -1,9 +1,5 @@ validateToken($tokenValue, $clearIfValid); @@ -19,7 +16,7 @@ function createToken($timeout = XOOPS_TOKEN_TIMEOUT) { - $token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_XOOPSORG, $timeout); + $token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_DEFAULT, $timeout); return $token->getTokenValue(); } @@ -27,22 +24,52 @@ { if (false !== $tokenValue) { $handler = new XoopsSingleTokenHandler(); - $token =& $handler->fetch(XOOPS_TOKEN_XOOPSORG); + $token =& $handler->fetch(XOOPS_TOKEN_DEFAULT); if($token->validate($tokenValue)) { if ($clearIfValid) { $handler->unregister($token); } return true; } else { + $this->setErrors('No token found'); return false; } } - return XoopsMultiTokenHandler::quickValidate(XOOPS_TOKEN_XOOPSORG, $clearIfValid); + return XoopsMultiTokenHandler::quickValidate(XOOPS_TOKEN_DEFAULT, $clearIfValid); } function getTokenHTML() { - $token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_XOOPSORG); + $token =& XoopsMultiTokenHandler::quickCreate(XOOPS_TOKEN_DEFAULT); return $token->getHtml(); } + + /** + * Add an error + * @param string $error + **/ + function setErrors($error) + { + $this->errors[] = trim($error); + } + + /** + * Get generated errors + * @param bool $ashtml Format using HTML? + * @return array|string Array of array messages OR HTML string + */ + function &getErrors($ashtml = false) + { + if (!$ashtml) { + return $this->errors; + } else { + $ret = ''; + if (count($this->errors) > 0) { + foreach ($this->errors as $error) { + $ret .= $error.'
'; + } + } + return $ret; + } + } } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Wed Jun 1 21:45:30 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 1 Jun 2005 21:45:30 +0900 Subject: [xoops-cvslog 61] CVS update: xoops2jp/html/include Message-ID: <20050601124530.B451D2AC019@users.sourceforge.jp> Index: xoops2jp/html/include/cp_functions.php diff -u xoops2jp/html/include/cp_functions.php:1.2.6.3 xoops2jp/html/include/cp_functions.php:1.2.6.4 --- xoops2jp/html/include/cp_functions.php:1.2.6.3 Mon May 30 19:39:32 2005 +++ xoops2jp/html/include/cp_functions.php Wed Jun 1 21:45:30 2005 @@ -1,5 +1,5 @@ getItemIds('module_admin', $xoopsUser->getGroups()); + + $module_handler =& xoops_gethandler('module'); + $modules =& $module_handler->getObjects(new +Criteria('mid', "(".implode(',', $admin_mids).")", 'IN'), true); + $admin_mids = array_keys($modules); + ?>

- + '> getVar("uname", 'e'); $ymail = $xoopsUser->getVar("email", 'e'); From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:07:34 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:07:34 +0900 Subject: [xoops-cvslog 79] CVS update: xoops2jp/html/modules/mylinks/admin Message-ID: <20050605230734.885A72AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/admin/index.php diff -u xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1 xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.2 --- xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1 Mon May 30 21:26:41 2005 +++ xoops2jp/html/modules/mylinks/admin/index.php Mon Jun 6 08:07:34 2005 @@ -308,7 +308,7 @@ echo "
\n"; echo myTextForm("index.php?op=linksConfigMenu", _MD_CANCEL); echo "
\n"; - echo "
"; + echo "
"; $result5=$xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid = $lid"); list($totalvotes) = $xoopsDB->fetchRow($result5); From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:08:02 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:08:02 +0900 Subject: [xoops-cvslog 80] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050605230802.337FD2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.2.6.2 xoops2jp/html/modules/sections/admin/index.php:1.2.6.3 --- xoops2jp/html/modules/sections/admin/index.php:1.2.6.2 Mon May 30 20:17:28 2005 +++ xoops2jp/html/modules/sections/admin/index.php Mon Jun 6 08:08:01 2005 @@ -1,5 +1,5 @@ "; ?>
-

+



"; ?>

From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:08:50 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:08:50 +0900 Subject: [xoops-cvslog 81] CVS update: xoops2jp/html/modules/xoopspoll/admin Message-ID: <20050605230850.03B462AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspoll/admin/index.php diff -u xoops2jp/html/modules/xoopspoll/admin/index.php:1.2.6.1 xoops2jp/html/modules/xoopspoll/admin/index.php:1.2.6.2 --- xoops2jp/html/modules/xoopspoll/admin/index.php:1.2.6.1 Thu Apr 21 18:41:15 2005 +++ xoops2jp/html/modules/xoopspoll/admin/index.php Mon Jun 6 08:08:49 2005 @@ -1,5 +1,5 @@ "._AM_POLLCONF.""; - echo "
View Log
Sorry, not yet. ;-)"; + echo "
View Log
Sorry, not yet. ;-)"; xoops_cp_footer(); exit(); } From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:10:32 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:10:32 +0900 Subject: [xoops-cvslog 82] CVS update: xoops2jp/html/class Message-ID: <20050605231032.231442AC00F@users.sourceforge.jp> Index: xoops2jp/html/class/module.textsanitizer.php diff -u xoops2jp/html/class/module.textsanitizer.php:1.2 xoops2jp/html/class/module.textsanitizer.php:1.2.6.1 --- xoops2jp/html/class/module.textsanitizer.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/module.textsanitizer.php Mon Jun 6 08:10:31 2005 @@ -1,5 +1,5 @@ Singleton * - * @package kernel - * @subpackage core + * @package kernel + * @subpackage core * - * @author Kazumi Ono + * @author Kazumi Ono * @author Goghs Cheng - * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org + * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org */ class MyTextSanitizer { - /** - * @var array - */ - var $smileys = array(); - - /** - * - */ - var $censorConf; + /** + * @var array + */ + var $smileys = array(); + + /** + * + */ + var $censorConf; - /* - * Constructor of this class + /* + * Constructor of this class * - * Gets allowed html tags from admin config settings - *
should not be allowed since nl2br will be used - * when storing data. + * Gets allowed html tags from admin config settings + *
should not be allowed since nl2br will be used + * when storing data. * - * @access private + * @access private * * @todo Sofar, this does nuttin' ;-) - */ - function MyTextSanitizer() - { + */ + function MyTextSanitizer() + { - } + } - /** - * Access the only instance of this class + /** + * Access the only instance of this class * - * @return object + * @return object * * @static * @staticvar object - */ - function &getInstance() - { - static $instance; - if (!isset($instance)) { - $instance = new MyTextSanitizer(); - } - return $instance; - } - - /** - * Get the smileys - * - * @return array - */ - function getSmileys() - { - return $this->smileys; - } + */ + function &getInstance() + { + static $instance; + if (!isset($instance)) { + $instance = new MyTextSanitizer(); + } + return $instance; + } + + /** + * Get the smileys + * + * @return array + */ + function getSmileys() + { + return $this->smileys; + } /** * Replace emoticons in the message with smiley images * - * @param string $message + * @param string $message * - * @return string + * @return string */ function &smiley($message) - { - $db =& Database::getInstance(); - if (count($this->smileys) == 0) { - if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))){ - while ($smiles = $db->fetchArray($getsmiles)) { - $message =& str_replace($smiles['code'], '', $message); - array_push($this->smileys, $smiles); - } - } - } - elseif (is_array($this->smileys)) { - foreach ($this->smileys as $smile) { - $message =& str_replace($smile['code'], '', $message); - } - } - return $message; - } - - /** - * Make links in the text clickable - * - * @param string $text - * @return string - **/ - function &makeClickable(&$text) - { - $patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([^, \r\n\"\(\)'<>\[\]]+)/i"); - $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1ftp.\\2.\\3", "\\1\\2@\\3"); - return preg_replace($patterns, $replacements, $text); - } - - /** - * Replace XoopsCodes with their equivalent HTML formatting - * - * @param string $text - * @param bool $allowimage Allow images in the text? + { + $db =& Database::getInstance(); + if (count($this->smileys) == 0) { + if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))){ + while ($smiles = $db->fetchArray($getsmiles)) { + $message =& str_replace($smiles['code'], '', $message); + array_push($this->smileys, $smiles); + } + } + } + elseif (is_array($this->smileys)) { + foreach ($this->smileys as $smile) { + $message =& str_replace($smile['code'], '', $message); + } + } + return $message; + } + + /** + * Make links in the text clickable + * + * @param string $text + * @return string + **/ + function &makeClickable(&$text) + { + $patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([^, \r\n\"\(\)'<>\[\]]+)/i"); + $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1ftp.\\2.\\3", "\\1\\2@\\3"); + return preg_replace($patterns, $replacements, $text); + } + + /** + * Replace XoopsCodes with their equivalent HTML formatting + * + * @param string $text + * @param bool $allowimage Allow images in the text? * On FALSE, uses links to images. - * @return string - **/ - function &xoopsCodeDecode(&$text, $allowimage = 1) - { - $patterns = array(); - $replacements = array(); - //$patterns[] = "/\[code](.*)\[\/code\]/esU"; - //$replacements[] = "'
'.wordwrap(MyTextSanitizer::htmlSpecialChars('\\1'), 100).'
'"; - // RMV: added new markup for intrasite url (allows easier site moves) - // TODO: automatically convert other URLs to this format if XOOPS_URL matches?? - $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[url=(['\"]?)([^\"'<>]*)\\1](.*)\[\/url\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9]*)\\1](.*)\[\/color\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[size=(['\"]?)([a-z0-9-]*)\\1](.*)\[\/size\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU"; - $replacements[] = '\\1'; - $patterns[] = "/\[b](.*)\[\/b\]/sU"; - $replacements[] = '\\1'; - $patterns[] = "/\[i](.*)\[\/i\]/sU"; - $replacements[] = '\\1'; - $patterns[] = "/\[u](.*)\[\/u\]/sU"; - $replacements[] = '\\1'; - $patterns[] = "/\[d](.*)\[\/d\]/sU"; - $replacements[] = '\\1'; - //$patterns[] = "/\[li](.*)\[\/li\]/sU"; - //$replacements[] = '
  • \\1
  • '; - $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; - $patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; - $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 id=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; - $patterns[] = "/\[img id=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; - if ($allowimage != 1) { - $replacements[] = '\\3'; - $replacements[] = '\\1'; - $replacements[] = '\\4'; - $replacements[] = '\\3'; - } else { - $replacements[] = ''; - $replacements[] = ''; - $replacements[] = '\\4'; - $replacements[] = '\\3'; - } - $patterns[] = "/\[quote]/sU"; - $replacements[] = _QUOTEC.'
    '; - //$replacements[] = 'Quote:
    '; - $patterns[] = "/\[\/quote]/sU"; - $replacements[] = '
    '; - $patterns[] = "/javascript:/si"; - $replacements[] = "java script:"; - $patterns[] = "/about:/si"; - $replacements[] = "about :"; - return preg_replace($patterns, $replacements, $text); - } - - /** - * Convert linebreaks to
    tags - * - * @param string $text - * - * @return string - */ - function &nl2Br($text) - { - return preg_replace("/(\015\012)|(\015)|(\012)/","
    ",$text); - } - - /** - * Add slashes to the text if magic_quotes_gpc is turned off. - * - * @param string $text - * @return string - **/ - function &addSlashes($text) - { - if (!get_magic_quotes_gpc()) { - $text =& addslashes($text); - } - return $text; - } - /* - * if magic_quotes_gpc is on, stirip back slashes + * @return string + **/ + function &xoopsCodeDecode(&$text, $allowimage = 1) + { + $patterns = array(); + $replacements = array(); + //$patterns[] = "/\[code](.*)\[\/code\]/esU"; + //$replacements[] = "'
    '.wordwrap(MyTextSanitizer::htmlSpecialChars('\\1'), 100).'
    '"; + // RMV: added new markup for intrasite url (allows easier site moves) + // TODO: automatically convert other URLs to this format if XOOPS_URL matches?? + $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[url=(['\"]?)([^\"'<>]*)\\1](.*)\[\/url\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9]*)\\1](.*)\[\/color\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[size=(['\"]?)([a-z0-9-]*)\\1](.*)\[\/size\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[email]([^;<>\*\(\)\"']*)\[\/email\]/sU"; + $replacements[] = '\\1'; + $patterns[] = "/\[b](.*)\[\/b\]/sU"; + $replacements[] = '\\1'; + $patterns[] = "/\[i](.*)\[\/i\]/sU"; + $replacements[] = '\\1'; + $patterns[] = "/\[u](.*)\[\/u\]/sU"; + $replacements[] = '\\1'; + $patterns[] = "/\[d](.*)\[\/d\]/sU"; + $replacements[] = '\\1'; + //$patterns[] = "/\[li](.*)\[\/li\]/sU"; + //$replacements[] = '
  • \\1
  • '; + $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; + $patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; + $patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 id=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; + $patterns[] = "/\[img id=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sU"; + if ($allowimage != 1) { + $replacements[] = '\\3'; + $replacements[] = '\\1'; + $replacements[] = '\\4'; + $replacements[] = '\\3'; + } else { + $replacements[] = ''; + $replacements[] = ''; + $replacements[] = '\\4'; + $replacements[] = '\\3'; + } + $patterns[] = "/\[quote]/sU"; + $replacements[] = _QUOTEC.'
    '; + //$replacements[] = 'Quote:
    '; + $patterns[] = "/\[\/quote]/sU"; + $replacements[] = '
    '; + $patterns[] = "/javascript:/si"; + $replacements[] = "java script:"; + $patterns[] = "/about:/si"; + $replacements[] = "about :"; + return preg_replace($patterns, $replacements, $text); + } + + /** + * Convert linebreaks to
    tags + * + * @param string $text + * + * @return string + */ + function &nl2Br($text) + { + return preg_replace("/(\015\012)|(\015)|(\012)/","
    ",$text); + } + + /** + * Add slashes to the text if magic_quotes_gpc is turned off. + * + * @param string $text + * @return string + **/ + function &addSlashes($text) + { + if (!get_magic_quotes_gpc()) { + $text =& addslashes($text); + } + return $text; + } + /* + * if magic_quotes_gpc is on, stirip back slashes * - * @param string $text + * @param string $text * - * @return string - */ - function &stripSlashesGPC($text) - { - if (get_magic_quotes_gpc()) { - $text =& stripslashes($text); - } - return $text; - } + * @return string + */ + function &stripSlashesGPC($text) + { + if (get_magic_quotes_gpc()) { + $text =& stripslashes($text); + } + return $text; + } - /* - * for displaying data in html textbox forms + /* + * for displaying data in html textbox forms * - * @param string $text + * @param string $text * - * @return string - */ - function &htmlSpecialChars($text) - { - //return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES)); - return preg_replace(array("/&/i", "/ /i"), array('&', '&nbsp;'), htmlspecialchars($text, ENT_QUOTES)); - } - - /** - * Reverses {@link htmlSpecialChars()} - * - * @param string $text - * @return string - **/ - function &undoHtmlSpecialChars(&$text) - { - return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); - } - - /** - * Filters textarea form data in DB for display - * - * @param string $text - * @param bool $html allow html? - * @param bool $smiley allow smileys? - * @param bool $xcode allow xoopscode? - * @param bool $image allow inline images? - * @param bool $br convert linebreaks? - * @return string - **/ - function &displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) - { - if ($html != 1) { - // html not allowed - $text =& $this->htmlSpecialChars($text); - } - $text =& $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18) - $text =& $this->makeClickable($text); - if ($smiley != 0) { - // process smiley - $text =& $this->smiley($text); - } - if ($xcode != 0) { - // decode xcode - if ($image != 0) { - // image allowed - $text =& $this->xoopsCodeDecode($text); - } else { - // image not allowed - $text =& $this->xoopsCodeDecode($text, 0); - } - } - if ($br != 0) { - $text =& $this->nl2Br($text); - } - $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) - return $text; - } - - /** - * Filters textarea form data submitted for preview - * - * @param string $text - * @param bool $html allow html? - * @param bool $smiley allow smileys? - * @param bool $xcode allow xoopscode? - * @param bool $image allow inline images? - * @param bool $br convert linebreaks? - * @return string - **/ - function &previewTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) - { - $text =& $this->stripSlashesGPC($text); - if ($html != 1) { - // html not allowed - $text =& $this->htmlSpecialChars($text); - } - $text =& $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18) - $text =& $this->makeClickable($text); - if ($smiley != 0) { - // process smiley - $text =& $this->smiley($text); - } - if ($xcode != 0) { - // decode xcode - if ($image != 0) { - // image allowed - $text =& $this->xoopsCodeDecode($text); - } else { - // image not allowed - $text =& $this->xoopsCodeDecode($text, 0); - } - } - if ($br != 0) { - $text =& $this->nl2Br($text); - } - $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) - return $text; - } - - /** - * Replaces banned words in a string with their replacements - * - * @param string $text - * @return string + * @return string + */ + function &htmlSpecialChars($text) + { + //return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES)); + return preg_replace(array("/&/i", "/ /i"), array('&', '&nbsp;'), htmlspecialchars($text, ENT_QUOTES)); + } + + /** + * Reverses {@link htmlSpecialChars()} + * + * @param string $text + * @return string + **/ + function &undoHtmlSpecialChars(&$text) + { + return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); + } + + /** + * Filters textarea form data in DB for display + * + * @param string $text + * @param bool $html allow html? + * @param bool $smiley allow smileys? + * @param bool $xcode allow xoopscode? + * @param bool $image allow inline images? + * @param bool $br convert linebreaks? + * @return string + **/ + function &displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) + { + if ($html != 1) { + // html not allowed + $text =& $this->htmlSpecialChars($text); + } + $text =& $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18) + $text =& $this->makeClickable($text); + if ($smiley != 0) { + // process smiley + $text =& $this->smiley($text); + } + if ($xcode != 0) { + // decode xcode + if ($image != 0) { + // image allowed + $text =& $this->xoopsCodeDecode($text); + } else { + // image not allowed + $text =& $this->xoopsCodeDecode($text, 0); + } + } + if ($br != 0) { + $text =& $this->nl2Br($text); + } + $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) + return $text; + } + + /** + * Filters textarea form data submitted for preview + * + * @param string $text + * @param bool $html allow html? + * @param bool $smiley allow smileys? + * @param bool $xcode allow xoopscode? + * @param bool $image allow inline images? + * @param bool $br convert linebreaks? + * @return string + **/ + function &previewTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) + { + $text =& $this->stripSlashesGPC($text); + if ($html != 1) { + // html not allowed + $text =& $this->htmlSpecialChars($text); + } + $text =& $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18) + $text =& $this->makeClickable($text); + if ($smiley != 0) { + // process smiley + $text =& $this->smiley($text); + } + if ($xcode != 0) { + // decode xcode + if ($image != 0) { + // image allowed + $text =& $this->xoopsCodeDecode($text); + } else { + // image not allowed + $text =& $this->xoopsCodeDecode($text, 0); + } + } + if ($br != 0) { + $text =& $this->nl2Br($text); + } + $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) + return $text; + } + + /** + * Replaces banned words in a string with their replacements + * + * @param string $text + * @return string * * @deprecated - **/ - function &censorString(&$text) - { - if (!isset($this->censorConf)) { - $config_handler =& xoops_gethandler('config'); - $this->censorConf =& $config_handler->getConfigsByCat(XOOPS_CONF_CENSOR); - } - if ($this->censorConf['censor_enable'] == 1) { - $replacement = $this->censorConf['censor_replace']; - foreach ($this->censorConf['censor_words'] as $bad) { - if ( !empty($bad) ) { - $bad = quotemeta($bad); - $patterns[] = "/(\s)".$bad."/siU"; - $replacements[] = "\\1".$replacement; - $patterns[] = "/^".$bad."/siU"; - $replacements[] = $replacement; - $patterns[] = "/(\n)".$bad."/siU"; - $replacements[] = "\\1".$replacement; - $patterns[] = "/]".$bad."/siU"; - $replacements[] = "]".$replacement; - $text = preg_replace($patterns, $replacements, $text); - } - } - } - return $text; - } - - - /**#@+ - * Sanitizing of [code] tag - */ - function codePreConv($text, $xcode = 1) { - if($xcode != 0){ - $patterns = "/\[code](.*)\[\/code\]/esU"; - $replacements = "'[code]'.base64_encode('$1').'[/code]'"; - $text = preg_replace($patterns, $replacements, $text); - } - return $text; - } - - function codeConv($text, $xcode = 1, $image = 1){ - if($xcode != 0){ - $patterns = "/\[code](.*)\[\/code\]/esU"; - if ($image != 0) { - // image allowed - $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1').'
    '"; - //$text =& $this->xoopsCodeDecode($text); - } else { - // image not allowed - $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1', 0).'
    '"; - //$text =& $this->xoopsCodeDecode($text, 0); - } - $text = preg_replace($patterns, $replacements, $text); - } - return $text; - } - - function codeSanitizer($str, $image = 1){ - if($image != 0){ - $str = $this->xoopsCodeDecode( - $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))) - ); - }else{ - $str = $this->xoopsCodeDecode( - $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))),0 - ); - } - return $str; - } + **/ + function &censorString(&$text) + { + if (!isset($this->censorConf)) { + $config_handler =& xoops_gethandler('config'); + $this->censorConf =& $config_handler->getConfigsByCat(XOOPS_CONF_CENSOR); + } + if ($this->censorConf['censor_enable'] == 1) { + $replacement = $this->censorConf['censor_replace']; + foreach ($this->censorConf['censor_words'] as $bad) { + if ( !empty($bad) ) { + $bad = quotemeta($bad); + $patterns[] = "/(\s)".$bad."/siU"; + $replacements[] = "\\1".$replacement; + $patterns[] = "/^".$bad."/siU"; + $replacements[] = $replacement; + $patterns[] = "/(\n)".$bad."/siU"; + $replacements[] = "\\1".$replacement; + $patterns[] = "/]".$bad."/siU"; + $replacements[] = "]".$replacement; + $text = preg_replace($patterns, $replacements, $text); + } + } + } + return $text; + } - /**#@-*/ + /**#@+ + * Sanitizing of [code] tag + */ + function codePreConv($text, $xcode = 1) { + if($xcode != 0){ + $patterns = "/\[code](.*)\[\/code\]/esU"; + $replacements = "'[code]'.base64_encode('$1').'[/code]'"; + $text = preg_replace($patterns, $replacements, $text); + } + return $text; + } + + function codeConv($text, $xcode = 1, $image = 1){ + if($xcode != 0){ + $patterns = "/\[code](.*)\[\/code\]/esU"; + if ($image != 0) { + // image allowed + $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1').'
    '"; + //$text =& $this->xoopsCodeDecode($text); + } else { + // image not allowed + $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1', 0).'
    '"; + //$text =& $this->xoopsCodeDecode($text, 0); + } + $text = preg_replace($patterns, $replacements, $text); + } + return $text; + } + + function codeSanitizer($str, $image = 1){ + if($image != 0){ + $str = $this->xoopsCodeDecode( + $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))) + ); + }else{ + $str = $this->xoopsCodeDecode( + $this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))),0 + ); + } + return $str; + } + + + /**#@-*/ ##################### Deprecated Methods ###################### - /**#@+ - * @deprecated - */ - function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) - { - if ( $allowhtml == 0 ) { - $text = $this->htmlSpecialChars($text); - } else { - //$config =& $GLOBALS['xoopsConfig']; - //$allowed = $config['allowed_html']; - //$text = strip_tags($text, $allowed); - $text = $this->makeClickable($text); - } - if ( $smiley == 1 ) { - $text = $this->smiley($text); - } - if ( $bbcode == 1 ) { - $text = $this->xoopsCodeDecode($text); - } - $text = $this->nl2Br($text); - return $text; - } - - function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) - { - $text = $this->oopsStripSlashesGPC($text); - if ( $allowhtml == 0 ) { - $text = $this->htmlSpecialChars($text); - } else { - //$config =& $GLOBALS['xoopsConfig']; - //$allowed = $config['allowed_html']; - //$text = strip_tags($text, $allowed); - $text = $this->makeClickable($text); - } - if ( $smiley == 1 ) { - $text = $this->smiley($text); - } - if ( $bbcode == 1 ) { - $text = $this->xoopsCodeDecode($text); - } - $text = $this->nl2Br($text); - return $text; - } - - function makeTboxData4Save($text) - { - //$text = $this->undoHtmlSpecialChars($text); - return $this->addSlashes($text); - } - - function makeTboxData4Show($text, $smiley=0) - { - $text = $this->htmlSpecialChars($text); - return $text; - } - - function makeTboxData4Edit($text) - { - return $this->htmlSpecialChars($text); - } - - function makeTboxData4Preview($text, $smiley=0) - { - $text = $this->stripSlashesGPC($text); - $text = $this->htmlSpecialChars($text); - return $text; - } - - function makeTboxData4PreviewInForm($text) - { - $text = $this->stripSlashesGPC($text); - return $this->htmlSpecialChars($text); - } - - function makeTareaData4Save($text) - { - return $this->addSlashes($text); - } - - function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1) - { - return $this->displayTarea($text, $html, $smiley, $xcode); - } - - function makeTareaData4Edit($text) - { - return $this->htmlSpecialChars($text); - } - - function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1) - { - return $this->previewTarea($text, $html, $smiley, $xcode); - } - - function makeTareaData4PreviewInForm($text) - { - //if magic_quotes_gpc is on, do stipslashes - $text = $this->stripSlashesGPC($text); - return $this->htmlSpecialChars($text); - } - - function makeTareaData4InsideQuotes($text) - { - return $this->htmlSpecialChars($text); - } - - function &oopsStripSlashesGPC($text) - { - return $this->stripSlashesGPC($text); - } - - function &oopsStripSlashesRT($text) - { - if (get_magic_quotes_runtime()) { - $text =& stripslashes($text); - } - return $text; - } - - function &oopsAddSlashes($text) - { - return $this->addSlashes($text); - } - - function &oopsHtmlSpecialChars($text) - { - return $this->htmlSpecialChars($text); - } - - function &oopsNl2Br($text) - { - return $this->nl2br($text); - } + /**#@+ + * @deprecated + */ + function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) + { + if ( $allowhtml == 0 ) { + $text = $this->htmlSpecialChars($text); + } else { + //$config =& $GLOBALS['xoopsConfig']; + //$allowed = $config['allowed_html']; + //$text = strip_tags($text, $allowed); + $text = $this->makeClickable($text); + } + if ( $smiley == 1 ) { + $text = $this->smiley($text); + } + if ( $bbcode == 1 ) { + $text = $this->xoopsCodeDecode($text); + } + $text = $this->nl2Br($text); + return $text; + } + + function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) + { + $text = $this->oopsStripSlashesGPC($text); + if ( $allowhtml == 0 ) { + $text = $this->htmlSpecialChars($text); + } else { + //$config =& $GLOBALS['xoopsConfig']; + //$allowed = $config['allowed_html']; + //$text = strip_tags($text, $allowed); + $text = $this->makeClickable($text); + } + if ( $smiley == 1 ) { + $text = $this->smiley($text); + } + if ( $bbcode == 1 ) { + $text = $this->xoopsCodeDecode($text); + } + $text = $this->nl2Br($text); + return $text; + } + + function makeTboxData4Save($text) + { + //$text = $this->undoHtmlSpecialChars($text); + return $this->addSlashes($text); + } + + function makeTboxData4Show($text, $smiley=0) + { + $text = $this->htmlSpecialChars($text); + return $text; + } + + function makeTboxData4Edit($text) + { + return $this->htmlSpecialChars($text); + } + + function makeTboxData4Preview($text, $smiley=0) + { + $text = $this->stripSlashesGPC($text); + $text = $this->htmlSpecialChars($text); + return $text; + } + + function makeTboxData4PreviewInForm($text) + { + $text = $this->stripSlashesGPC($text); + return $this->htmlSpecialChars($text); + } + + function makeTareaData4Save($text) + { + return $this->addSlashes($text); + } + + function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1) + { + return $this->displayTarea($text, $html, $smiley, $xcode); + } + + function makeTareaData4Edit($text) + { + return $this->htmlSpecialChars($text); + } + + function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1) + { + return $this->previewTarea($text, $html, $smiley, $xcode); + } + + function makeTareaData4PreviewInForm($text) + { + //if magic_quotes_gpc is on, do stipslashes + $text = $this->stripSlashesGPC($text); + return $this->htmlSpecialChars($text); + } + + function makeTareaData4InsideQuotes($text) + { + return $this->htmlSpecialChars($text); + } + + function &oopsStripSlashesGPC($text) + { + return $this->stripSlashesGPC($text); + } + + function &oopsStripSlashesRT($text) + { + if (get_magic_quotes_runtime()) { + $text =& stripslashes($text); + } + return $text; + } + + function &oopsAddSlashes($text) + { + return $this->addSlashes($text); + } + + function &oopsHtmlSpecialChars($text) + { + return $this->htmlSpecialChars($text); + } + + function &oopsNl2Br($text) + { + return $this->nl2br($text); + } /**#@-*/ } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:11:44 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:11:44 +0900 Subject: [xoops-cvslog 83] CVS update: xoops2jp/html/modules/mylinks/language/japanese Message-ID: <20050605231144.BD09C2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/language/japanese/main.php diff -u xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1 xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1.6.1 --- xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/language/japanese/main.php Mon Jun 6 08:11:44 2005 @@ -1,6 +1,6 @@ ¤Þ¤ºÅÐÏ¿¤µ¤ì¤ë¤«¡¢¥í¥°¥¤¥ó¤·¤Æ²¼¤µ¤¤¡£"); +define("_MD_MUSTREGFIRST","¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¤¬¤¢¤Ê¤¿¤Ï¤³¤Î¥Ú¡¼¥¸¤Ë¤Ï¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¡£
    ¤Þ¤ºÅÐÏ¿¤µ¤ì¤ë¤«¡¢¥í¥°¥¤¥ó¤·¤Æ²¼¤µ¤¤¡£"); define("_MD_NORATING","ɾ²Á¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); -define("_MD_CANTVOTEOWN","¤¢¤Ê¤¿¤¬ÅÐÏ¿¤·¤¿¥ê¥ó¥¯¤Ë¤ÏÅêɼ¤Ç¤­¤Þ¤»¤ó¡£
    Åêɼ¤ÏÁ´¤Æµ­Ï¿¤µ¤ìÄ´ºº¤µ¤ì¤Þ¤¹¡£"); +define("_MD_CANTVOTEOWN","¤¢¤Ê¤¿¤¬ÅÐÏ¿¤·¤¿¥ê¥ó¥¯¤Ë¤ÏÅêɼ¤Ç¤­¤Þ¤»¤ó¡£
    Åêɼ¤ÏÁ´¤Æµ­Ï¿¤µ¤ìÄ´ºº¤µ¤ì¤Þ¤¹¡£"); define("_MD_VOTEONCE2","¿½¤·Ìõ¤¢¤ê¤Þ¤»¤ó¤¬¡¢Æ±°ì¥ê¥ó¥¯¾ðÊó¤Ø¤ÎÅêɼ¤Ï°ì²ó¸Â¤ê¤È¤µ¤»¤Æ¤¤¤¿¤À¤¤¤Æ¤¤¤Þ¤¹¡£"); -//%%%%%% Module Name 'MyLinks' (Admin) %%%%% +//%%%%%% Module Name 'MyLinks' (Admin) %%%%% define("_MD_WEBLINKSCONF","¥ê¥ó¥¯½¸´ÉÍý"); define("_MD_GENERALSET","°ìÈÌÀßÄê"); From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:12:47 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:12:47 +0900 Subject: [xoops-cvslog 84] CVS update: xoops2jp/html/modules/xoopsheadline/language/japanese Message-ID: <20050605231247.6AF642AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php diff -u xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2 xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2.6.1 --- xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2 Fri Mar 18 22:00:59 2005 +++ xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php Mon Jun 6 08:12:47 2005 @@ -1,5 +1,5 @@ ¥µ¥¤¥È̾¡§ %s'); +define('_AM_WANTDEL','ËÜÅö¤Ë¤³¤Î¥Ø¥Ã¥É¥é¥¤¥ó¤òºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡©
    ¥µ¥¤¥È̾¡§ %s'); define('_AM_INVALIDID', 'ID¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó'); define('_AM_OBJECTNG', '¥ª¥Ö¥¸¥§¥¯¥È¤¬Â¸ºß¤·¤Þ¤»¤ó'); -define('_AM_FAILUPDATE', '¥Ø¥Ã¥É¥é¥¤¥ó¤ÎÊݸ¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); -define('_AM_FAILDELETE', '¥Ø¥Ã¥É¥é¥¤¥ó¤Îºï½ü¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); +define('_AM_FAILUPDATE', '¥Ø¥Ã¥É¥é¥¤¥ó¤ÎÊݸ¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); +define('_AM_FAILDELETE', '¥Ø¥Ã¥É¥é¥¤¥ó¤Îºï½ü¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); ?> From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 08:13:07 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 08:13:07 +0900 Subject: [xoops-cvslog 85] CVS update: xoops2jp/html/modules/sections/language/english Message-ID: <20050605231307.BFA712AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/language/english/main.php diff -u xoops2jp/html/modules/sections/language/english/main.php:1.2 xoops2jp/html/modules/sections/language/english/main.php:1.2.6.1 --- xoops2jp/html/modules/sections/language/english/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/sections/language/english/main.php Mon Jun 6 08:13:07 2005 @@ -1,7 +1,7 @@ Please register or login first!"); +define("_MD_MUSTREGFIRST","You need to be a registered user or logged in to send a modify request.
    Please register or login first!"); define("_MD_WELCOMETOSEC","Welcome to the Special Sections at %s"); // %s is your site name define("_MD_HEREUCANFIND","Here you can find some cool articles that are not presented on the homepage."); define("_MD_THISISSECTION","This is Section %s"); // %s is a section name From onokazu ¡÷ users.sourceforge.jp Mon Jun 6 14:59:39 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Mon, 6 Jun 2005 14:59:39 +0900 Subject: [xoops-cvslog 86] CVS update: xoops2jp/html/class Message-ID: <20050606055939.F3C112AC00F@users.sourceforge.jp> Index: xoops2jp/html/class/module.textsanitizer.php diff -u xoops2jp/html/class/module.textsanitizer.php:1.2.6.1 xoops2jp/html/class/module.textsanitizer.php:1.2.6.2 --- xoops2jp/html/class/module.textsanitizer.php:1.2.6.1 Mon Jun 6 08:10:31 2005 +++ xoops2jp/html/class/module.textsanitizer.php Mon Jun 6 14:59:39 2005 @@ -1,5 +1,5 @@ '.MyTextSanitizer::codeSanitizer('$1').'
    '"; + $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1').'
    '"; //$text =& $this->xoopsCodeDecode($text); } else { // image not allowed - $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1', 0).'
    '"; + $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1', 0).'
    '"; //$text =& $this->xoopsCodeDecode($text, 0); } $text = preg_replace($patterns, $replacements, $text); From onokazu ¡÷ users.sourceforge.jp Tue Jun 7 11:41:26 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 7 Jun 2005 11:41:26 +0900 Subject: [xoops-cvslog 87] CVS update: xoops2jp/html/modules/system/admin/users Message-ID: <20050607024126.105522AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/users/userform.php diff -u xoops2jp/html/modules/system/admin/users/userform.php:1.2.6.2 xoops2jp/html/modules/system/admin/users/userform.php:1.2.6.3 --- xoops2jp/html/modules/system/admin/users/userform.php:1.2.6.2 Fri May 13 20:04:10 2005 +++ xoops2jp/html/modules/system/admin/users/userform.php Tue Jun 7 11:41:25 2005 @@ -1,5 +1,5 @@ addOption(1, _AM_AOUTVTEAD); $email_tray->addElement($email_cbox); $url_text = new XoopsFormText(_AM_URL, "url", 30, 100, $url_value); -// $avatar_select = new XoopsFormSelect("", "user_avatar", $avatar_value); -// $avatar_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); -// $avatar_select->addOptionArray($avatar_array); -// $a_dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); -// $a_dir_labels = array(); -// $a_count = 0; -// $a_dir_link = "XOOPS"; -// $a_count = $a_count + count($avatar_array); -// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); -// foreach ($a_dirlist as $a_dir) { -// if ( $a_dir == "users" ) { -// continue; -// } -// $avatars_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/"); -// $avatar_select->addOptionArray($avatars_array); -// $a_dir_link = "".$a_dir.""; -// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); -// $a_count = $a_count + count($avatars_array); -// } -// if (!empty($uid_value)) { -// $myavatar = avatarExists($uid_value); -// if ( $myavatar != false ) { -// $avatar_select->addOption($myavatar, _US_MYAVATAR); -// } -// } -// $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'"); -// $avatar_label = new XoopsFormLabel("", ""); -// $avatar_tray = new XoopsFormElementTray(_AM_AVATAR, " "); -// $avatar_tray->addElement($avatar_select); -// $avatar_tray->addElement($avatar_label); -// foreach ($a_dir_labels as $a_dir_label) { -// $avatar_tray->addElement($a_dir_label); -// } -// $theme_select = new XoopsFormSelectTheme(_AM_THEME, "theme", $theme_value); +// $avatar_select = new XoopsFormSelect("", "user_avatar", $avatar_value); +// $avatar_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); +// $avatar_select->addOptionArray($avatar_array); +// $a_dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); +// $a_dir_labels = array(); +// $a_count = 0; +// $a_dir_link = "XOOPS"; +// $a_count = $a_count + count($avatar_array); +// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); +// foreach ($a_dirlist as $a_dir) { +// if ( $a_dir == "users" ) { +// continue; +// } +// $avatars_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/"); +// $avatar_select->addOptionArray($avatars_array); +// $a_dir_link = "".$a_dir.""; +// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); +// $a_count = $a_count + count($avatars_array); +// } +// if (!empty($uid_value)) { +// $myavatar = avatarExists($uid_value); +// if ( $myavatar != false ) { +// $avatar_select->addOption($myavatar, _US_MYAVATAR); +// } +// } +// $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'"); +// $avatar_label = new XoopsFormLabel("", ""); +// $avatar_tray = new XoopsFormElementTray(_AM_AVATAR, " "); +// $avatar_tray->addElement($avatar_select); +// $avatar_tray->addElement($avatar_label); +// foreach ($a_dir_labels as $a_dir_label) { +// $avatar_tray->addElement($a_dir_label); +// } +// $theme_select = new XoopsFormSelectTheme(_AM_THEME, "theme", $theme_value); $timezone_select = new XoopsFormSelectTimezone(_US_TIMEZONE, "timezone_offset", $timezone_value); $icq_text = new XoopsFormText(_AM_ICQ, "user_icq", 15, 15, $icq_value); $aim_text = new XoopsFormText(_AM_AIM, "user_aim", 18, 18, $aim_value); @@ -102,13 +102,13 @@ $rank_select = new XoopsFormSelect(_AM_RANK, "rank", $rank_value); $ranklist = XoopsLists::getUserRankList(); if ( count($ranklist) > 0 ) { - $rank_select->addOption(0, _AM_NSRA); - $rank_select->addOption(0, "--------------"); - $rank_select->addOptionArray($ranklist); + $rank_select->addOption(0, _AM_NSRA); + $rank_select->addOption(0, "--------------"); + $rank_select->addOptionArray($ranklist); } else { - $rank_select->addOption(0, _AM_NSRID); + $rank_select->addOption(0, _AM_NSRID); } -$pwd_text = new XoopsFormPassword(_AM_PASSWORD, "password", 10, 32); +$pwd_text = new XoopsFormPassword(_AM_PASSWORD, "pass", 10, 32); $pwd_text2 = new XoopsFormPassword(_AM_RETYPEPD, "pass2", 10, 32); $mailok_radio = new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $mailok_value); @@ -135,8 +135,8 @@ $form->addElement($name_text); $form->addElement($email_tray, true); $form->addElement($url_text); -// $form->addElement($avatar_tray); -// $form->addElement($theme_select); +// $form->addElement($avatar_tray); +// $form->addElement($theme_select); $form->addElement($timezone_select); $form->addElement($icq_text); $form->addElement($aim_text); @@ -155,11 +155,11 @@ $form->addElement($rank_select); // adding a new user requires password fields if (!$form_isedit) { - $form->addElement($pwd_text, true); - $form->addElement($pwd_text2, true); + $form->addElement($pwd_text, true); + $form->addElement($pwd_text2, true); } else { - $form->addElement($pwd_text); - $form->addElement($pwd_text2); + $form->addElement($pwd_text); + $form->addElement($pwd_text2); } $form->addElement($mailok_radio); $form->addElement($group_select); @@ -167,8 +167,8 @@ $form->addElement($op_hidden); $form->addElement($submit_button); if ( !empty($uid_value) ) { - $uid_hidden = new XoopsFormHidden("uid", $uid_value); - $form->addElement($uid_hidden); + $uid_hidden = new XoopsFormHidden("uid", $uid_value); + $form->addElement($uid_hidden); } //$form->setRequired($uname_text); //$form->setRequired($email_text); From onokazu ¡÷ users.sourceforge.jp Wed Jun 8 13:28:52 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 8 Jun 2005 13:28:52 +0900 Subject: [xoops-cvslog 88] CVS update: xoops2jp/html/modules/newbb Message-ID: <20050608042852.0DC782AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/index.php diff -u xoops2jp/html/modules/newbb/index.php:1.2 xoops2jp/html/modules/newbb/index.php:1.2.6.1 --- xoops2jp/html/modules/newbb/index.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/index.php Wed Jun 8 13:28:51 2005 @@ -1,5 +1,5 @@ prefix('bb_categories').' c, '.$xoopsDB->prefix("bb_forums").' f WHERE f.cat_id=c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order'; if ( !$result = $xoopsDB->query($sql) ) { - redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); - exit(); + redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); + exit(); } -$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,$xoopsConfig['sitename']), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); +$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); $viewcat = (!empty($HTTP_GET_VARS['cat'])) ? intval($HTTP_GET_VARS['cat']) : 0; $categories = array(); while ( $cat_row = $xoopsDB->fetchArray($result) ) { - $categories[] = $cat_row; + $categories[] = $cat_row; } $sql = 'SELECT f.*, u.uname, u.uid, p.topic_id, p.post_time, p.subject, p.icon FROM '.$xoopsDB->prefix('bb_forums').' f LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = f.forum_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = p.uid'; if ( $viewcat != 0 ) { - $sql .= ' WHERE f.cat_id = '.$viewcat; - $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename'])); + $sql .= ' WHERE f.cat_id = '.$viewcat; + $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); } else { - $xoopsTpl->assign('forum_index_title', ''); + $xoopsTpl->assign('forum_index_title', ''); } $sql .= ' ORDER BY f.cat_id, f.forum_id'; if ( !$result = $xoopsDB->query($sql) ) { - exit("Error"); + exit("Error"); } $forums = array(); // RMV-FIX while ( $forum_data = $xoopsDB->fetchArray($result) ) { - $forums[] = $forum_data; + $forums[] = $forum_data; } $cat_count = count($categories); if ($cat_count > 0) { - for ( $i = 0; $i < $cat_count; $i++ ) { - $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); - if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { - $xoopsTpl->append("categories", $categories[$i]); - continue; - } - $topic_lastread = newbb_get_topics_viewed(); - foreach ( $forums as $forum_row ) { - unset($last_post); - if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { - if ($forum_row['post_time']) { - //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); - $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); - $last_post_icon = ''; - if ( $forum_row['icon'] ) { - $last_post_icon .= ''; - } else { - $last_post_icon .= ''; - } - $last_post_icon .= ''; - $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; - if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ - $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; - } else { - $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; - } - $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } else { - // no forums, so put empty values - $categories[$i]['forums']['forum_lastpost_time'][] = ""; - $categories[$i]['forums']['forum_lastpost_icon'][] = ""; - $categories[$i]['forums']['forum_lastpost_user'][] = ""; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } - $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; - $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); - $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); - $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; - $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; - $all_moderators = get_moderators($forum_row['forum_id']); - $count = 0; - $forum_moderators = ''; - foreach ( $all_moderators as $mods) { - foreach ( $mods as $mod_id => $mod_name) { - if ( $count > 0 ) { - $forum_moderators .= ', '; - } - $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; - $count = 1; - } - } - $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; - } - } - $xoopsTpl->append("categories", $categories[$i]); - } + for ( $i = 0; $i < $cat_count; $i++ ) { + $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); + if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { + $xoopsTpl->append("categories", $categories[$i]); + continue; + } + $topic_lastread = newbb_get_topics_viewed(); + foreach ( $forums as $forum_row ) { + unset($last_post); + if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { + if ($forum_row['post_time']) { + //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); + $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); + $last_post_icon = ''; + if ( $forum_row['icon'] ) { + $last_post_icon .= ''; + } else { + $last_post_icon .= ''; + } + $last_post_icon .= ''; + $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; + if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ + $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; + } else { + $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; + } + $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } else { + // no forums, so put empty values + $categories[$i]['forums']['forum_lastpost_time'][] = ""; + $categories[$i]['forums']['forum_lastpost_icon'][] = ""; + $categories[$i]['forums']['forum_lastpost_user'][] = ""; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } + $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; + $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); + $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); + $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; + $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; + $all_moderators = get_moderators($forum_row['forum_id']); + $count = 0; + $forum_moderators = ''; + foreach ( $all_moderators as $mods) { + foreach ( $mods as $mod_id => $mod_name) { + if ( $count > 0 ) { + $forum_moderators .= ', '; + } + $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; + $count = 1; + } + } + $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; + } + } + $xoopsTpl->append("categories", $categories[$i]); + } } else { - $xoopsTpl->append("categories", array()); + $xoopsTpl->append("categories", array()); } $xoopsTpl->assign(array("img_hotfolder" => $bbImage['newposts_forum'], "img_folder" => $bbImage['folder_forum'], "img_locked" => $bbImage['locked_forum'], "lang_newposts" => _MD_NEWPOSTS, "lang_private" => _MD_PRIVATEFORUM, "lang_nonewposts" => _MD_NONEWPOSTS, "lang_search" => _MD_SEARCH, "lang_advsearch" => _MD_ADVSEARCH)); include_once XOOPS_ROOT_PATH.'/footer.php'; From onokazu ¡÷ users.sourceforge.jp Wed Jun 8 13:29:14 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 8 Jun 2005 13:29:14 +0900 Subject: [xoops-cvslog 89] CVS update: xoops2jp/html/modules/mylinks Message-ID: <20050608042914.813272AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/ratelink.php diff -u xoops2jp/html/modules/mylinks/ratelink.php:1.2 xoops2jp/html/modules/mylinks/ratelink.php:1.2.6.1 --- xoops2jp/html/modules/mylinks/ratelink.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/ratelink.php Wed Jun 8 13:29:14 2005 @@ -1,5 +1,5 @@ getVar('uid'); - } - - //Make sure only 1 anonymous from an IP in a single day. - $anonwaitdays = 1; - $ip = getenv("REMOTE_ADDR"); - $lid = intval($HTTP_POST_VARS['lid']); - $cid = intval($HTTP_POST_VARS['cid']); - $rating = intval($HTTP_POST_VARS['rating']); - - // Check if Rating is Null - if ($rating=="--") { - redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); - exit(); - } - - // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) - if ($ratinguser != 0) { - $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); - while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { - if ($ratinguserDB == $ratinguser) { - redirect_header("index.php",4,_MD_CANTVOTEOWN); - exit(); - } - } - - // Check if REG user is trying to vote twice. - $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid"); - while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { - if ($ratinguserDB == $ratinguser) { - redirect_header("index.php",4,_MD_VOTEONCE2); - exit(); - } - } - - } else { - - // Check if ANONYMOUS user is trying to vote more than once per day. - $yesterday = (time()-(86400 * $anonwaitdays)); - $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); - list($anonvotecount) = $xoopsDB->fetchRow($result); - if ($anonvotecount > 0) { - redirect_header("index.php",4,_MD_VOTEONCE2); - exit(); - } - } - if($rating > 10){ - $rating = 10; - } + $eh = new ErrorHandler; //ErrorHandler object + if(empty($xoopsUser)){ + $ratinguser = 0; + }else{ + $ratinguser = $xoopsUser->getVar('uid'); + } + + //Make sure only 1 anonymous from an IP in a single day. + $anonwaitdays = 1; + $ip = getenv("REMOTE_ADDR"); + $lid = intval($HTTP_POST_VARS['lid']); + $cid = intval($HTTP_POST_VARS['cid']); + $rating = intval($HTTP_POST_VARS['rating']); + + // Check if Rating is Null + if ($rating=="--") { + redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); + exit(); + } + + // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) + if ($ratinguser != 0) { + $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); + while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { + if ($ratinguserDB == $ratinguser) { + redirect_header("index.php",4,_MD_CANTVOTEOWN); + exit(); + } + } + + // Check if REG user is trying to vote twice. + $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid"); + while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { + if ($ratinguserDB == $ratinguser) { + redirect_header("index.php",4,_MD_VOTEONCE2); + exit(); + } + } + + } else { + + // Check if ANONYMOUS user is trying to vote more than once per day. + $yesterday = (time()-(86400 * $anonwaitdays)); + $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); + list($anonvotecount) = $xoopsDB->fetchRow($result); + if ($anonvotecount > 0) { + redirect_header("index.php",4,_MD_VOTEONCE2); + exit(); + } + } + if($rating > 10){ + $rating = 10; + } //All is well. Add to Line Item Rate to DB. - $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); - $xoopsDB->query($sql) or $eh->show("0013"); + $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); + $xoopsDB->query($sql) or $eh->show("0013"); //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. updaterating($lid); - $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKURATE,$xoopsConfig[sitename]); - redirect_header("index.php",2,$ratemessage); - exit(); + $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKURATE, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + redirect_header("index.php",2,$ratemessage); + exit(); } else { - $xoopsOption['template_main'] = 'mylinks_ratelink.html'; - include XOOPS_ROOT_PATH."/header.php"; - $lid = intval($HTTP_GET_VARS['lid']); - $cid = intval($HTTP_GET_VARS['cid']); - $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); - list($title) = $xoopsDB->fetchRow($result); - $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title))); - $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE); - $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE); - $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE); - $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE); - $xoopsTpl->assign('lang_rateit', _MD_RATEIT); - $xoopsTpl->assign('lang_cancel', _CANCEL); - include XOOPS_ROOT_PATH.'/footer.php'; + $xoopsOption['template_main'] = 'mylinks_ratelink.html'; + include XOOPS_ROOT_PATH."/header.php"; + $lid = intval($HTTP_GET_VARS['lid']); + $cid = intval($HTTP_GET_VARS['cid']); + $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); + list($title) = $xoopsDB->fetchRow($result); + $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title))); + $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE); + $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE); + $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE); + $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE); + $xoopsTpl->assign('lang_rateit', _MD_RATEIT); + $xoopsTpl->assign('lang_cancel', _CANCEL); + include XOOPS_ROOT_PATH.'/footer.php'; } ?> From onokazu ¡÷ users.sourceforge.jp Wed Jun 8 13:32:11 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 8 Jun 2005 13:32:11 +0900 Subject: [xoops-cvslog 90] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20050608043211.5EDA02AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailform.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2.6.2 xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2.6.3 --- xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2.6.2 Fri May 13 20:02:32 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailform.php Wed Jun 8 13:32:11 2005 @@ -1,5 +1,5 @@ addElement($uid_hidden); - $display_names .= "".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]].", "; - unset($uid_hidden); - } - $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2)); - $form->addElement($users_label); - $display_criteria = 0; + $user_count = count($_POST['memberslist_id']); + $display_names = ""; + for ( $i = 0; $i < $user_count; $i++ ) { + $uid_hidden = new XoopsFormHidden("mail_to_user[]", $_POST['memberslist_id'][$i]); + $form->addElement($uid_hidden); + $display_names .= "".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]].", "; + unset($uid_hidden); + } + $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2)); + $form->addElement($users_label); + $display_criteria = 0; } if ( !empty($display_criteria) ) { - $selected_groups = array(); - $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."
    ", "mail_to_group", false, $selected_groups, 5, true); - $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_min", 20, 10); - $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_max", 20, 10); - $regd_min = new XoopsFormText(_AM_REGDMIN."
    "._AM_TIMEFORMAT."
    ", "mail_regd_min", 20, 10); - $regd_max = new XoopsFormText(_AM_REGDMAX."
    "._AM_TIMEFORMAT."
    ", "mail_regd_max", 20, 10); - $idle_more = new XoopsFormText(_AM_IDLEMORE."
    ", "mail_idle_more", 10, 5); - $idle_less = new XoopsFormText(_AM_IDLELESS."
    ", "mail_idle_less", 10, 5); - $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); - $mailok_cbox->addOption(1, _AM_MAILOK); - $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."
    ", "mail_inactive"); - $inactive_cbox->addOption(1, _AMIFCHECKD); - $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); - $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "

    "); - $criteria_tray->addElement($group_select); - $criteria_tray->addElement($lastlog_min); - $criteria_tray->addElement($lastlog_max); - $criteria_tray->addElement($idle_more); - $criteria_tray->addElement($idle_less); - $criteria_tray->addElement($mailok_cbox); - $criteria_tray->addElement($inactive_cbox); - $criteria_tray->addElement($regd_min); - $criteria_tray->addElement($regd_max); - $form->addElement($criteria_tray); + $selected_groups = array(); + $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."
    ", "mail_to_group", false, $selected_groups, 5, true); + $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_min", 20, 10); + $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_max", 20, 10); + $regd_min = new XoopsFormText(_AM_REGDMIN."
    "._AM_TIMEFORMAT."
    ", "mail_regd_min", 20, 10); + $regd_max = new XoopsFormText(_AM_REGDMAX."
    "._AM_TIMEFORMAT."
    ", "mail_regd_max", 20, 10); + $idle_more = new XoopsFormText(_AM_IDLEMORE."
    ", "mail_idle_more", 10, 5); + $idle_less = new XoopsFormText(_AM_IDLELESS."
    ", "mail_idle_less", 10, 5); + $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); + $mailok_cbox->addOption(1, _AM_MAILOK); + $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."
    ", "mail_inactive"); + $inactive_cbox->addOption(1, _AMIFCHECKD); + $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); + $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "

    "); + $criteria_tray->addElement($group_select); + $criteria_tray->addElement($lastlog_min); + $criteria_tray->addElement($lastlog_max); + $criteria_tray->addElement($idle_more); + $criteria_tray->addElement($idle_less); + $criteria_tray->addElement($mailok_cbox); + $criteria_tray->addElement($inactive_cbox); + $criteria_tray->addElement($regd_min); + $criteria_tray->addElement($regd_max); + $form->addElement($criteria_tray); } -$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, $xoopsConfig['sitename']); +$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E"); $femail_text = new XoopsFormText(_AM_MAILFMAIL, "mail_fromemail", 30, 255, $fromemail); //$subject_caption = _AM_MAILSUBJECT."

    "._AM_MAILTAGS."
    "._AM_MAILTAGS1."
    "._AM_MAILTAGS2."
    "._AM_MAILTAGS3."
    "; From onokazu ¡÷ users.sourceforge.jp Wed Jun 8 13:35:07 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 8 Jun 2005 13:35:07 +0900 Subject: [xoops-cvslog 91] CVS update: xoops2jp/html/modules/xoopspartners Message-ID: <20050608043508.071A52AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/index.php diff -u xoops2jp/html/modules/xoopspartners/index.php:1.2 xoops2jp/html/modules/xoopspartners/index.php:1.2.6.1 --- xoops2jp/html/modules/xoopspartners/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopspartners/index.php Wed Jun 8 13:35:07 2005 @@ -1,5 +1,5 @@ assign("partner_join" ,""._MD_JOIN.""); + $xoopsTpl->assign("partner_join" ,""._MD_JOIN.""); } $query = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("partners")." WHERE status=1"); list($numrows) = $xoopsDB->fetchrow($query); if( $xoopsModuleConfig['modlimit'] != 0 ) { - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); }else{ - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); } foreach ( $partners as $part_obj ) { - $array_partners[] = array( - "id" => $part_obj->getVar("id"), - "hits" => $part_obj->getVar("hits"), - "url" => $part_obj->getVar("url"), - "image" => $part_obj->getVar("image"), - "title" => $part_obj->getVar("title"), - "description" => $part_obj->getVar("description") - ); + $array_partners[] = array( + "id" => $part_obj->getVar("id"), + "hits" => $part_obj->getVar("hits"), + "url" => $part_obj->getVar("url"), + "image" => $part_obj->getVar("image"), + "title" => $part_obj->getVar("title"), + "description" => $part_obj->getVar("description") + ); } $partner_count = count($array_partners); for ( $i = 0; $i < $partner_count; $i++ ) { - $ImagePartner = ""; - if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { - $ImagePartner .= "".$array_partners[$i]["url"].""; - } - if ( $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= "
    "; - } - if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= $array_partners[$i]["title"]; - } - $ImagePartner .= "
    "; - $partner[$i]['id'] = $array_partners[$i]['id']; - $partner[$i]['hits'] = $array_partners[$i]['hits']; - $partner[$i]['url'] = $array_partners[$i]['url']; - $partner[$i]['image'] = $ImagePartner; - $partner[$i]['title'] = $array_partners[$i]['title']; - $partner[$i]['description'] = $array_partners[$i]['description']; - if ($xoopsUserIsAdmin) { - $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; - } - $xoopsTpl->append("partners", $partner[$i]); + $ImagePartner = ""; + if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { + $ImagePartner .= "".$array_partners[$i]["url"].""; + } + if ( $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= "
    "; + } + if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= $array_partners[$i]["title"]; + } + $ImagePartner .= "
    "; + $partner[$i]['id'] = $array_partners[$i]['id']; + $partner[$i]['hits'] = $array_partners[$i]['hits']; + $partner[$i]['url'] = $array_partners[$i]['url']; + $partner[$i]['image'] = $ImagePartner; + $partner[$i]['title'] = $array_partners[$i]['title']; + $partner[$i]['description'] = $array_partners[$i]['description']; + if ($xoopsUserIsAdmin) { + $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; + } + $xoopsTpl->append("partners", $partner[$i]); } if ( $xoopsModuleConfig['modlimit'] != 0 ) { - $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); - $pagenav = $nav->renderImageNav(); + $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); + $pagenav = $nav->renderImageNav(); } $xoopsTpl->assign(array( - "lang_partner" => _MD_PARTNER, - "lang_desc" => _MD_DESCRIPTION, - "lang_hits" => _MD_HITS, - "lang_no_partners" => _MD_NOPART, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'], - "pagenav" => $pagenav - )); + "lang_partner" => _MD_PARTNER, + "lang_desc" => _MD_DESCRIPTION, + "lang_hits" => _MD_HITS, + "lang_no_partners" => _MD_NOPART, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']), + "pagenav" => $pagenav + )); include_once XOOPS_ROOT_PATH.'/footer.php'; ?> \ No newline at end of file Index: xoops2jp/html/modules/xoopspartners/join.php diff -u xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1 xoops2jp/html/modules/xoopspartners/join.php:1.2.6.2 --- xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1 Thu Apr 21 19:06:35 2005 +++ xoops2jp/html/modules/xoopspartners/join.php Wed Jun 8 13:35:07 2005 @@ -1,5 +1,5 @@ $content, "lang_main_partner" => _MD_PARTNERS, "lang_join" => _MD_JOIN, - "sitename" => $xoopsConfig['sitename'] + "sitename" => htmlspecialchars($xoopsConfig['sitename']) )); } } else { // else -- if ( $xoopsUser ) From onokazu ¡÷ users.sourceforge.jp Wed Jun 8 13:36:25 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 8 Jun 2005 13:36:25 +0900 Subject: [xoops-cvslog 92] CVS update: xoops2jp/html/modules/mydownloads Message-ID: <20050608043625.668982AC054@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/ratefile.php diff -u xoops2jp/html/modules/mydownloads/ratefile.php:1.2 xoops2jp/html/modules/mydownloads/ratefile.php:1.2.6.1 --- xoops2jp/html/modules/mydownloads/ratefile.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/ratefile.php Wed Jun 8 13:36:25 2005 @@ -1,5 +1,5 @@ getVar('uid'); - } - - //Make sure only 1 anonymous from an IP in a single day. - $anonwaitdays = 1; - $ip = getenv("REMOTE_ADDR"); - $lid = intval($HTTP_POST_VARS['lid']); - $cid = intval($HTTP_POST_VARS['cid']); - $rating = intval($HTTP_POST_VARS['rating']); - - // Check if Rating is Null - if ($rating=="--") { - redirect_header("ratefile.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); - exit(); - } - - // Check if Download POSTER is voting (UNLESS Anonymous users allowed to post) - if ($ratinguser != 0) { - $result=$xoopsDB->query("SELECT submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); - while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { - if ($ratinguserDB==$ratinguser) { - redirect_header("index.php",4,_MD_CANTVOTEOWN); - exit(); - } - } - - // Check if REG user is trying to vote twice. - $result=$xoopsDB->query("SELECT ratinguser FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid"); - while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { - if ($ratinguserDB==$ratinguser) { - redirect_header("index.php",4,_MD_VOTEONCE); - exit(); - } - } - - } else { - - // Check if ANONYMOUS user is trying to vote more than once per day. - $yesterday = (time()-(86400 * $anonwaitdays)); - $result=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); - list($anonvotecount) = $xoopsDB->fetchRow($result); - if ($anonvotecount >= 1) { - redirect_header("index.php",4,_MD_VOTEONCE); - exit(); - } - } - - //All is well. Add to Line Item Rate to DB. - $newid = $xoopsDB->genId($xoopsDB->prefix("mydownloads_votedata")."_ratingid_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mydownloads_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); - $xoopsDB->query($sql) or $eh("0013"); - - //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. - updaterating($lid); - $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKYOU,$xoopsConfig[sitename]); - redirect_header("index.php",4,$ratemessage); - exit(); + $eh = new ErrorHandler; //ErrorHandler object + if(empty($xoopsUser)){ + $ratinguser = 0; + }else{ + $ratinguser = $xoopsUser->getVar('uid'); + } + + //Make sure only 1 anonymous from an IP in a single day. + $anonwaitdays = 1; + $ip = getenv("REMOTE_ADDR"); + $lid = intval($HTTP_POST_VARS['lid']); + $cid = intval($HTTP_POST_VARS['cid']); + $rating = intval($HTTP_POST_VARS['rating']); + + // Check if Rating is Null + if ($rating=="--") { + redirect_header("ratefile.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); + exit(); + } + + // Check if Download POSTER is voting (UNLESS Anonymous users allowed to post) + if ($ratinguser != 0) { + $result=$xoopsDB->query("SELECT submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); + while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { + if ($ratinguserDB==$ratinguser) { + redirect_header("index.php",4,_MD_CANTVOTEOWN); + exit(); + } + } + + // Check if REG user is trying to vote twice. + $result=$xoopsDB->query("SELECT ratinguser FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid"); + while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { + if ($ratinguserDB==$ratinguser) { + redirect_header("index.php",4,_MD_VOTEONCE); + exit(); + } + } + + } else { + + // Check if ANONYMOUS user is trying to vote more than once per day. + $yesterday = (time()-(86400 * $anonwaitdays)); + $result=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); + list($anonvotecount) = $xoopsDB->fetchRow($result); + if ($anonvotecount >= 1) { + redirect_header("index.php",4,_MD_VOTEONCE); + exit(); + } + } + + //All is well. Add to Line Item Rate to DB. + $newid = $xoopsDB->genId($xoopsDB->prefix("mydownloads_votedata")."_ratingid_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mydownloads_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); + $xoopsDB->query($sql) or $eh("0013"); + + //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. + updaterating($lid); + $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKYOU, htmlspecialchars($xoopsConfig['sitename'])); + redirect_header("index.php",4,$ratemessage); + exit(); } else { - $xoopsOption['template_main'] = 'mydownloads_ratefile.html'; + $xoopsOption['template_main'] = 'mydownloads_ratefile.html'; include XOOPS_ROOT_PATH."/header.php"; $lid = intval($HTTP_GET_VARS['lid']); $result=$xoopsDB->query("SELECT title FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); From onokazu ¡÷ users.sourceforge.jp Thu Jun 9 12:20:47 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 9 Jun 2005 12:20:47 +0900 Subject: [xoops-cvslog 93] CVS update: xoops2jp/html/class Message-ID: <20050609032047.12A8D2AC024@users.sourceforge.jp> Index: xoops2jp/html/class/module.textsanitizer.php diff -u xoops2jp/html/class/module.textsanitizer.php:1.2.6.2 xoops2jp/html/class/module.textsanitizer.php:1.2.6.3 --- xoops2jp/html/class/module.textsanitizer.php:1.2.6.2 Mon Jun 6 14:59:39 2005 +++ xoops2jp/html/class/module.textsanitizer.php Thu Jun 9 12:20:46 2005 @@ -1,5 +1,5 @@
    '.wordwrap(MyTextSanitizer::htmlSpecialChars('\\1'), 100).'
    '"; // RMV: added new markup for intrasite url (allows easier site moves) // TODO: automatically convert other URLs to this format if XOOPS_URL matches?? $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU"; @@ -401,11 +399,11 @@ $patterns = "/\[code](.*)\[\/code\]/esU"; if ($image != 0) { // image allowed - $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1').'
    '"; + $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1').'
    '"; //$text =& $this->xoopsCodeDecode($text); } else { // image not allowed - $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1', 0).'
    '"; + $replacements = "'
    '.MyTextSanitizer::codeSanitizer('$1', 0).'
    '"; //$text =& $this->xoopsCodeDecode($text, 0); } $text = preg_replace($patterns, $replacements, $text); From onokazu ¡÷ users.sourceforge.jp Fri Jun 10 00:15:03 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Fri, 10 Jun 2005 00:15:03 +0900 Subject: [xoops-cvslog 94] CVS update: xoops2jp/html/include Message-ID: <20050609151505.980482AC010@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.4.6.4 xoops2jp/html/include/version.php:1.4.6.5 --- xoops2jp/html/include/version.php:1.4.6.4 Wed Jun 1 23:01:43 2005 +++ xoops2jp/html/include/version.php Fri Jun 10 00:15:02 2005 @@ -1,4 +1,4 @@ \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Fri Jun 10 00:55:56 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Fri, 10 Jun 2005 00:55:56 +0900 Subject: [xoops-cvslog 95] CVS update: xoops2jp/docs Message-ID: <20050609155556.E05882AC010@users.sourceforge.jp> Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.2.6.6 xoops2jp/docs/CHANGES.txt:1.2.6.7 --- xoops2jp/docs/CHANGES.txt:1.2.6.6 Wed Jun 1 23:18:47 2005 +++ xoops2jp/docs/CHANGES.txt Fri Jun 10 00:55:56 2005 @@ -1,6 +1,16 @@ XOOPS v2 Changelog ============================ +2005/ 6/10: Version 2.0.10 JP +=============================== +- Added fix for better module version number handling +- Fixed possible fatal error when using the template manager +- Fixed more invalid usages of HTML +- Fixed bug not being able to change password in user admin area +- Changed <{$xoops_moduledir}> to <{$xoops_dirname}> for xoops.org 2.0.10 compatibility +- Fixed <{$show_lblock}> not being assigned when no left blocks + + 2005/ 6/2: Version 2.0.10 JP RC2 =============================== - Fixed Invalid usages of HTML From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:37 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:37 +0900 Subject: [xoops-cvslog 96] CVS update: xoops2jp/extras Message-ID: <20050611023237.6B0F42AC02A@users.sourceforge.jp> Index: xoops2jp/extras/login.php diff -u xoops2jp/extras/login.php:1.2 xoops2jp/extras/login.php:1.3 --- xoops2jp/extras/login.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/extras/login.php Sat Jun 11 11:32:37 2005 @@ -6,7 +6,7 @@ include $path.'/mainfile.php'; if (!defined('XOOPS_ROOT_PATH')) { - exit(); + exit(); } include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php'; $op = (isset($_POST['op']) && $_POST['op'] == 'dologin') ? 'dologin' : 'login'; @@ -22,15 +22,15 @@ - '.$xoopsConfig['sitename'].' + '.htmlspecialchars($xoopsConfig['sitename']).' '; $style = getcss($xoopsConfig['theme_set']); if ($style == '') { - $style = xoops_getcss($xoopsConfig['theme_set']); + $style = xoops_getcss($xoopsConfig['theme_set']); } if ($style != '') { - echo ''; + echo ''; } echo ' @@ -40,44 +40,44 @@ if ($op == 'dologin') { $member_handler =& xoops_gethandler('member'); $myts =& MyTextsanitizer::getInstance(); - $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password))); + $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password))); if (is_object($user)) { - if (0 == $user->getVar('level')) { - redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM); - exit(); - } - if ($xoopsConfig['closesite'] == 1) { - $allowed = false; - foreach ($user->getGroups() as $group) { - if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) { - $allowed = true; - break; - } - } - if (!$allowed) { - redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM); - exit(); - } - } - $user->setVar('last_login', time()); - if (!$member_handler->insertUser($user)) { - } - $_SESSION = array(); - $_SESSION['xoopsUserId'] = $user->getVar('uid'); - $_SESSION['xoopsUserGroups'] = $user->getGroups(); - if (!empty($xoopsConfig['use_ssl'])) { - xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL.'/misc.php?action=showpopups&type=ssllogin', _US_PRESSLOGIN, _LOGIN); - } else { - echo sprintf(_US_LOGGINGU, $user->getVar('uname')); - echo '
    '; - } + if (0 == $user->getVar('level')) { + redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM); + exit(); + } + if ($xoopsConfig['closesite'] == 1) { + $allowed = false; + foreach ($user->getGroups() as $group) { + if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) { + $allowed = true; + break; + } + } + if (!$allowed) { + redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM); + exit(); + } + } + $user->setVar('last_login', time()); + if (!$member_handler->insertUser($user)) { + } + $_SESSION = array(); + $_SESSION['xoopsUserId'] = $user->getVar('uid'); + $_SESSION['xoopsUserGroups'] = $user->getGroups(); + if (!empty($xoopsConfig['use_ssl'])) { + xoops_confirm(array($xoopsConfig['sslpost_name'] => session_id()), XOOPS_URL.'/misc.php?action=showpopups&type=ssllogin', _US_PRESSLOGIN, _LOGIN); + } else { + echo sprintf(_US_LOGGINGU, $user->getVar('uname')); + echo '
    '; + } } else { xoops_error(_US_INCORRECTLOGIN.'
    '._BACK.''); } } if ($op == 'login') { - echo ' + echo '
    @@ -96,7 +96,7 @@
    - '; + '; } echo ' From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:37 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:37 +0900 Subject: [xoops-cvslog 97] CVS update: xoops2jp/extras/theme_x2t/doc Message-ID: <20050611023237.B4BCC2AC02B@users.sourceforge.jp> Index: xoops2jp/extras/theme_x2t/doc/readme.htm diff -u xoops2jp/extras/theme_x2t/doc/readme.htm:1.1 xoops2jp/extras/theme_x2t/doc/readme.htm:1.2 --- xoops2jp/extras/theme_x2t/doc/readme.htm:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/extras/theme_x2t/doc/readme.htm Sat Jun 11 11:32:37 2005 @@ -1,222 +1,222 @@ - - -Info - - - - -
    - - - - - - - - - -
    - -
    - - - - - - - - -
    - -
    -

    XooPS
    - eXtended object
    - oriented
    - Portal System

    -

    ...que m? queres...

    -
    - - - - - - - - - - - - - - - - - - -
    -
    X2 Theme for XooPS 2.0.x / Tema X2 para XooPS 2.0.x
    -
    - | Creators / Creadores : w4z004 - Unfor
    - - | E-mail / E-mail : w4z004 ¡÷ hotmail.com
    - - | This is a original work bassed in the ideas of w4z004
    - | and the excelent and professional work of Unfor
    - - | Date / Fecha : Feb. 2003
    - - | Thanks to / Gracias a : Chapi for the graphic work colaboration
    - |                                       Aitor for the enhancements into the theme
    - |                                       ralf57 for the hidde/unhidde idea
    - |
    - - | INSTALL: upload the x2t.tar.gz file with the theme manager
    - |
    - - | NEWS TWO COLUMNS: later of installed the theme with the theme manager into
    - | the news need upload or copy and paste the files news_index.html and
    - | news_item.html that are into the EXTRAS dir to the respective places and obtain
    - | a news with 2 columns.
    - |
    - - | LAYOUT: into the EXTRAS dir too have a theme.html file that if you replace into
    - | the theme skin with copy and paste obtain that the center-center blocks
    - | appear in the top (now are changed to the bottom).
    - |
    - - | CHANGELOG:
    - | 27/02 - Removed the login in the headerbar.
    - |               Fixed the userinfo template
    - |
    - | 01/03 - Removed the skin changed to the new structure.
    - |
    - | 30/03 - Finished the notification templates, XHTML cleanup,
    - |               and added scrolling to the top posters and new users blocks.
    - |
    - | 20/09 - Upgraded to xoops 2.0.4.
    - |
    - | 05/07/04 - Upgraded to xoops 2.0.6.
    - |                  - Created the SmartFAQ module templates.
    - |                  - Enhanced the CSS.
    - |                  - Added the hidde/display effect for the notification system.
    - |                  - Modified the main menu / user menu, and added graphics to this.
    - |
    - | 05/08/04 - Created the Liase module templates.
    - |                  - Created the RSSfit module templates.
    - |
    - | 05/16/04 - Fixed the styleNN.css (thnx chapi).
    - |                  - Cleaned to be 100% html transitional 1.0.
    - - - |
    -
     
    | - Dedicated to all Xoops users.
    - | Dedicado a todos los usuarios de Xoops.
    | - ENGLISH SUPPORT :
    - |> http://www.xoops.org -
    | - SOPORTE EN CASTELLANO :
    - |> http://www.esxoops.com
    -
    - - + + +Info + + + + +
    + + + + + + + + + +
    + +
    + + + + + + + + +
    + +
    +

    XooPS
    + eXtended object
    + oriented
    + Portal System

    +

    ...que m? queres...

    +
    + + + + + + + + + + + + + + + + + + +
    +
    X2 Theme for XooPS 2.0.x / Tema X2 para XooPS 2.0.x
    +
    + | Creators / Creadores : w4z004 - Unfor
    + + | E-mail / E-mail : w4z004 ¡÷ hotmail.com
    + + | This is a original work bassed in the ideas of w4z004
    + | and the excelent and professional work of Unfor
    + + | Date / Fecha : Feb. 2003
    + + | Thanks to / Gracias a : Chapi for the graphic work colaboration
    + |                                       Aitor for the enhancements into the theme
    + |                                       ralf57 for the hidde/unhidde idea
    + |
    + + | INSTALL: upload the x2t.tar.gz file with the theme manager
    + |
    + + | NEWS TWO COLUMNS: later of installed the theme with the theme manager into
    + | the news need upload or copy and paste the files news_index.html and
    + | news_item.html that are into the EXTRAS dir to the respective places and obtain
    + | a news with 2 columns.
    + |
    + + | LAYOUT: into the EXTRAS dir too have a theme.html file that if you replace into
    + | the theme skin with copy and paste obtain that the center-center blocks
    + | appear in the top (now are changed to the bottom).
    + |
    + + | CHANGELOG:
    + | 27/02 - Removed the login in the headerbar.
    + |               Fixed the userinfo template
    + |
    + | 01/03 - Removed the skin changed to the new structure.
    + |
    + | 30/03 - Finished the notification templates, XHTML cleanup,
    + |               and added scrolling to the top posters and new users blocks.
    + |
    + | 20/09 - Upgraded to xoops 2.0.4.
    + |
    + | 05/07/04 - Upgraded to xoops 2.0.6.
    + |                  - Created the SmartFAQ module templates.
    + |                  - Enhanced the CSS.
    + |                  - Added the hidde/display effect for the notification system.
    + |                  - Modified the main menu / user menu, and added graphics to this.
    + |
    + | 05/08/04 - Created the Liase module templates.
    + |                  - Created the RSSfit module templates.
    + |
    + | 05/16/04 - Fixed the styleNN.css (thnx chapi).
    + |                  - Cleaned to be 100% html transitional 1.0.
    + + + |
    +
     
    | + Dedicated to all Xoops users.
    + | Dedicado a todos los usuarios de Xoops.
    | + ENGLISH SUPPORT :
    + |> http://www.xoops.org +
    | + SOPORTE EN CASTELLANO :
    + |> http://www.esxoops.com
    +
    + + Index: xoops2jp/extras/theme_x2t/doc/readme.txt diff -u xoops2jp/extras/theme_x2t/doc/readme.txt:1.1 xoops2jp/extras/theme_x2t/doc/readme.txt:1.2 --- xoops2jp/extras/theme_x2t/doc/readme.txt:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/extras/theme_x2t/doc/readme.txt Sat Jun 11 11:32:37 2005 @@ -1,57 +1,57 @@ -X2 Theme for XooPS 2.0.x / Tema X2 para XooPS 2.0.x - -| Creators / Creadores : Unfor-w4z004 - -| E-mail / E-mail : w4z004 ¡÷ hotmail.com - -| This is a original work bassed in the ideas of w4z004 -| and the excelent and professional work of Unfor - -| Date / Fecha : Feb. 2003 - -| Thanks to / Gracias a : Chapi for the graphic work colaboration -| Aitor for the enhancements into the theme -| ralf57 for the hidde/unhidde idea - -| INSTALL: upload the x2t.tar.gz file with the theme manager - -| NEWS TWO COLUMNS: later of installed the theme with the theme manager into -| the news need upload or copy and paste the files news_index.html and -| news_item.html that are into the EXTRAS dir to the respective places and obtain -| a news with 2 columns. - -| LAYOUT: into the EXTRAS dir too have a theme.html file that if you replace into -| the theme skin with copy and paste obtain that the center-center blocks -| appear in the top (now are changed to the bottom). - -| CHANGELOG: -| 27/02 - Removed the login in the headerbar. -| Fixed the userinfo template - -| 01/03 - Removed the skin changed to the new structure - -| 30/03 - Finished the notification templates, XHTML cleanup, -| and added scrolling to the top posters and new users blocks. - -| 20/09 - Upgraded to xoops 2.0.4. - -| 05/07/04 - Upgraded to xoops 2.0.6. -| - Created the SmartFAQ module templates. -| - Enhanced the CSS. -| - Added the hidde/display effect for the notification system. -| - Modified the main menu / user menu, and added graphics to this. - -| 05/08/04 - Created the Liase module templates. -| - Created the RSSfit module templates. - -| 05/16/04 - Fixed the styleNN.css (thnx chapi). -| - Cleaned to be 100% html transitional 1.0. - -| Dedicated to all Xoops users. -| Dedicado a todos los usuarios de Xoops. - -| ENGLISH SUPPORT : -|> http://www.xoops.org - -| SOPORTE EN CASTELLANO : -|> http://www.esxoops.com +X2 Theme for XooPS 2.0.x / Tema X2 para XooPS 2.0.x + +| Creators / Creadores : Unfor-w4z004 + +| E-mail / E-mail : w4z004 ¡÷ hotmail.com + +| This is a original work bassed in the ideas of w4z004 +| and the excelent and professional work of Unfor + +| Date / Fecha : Feb. 2003 + +| Thanks to / Gracias a : Chapi for the graphic work colaboration +| Aitor for the enhancements into the theme +| ralf57 for the hidde/unhidde idea + +| INSTALL: upload the x2t.tar.gz file with the theme manager + +| NEWS TWO COLUMNS: later of installed the theme with the theme manager into +| the news need upload or copy and paste the files news_index.html and +| news_item.html that are into the EXTRAS dir to the respective places and obtain +| a news with 2 columns. + +| LAYOUT: into the EXTRAS dir too have a theme.html file that if you replace into +| the theme skin with copy and paste obtain that the center-center blocks +| appear in the top (now are changed to the bottom). + +| CHANGELOG: +| 27/02 - Removed the login in the headerbar. +| Fixed the userinfo template + +| 01/03 - Removed the skin changed to the new structure + +| 30/03 - Finished the notification templates, XHTML cleanup, +| and added scrolling to the top posters and new users blocks. + +| 20/09 - Upgraded to xoops 2.0.4. + +| 05/07/04 - Upgraded to xoops 2.0.6. +| - Created the SmartFAQ module templates. +| - Enhanced the CSS. +| - Added the hidde/display effect for the notification system. +| - Modified the main menu / user menu, and added graphics to this. + +| 05/08/04 - Created the Liase module templates. +| - Created the RSSfit module templates. + +| 05/16/04 - Fixed the styleNN.css (thnx chapi). +| - Cleaned to be 100% html transitional 1.0. + +| Dedicated to all Xoops users. +| Dedicado a todos los usuarios de Xoops. + +| ENGLISH SUPPORT : +|> http://www.xoops.org + +| SOPORTE EN CASTELLANO : +|> http://www.esxoops.com From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:38 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:38 +0900 Subject: [xoops-cvslog 98] CVS update: xoops2jp/extras/theme_x2t/extras Message-ID: <20050611023238.0B4BB2AC02A@users.sourceforge.jp> Index: xoops2jp/extras/theme_x2t/extras/news_index.html diff -u xoops2jp/extras/theme_x2t/extras/news_index.html:1.1 xoops2jp/extras/theme_x2t/extras/news_index.html:1.2 --- xoops2jp/extras/theme_x2t/extras/news_index.html:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/extras/theme_x2t/extras/news_index.html Sat Jun 11 11:32:37 2005 @@ -1,50 +1,50 @@ -<{if $displaynav == true}> -
    -
    - <{$topic_select}>
    -
    -
    -<{/if}> - - -<{section name=i loop=$stories}> -<{php}> -global $totalarticulos; -global $impar; -$totalarticulos = $totalarticulos +1; -<{/php}> -<{/section}> - -<{php}> -if (($totalarticulos % 2)==1){ - $impar=true; - echo '
    '; -}else{ - echo '
    '; -} -<{/php}> -
    <{$pagenav}>
    -
    - -<{section name=i loop=$stories}> - <{include file="db:news_item.html" story=$stories[i]}> -<{php}> -global $contador; -$contador = $contador +1; -if ($contador && $impar && (!$arrancado)){ - $arrancado = true; - $contador = 0; - echo "
    "; -}else{ - if (($contador % 2)==1){ - echo ""; - }else{ - echo "
    "; - } -} -<{/php}> -<{/section}> -
    - -
    <{$pagenav}>
    +<{if $displaynav == true}> +
    +
    + <{$topic_select}>
    +
    +
    +<{/if}> + + +<{section name=i loop=$stories}> +<{php}> +global $totalarticulos; +global $impar; +$totalarticulos = $totalarticulos +1; +<{/php}> +<{/section}> + +<{php}> +if (($totalarticulos % 2)==1){ + $impar=true; + echo ' - + @@ -26,7 +26,7 @@
    '; +}else{ + echo '
    '; +} +<{/php}> +
    <{$pagenav}>
    +
    + +<{section name=i loop=$stories}> + <{include file="db:news_item.html" story=$stories[i]}> +<{php}> +global $contador; +$contador = $contador +1; +if ($contador && $impar && (!$arrancado)){ + $arrancado = true; + $contador = 0; + echo "
    "; +}else{ + if (($contador % 2)==1){ + echo ""; + }else{ + echo "
    "; + } +} +<{/php}> +<{/section}> +
    + +
    <{$pagenav}>

    \ No newline at end of file Index: xoops2jp/extras/theme_x2t/extras/news_item.html diff -u xoops2jp/extras/theme_x2t/extras/news_item.html:1.1 xoops2jp/extras/theme_x2t/extras/news_item.html:1.2 --- xoops2jp/extras/theme_x2t/extras/news_item.html:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/extras/theme_x2t/extras/news_item.html Sat Jun 11 11:32:37 2005 @@ -1,44 +1,44 @@ - - - - - - - - - <{if $story.align == "left" }> - - - <{else}> - - - <{/if}> - - - - -
    <{$story.title}>
    <{$lang_postedby}> <{$story.poster}> <{$lang_on}> <{$story.posttime}> (<{$story.hits}> <{$lang_reads}>)
    - - - - -
    - <{$story.imglink}>
    - <{$lang_printerpage}> - <{$lang_sendstory}> -
    -
    - <{$story.text}> - - <{$story.text}> - - - - -
    - <{$lang_printerpage}> - <{$lang_sendstory}> -
    - -
    <{$story.adminlink}> <{$story.morelink}>
    + + + + + + + + + <{if $story.align == "left" }> + + + <{else}> + + + <{/if}> + + + + +
    <{$story.title}>
    <{$lang_postedby}> <{$story.poster}> <{$lang_on}> <{$story.posttime}> (<{$story.hits}> <{$lang_reads}>)
    + + + + +
    + <{$story.imglink}>
    + <{$lang_printerpage}> + <{$lang_sendstory}> +
    +
    + <{$story.text}> + + <{$story.text}> + + + + +
    + <{$lang_printerpage}> + <{$lang_sendstory}> +
    + +
    <{$story.adminlink}> <{$story.morelink}>

    \ No newline at end of file Index: xoops2jp/extras/theme_x2t/extras/theme.html diff -u xoops2jp/extras/theme_x2t/extras/theme.html:1.1 xoops2jp/extras/theme_x2t/extras/theme.html:1.2 --- xoops2jp/extras/theme_x2t/extras/theme.html:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/extras/theme_x2t/extras/theme.html Sat Jun 11 11:32:37 2005 @@ -1,146 +1,146 @@ - - - - - - - - - - - - -<{$xoops_sitename}> - <{$xoops_pagetitle}> - - - - - - - - - - - - - -
    - -<{$xoops_banner}> -
    - - - - - - - - - -
      -
    - -
    - - - - - - - <{if $xoops_showrblock == 1}> - -<{else}> - -<{/if}> - - -
    - - <{foreach item=block from=$xoops_lblocks}> - <{include file="x2t/theme_blockleft.html"}> - <{/foreach}> - -
    - - - <{if $xoops_showcblock == 1}> -
    - - - - - - -
       
    - - - - - - - - -
    -
    - - <{foreach item=block from=$xoops_ccblocks}> - <{include file="x2t/theme_blockcenter_c.html"}> -
    - <{/foreach}> - -
    -
    -
    - - <{foreach item=block from=$xoops_clblocks}> - <{include file="x2t/theme_blockcenter_l.html"}> -
    - <{/foreach}> - -
    -
    -
    - - <{foreach item=block from=$xoops_crblocks}> - <{include file="x2t/theme_blockcenter_r.html"}> -
    - <{/foreach}> - -
    -
    - <{/if}> - - - -
    -
    <{$xoops_contents}>
    -
    - - <{foreach item=block from=$xoops_rblocks}> - <{include file="x2t/theme_blockright.html"}> - <{/foreach}> - -
    -
    - - - - - - -
     <{$footer}>
    -
    - + + + + + + + + + + + + +<{$xoops_sitename}> - <{$xoops_pagetitle}> + + + + + + + + + + + + + +
    + +<{$xoops_banner}> +
    + + + + + + + + + +
      +
    + +
    + + + + + + + <{if $xoops_showrblock == 1}> + +<{else}> + +<{/if}> + + +
    + + <{foreach item=block from=$xoops_lblocks}> + <{include file="x2t/theme_blockleft.html"}> + <{/foreach}> + +
    + + + <{if $xoops_showcblock == 1}> +
    + + + + + + +
       
    + + + + + + + + +
    +
    + + <{foreach item=block from=$xoops_ccblocks}> + <{include file="x2t/theme_blockcenter_c.html"}> +
    + <{/foreach}> + +
    +
    +
    + + <{foreach item=block from=$xoops_clblocks}> + <{include file="x2t/theme_blockcenter_l.html"}> +
    + <{/foreach}> + +
    +
    +
    + + <{foreach item=block from=$xoops_crblocks}> + <{include file="x2t/theme_blockcenter_r.html"}> +
    + <{/foreach}> + +
    +
    + <{/if}> + + + +
    +
    <{$xoops_contents}>
    +
    + + <{foreach item=block from=$xoops_rblocks}> + <{include file="x2t/theme_blockright.html"}> + <{/foreach}> + +
    +
    + + + + + + +
     <{$footer}>
    +
    + \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:39 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:39 +0900 Subject: [xoops-cvslog 99] CVS update: xoops2jp/html/class/mail/phpmailer Message-ID: <20050611023239.4DC9C2AC022@users.sourceforge.jp> Index: xoops2jp/html/class/mail/phpmailer/class.smtp.php diff -u xoops2jp/html/class/mail/phpmailer/class.smtp.php:1.1 xoops2jp/html/class/mail/phpmailer/class.smtp.php:1.2 --- xoops2jp/html/class/mail/phpmailer/class.smtp.php:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/html/class/mail/phpmailer/class.smtp.php Sat Jun 11 11:32:39 2005 @@ -314,6 +314,14 @@ # smaller lines while(strlen($line) > $max_line_length) { $pos = strrpos(substr($line,0,$max_line_length)," "); + + // fix for infinite loop bug + // added by onokazu, 2005/5/31 + if (!$pos) { + $pos = $max_line_length - 1; + } + // end fix + $lines_out[] = substr($line,0,$pos); $line = substr($line,$pos + 1); # if we are processing headers we need to From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:39 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:39 +0900 Subject: [xoops-cvslog 100] CVS update: xoops2jp/html/class/xml/rpc Message-ID: <20050611023239.8FEC22AC02A@users.sourceforge.jp> Index: xoops2jp/html/class/xml/rpc/xmlrpcapi.php diff -u xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.2 xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.3 --- xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/xml/rpc/xmlrpcapi.php Sat Jun 11 11:32:39 2005 @@ -1,5 +1,5 @@ module =& $module; } - function _setUser(&$user, $isadmin = false) + function _setUser(&$user, $isadmin = false) { if (is_object($user)) { $this->user =& $user; @@ -72,13 +72,13 @@ if (isset($this->user)) { return true; } - $member_handler =& xoops_gethandler('member'); + $member_handler =& xoops_gethandler('member'); $this->user =& $member_handler->loginUser($username, $password); if (!is_object($this->user)) { unset($this->user); return false; } - $moduleperm_handler =& xoops_gethandler('groupperm'); + $moduleperm_handler =& xoops_gethandler('groupperm'); if (!$moduleperm_handler->checkRight('module_read', $this->module->getVar('mid'), $this->user->getGroups())) { unset($this->user); return false; @@ -153,10 +153,10 @@ } // kind of dirty method to load XOOPS API and create a new object thereof - // returns itself if the calling object is XOOPS API + // returns itself if the calling object is XOOPS API function &_getXoopsApi(&$params) { - if (!(strtolower(get_class($this)) != 'xoopsapi')) { + if (strtolower(get_class($this)) != 'xoopsapi') { require_once(XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php'); return new XoopsApi($params, $this->response, $this->module); } else { From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:39 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:39 +0900 Subject: [xoops-cvslog 101] CVS update: xoops2jp/html/class/xml Message-ID: <20050611023239.CF79A2AC02B@users.sourceforge.jp> Index: xoops2jp/html/class/xml/saxparser.php diff -u xoops2jp/html/class/xml/saxparser.php:1.2 xoops2jp/html/class/xml/saxparser.php:1.3 --- xoops2jp/html/class/xml/saxparser.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/xml/saxparser.php Sat Jun 11 11:32:39 2005 @@ -1,5 +1,5 @@ xml/SaxParser.class

    @@ -160,8 +160,11 @@ { xml_parser_free($this->parser); - unset($this); - $this = null; + if (!method_exists($this, '__destruct')) { + unset($this); + } else { + $this->__destruct(); + } } /**************************************************************************** @@ -220,8 +223,8 @@ if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) { $this->tagHandlers[$tagName]->handleBeginElement($this, $attributesArray); } else { - $this->handleBeginElementDefault($parser, $tagName, $attributesArray); - } + $this->handleBeginElementDefault($parser, $tagName, $attributesArray); + } } /**************************************************************************** @@ -238,8 +241,8 @@ if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) { $this->tagHandlers[$tagName]->handleEndElement($this); } else { - $this->handleEndElementDefault($parser, $tagName); - } + $this->handleEndElementDefault($parser, $tagName); + } $this->level--; } @@ -256,8 +259,8 @@ if (isset($tagHandler) && is_subclass_of($tagHandler, 'xmltaghandler')) { $tagHandler->handleCharacterData($this, $data); } else { - $this->handleCharacterDataDefault($parser, $data); - } + $this->handleCharacterDataDefault($parser, $data); + } } /**************************************************************************** @@ -266,9 +269,9 @@ ****************************************************************************/ function handleProcessingInstruction($parser, &$target, &$data) { - if($target == 'php') { - eval($data); - } +// if($target == 'php') { +// eval($data); +// } } /**************************************************************************** @@ -307,61 +310,61 @@ } - /** - * The default tag handler method for a tag with no handler - * - * @abstract - */ - function handleBeginElementDefault($parser, $tagName, $attributesArray) - { - } - - /** - * The default tag handler method for a tag with no handler - * - * @abstract - */ - function handleEndElementDefault($parser, $tagName) - { - } - - /** - * The default tag handler method for a tag with no handler - * - * @abstract - */ - function handleCharacterDataDefault($parser, $data) - { - } - - /** - * Sets error messages - * - * @param $error string an error message - */ + /** + * The default tag handler method for a tag with no handler + * + * @abstract + */ + function handleBeginElementDefault($parser, $tagName, $attributesArray) + { + } + + /** + * The default tag handler method for a tag with no handler + * + * @abstract + */ + function handleEndElementDefault($parser, $tagName) + { + } + + /** + * The default tag handler method for a tag with no handler + * + * @abstract + */ + function handleCharacterDataDefault($parser, $data) + { + } + + /** + * Sets error messages + * + * @param $error string an error message + */ function setErrors($error) { $this->errors[] = trim($error); } - /** - * Gets all the error messages - * - * @param $ashtml bool return as html? - * @return mixed - */ + /** + * Gets all the error messages + * + * @param $ashtml bool return as html? + * @return mixed + */ function &getErrors($ashtml = true) { if (!$ashtml) { return $this->errors; } else { - $ret = ''; - if (count($this->errors) > 0) { - foreach ($this->errors as $error) { - $ret .= $error.'
    '; - } - } - return $ret; + $ret = ''; + if (count($this->errors) > 0) { + foreach ($this->errors as $error) { + $ret .= $error.'
    '; + } + } + return $ret; } } } From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:41 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:41 +0900 Subject: [xoops-cvslog 102] CVS update: xoops2jp/html/install Message-ID: <20050611023241.258E32AC02A@users.sourceforge.jp> Index: xoops2jp/html/install/install_tpl.php diff -u xoops2jp/html/install/install_tpl.php:1.1 xoops2jp/html/install/install_tpl.php:1.2 --- xoops2jp/html/install/install_tpl.php:1.1 Thu Sep 9 14:15:04 2004 +++ xoops2jp/html/install/install_tpl.php Sat Jun 11 11:32:40 2005 @@ -17,7 +17,7 @@
     
    - @@ -76,9 +76,9 @@ function b_reload($option=''){ if(empty($option)) return ''; - if (!defined('_INSTALL_L200')) { - define('_INSTALL_L200', 'Reload'); - } + if (!defined('_INSTALL_L200')) { + define('_INSTALL_L200', 'Reload'); + } return " "; } Index: xoops2jp/html/install/makedata.php diff -u xoops2jp/html/install/makedata.php:1.2 xoops2jp/html/install/makedata.php:1.3 --- xoops2jp/html/install/makedata.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/makedata.php Sat Jun 11 11:32:40 2005 @@ -1,5 +1,5 @@ insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_USERS'].",1,1,'module_read')"); $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ANONYMOUS'].",1,1,'module_read')"); - $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')"); + $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",2,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",3,1,'system_admin')"); $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",4,1,'system_admin')"); @@ -82,9 +82,9 @@ // data for table 'banner' - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://www.xoops.org/', 1008813250)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://www.xoops.org/', 1008813250)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://jp.xoops.org/', 1008813250)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://jp.xoops.org/', 1008813250)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://jp.xoops.org/', 1008813250)"); // default theme @@ -104,7 +104,7 @@ include_once '../modules/system/xoops_version.php'; $time = time(); - // RMV-NOTIFY (updated for extra column in table) + // RMV-NOTIFY (updated for extra column in table) $dbm->insert("modules", " VALUES (1, '"._MI_SYSTEM_NAME."', 100, ".$time.", 0, 1, 'system', 0, 1, 0, 0, 0, 0)"); foreach ($modversion['templates'] as $tplfile) { @@ -145,7 +145,7 @@ $temp = md5($adminpass); $regdate = time(); //$dbadminname= addslashes($adminname); - // RMV-NOTIFY (updated for extra columns in user table) + // RMV-NOTIFY (updated for extra columns in user table) $dbm->insert('users', " VALUES (1,'','".addslashes($adminname)."','".addslashes($adminmail)."','".XOOPS_URL."/','blank.gif','".$regdate."','','','',1,'','','','','".$temp."',0,0,7,5,'default','0.0',".time().",'thread',0,1,0,'','','',0)"); @@ -200,7 +200,7 @@ $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '".addslashes(serialize(array('127.0.0.1')))."', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); $dbm->insert('config', " VALUES (38, 0, 3, 'meta_keywords', '_MD_AM_METAKEY', 'news, technology, headlines, xoops, xoop, nuke, myphpnuke, myphp-nuke, phpnuke, SE, geek, geeks, hacker, hackers, linux, software, download, downloads, free, community, mp3, forum, forums, bulletin, board, boards, bbs, php, survey, poll, polls, kernel, comment, comments, portal, odp, open, source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, weblog, guru, module, modules, theme, themes, cms, content management', '_MD_AM_METAKEYDSC', 'textarea', 'text', 0)"); - $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS 2.0 © 2001-2003 The XOOPS Project', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); + $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS 2.0 © 2001-2003 The XOOPS Project', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '".addslashes(serialize(array('fuck', 'shit')))."', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); @@ -220,23 +220,23 @@ $dbm->insert('config', " VALUES (56, 0, 2, 'allow_register', '_MD_AM_ALLOWREG', 1, '_MD_AM_ALLOWREGDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (57, 0, 1, 'theme_fromfile', '_MD_AM_THEMEFILE', '0', '_MD_AM_THEMEFILEDSC', 'yesno', 'int', 13)"); $dbm->insert('config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '0', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)"); - $dbm->insert('config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '".addslashes(serialize(array('1')))."', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)"); - $dbm->insert('config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '"._INSTALL_L165."', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)"); - $dbm->insert('config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'xoops_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)"); - $dbm->insert('config', " VALUES (62, 0, 1, 'module_cache', '_MD_AM_MODCACHE', '', '_MD_AM_MODCACHEDSC', 'module_cache', 'array', 50)"); - $dbm->insert('config', " VALUES (63, 0, 1, 'template_set', '_MD_AM_DTPLSET', 'default', '_MD_AM_DTPLSETDSC', 'tplset', 'other', 14)"); - - $dbm->insert('config', " VALUES (64,0,6,'mailmethod','_MD_AM_MAILERMETHOD','mail','_MD_AM_MAILERMETHODDESC','select','text',4)"); - $dbm->insert('config', " VALUES (65,0,6,'smtphost','_MD_AM_SMTPHOST','a:1:{i:0;s:0:\"\";}', '_MD_AM_SMTPHOSTDESC','textarea','array',6)"); - $dbm->insert('config', " VALUES (66,0,6,'smtpuser','_MD_AM_SMTPUSER','','_MD_AM_SMTPUSERDESC','textbox','text',7)"); - $dbm->insert('config', " VALUES (67,0,6,'smtppass','_MD_AM_SMTPPASS','','_MD_AM_SMTPPASSDESC','password','text',8)"); - $dbm->insert('config', " VALUES (68,0,6,'sendmailpath','_MD_AM_SENDMAILPATH','/usr/sbin/sendmail','_MD_AM_SENDMAILPATHDESC','textbox','text',5)"); - $dbm->insert('config', " VALUES (69,0,6,'from','_MD_AM_MAILFROM','','_MD_AM_MAILFROMDESC','textbox','text', 1)"); - $dbm->insert('config', " VALUES (70,0,6,'fromname','_MD_AM_MAILFROMNAME','','_MD_AM_MAILFROMNAMEDESC','textbox','text',2)"); - $dbm->insert('config', " VALUES (71, 0, 1, 'sslloginlink', '_MD_AM_SSLLINK', 'https://', '_MD_AM_SSLLINKDSC', 'textbox', 'text', 33)"); - $dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '".serialize(array('default'))."', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)"); - // RMV-NOTIFY... Need to specify which user is sender of notification PM - $dbm->insert('config', " VALUES (73,0,6,'fromuid','_MD_AM_MAILFROMUID','1','_MD_AM_MAILFROMUIDDESC','user','int',3)"); + $dbm->insert('config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '".addslashes(serialize(array('1')))."', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)"); + $dbm->insert('config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '"._INSTALL_L165."', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)"); + $dbm->insert('config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'xoops_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)"); + $dbm->insert('config', " VALUES (62, 0, 1, 'module_cache', '_MD_AM_MODCACHE', '', '_MD_AM_MODCACHEDSC', 'module_cache', 'array', 50)"); + $dbm->insert('config', " VALUES (63, 0, 1, 'template_set', '_MD_AM_DTPLSET', 'default', '_MD_AM_DTPLSETDSC', 'tplset', 'other', 14)"); + + $dbm->insert('config', " VALUES (64,0,6,'mailmethod','_MD_AM_MAILERMETHOD','mail','_MD_AM_MAILERMETHODDESC','select','text',4)"); + $dbm->insert('config', " VALUES (65,0,6,'smtphost','_MD_AM_SMTPHOST','a:1:{i:0;s:0:\"\";}', '_MD_AM_SMTPHOSTDESC','textarea','array',6)"); + $dbm->insert('config', " VALUES (66,0,6,'smtpuser','_MD_AM_SMTPUSER','','_MD_AM_SMTPUSERDESC','textbox','text',7)"); + $dbm->insert('config', " VALUES (67,0,6,'smtppass','_MD_AM_SMTPPASS','','_MD_AM_SMTPPASSDESC','password','text',8)"); + $dbm->insert('config', " VALUES (68,0,6,'sendmailpath','_MD_AM_SENDMAILPATH','/usr/sbin/sendmail','_MD_AM_SENDMAILPATHDESC','textbox','text',5)"); + $dbm->insert('config', " VALUES (69,0,6,'from','_MD_AM_MAILFROM','','_MD_AM_MAILFROMDESC','textbox','text', 1)"); + $dbm->insert('config', " VALUES (70,0,6,'fromname','_MD_AM_MAILFROMNAME','','_MD_AM_MAILFROMNAMEDESC','textbox','text',2)"); + $dbm->insert('config', " VALUES (71, 0, 1, 'sslloginlink', '_MD_AM_SSLLINK', 'https://', '_MD_AM_SSLLINKDSC', 'textbox', 'text', 33)"); + $dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '".serialize(array('default'))."', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)"); + // RMV-NOTIFY... Need to specify which user is sender of notification PM + $dbm->insert('config', " VALUES (73,0,6,'fromuid','_MD_AM_MAILFROMUID','1','_MD_AM_MAILFROMUIDDESC','user','int',3)"); return $gruops; From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:41 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:41 +0900 Subject: [xoops-cvslog 103] CVS update: xoops2jp/html/language/japanese Message-ID: <20050611023241.CB8142AC02C@users.sourceforge.jp> Index: xoops2jp/html/language/japanese/notification.php diff -u xoops2jp/html/language/japanese/notification.php:1.2 xoops2jp/html/language/japanese/notification.php:1.3 --- xoops2jp/html/language/japanese/notification.php:1.2 Fri Mar 18 22:00:58 2005 +++ xoops2jp/html/language/japanese/notification.php Sat Jun 11 11:32:41 2005 @@ -1,5 +1,5 @@ From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:42 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:42 +0900 Subject: [xoops-cvslog 104] CVS update: xoops2jp/html/modules/contact Message-ID: <20050611023242.19C1E2AC02F@users.sourceforge.jp> Index: xoops2jp/html/modules/contact/index.php diff -u xoops2jp/html/modules/contact/index.php:1.2 xoops2jp/html/modules/contact/index.php:1.3 --- xoops2jp/html/modules/contact/index.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/contact/index.php Sat Jun 11 11:32:41 2005 @@ -1,5 +1,5 @@ getVar("uname", "E") : ""; - $email_v = !empty($xoopsUser) ? $xoopsUser->getVar("email", "E") : ""; - $url_v = !empty($xoopsUser) ? $xoopsUser->getVar("url", "E") : ""; - $icq_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_icq", "E") : ""; - $location_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_from", "E") : ""; - $comment_v = ""; - include "contactform.php"; - $contact_form->assign($xoopsTpl); - include XOOPS_ROOT_PATH."/footer.php"; + $xoopsOption['template_main'] = 'contact_contactusform.html'; + include XOOPS_ROOT_PATH."/header.php"; + include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; + $company_v = ""; + $name_v = !empty($xoopsUser) ? $xoopsUser->getVar("uname", "E") : ""; + $email_v = !empty($xoopsUser) ? $xoopsUser->getVar("email", "E") : ""; + $url_v = !empty($xoopsUser) ? $xoopsUser->getVar("url", "E") : ""; + $icq_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_icq", "E") : ""; + $location_v = !empty($xoopsUser) ? $xoopsUser->getVar("user_from", "E") : ""; + $comment_v = ""; + include "contactform.php"; + $contact_form->assign($xoopsTpl); + include XOOPS_ROOT_PATH."/footer.php"; } else { - extract($HTTP_POST_VARS); - $myts =& MyTextSanitizer::getInstance(); - $usersEmail = $myts->stripSlashesGPC($usersEmail); - $usersCompanyName = $myts->stripSlashesGPC($usersCompanyName); - $usersCompanyLocation = $myts->stripSlashesGPC($usersCompanyLocation); - $usersComments = $myts->stripSlashesGPC($usersComments); - $usersName = $myts->stripSlashesGPC($usersName); + $myts =& MyTextSanitizer::getInstance(); + $usersEmail = $myts->stripSlashesGPC($_POST['usersEmail']); + $usersCompanyName = $myts->stripSlashesGPC($_POST['usersCompanyName']); + $usersCompanyLocation = $myts->stripSlashesGPC($_POST['usersCompanyLocation']); + $usersComments = $myts->stripSlashesGPC($_POST['usersComments']); + $usersName = $myts->stripSlashesGPC($_POST['usersName']); - $adminMessage = sprintf(_CT_SUBMITTED,$usersName); - $adminMessage .= "\n"; - $adminMessage .= ""._CT_EMAIL." $usersEmail\n"; - if ( !empty($usersSite) ) { - $adminMessage .= ""._CT_URL." $usersSite\n"; - } - if ( !empty($usersICQ) ) { - $adminMessage .= ""._CT_ICQ." $usersICQ\n"; - } - if ( !empty($usersCompanyName) ) { - $adminMessage .= _CT_COMPANY. " $usersCompanyName\n"; - } - if ( !empty($usersCompanyLocation) ) { - $adminMessage .= _CT_LOCATION." $usersCompanyLocation\n"; - } - $adminMessage .= _CT_COMMENTS."\n"; - $adminMessage .= "\n$usersComments\n"; - $adminMessage .= "\n".$HTTP_SERVER_VARS['HTTP_USER_AGENT']."\n"; - $subject = $xoopsConfig['sitename']." - "._CT_CONTACTFORM; - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($xoopsConfig['adminmail']); - $xoopsMailer->setFromEmail($usersEmail); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject($subject); - $xoopsMailer->setBody($adminMessage); - $xoopsMailer->send(); - $messagesent = sprintf(_CT_MESSAGESENT,$xoopsConfig['sitename'])."
    "._CT_THANKYOU.""; + $adminMessage = sprintf(_CT_SUBMITTED,$usersName); + $adminMessage .= "\n"; + $adminMessage .= ""._CT_EMAIL." $usersEmail\n"; + if ( !empty($_POST['usersSite']) ) { + $adminMessage .= _CT_URL." ".$myts->stripSlashesGPC($_POST['usersSite'])."\n"; + } + if ( !empty($_POST['usersICQ']) ) { + $adminMessage .= _CT_ICQ." ".$myts->stripSlashesGPC($_POST['usersICQ'])."\n"; + } + if ( !empty($usersCompanyName) ) { + $adminMessage .= _CT_COMPANY. " $usersCompanyName\n"; + } + if ( !empty($usersCompanyLocation) ) { + $adminMessage .= _CT_LOCATION." $usersCompanyLocation\n"; + } + $adminMessage .= _CT_COMMENTS."\n"; + $adminMessage .= "\n$usersComments\n"; + $adminMessage .= "\n".$HTTP_SERVER_VARS['HTTP_USER_AGENT']."\n"; + $subject = $xoopsConfig['sitename']." - "._CT_CONTACTFORM; + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setToEmails($xoopsConfig['adminmail']); + $xoopsMailer->setFromEmail($usersEmail); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject($subject); + $xoopsMailer->setBody($adminMessage); + $xoopsMailer->send(); + $messagesent = sprintf(_CT_MESSAGESENT,$xoopsConfig['sitename'])."
    "._CT_THANKYOU.""; - // uncomment the following lines if you want to send confirmation mail to the user - /* - $conf_subject = _CT_THANKYOU; - $userMessage = sprintf(_CT_HELLO,$usersName); - $userMessage .= "\n\n"; - $userMessage .= sprintf(_CT_THANKYOUCOMMENTS,$xoopsConfig['sitename']); - $userMessage .= "\n"; - $userMessage .= sprintf(_CT_SENTTOWEBMASTER,$xoopsConfig['sitename']); - $userMessage .= "\n"; - $userMessage .= _CT_YOURMESSAGE."\n"; - $userMessage .= "\n$usersComments\n\n"; - $userMessage .= "--------------\n"; - $userMessage .= "".$xoopsConfig['sitename']." "._CT_WEBMASTER."\n"; - $userMessage .= "".$xoopsConfig['adminmail'].""; - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($usersEmail); - $xoopsMailer->setFromEmail($usersEmail); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject($conf_subject); - $xoopsMailer->setBody($userMessage); - $xoopsMailer->send(); - $messagesent .= sprintf(_CT_SENTASCONFIRM,$usersEmail); - */ + // uncomment the following lines if you want to send confirmation mail to the user + /* + $conf_subject = _CT_THANKYOU; + $userMessage = sprintf(_CT_HELLO,$usersName); + $userMessage .= "\n\n"; + $userMessage .= sprintf(_CT_THANKYOUCOMMENTS,$xoopsConfig['sitename']); + $userMessage .= "\n"; + $userMessage .= sprintf(_CT_SENTTOWEBMASTER,$xoopsConfig['sitename']); + $userMessage .= "\n"; + $userMessage .= _CT_YOURMESSAGE."\n"; + $userMessage .= "\n$usersComments\n\n"; + $userMessage .= "--------------\n"; + $userMessage .= "".$xoopsConfig['sitename']." "._CT_WEBMASTER."\n"; + $userMessage .= "".$xoopsConfig['adminmail'].""; + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setToEmails($usersEmail); + $xoopsMailer->setFromEmail($usersEmail); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject($conf_subject); + $xoopsMailer->setBody($userMessage); + $xoopsMailer->send(); + $messagesent .= sprintf(_CT_SENTASCONFIRM,$usersEmail); + */ - redirect_header(XOOPS_URL."/index.php",2,$messagesent); + redirect_header(XOOPS_URL."/index.php",2,$messagesent); } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:43 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:43 +0900 Subject: [xoops-cvslog 106] CVS update: xoops2jp/html/modules/mydownloads/templates Message-ID: <20050611023243.600322AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/templates/mydownloads_index.html diff -u xoops2jp/html/modules/mydownloads/templates/mydownloads_index.html:1.1 xoops2jp/html/modules/mydownloads/templates/mydownloads_index.html:1.2 --- xoops2jp/html/modules/mydownloads/templates/mydownloads_index.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mydownloads/templates/mydownloads_index.html Sat Jun 11 11:32:43 2005 @@ -6,7 +6,7 @@


    <{if count($categories) gt 0}> -
    +
      '.$title.''; echo '
    '.$content.'
    '; ?>
    @@ -29,7 +29,7 @@

    <{$lang_thereare}>
    -
    +
    <{/if}> Index: xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html diff -u xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html:1.1 xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html:1.2 --- xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html Sat Jun 11 11:32:43 2005 @@ -14,11 +14,11 @@ - + - + @@ -29,26 +29,26 @@ - + - + - + - + - +
    <{$lang_sitetitle}>
    <{$lang_siteurl}>
    <{$lang_category}>
    <{$lang_homepage}>
    <{$lang_version}>
    <{$lang_size}> <{$lang_bytes}> <{$lang_bytes}>
    <{$lang_platform}>
    <{$lang_description}>

     

     
    Index: xoops2jp/html/modules/mydownloads/templates/mydownloads_ratefile.html diff -u xoops2jp/html/modules/mydownloads/templates/mydownloads_ratefile.html:1.1 xoops2jp/html/modules/mydownloads/templates/mydownloads_ratefile.html:1.2 --- xoops2jp/html/modules/mydownloads/templates/mydownloads_ratefile.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mydownloads/templates/mydownloads_ratefile.html Sat Jun 11 11:32:43 2005 @@ -6,27 +6,27 @@


    -
    - +
    +
    -

    <{$file.title}>

      -
    • <{$lang_voteonce}> -
    • <{$lang_ratingscale}> -
    • <{$lang_beobjective}> -
    • <{$lang_donotvote}> +
    • <{$lang_voteonce}>
    • +
    • <{$lang_ratingscale}>
    • +
    • <{$lang_beobjective}>
    • +
    • <{$lang_donotvote}>
    - - + +   
    +
    Index: xoops2jp/html/modules/mydownloads/templates/mydownloads_submit.html diff -u xoops2jp/html/modules/mydownloads/templates/mydownloads_submit.html:1.1 xoops2jp/html/modules/mydownloads/templates/mydownloads_submit.html:1.2 --- xoops2jp/html/modules/mydownloads/templates/mydownloads_submit.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mydownloads/templates/mydownloads_submit.html Sat Jun 11 11:32:43 2005 @@ -18,51 +18,51 @@
    - - + - + - + - + Index: xoops2jp/html/modules/mydownloads/templates/mydownloads_viewcat.html diff -u xoops2jp/html/modules/mydownloads/templates/mydownloads_viewcat.html:1.1 xoops2jp/html/modules/mydownloads/templates/mydownloads_viewcat.html:1.2 --- xoops2jp/html/modules/mydownloads/templates/mydownloads_viewcat.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mydownloads/templates/mydownloads_viewcat.html Sat Jun 11 11:32:43 2005 @@ -5,7 +5,7 @@




    -
    +
    <{$lang_submitcath}> + <{$lang_submitcath}>
    <{$lang_sitetitle}><{$lang_sitetitle}>
    <{$lang_siteurl}><{$lang_siteurl}>
    <{$lang_category}><{$lang_category}> <{$category_selbox}>
    <{$lang_homepage}> - +
    <{$lang_version}> - +
    <{$lang_size}> - + <{$lang_bytes}>
    <{$lang_platform}> - +
    <{$lang_description}><{$lang_description}> <{$xoops_codes}><{$xoops_smilies}>
    Index: xoops2jp/html/modules/newbb/templates/newbb_searchresults.html diff -u xoops2jp/html/modules/newbb/templates/newbb_searchresults.html:1.1 xoops2jp/html/modules/newbb/templates/newbb_searchresults.html:1.2 --- xoops2jp/html/modules/newbb/templates/newbb_searchresults.html:1.1 Thu Sep 9 14:15:18 2004 +++ xoops2jp/html/modules/newbb/templates/newbb_searchresults.html Sat Jun 11 11:32:47 2005 @@ -15,7 +15,7 @@ - + <{section name=i loop=$results}> @@ -53,11 +53,14 @@ + + +
    @@ -19,7 +19,7 @@
    -
    + <{foreach item=subcat from=$subcategories}> <{if $subcat.count is div by 4}> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:43 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:43 +0900 Subject: [xoops-cvslog 107] CVS update: xoops2jp/html/modules/mydownloads Message-ID: <20050611023243.0AFA82AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/index.php diff -u xoops2jp/html/modules/mydownloads/index.php:1.2 xoops2jp/html/modules/mydownloads/index.php:1.3 --- xoops2jp/html/modules/mydownloads/index.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/index.php Sat Jun 11 11:32:42 2005 @@ -1,5 +1,5 @@ fetchArray($result)) { - $title = $myts->makeTboxData4Show($myrow['title']); - if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){ - $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']); - } else { - $imgurl = ''; - } - $totaldownload = getTotalItems($myrow['cid'], 1); - - // get child category objects - $arr=array(); - $arr=$mytree->getFirstChild($myrow['cid'], "title"); - $space = 0; - $chcount = 0; - $subcategories = ""; - foreach($arr as $ele){ - $chtitle=$myts->makeTboxData4Show($ele['title']); - if ($chcount>5){ - $subcategories .= "..."; - break; - } - if ($space>0) { - $subcategories .= ", "; - } - $subcategories .= "".$chtitle.""; - $space++; - $chcount++; - } - $xoopsTpl->append('categories', array('image' => $imgurl, 'id' => $myrow['cid'], 'title' => $myts->makeTboxData4Show($myrow['title']), 'subcategories' => $subcategories, 'totaldownloads' => $totaldownload, 'count' => $count)); - $count++; + $title = $myts->makeTboxData4Show($myrow['title']); + if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){ + $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']); + } else { + $imgurl = ''; + } + $totaldownload = getTotalItems($myrow['cid'], 1); + + // get child category objects + $arr=array(); + $arr=$mytree->getFirstChild($myrow['cid'], "title"); + $space = 0; + $chcount = 0; + $subcategories = ""; + foreach($arr as $ele){ + $chtitle=$myts->makeTboxData4Show($ele['title']); + if ($chcount>5){ + $subcategories .= "..."; + break; + } + if ($space>0) { + $subcategories .= ", "; + } + $subcategories .= "".$chtitle.""; + $space++; + $chcount++; + } + $xoopsTpl->append('categories', array('image' => $imgurl, 'id' => $myrow['cid'], 'title' => $myts->makeTboxData4Show($myrow['title']), 'subcategories' => $subcategories, 'totaldownloads' => $totaldownload, 'count' => $count)); + $count++; } list($numrows)=$xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status>0")); $xoopsTpl->assign('lang_thereare', sprintf(_MD_THEREARE,$numrows)); if ($xoopsModuleConfig['useshots'] == 1) { - $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); - $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); - $xoopsTpl->assign('show_screenshot', true); - $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); + $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); + $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); + $xoopsTpl->assign('show_screenshot', true); + $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) { - $isadmin = true; + $isadmin = true; } else { - $isadmin = false; + $isadmin = false; } $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); $xoopsTpl->assign('lang_lastupdate', _MD_LASTUPDATEC); @@ -101,32 +101,32 @@ $xoopsTpl->assign('lang_comments' , _COMMENTS); $result = $xoopsDB->query("SELECT d.lid, d.cid, d.title, d.url, d.homepage, d.version, d.size, d.platform, d.logourl, d.status, d.date, d.hits, d.rating, d.votes, d.comments, t.description FROM ".$xoopsDB->prefix("mydownloads_downloads")." d, ".$xoopsDB->prefix("mydownloads_text")." t WHERE d.status>0 AND d.lid=t.lid ORDER BY date DESC", $xoopsModuleConfig['newdownloads'], 0); while(list($lid, $cid, $dtitle, $url, $homepage, $version, $size, $platform, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description)=$xoopsDB->fetchRow($result)) { - $path = $mytree->getPathFromId($cid, "title"); - $path = substr($path, 1); - $path = str_replace("/"," ",$path); - $rating = number_format($rating, 2); - $dtitle = $myts->makeTboxData4Show($dtitle); - $url = $myts->makeTboxData4Show($url); - $homepage = $myts->makeTboxData4Show($homepage); - $version = $myts->makeTboxData4Show($version); - $size = PrettySize($myts->makeTboxData4Show($size)); - $platform = $myts->makeTboxData4Show($platform); - $logourl = $myts->makeTboxData4Show($logourl); - $datetime = formatTimestamp($time,"s"); - $description = $myts->makeTareaData4Show($description,0); //no html - $new = newdownloadgraphic($time, $status); - $pop = popgraphic($hits); - if ($isadmin) { - $adminlink = ''._MD_EDITTHISDL.''; - } else { - $adminlink = ''; - } - if ($votes == 1) { - $votestring = _MD_ONEVOTE; - } else { - $votestring = sprintf(_MD_NUMVOTES,$votes); - } - $xoopsTpl->append('file', array('id' => $lid,'cid'=>$cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); + $path = $mytree->getPathFromId($cid, "title"); + $path = substr($path, 1); + $path = str_replace("/"," ",$path); + $rating = number_format($rating, 2); + $dtitle = $myts->makeTboxData4Show($dtitle); + $url = $myts->makeTboxData4Show($url); + $homepage = $myts->makeTboxData4Show($homepage); + $version = $myts->makeTboxData4Show($version); + $size = PrettySize($myts->makeTboxData4Show($size)); + $platform = $myts->makeTboxData4Show($platform); + $logourl = $myts->makeTboxData4Show($logourl); + $datetime = formatTimestamp($time,"s"); + $description = $myts->makeTareaData4Show($description,0); //no html + $new = newdownloadgraphic($time, $status); + $pop = popgraphic($hits); + if ($isadmin) { + $adminlink = ''._MD_EDITTHISDL.''; + } else { + $adminlink = ''; + } + if ($votes == 1) { + $votestring = _MD_ONEVOTE; + } else { + $votestring = sprintf(_MD_NUMVOTES,$votes); + } + $xoopsTpl->append('file', array('id' => $lid,'cid'=>$cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); } include XOOPS_ROOT_PATH."/modules/mydownloads/footer.php"; Index: xoops2jp/html/modules/mydownloads/ratefile.php diff -u xoops2jp/html/modules/mydownloads/ratefile.php:1.2 xoops2jp/html/modules/mydownloads/ratefile.php:1.3 --- xoops2jp/html/modules/mydownloads/ratefile.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/ratefile.php Sat Jun 11 11:32:42 2005 @@ -1,5 +1,5 @@ getVar('uid'); - } - - //Make sure only 1 anonymous from an IP in a single day. - $anonwaitdays = 1; - $ip = getenv("REMOTE_ADDR"); - $lid = intval($HTTP_POST_VARS['lid']); - $cid = intval($HTTP_POST_VARS['cid']); - $rating = intval($HTTP_POST_VARS['rating']); - - // Check if Rating is Null - if ($rating=="--") { - redirect_header("ratefile.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); - exit(); - } - - // Check if Download POSTER is voting (UNLESS Anonymous users allowed to post) - if ($ratinguser != 0) { - $result=$xoopsDB->query("SELECT submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); - while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { - if ($ratinguserDB==$ratinguser) { - redirect_header("index.php",4,_MD_CANTVOTEOWN); - exit(); - } - } - - // Check if REG user is trying to vote twice. - $result=$xoopsDB->query("SELECT ratinguser FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid"); - while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { - if ($ratinguserDB==$ratinguser) { - redirect_header("index.php",4,_MD_VOTEONCE); - exit(); - } - } - - } else { - - // Check if ANONYMOUS user is trying to vote more than once per day. - $yesterday = (time()-(86400 * $anonwaitdays)); - $result=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); - list($anonvotecount) = $xoopsDB->fetchRow($result); - if ($anonvotecount >= 1) { - redirect_header("index.php",4,_MD_VOTEONCE); - exit(); - } - } - - //All is well. Add to Line Item Rate to DB. - $newid = $xoopsDB->genId($xoopsDB->prefix("mydownloads_votedata")."_ratingid_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mydownloads_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); - $xoopsDB->query($sql) or $eh("0013"); - - //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. - updaterating($lid); - $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKYOU,$xoopsConfig[sitename]); - redirect_header("index.php",4,$ratemessage); - exit(); + $eh = new ErrorHandler; //ErrorHandler object + if(empty($xoopsUser)){ + $ratinguser = 0; + }else{ + $ratinguser = $xoopsUser->getVar('uid'); + } + + //Make sure only 1 anonymous from an IP in a single day. + $anonwaitdays = 1; + $ip = getenv("REMOTE_ADDR"); + $lid = intval($HTTP_POST_VARS['lid']); + $cid = intval($HTTP_POST_VARS['cid']); + $rating = intval($HTTP_POST_VARS['rating']); + + // Check if Rating is Null + if ($rating=="--") { + redirect_header("ratefile.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); + exit(); + } + + // Check if Download POSTER is voting (UNLESS Anonymous users allowed to post) + if ($ratinguser != 0) { + $result=$xoopsDB->query("SELECT submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); + while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { + if ($ratinguserDB==$ratinguser) { + redirect_header("index.php",4,_MD_CANTVOTEOWN); + exit(); + } + } + + // Check if REG user is trying to vote twice. + $result=$xoopsDB->query("SELECT ratinguser FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid"); + while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { + if ($ratinguserDB==$ratinguser) { + redirect_header("index.php",4,_MD_VOTEONCE); + exit(); + } + } + + } else { + + // Check if ANONYMOUS user is trying to vote more than once per day. + $yesterday = (time()-(86400 * $anonwaitdays)); + $result=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); + list($anonvotecount) = $xoopsDB->fetchRow($result); + if ($anonvotecount >= 1) { + redirect_header("index.php",4,_MD_VOTEONCE); + exit(); + } + } + + //All is well. Add to Line Item Rate to DB. + $newid = $xoopsDB->genId($xoopsDB->prefix("mydownloads_votedata")."_ratingid_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mydownloads_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); + $xoopsDB->query($sql) or $eh("0013"); + + //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. + updaterating($lid); + $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKYOU, htmlspecialchars($xoopsConfig['sitename'])); + redirect_header("index.php",4,$ratemessage); + exit(); } else { - $xoopsOption['template_main'] = 'mydownloads_ratefile.html'; + $xoopsOption['template_main'] = 'mydownloads_ratefile.html'; include XOOPS_ROOT_PATH."/header.php"; $lid = intval($HTTP_GET_VARS['lid']); $result=$xoopsDB->query("SELECT title FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); Index: xoops2jp/html/modules/mydownloads/singlefile.php diff -u xoops2jp/html/modules/mydownloads/singlefile.php:1.2 xoops2jp/html/modules/mydownloads/singlefile.php:1.3 --- xoops2jp/html/modules/mydownloads/singlefile.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/singlefile.php Sat Jun 11 11:32:42 2005 @@ -1,5 +1,5 @@ assign('category_path', $pathstring); $path = $mytree->getPathFromId($cid, "title"); $path = substr($path, 1); -$path = str_replace("/"," ",$path); +$path = str_replace("/"," ",$path); $rating = number_format($rating, 2); $dtitle = $myts->makeTboxData4Show($title); $url = $myts->makeTboxData4Show($url); @@ -58,20 +58,20 @@ $new = newdownloadgraphic($time, $status); $pop = popgraphic($hits); if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) { - $adminlink = ''._MD_EDITTHISDL.''; + $adminlink = ''._MD_EDITTHISDL.''; } else { - $adminlink = ''; + $adminlink = ''; } if ($votes == 1) { - $votestring = _MD_ONEVOTE; + $votestring = _MD_ONEVOTE; } else { - $votestring = sprintf(_MD_NUMVOTES,$votes); + $votestring = sprintf(_MD_NUMVOTES,$votes); } if ($xoopsModuleConfig['useshots'] == 1) { - $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); - $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); - $xoopsTpl->assign('show_screenshot', true); - $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); + $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); + $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); + $xoopsTpl->assign('show_screenshot', true); + $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } $xoopsTpl->assign('file', array('id' => $lid, 'cid' => $cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'platform' => $platform, 'comments' => $comments, 'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); Index: xoops2jp/html/modules/mydownloads/viewcat.php diff -u xoops2jp/html/modules/mydownloads/viewcat.php:1.2 xoops2jp/html/modules/mydownloads/viewcat.php:1.3 --- xoops2jp/html/modules/mydownloads/viewcat.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/viewcat.php Sat Jun 11 11:32:42 2005 @@ -1,5 +1,5 @@ getFirstChild($cid, "title"); if ( count($arr) > 0 ) { - $scount = 1; - foreach($arr as $ele){ - $sub_arr=array(); - $sub_arr=$mytree->getFirstChild($ele['cid'], "title"); - $space = 0; - $chcount = 0; - $infercategories = ""; - foreach($sub_arr as $sub_ele){ - $chtitle=$myts->makeTboxData4Show($sub_ele['title']); - if ($chcount>5){ - $infercategories .= "..."; - break; - } - if ($space>0) { - $infercategories .= ", "; - } - $infercategories .= "".$chtitle.""; - $space++; - $chcount++; - } - $xoopsTpl->append('subcategories', array('title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount)); - $scount++; - } + $scount = 1; + foreach($arr as $ele){ + $sub_arr=array(); + $sub_arr=$mytree->getFirstChild($ele['cid'], "title"); + $space = 0; + $chcount = 0; + $infercategories = ""; + foreach($sub_arr as $sub_ele){ + $chtitle=$myts->makeTboxData4Show($sub_ele['title']); + if ($chcount>5){ + $infercategories .= "..."; + break; + } + if ($space>0) { + $infercategories .= ", "; + } + $infercategories .= "".$chtitle.""; + $space++; + $chcount++; + } + $xoopsTpl->append('subcategories', array('title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount)); + $scount++; + } } if ($xoopsModuleConfig['useshots'] == 1) { - $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); - $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); - $xoopsTpl->assign('show_screenshot', true); - $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); + $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); + $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); + $xoopsTpl->assign('show_screenshot', true); + $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } if (!empty($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { - $isadmin = true; + $isadmin = true; } else { - $isadmin = false; + $isadmin = false; } $fullcountresult=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE cid=$cid AND status>0"); list($numrows) = $xoopsDB->fetchRow($fullcountresult); $page_nav = ''; if($numrows>0){ - $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); - $xoopsTpl->assign('lang_lastupdate', _MD_LASTUPDATEC); - $xoopsTpl->assign('lang_hits', _MD_HITSC); - $xoopsTpl->assign('lang_ratingc', _MD_RATINGC); - $xoopsTpl->assign('lang_email', _MD_EMAILC); - $xoopsTpl->assign('lang_ratethissite', _MD_RATETHISFILE); - $xoopsTpl->assign('lang_reportbroken', _MD_REPORTBROKEN); - $xoopsTpl->assign('lang_tellafriend', _MD_TELLAFRIEND); - $xoopsTpl->assign('lang_modify', _MD_MODIFY); - $xoopsTpl->assign('lang_version' , _MD_VERSION); - $xoopsTpl->assign('lang_subdate' , _MD_SUBMITDATE); - $xoopsTpl->assign('lang_dlnow' , _MD_DLNOW); - $xoopsTpl->assign('lang_category' , _MD_CATEGORYC); - $xoopsTpl->assign('lang_size' , _MD_FILESIZE); - $xoopsTpl->assign('lang_platform' , _MD_SUPPORTEDPLAT); - $xoopsTpl->assign('lang_homepage' , _MD_HOMEPAGE); - $xoopsTpl->assign('lang_comments' , _COMMENTS); - $xoopsTpl->assign('show_links', true); - $q = "SELECT d.lid, d.title, d.url, d.homepage, d.version, d.size, d.platform, d.logourl, d.status, d.date, d.hits, d.rating, d.votes, d.comments, t.description FROM ".$xoopsDB->prefix("mydownloads_downloads")." d, ".$xoopsDB->prefix("mydownloads_text")." t WHERE cid=".$cid." AND d.status>0 AND d.lid=t.lid ORDER BY ".$orderby.""; - $result = $xoopsDB->query($q,$show,$min); + $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); + $xoopsTpl->assign('lang_lastupdate', _MD_LASTUPDATEC); + $xoopsTpl->assign('lang_hits', _MD_HITSC); + $xoopsTpl->assign('lang_ratingc', _MD_RATINGC); + $xoopsTpl->assign('lang_email', _MD_EMAILC); + $xoopsTpl->assign('lang_ratethissite', _MD_RATETHISFILE); + $xoopsTpl->assign('lang_reportbroken', _MD_REPORTBROKEN); + $xoopsTpl->assign('lang_tellafriend', _MD_TELLAFRIEND); + $xoopsTpl->assign('lang_modify', _MD_MODIFY); + $xoopsTpl->assign('lang_version' , _MD_VERSION); + $xoopsTpl->assign('lang_subdate' , _MD_SUBMITDATE); + $xoopsTpl->assign('lang_dlnow' , _MD_DLNOW); + $xoopsTpl->assign('lang_category' , _MD_CATEGORYC); + $xoopsTpl->assign('lang_size' , _MD_FILESIZE); + $xoopsTpl->assign('lang_platform' , _MD_SUPPORTEDPLAT); + $xoopsTpl->assign('lang_homepage' , _MD_HOMEPAGE); + $xoopsTpl->assign('lang_comments' , _COMMENTS); + $xoopsTpl->assign('show_links', true); + $q = "SELECT d.lid, d.title, d.url, d.homepage, d.version, d.size, d.platform, d.logourl, d.status, d.date, d.hits, d.rating, d.votes, d.comments, t.description FROM ".$xoopsDB->prefix("mydownloads_downloads")." d, ".$xoopsDB->prefix("mydownloads_text")." t WHERE cid=".$cid." AND d.status>0 AND d.lid=t.lid ORDER BY ".$orderby.""; + $result = $xoopsDB->query($q,$show,$min); //if 2 or more items in result, show the sort menu - if($numrows>1){ - $xoopsTpl->assign('show_nav', true); - $orderbyTrans = convertorderbytrans($orderby); - $xoopsTpl->assign('lang_sortby', _MD_SORTBY); - $xoopsTpl->assign('lang_title', _MD_TITLE); - $xoopsTpl->assign('lang_date', _MD_DATE); - $xoopsTpl->assign('lang_rating', _MD_RATING); - $xoopsTpl->assign('lang_popularity', _MD_POPULARITY); - $xoopsTpl->assign('lang_cursortedby', sprintf(_MD_CURSORTBY, convertorderbytrans($orderby))); - } - while(list($lid, $dtitle, $url, $homepage, $version, $size, $platform, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description)=$xoopsDB->fetchRow($result)) { - $path = $mytree->getPathFromId($cid, "title"); - $path = substr($path, 1); - $path = str_replace("/"," ",$path); - $rating = number_format($rating, 2); - $dtitle = $myts->makeTboxData4Show($dtitle); - $url = $myts->makeTboxData4Show($url); - $homepage = $myts->makeTboxData4Show($homepage); - $version = $myts->makeTboxData4Show($version); - $size = PrettySize($myts->makeTboxData4Show($size)); - $platform = $myts->makeTboxData4Show($platform); - $logourl = $myts->makeTboxData4Show($logourl); - $datetime = formatTimestamp($time,"s"); - $description = $myts->makeTareaData4Show($description,0); //no html - $new = newdownloadgraphic($time, $status); - $pop = popgraphic($hits); - if ($isadmin) { - $adminlink = ''._MD_EDITTHISDL.''; - } else { - $adminlink = ''; - } - if ($votes == 1) { - $votestring = _MD_ONEVOTE; - } else { - $votestring = sprintf(_MD_NUMVOTES,$votes); - } - $xoopsTpl->append('file', array('id' => $lid, 'cid' => $cid, 'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); - } - $orderby = convertorderbyout($orderby); + if($numrows>1){ + $xoopsTpl->assign('show_nav', true); + $orderbyTrans = convertorderbytrans($orderby); + $xoopsTpl->assign('lang_sortby', _MD_SORTBY); + $xoopsTpl->assign('lang_title', _MD_TITLE); + $xoopsTpl->assign('lang_date', _MD_DATE); + $xoopsTpl->assign('lang_rating', _MD_RATING); + $xoopsTpl->assign('lang_popularity', _MD_POPULARITY); + $xoopsTpl->assign('lang_cursortedby', sprintf(_MD_CURSORTBY, convertorderbytrans($orderby))); + } + while(list($lid, $dtitle, $url, $homepage, $version, $size, $platform, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description)=$xoopsDB->fetchRow($result)) { + $path = $mytree->getPathFromId($cid, "title"); + $path = substr($path, 1); + $path = str_replace("/"," ",$path); + $rating = number_format($rating, 2); + $dtitle = $myts->makeTboxData4Show($dtitle); + $url = $myts->makeTboxData4Show($url); + $homepage = $myts->makeTboxData4Show($homepage); + $version = $myts->makeTboxData4Show($version); + $size = PrettySize($myts->makeTboxData4Show($size)); + $platform = $myts->makeTboxData4Show($platform); + $logourl = $myts->makeTboxData4Show($logourl); + $datetime = formatTimestamp($time,"s"); + $description = $myts->makeTareaData4Show($description,0); //no html + $new = newdownloadgraphic($time, $status); + $pop = popgraphic($hits); + if ($isadmin) { + $adminlink = ''._MD_EDITTHISDL.''; + } else { + $adminlink = ''; + } + if ($votes == 1) { + $votestring = _MD_ONEVOTE; + } else { + $votestring = sprintf(_MD_NUMVOTES,$votes); + } + $xoopsTpl->append('file', array('id' => $lid, 'cid' => $cid, 'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); + } + $orderby = convertorderbyout($orderby); //Calculates how many pages exist. Which page one should be on, etc... - $downpages = ceil($numrows / $show); + $downpages = ceil($numrows / $show); //Page Numbering - if ($downpages!=1 && $downpages!=0) { - $prev = $min - $show; - if ($prev>=0) { - $page_nav .= "« "; - } - $counter = 1; - $currentpage = ($max / $show); - while ( $counter<=$downpages ) { - $mintemp = ($show * $counter) - $show; - if ($counter == $currentpage) { - $page_nav .= "($counter) "; - } else { - $page_nav .= "$counter "; - } - $counter++; - } - if ( $numrows>$max ) { - $page_nav .= ""; - $page_nav .= "»"; - } - } + if ($downpages!=1 && $downpages!=0) { + $prev = $min - $show; + if ($prev>=0) { + $page_nav .= "« "; + } + $counter = 1; + $currentpage = ($max / $show); + while ( $counter<=$downpages ) { + $mintemp = ($show * $counter) - $show; + if ($counter == $currentpage) { + $page_nav .= "($counter) "; + } else { + $page_nav .= "$counter "; + } + $counter++; + } + if ( $numrows>$max ) { + $page_nav .= ""; + $page_nav .= "»"; + } + } } $xoopsTpl->assign('page_nav', $page_nav); include XOOPS_ROOT_PATH."/modules/mydownloads/footer.php"; From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:44 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:44 +0900 Subject: [xoops-cvslog 108] CVS update: xoops2jp/html/modules/mylinks/templates Message-ID: <20050611023244.E18A62AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/templates/mylinks_link.html diff -u xoops2jp/html/modules/mylinks/templates/mylinks_link.html:1.1 xoops2jp/html/modules/mylinks/templates/mylinks_link.html:1.2 --- xoops2jp/html/modules/mylinks/templates/mylinks_link.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/templates/mylinks_link.html Sat Jun 11 11:32:44 2005 @@ -3,7 +3,7 @@ - + Index: xoops2jp/html/modules/mylinks/templates/mylinks_modlink.html diff -u xoops2jp/html/modules/mylinks/templates/mylinks_modlink.html:1.1 xoops2jp/html/modules/mylinks/templates/mylinks_modlink.html:1.2 --- xoops2jp/html/modules/mylinks/templates/mylinks_modlink.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/templates/mylinks_modlink.html Sat Jun 11 11:32:44 2005 @@ -13,11 +13,11 @@ - + - + @@ -28,10 +28,10 @@ - + - +
    <{$subcat.title}> (<{$subcat.totallinks}>)
    <{$subcat.infercategories}>
    <{$lang_category}> <{$link.category}>
    <{$lang_visit}><{$link.title}><{$lang_visit}><{$link.title}> <{$lang_lastupdate}><{$link.updated}>
    <{$lang_sitetitle}>
    <{$lang_siteurl}>
    <{$lang_category}>
    <{$lang_description}>

     

     
    Index: xoops2jp/html/modules/mylinks/templates/mylinks_ratelink.html diff -u xoops2jp/html/modules/mylinks/templates/mylinks_ratelink.html:1.1 xoops2jp/html/modules/mylinks/templates/mylinks_ratelink.html:1.2 --- xoops2jp/html/modules/mylinks/templates/mylinks_ratelink.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/templates/mylinks_ratelink.html Sat Jun 11 11:32:44 2005 @@ -4,24 +4,24 @@

    -
    - +
    +
    +

    <{$link.title}>

      -
    • <{$lang_voteonce}> -
    • <{$lang_ratingscale}> -
    • <{$lang_beobjective}> -
    • <{$lang_donotvote}> +
    • <{$lang_voteonce}>
    • +
    • <{$lang_ratingscale}>
    • +
    • <{$lang_beobjective}>
    • +
    • <{$lang_donotvote}>
    - - + +   
    Index: xoops2jp/html/modules/mylinks/templates/mylinks_submit.html diff -u xoops2jp/html/modules/mylinks/templates/mylinks_submit.html:1.1 xoops2jp/html/modules/mylinks/templates/mylinks_submit.html:1.2 --- xoops2jp/html/modules/mylinks/templates/mylinks_submit.html:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/templates/mylinks_submit.html Sat Jun 11 11:32:44 2005 @@ -17,12 +17,12 @@
    - - - - -
    +
    <{$lang_submitlinkh}>
    +
    <{$lang_sitetitle}>
    @@ -32,7 +32,7 @@
    +
    <{$lang_siteurl}>
    @@ -40,14 +40,14 @@
    +
    <{$lang_category}>
    <{$category_selbox}>
    +
    <{$lang_description}>
    From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:43 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:43 +0900 Subject: [xoops-cvslog 109] CVS update: xoops2jp/html/modules/mylinks/blocks Message-ID: <20050611023243.F0F4D2AC02F@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/blocks/mylinks_top.php diff -u xoops2jp/html/modules/mylinks/blocks/mylinks_top.php:1.2 xoops2jp/html/modules/mylinks/blocks/mylinks_top.php:1.3 --- xoops2jp/html/modules/mylinks/blocks/mylinks_top.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/blocks/mylinks_top.php Sat Jun 11 11:32:43 2005 @@ -1,5 +1,5 @@ query("SELECT lid, cid, title, date, hits FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status>0 ORDER BY ".$options[0]." DESC",$options[1],0); - while($myrow = $xoopsDB->fetchArray($result)){ - $link = array(); - $title = $myts->makeTboxData4Show($myrow["title"]); - if ( !XOOPS_USE_MULTIBYTES ) { - if (strlen($myrow['title']) >= $options[2]) { - $title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."..."; - } - } - $link['id'] = $myrow['lid']; - $link['cid'] = $myrow['cid']; - $link['title'] = $title; - if($options[0] == "date"){ - $link['date'] = formatTimestamp($myrow['date'],'s'); - }elseif($options[0] == "hits"){ - $link['hits'] = $myrow['hits']; - } - $block['links'][] = $link; - } - return $block; + global $xoopsDB; + $block = array(); + $myts =& MyTextSanitizer::getInstance(); + $result = $xoopsDB->query("SELECT lid, cid, title, date, hits FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status>0 ORDER BY ".$options[0]." DESC",$options[1],0); + while($myrow = $xoopsDB->fetchArray($result)){ + $link = array(); + $title = $myts->makeTboxData4Show($myrow["title"]); + if ( !XOOPS_USE_MULTIBYTES ) { + if (strlen($myrow['title']) >= $options[2]) { + $title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."..."; + } + } + $link['id'] = $myrow['lid']; + $link['cid'] = $myrow['cid']; + $link['title'] = $title; + if($options[0] == "date"){ + $link['date'] = formatTimestamp($myrow['date'],'s'); + }elseif($options[0] == "hits"){ + $link['hits'] = $myrow['hits']; + } + $block['links'][] = $link; + } + return $block; } function b_mylinks_top_edit($options) { - $form = ""._MB_MYLINKS_DISP." "; - $form .= " "._MB_MYLINKS_LINKS.""; - $form .= " 
    "._MB_MYLINKS_CHARS."  "._MB_MYLINKS_LENGTH.""; + $form = ""._MB_MYLINKS_DISP." "; + $form .= " "._MB_MYLINKS_LINKS.""; + $form .= " 
    "._MB_MYLINKS_CHARS."  "._MB_MYLINKS_LENGTH.""; - return $form; + return $form; } ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:44 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:44 +0900 Subject: [xoops-cvslog 110] CVS update: xoops2jp/html/modules/mylinks/language/japanese Message-ID: <20050611023244.990482AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/language/japanese/main.php diff -u xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1 xoops2jp/html/modules/mylinks/language/japanese/main.php:1.2 --- xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/language/japanese/main.php Sat Jun 11 11:32:44 2005 @@ -1,6 +1,6 @@ ¤Þ¤ºÅÐÏ¿¤µ¤ì¤ë¤«¡¢¥í¥°¥¤¥ó¤·¤Æ²¼¤µ¤¤¡£"); +define("_MD_MUSTREGFIRST","¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¤¬¤¢¤Ê¤¿¤Ï¤³¤Î¥Ú¡¼¥¸¤Ë¤Ï¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¡£
    ¤Þ¤ºÅÐÏ¿¤µ¤ì¤ë¤«¡¢¥í¥°¥¤¥ó¤·¤Æ²¼¤µ¤¤¡£"); define("_MD_NORATING","ɾ²Á¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); -define("_MD_CANTVOTEOWN","¤¢¤Ê¤¿¤¬ÅÐÏ¿¤·¤¿¥ê¥ó¥¯¤Ë¤ÏÅêɼ¤Ç¤­¤Þ¤»¤ó¡£
    Åêɼ¤ÏÁ´¤Æµ­Ï¿¤µ¤ìÄ´ºº¤µ¤ì¤Þ¤¹¡£"); +define("_MD_CANTVOTEOWN","¤¢¤Ê¤¿¤¬ÅÐÏ¿¤·¤¿¥ê¥ó¥¯¤Ë¤ÏÅêɼ¤Ç¤­¤Þ¤»¤ó¡£
    Åêɼ¤ÏÁ´¤Æµ­Ï¿¤µ¤ìÄ´ºº¤µ¤ì¤Þ¤¹¡£"); define("_MD_VOTEONCE2","¿½¤·Ìõ¤¢¤ê¤Þ¤»¤ó¤¬¡¢Æ±°ì¥ê¥ó¥¯¾ðÊó¤Ø¤ÎÅêɼ¤Ï°ì²ó¸Â¤ê¤È¤µ¤»¤Æ¤¤¤¿¤À¤¤¤Æ¤¤¤Þ¤¹¡£"); -//%%%%%% Module Name 'MyLinks' (Admin) %%%%% +//%%%%%% Module Name 'MyLinks' (Admin) %%%%% define("_MD_WEBLINKSCONF","¥ê¥ó¥¯½¸´ÉÍý"); define("_MD_GENERALSET","°ìÈÌÀßÄê"); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:45 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:45 +0900 Subject: [xoops-cvslog 111] CVS update: xoops2jp/html/modules/newbb/blocks Message-ID: <20050611023245.879FC2AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/blocks/newbb_new.php diff -u xoops2jp/html/modules/newbb/blocks/newbb_new.php:1.2 xoops2jp/html/modules/newbb/blocks/newbb_new.php:1.3 --- xoops2jp/html/modules/newbb/blocks/newbb_new.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/blocks/newbb_new.php Sat Jun 11 11:32:45 2005 @@ -1,5 +1,5 @@  "._NO; - $form .= ''; + $form .= ''; return $form; } From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:42 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:42 +0900 Subject: [xoops-cvslog 105] CVS update: xoops2jp/html/modules/mydownloads/blocks Message-ID: <20050611023242.AE4312AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/blocks/mydownloads_top.php diff -u xoops2jp/html/modules/mydownloads/blocks/mydownloads_top.php:1.2 xoops2jp/html/modules/mydownloads/blocks/mydownloads_top.php:1.3 --- xoops2jp/html/modules/mydownloads/blocks/mydownloads_top.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/blocks/mydownloads_top.php Sat Jun 11 11:32:42 2005 @@ -1,5 +1,5 @@ "; $form .= " "._MB_MYDOWNLOADS_FILES.""; - $form .= " 
    "._MB_MYDOWNLOADS_CHARS."  "._MB_MYDOWNLOADS_LENGTH.""; + $form .= " 
    "._MB_MYDOWNLOADS_CHARS."  "._MB_MYDOWNLOADS_LENGTH.""; return $form; } ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:44 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:44 +0900 Subject: [xoops-cvslog 112] CVS update: xoops2jp/html/modules/mylinks Message-ID: <20050611023244.593CF2AC030@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/index.php diff -u xoops2jp/html/modules/mylinks/index.php:1.2 xoops2jp/html/modules/mylinks/index.php:1.3 --- xoops2jp/html/modules/mylinks/index.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/index.php Sat Jun 11 11:32:44 2005 @@ -1,5 +1,5 @@ fetchArray($result)) { - $imgurl = ''; - if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){ - $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']); - } - $totallink = getTotalItems($myrow['cid'], 1); - // get child category objects - $arr = array(); - $arr = $mytree->getFirstChild($myrow['cid'], "title"); - $space = 0; - $chcount = 0; - $subcategories = ''; - foreach($arr as $ele){ - $chtitle = $myts->makeTboxData4Show($ele['title']); - if ($chcount > 5) { - $subcategories .= "..."; - break; - } - if ($space>0) { - $subcategories .= ", "; - } - $subcategories .= "".$chtitle.""; - $space++; - $chcount++; - } - $xoopsTpl->append('categories', array('image' => $imgurl, 'id' => $myrow['cid'], 'title' => $myts->makeTboxData4Show($myrow['title']), 'subcategories' => $subcategories, 'totallink' => $totallink, 'count' => $count)); - $count++; + $imgurl = ''; + if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){ + $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']); + } + $totallink = getTotalItems($myrow['cid'], 1); + // get child category objects + $arr = array(); + $arr = $mytree->getFirstChild($myrow['cid'], "title"); + $space = 0; + $chcount = 0; + $subcategories = ''; + foreach($arr as $ele){ + $chtitle = $myts->makeTboxData4Show($ele['title']); + if ($chcount > 5) { + $subcategories .= "..."; + break; + } + if ($space>0) { + $subcategories .= ", "; + } + $subcategories .= "".$chtitle.""; + $space++; + $chcount++; + } + $xoopsTpl->append('categories', array('image' => $imgurl, 'id' => $myrow['cid'], 'title' => $myts->makeTboxData4Show($myrow['title']), 'subcategories' => $subcategories, 'totallink' => $totallink, 'count' => $count)); + $count++; } list($numrows) = $xoopsDB->fetchRow($xoopsDB->query("select count(*) from ".$xoopsDB->prefix("mylinks_links")." where status>0")); $xoopsTpl->assign('lang_thereare', sprintf(_MD_THEREARE,$numrows)); if ($xoopsModuleConfig['useshots'] == 1) { - $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); - $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); - $xoopsTpl->assign('show_screenshot', true); - $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); + $xoopsTpl->assign('shotwidth', $xoopsModuleConfig['shotwidth']); + $xoopsTpl->assign('tablewidth', $xoopsModuleConfig['shotwidth'] + 10); + $xoopsTpl->assign('show_screenshot', true); + $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) { - $isadmin = true; + $isadmin = true; } else { - $isadmin = false; + $isadmin = false; } $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); @@ -92,22 +92,22 @@ $result = $xoopsDB->query("SELECT l.lid, l.cid, l.title, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description FROM ".$xoopsDB->prefix("mylinks_links")." l, ".$xoopsDB->prefix("mylinks_text")." t where l.status>0 and l.lid=t.lid ORDER BY date DESC", $xoopsModuleConfig['newlinks'], 0); while(list($lid, $cid, $ltitle, $url, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $xoopsDB->fetchRow($result)) { - if ($isadmin) { - $adminlink = ''._MD_EDITTHISLINK.''; - } else { - $adminlink = ''; - } - if ($votes == 1) { - $votestring = _MD_ONEVOTE; - } else { - $votestring = sprintf(_MD_NUMVOTES,$votes); - } - $path = $mytree->getPathFromId($cid, "title"); - $path = substr($path, 1); - $path = str_replace("/"," ",$path); - $new = newlinkgraphic($time, $status); - $pop = popgraphic($hits); - $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); + if ($isadmin) { + $adminlink = ''._MD_EDITTHISLINK.''; + } else { + $adminlink = ''; + } + if ($votes == 1) { + $votestring = _MD_ONEVOTE; + } else { + $votestring = sprintf(_MD_NUMVOTES,$votes); + } + $path = $mytree->getPathFromId($cid, "title"); + $path = substr($path, 1); + $path = str_replace("/"," ",$path); + $new = newlinkgraphic($time, $status); + $pop = popgraphic($hits); + $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); } include XOOPS_ROOT_PATH.'/footer.php'; ?> Index: xoops2jp/html/modules/mylinks/myheader.php diff -u xoops2jp/html/modules/mylinks/myheader.php:1.2 xoops2jp/html/modules/mylinks/myheader.php:1.3 --- xoops2jp/html/modules/mylinks/myheader.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/myheader.php Sat Jun 11 11:32:44 2005 @@ -1,5 +1,5 @@ +
    -
    - | | | | Back to | Close Frame + | | | | Back to | Close Frame
    Index: xoops2jp/html/modules/mylinks/ratelink.php diff -u xoops2jp/html/modules/mylinks/ratelink.php:1.2 xoops2jp/html/modules/mylinks/ratelink.php:1.3 --- xoops2jp/html/modules/mylinks/ratelink.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/ratelink.php Sat Jun 11 11:32:44 2005 @@ -1,5 +1,5 @@ getVar('uid'); - } - - //Make sure only 1 anonymous from an IP in a single day. - $anonwaitdays = 1; - $ip = getenv("REMOTE_ADDR"); - $lid = intval($HTTP_POST_VARS['lid']); - $cid = intval($HTTP_POST_VARS['cid']); - $rating = intval($HTTP_POST_VARS['rating']); - - // Check if Rating is Null - if ($rating=="--") { - redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); - exit(); - } - - // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) - if ($ratinguser != 0) { - $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); - while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { - if ($ratinguserDB == $ratinguser) { - redirect_header("index.php",4,_MD_CANTVOTEOWN); - exit(); - } - } - - // Check if REG user is trying to vote twice. - $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid"); - while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { - if ($ratinguserDB == $ratinguser) { - redirect_header("index.php",4,_MD_VOTEONCE2); - exit(); - } - } - - } else { - - // Check if ANONYMOUS user is trying to vote more than once per day. - $yesterday = (time()-(86400 * $anonwaitdays)); - $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); - list($anonvotecount) = $xoopsDB->fetchRow($result); - if ($anonvotecount > 0) { - redirect_header("index.php",4,_MD_VOTEONCE2); - exit(); - } - } - if($rating > 10){ - $rating = 10; - } + $eh = new ErrorHandler; //ErrorHandler object + if(empty($xoopsUser)){ + $ratinguser = 0; + }else{ + $ratinguser = $xoopsUser->getVar('uid'); + } + + //Make sure only 1 anonymous from an IP in a single day. + $anonwaitdays = 1; + $ip = getenv("REMOTE_ADDR"); + $lid = intval($HTTP_POST_VARS['lid']); + $cid = intval($HTTP_POST_VARS['cid']); + $rating = intval($HTTP_POST_VARS['rating']); + + // Check if Rating is Null + if ($rating=="--") { + redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); + exit(); + } + + // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) + if ($ratinguser != 0) { + $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); + while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { + if ($ratinguserDB == $ratinguser) { + redirect_header("index.php",4,_MD_CANTVOTEOWN); + exit(); + } + } + + // Check if REG user is trying to vote twice. + $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid"); + while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { + if ($ratinguserDB == $ratinguser) { + redirect_header("index.php",4,_MD_VOTEONCE2); + exit(); + } + } + + } else { + + // Check if ANONYMOUS user is trying to vote more than once per day. + $yesterday = (time()-(86400 * $anonwaitdays)); + $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); + list($anonvotecount) = $xoopsDB->fetchRow($result); + if ($anonvotecount > 0) { + redirect_header("index.php",4,_MD_VOTEONCE2); + exit(); + } + } + if($rating > 10){ + $rating = 10; + } //All is well. Add to Line Item Rate to DB. - $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); - $xoopsDB->query($sql) or $eh->show("0013"); + $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); + $xoopsDB->query($sql) or $eh->show("0013"); //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. updaterating($lid); - $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKURATE,$xoopsConfig[sitename]); - redirect_header("index.php",2,$ratemessage); - exit(); + $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKURATE, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + redirect_header("index.php",2,$ratemessage); + exit(); } else { - $xoopsOption['template_main'] = 'mylinks_ratelink.html'; - include XOOPS_ROOT_PATH."/header.php"; - $lid = intval($HTTP_GET_VARS['lid']); - $cid = intval($HTTP_GET_VARS['cid']); - $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); - list($title) = $xoopsDB->fetchRow($result); - $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title))); - $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE); - $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE); - $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE); - $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE); - $xoopsTpl->assign('lang_rateit', _MD_RATEIT); - $xoopsTpl->assign('lang_cancel', _CANCEL); - include XOOPS_ROOT_PATH.'/footer.php'; + $xoopsOption['template_main'] = 'mylinks_ratelink.html'; + include XOOPS_ROOT_PATH."/header.php"; + $lid = intval($HTTP_GET_VARS['lid']); + $cid = intval($HTTP_GET_VARS['cid']); + $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); + list($title) = $xoopsDB->fetchRow($result); + $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title))); + $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE); + $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE); + $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE); + $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE); + $xoopsTpl->assign('lang_rateit', _MD_RATEIT); + $xoopsTpl->assign('lang_cancel', _CANCEL); + include XOOPS_ROOT_PATH.'/footer.php'; } ?> Index: xoops2jp/html/modules/mylinks/singlelink.php diff -u xoops2jp/html/modules/mylinks/singlelink.php:1.2 xoops2jp/html/modules/mylinks/singlelink.php:1.3 --- xoops2jp/html/modules/mylinks/singlelink.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/singlelink.php Sat Jun 11 11:32:44 2005 @@ -1,5 +1,5 @@ getPathFromId($cid, "title"); $path = substr($path, 1); -$path = str_replace("/"," ",$path); +$path = str_replace("/"," ",$path); $new = newlinkgraphic($time, $status); $pop = popgraphic($hits); $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?lid='.$lid))); Index: xoops2jp/html/modules/mylinks/viewcat.php diff -u xoops2jp/html/modules/mylinks/viewcat.php:1.2 xoops2jp/html/modules/mylinks/viewcat.php:1.3 --- xoops2jp/html/modules/mylinks/viewcat.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/viewcat.php Sat Jun 11 11:32:44 2005 @@ -1,5 +1,5 @@ 0 ) { $scount = 1; foreach($arr as $ele){ - $sub_arr=array(); - $sub_arr=$mytree->getFirstChild($ele['cid'], "title"); - $space = 0; - $chcount = 0; - $infercategories = ""; - foreach($sub_arr as $sub_ele){ - $chtitle=$myts->makeTboxData4Show($sub_ele['title']); - if ($chcount>5){ - $infercategories .= "..."; - break; - } - if ($space>0) { - $infercategories .= ", "; - } - $infercategories .= "".$chtitle.""; - $space++; - $chcount++; - } - $xoopsTpl->append('subcategories', array('title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount)); - $scount++; + $sub_arr=array(); + $sub_arr=$mytree->getFirstChild($ele['cid'], "title"); + $space = 0; + $chcount = 0; + $infercategories = ""; + foreach($sub_arr as $sub_ele){ + $chtitle=$myts->makeTboxData4Show($sub_ele['title']); + if ($chcount>5){ + $infercategories .= "..."; + break; + } + if ($space>0) { + $infercategories .= ", "; + } + $infercategories .= "".$chtitle.""; + $space++; + $chcount++; + } + $xoopsTpl->append('subcategories', array('title' => $myts->makeTboxData4Show($ele['title']), 'id' => $ele['cid'], 'infercategories' => $infercategories, 'totallinks' => getTotalItems($ele['cid'], 1), 'count' => $scount)); + $scount++; } } @@ -108,7 +108,7 @@ $xoopsTpl->assign('lang_category' , _MD_CATEGORYC); $xoopsTpl->assign('lang_visit' , _MD_VISIT); $xoopsTpl->assign('show_links', true); - $xoopsTpl->assign('lang_comments' , _COMMENTS); + $xoopsTpl->assign('lang_comments' , _COMMENTS); $sql = "select l.lid, l.cid, l.title, l.url, l.logourl, l.status, l.date, l.hits, l.rating, l.votes, l.comments, t.description from ".$xoopsDB->prefix("mylinks_links")." l, ".$xoopsDB->prefix("mylinks_text")." t where cid=$cid and l.lid=t.lid and status>0 order by $orderby"; $result=$xoopsDB->query($sql,$show,$min); @@ -136,17 +136,17 @@ } $path = $mytree->getPathFromId($cid, "title"); $path = substr($path, 1); - $path = str_replace("/"," ",$path); + $path = str_replace("/"," ",$path); $new = newlinkgraphic($time, $status); $pop = popgraphic($hits); $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'comments' => $comments, 'votes' => $votestring, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); - } + } $orderby = convertorderbyout($orderby); //Calculates how many pages exist. Which page one should be on, etc... $linkpages = ceil($numrows / $show); //Page Numbering if ($linkpages!=1 && $linkpages!=0) { - $cid = intval($HTTP_GET_VARS['cid']); + $cid = intval($HTTP_GET_VARS['cid']); $prev = $min - $show; if ($prev>=0) { $page_nav .= "« "; Index: xoops2jp/html/modules/mylinks/visit.php diff -u xoops2jp/html/modules/mylinks/visit.php:1.2 xoops2jp/html/modules/mylinks/visit.php:1.3 --- xoops2jp/html/modules/mylinks/visit.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/mylinks/visit.php Sat Jun 11 11:32:44 2005 @@ -1,5 +1,5 @@ - ".$xoopsConfig['sitename']." - - - - - "; + header('Content-Type:text/html; charset='._CHARSET); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header('Cache-Control: no-store, no-cache, must-revalidate'); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); + echo " + ".htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)." + + + + + "; } else { - echo ""; + echo ""; } exit(); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:46 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:46 +0900 Subject: [xoops-cvslog 113] CVS update: xoops2jp/html/modules/newbb/include Message-ID: <20050611023246.AB08D2AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/include/forumform.inc.php diff -u xoops2jp/html/modules/newbb/include/forumform.inc.php:1.2 xoops2jp/html/modules/newbb/include/forumform.inc.php:1.3 --- xoops2jp/html/modules/newbb/include/forumform.inc.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/include/forumform.inc.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ "; +echo $token->getHtml(); if ( $forumdata['forum_type'] == 1 ) { - echo ""; + echo ""; } elseif ( $forumdata['forum_access'] == 1 ) { - echo ""; + echo ""; } elseif ( $forumdata['forum_access'] == 2 ) { - echo ""; + echo ""; } elseif ( $forumdata['forum_access'] == 3 ) { - echo ""; + echo ""; } echo " @@ -62,17 +65,17 @@ $filelist = $lists->getSubjectsList(); $count = 1; while ( list($key, $file) = each($filelist) ) { - $checked = ""; - if ( isset($icon) && $file==$icon ) { - $checked = " checked='checked'"; - } - echo " "; - echo " "; - if ( $count == 8 ) { - echo "
    "; - $count = 0; - } - $count++; + $checked = ""; + if ( isset($icon) && $file==$icon ) { + $checked = " checked='checked'"; + } + echo " "; + echo " "; + if ( $count == 8 ) { + echo "
    "; + $count = 0; + } + $count++; } echo " @@ -83,9 +86,9 @@ xoopsCodeTarea("message"); if ( !empty($isreply) && isset($hidden) && $hidden != "" ) { - echo ""; - echo " -
    "; + echo ""; + echo " +
    "; } xoopsSmilies("message"); @@ -95,62 +98,62 @@ echo "
    ". _MD_ABOUTPOST .":". _MD_PRIVATE ."". _MD_PRIVATE ."". _MD_REGCANPOST ."". _MD_REGCANPOST ."". _MD_ANONCANPOST ."". _MD_ANONCANPOST ."". _MD_MODSCANPOST ."". _MD_MODSCANPOST ."
    "; if ( $xoopsUser && $forumdata['forum_access'] == 2 && !empty($post_id) ) { - echo " "._MD_POSTANONLY."
    \n"; + echo " "._MD_POSTANONLY."
    \n"; } echo " "._MD_DISABLESMILEY."
    \n"; if ( $forumdata['allow_html'] ) { - echo " "._MD_DISABLEHTML."
    \n"; + echo " "._MD_DISABLEHTML."
    \n"; } else { - echo ""; + echo ""; } if ( $forumdata['allow_sig'] && $xoopsUser ) { - echo " "; - } else { - echo " /> "; - } - } else { - if ($xoopsUser->getVar('attachsig') || !empty($attachsig)) { - echo " checked='checked' /> "; - } else { - echo "/> "; - } - } + echo " "; + } else { + echo " /> "; + } + } else { + if ($xoopsUser->getVar('attachsig') || !empty($attachsig)) { + echo " checked='checked' /> "; + } else { + echo "/> "; + } + } - echo _MD_ATTACHSIG."
    \n"; + echo _MD_ATTACHSIG."
    \n"; } if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) { - echo ""; - echo "isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'))) { - echo ' checked="checked"'; - } - } - echo " /> "._MD_NEWPOSTNOTIFY."
    \n"; + echo ""; + echo "isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'))) { + echo ' checked="checked"'; + } + } + echo " /> "._MD_NEWPOSTNOTIFY."
    \n"; } $post_id = isset($post_id) ? intval($post_id) : ''; @@ -168,9 +171,9 @@   "; echo "
    \n"; Index: xoops2jp/html/modules/newbb/include/search.inc.php diff -u xoops2jp/html/modules/newbb/include/search.inc.php:1.2 xoops2jp/html/modules/newbb/include/search.inc.php:1.3 --- xoops2jp/html/modules/newbb/include/search.inc.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/include/search.inc.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ prefix("bb_posts")." p LEFT JOIN ".$xoopsDB->prefix("bb_posts_text")." t ON t.post_id=p.post_id LEFT JOIN ".$xoopsDB->prefix("bb_forums")." f ON f.forum_id=p.forum_id WHERE f.forum_type=0"; - if ( $userid != 0 ) { - $sql .= " AND p.uid=".$userid." "; - } - // because count() returns 1 even if a supplied variable - // is not an array, we must check if $querryarray is really an array - if ( is_array($queryarray) && $count = count($queryarray) ) { - $sql .= " AND ((p.subject LIKE '%$queryarray[0]%' OR t.post_text LIKE '%$queryarray[0]%')"; - for($i=1;$i<$count;$i++){ - $sql .= " $andor "; - $sql .= "(p.subject LIKE '%$queryarray[$i]%' OR t.post_text LIKE '%$queryarray[$i]%')"; - } - $sql .= ") "; - } - $sql .= "ORDER BY p.post_time DESC"; - $result = $xoopsDB->query($sql,$limit,$offset); - $ret = array(); - $i = 0; - while($myrow = $xoopsDB->fetchArray($result)){ - $ret[$i]['link'] = "viewtopic.php?topic_id=".$myrow['topic_id']."&forum=".$myrow['forum_id']."#forumpost".$myrow['post_id']; - $ret[$i]['title'] = $myrow['subject']; - $ret[$i]['time'] = $myrow['post_time']; - $ret[$i]['uid'] = $myrow['uid']; - $i++; - } - return $ret; + global $xoopsDB; + $sql = "SELECT p.post_id,p.topic_id,p.forum_id,p.post_time,p.uid,p.subject FROM ".$xoopsDB->prefix("bb_posts")." p LEFT JOIN ".$xoopsDB->prefix("bb_posts_text")." t ON t.post_id=p.post_id LEFT JOIN ".$xoopsDB->prefix("bb_forums")." f ON f.forum_id=p.forum_id WHERE f.forum_type=0"; + if ( $userid != 0 ) { + $sql .= " AND p.uid=".$userid." "; + } + // because count() returns 1 even if a supplied variable + // is not an array, we must check if $querryarray is really an array + if ( is_array($queryarray) && $count = count($queryarray) ) { + $sql .= " AND ((p.subject LIKE '%$queryarray[0]%' OR t.post_text LIKE '%$queryarray[0]%')"; + for($i=1;$i<$count;$i++){ + $sql .= " $andor "; + $sql .= "(p.subject LIKE '%$queryarray[$i]%' OR t.post_text LIKE '%$queryarray[$i]%')"; + } + $sql .= ") "; + } + $sql .= "ORDER BY p.post_time DESC"; + $result = $xoopsDB->query($sql,$limit,$offset); + $ret = array(); + $i = 0; + while($myrow = $xoopsDB->fetchArray($result)){ + $ret[$i]['link'] = "viewtopic.php?topic_id=".$myrow['topic_id']."&forum=".$myrow['forum_id']."&post_id=".$myrow['post_id']."#forumpost".$myrow['post_id']; + $ret[$i]['title'] = $myrow['subject']; + $ret[$i]['time'] = $myrow['post_time']; + $ret[$i]['uid'] = $myrow['uid']; + $i++; + } + return $ret; } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:46 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:46 +0900 Subject: [xoops-cvslog 114] CVS update: xoops2jp/html/modules/newbb/class Message-ID: <20050611023246.0C27E2AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/class/class.forumposts.php diff -u xoops2jp/html/modules/newbb/class/class.forumposts.php:1.2 xoops2jp/html/modules/newbb/class/class.forumposts.php:1.3 --- xoops2jp/html/modules/newbb/class/class.forumposts.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/class/class.forumposts.php Sat Jun 11 11:32:45 2005 @@ -1,5 +1,5 @@ db =& Database::getInstance(); - if ( is_array($id) ) { - $this->makePost($id); - } elseif ( isset($id) ) { - $this->getPost(intval($id)); - } - } - - function setTopicId($value){ - $this->topic_id = $value; - } - - function getTopicId() { - return isset($this->topic_id) ? $this->topic_id : 0; - } - - function setOrder($value){ - $this->order = $value; - } - - // 2004-1-12 GIJOE Added routine to move to the correct - // starting position within a topic thread - function &getAllPosts($topic_id, $order="ASC", $perpage=0, &$start, $post_id=0){ - $db =& Database::getInstance(); - if( $order == "DESC" ) { - $operator_for_position = '>' ; - } else { - $order = "ASC" ; - $operator_for_position = '<' ; - } - if ($perpage <= 0) { - $perpage = 10; - } - if (empty($start)) { - $start = 0; - } - if (!empty($post_id)) { - $result = $db->query("SELECT COUNT(post_id) FROM ".$db->prefix('bb_posts')." WHERE topic_id=$topic_id AND post_id $operator_for_position $post_id"); - list($position) = $db->fetchRow($result); - $start = intval($position / $perpage) * $perpage; - } - $sql = 'SELECT p.*, t.post_text FROM '.$db->prefix('bb_posts').' p, '.$db->prefix('bb_posts_text')." t WHERE p.topic_id=$topic_id AND p.post_id = t.post_id ORDER BY p.post_id $order"; - $result = $db->query($sql,$perpage,$start); - $ret = array(); - while ($myrow = $db->fetchArray($result)) { - $ret[] = new ForumPosts($myrow); - } - return $ret; - } - - function setParent($value){ - $this->pid=$value; - } - - function setSubject($value){ - $this->subject=$value; - } - - function setText($value){ - $this->post_text=$value; - } - - function setUid($value){ - $this->uid=$value; - } - - function setForum($value){ - $this->forum_id=$value; - } - - function setIp($value){ - $this->poster_ip=$value; - } - - function setNohtml($value=0){ - $this->nohtml=$value; - } - - function setNosmiley($value=0){ - $this->nosmiley=$value; - } - - function setIcon($value){ - $this->icon=$value; - } - - function setAttachsig($value){ - $this->attachsig=$value; - } - - function store() { - $myts =& MyTextSanitizer::getInstance(); - $subject =$myts->censorString($this->subject); - $post_text =$myts->censorString($this->post_text); - $subject = $myts->makeTboxData4Save($subject); - $post_text = $myts->makeTareaData4Save($post_text); - if ( empty($this->post_id) ) { - if ( empty($this->topic_id) ) { - $this->topic_id = $this->db->genId($this->db->prefix("bb_topics")."_topic_id_seq"); - $datetime = time(); - $sql = "INSERT INTO ".$this->db->prefix("bb_topics")." (topic_id, topic_title, topic_poster, forum_id, topic_time) VALUES (".$this->topic_id.",'$subject', ".$this->uid.", ".$this->forum_id.", $datetime)"; - if ( !$result = $this->db->query($sql) ) { - return false; - } - if ( $this->topic_id == 0 ) { - $this->topic_id = $this->db->getInsertId(); - } - } - if ( !isset($this->nohtml) || $this->nohtml != 1 ) { - $this->nohtml = 0; - } - if ( !isset($this->nosmiley) || $this->nosmiley != 1 ) { - $this->nosmiley = 0; - } - if ( !isset($this->attachsig) || $this->attachsig != 1 ) { - $this->attachsig = 0; - } - $this->post_id = $this->db->genId($this->db->prefix("bb_posts")."_post_id_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (post_id, pid, topic_id, forum_id, post_time, uid, poster_ip, subject, nohtml, nosmiley, icon, attachsig) VALUES (%u, %u, %u, %u, %u, %u, '%s', '%s', %u, %u, '%s', %u)", $this->db->prefix("bb_posts"), $this->post_id, $this->pid, $this->topic_id, $this->forum_id, $datetime, $this->uid, $this->poster_ip, $subject, $this->nohtml, $this->nosmiley, $this->icon, $this->attachsig); - if ( !$result = $this->db->query($sql) ) { - return false; - } else { - if ( $this->post_id == 0 ) { - $this->post_id = $this->db->getInsertId(); - } - $sql = sprintf("INSERT INTO %s (post_id, post_text) VALUES (%u, '%s')", $this->db->prefix("bb_posts_text"), $this->post_id, $post_text); - if ( !$result = $this->db->query($sql) ) { - $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts"), $this->post_id); - $this->db->query($sql); - return false; - } - } - if ( $this->pid == 0 ) { - $sql = sprintf("UPDATE %s SET topic_last_post_id = %u, topic_time = %u WHERE topic_id = %u", $this->db->prefix("bb_topics"), $this->post_id, $datetime, $this->topic_id); - if ( !$result = $this->db->query($sql) ) { - } - $sql = sprintf("UPDATE %s SET forum_posts = forum_posts+1, forum_topics = forum_topics+1, forum_last_post_id = %u WHERE forum_id = %u", $this->db->prefix("bb_forums"), $this->post_id, $this->forum_id); - $result = $this->db->query($sql); - if ( !$result ) { - } - } else { - $sql = "UPDATE ".$this->db->prefix("bb_topics")." SET topic_replies=topic_replies+1, topic_last_post_id = ".$this->post_id.", topic_time = $datetime WHERE topic_id =".$this->topic_id.""; - if ( !$result = $this->db->query($sql) ) { - } - $sql = "UPDATE ".$this->db->prefix("bb_forums")." SET forum_posts = forum_posts+1, forum_last_post_id = ".$this->post_id." WHERE forum_id = ".$this->forum_id.""; - $result = $this->db->query($sql); - if ( !$result ) { - } - } - }else{ - if ( $this->istopic() ) { - $sql = "UPDATE ".$this->db->prefix("bb_topics")." SET topic_title = '$subject' WHERE topic_id = ".$this->topic_id.""; - if ( !$result = $this->db->query($sql) ) { - return false; - } - } - if ( !isset($this->nohtml) || $this->nohtml != 1 ) { - $this->nohtml = 0; - } - if ( !isset($this->nosmiley) || $this->nosmiley != 1 ) { - $this->nosmiley = 0; - } - if ( !isset($this->attachsig) || $this->attachsig != 1 ) { - $this->attachsig = 0; - } - $sql = "UPDATE ".$this->db->prefix("bb_posts")." SET subject='".$subject."', nohtml=".$this->nohtml.", nosmiley=".$this->nosmiley.", icon='".$this->icon."', attachsig=".$this->attachsig." WHERE post_id=".$this->post_id.""; - $result = $this->db->query($sql); - if ( !$result ) { - return false; - } else { - $sql = "UPDATE ".$this->db->prefix("bb_posts_text")." SET post_text = '".$post_text."' WHERE post_id =".$this->post_id.""; - $result = $this->db->query($sql); - if ( !$result ) { - return false; - } - } - } - return $this->post_id; - } - - function getPost($id) { - $sql = 'SELECT p.*, t.post_text, tp.topic_status FROM '.$this->db->prefix('bb_posts').' p LEFT JOIN '.$this->db->prefix('bb_posts_text').' t ON p.post_id=t.post_id LEFT JOIN '.$this->db->prefix('bb_topics').' tp ON tp.topic_id=p.topic_id WHERE p.post_id='.$id; - $array = $this->db->fetchArray($this->db->query($sql)); - $this->post_id = $array['post_id']; - $this->pid = $array['pid']; - $this->topic_id = $array['topic_id']; - $this->forum_id = $array['forum_id']; - $this->post_time = $array['post_time']; - $this->uid = $array['uid']; - $this->poster_ip = $array['poster_ip']; - $this->subject = $array['subject']; - $this->nohtml = $array['nohtml']; - $this->nosmiley = $array['nosmiley']; - $this->icon = $array['icon']; - $this->attachsig = $array['attachsig']; - $this->post_text = $array['post_text']; - if ($array['pid'] == 0) { - $this->istopic = true; - } - if ($array['topic_status'] == 1) { - $this->islocked = true; - } - } - - function makePost($array){ - foreach($array as $key=>$value){ - $this->$key = $value; - } - } - - function delete() { - $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts"), $this->post_id); - if ( !$result = $this->db->query($sql) ) { - return false; - } - $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts_text"), $this->post_id); - if ( !$result = $this->db->query($sql) ) { - echo "Could not remove posts text for Post ID:".$this->post_id.".
    "; - } - if ( !empty($this->uid) ) { - $sql = sprintf("UPDATE %s SET posts=posts-1 WHERE uid = %u", $this->db->prefix("users"), $this->uid); - if ( !$result = $this->db->query($sql) ) { - // echo "Could not update user posts."; - } - } - if ($this->istopic()) { - $sql = sprintf("DELETE FROM %s WHERE topic_id = %u", $this->db->prefix("bb_topics"), $this->topic_id); - if ( !$result = $this->db->query($sql) ) { - echo "Could not delete topic."; - } - } - $mytree = new XoopsTree($this->db->prefix("bb_posts"), "post_id", "pid"); - $arr = $mytree->getAllChild($this->post_id); - $size = count($arr); - if ( $size > 0 ) { - for ( $i = 0; $i < $size; $i++ ) { - $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts"), $arr[$i]['post_id']); - if ( !$result = $this->db->query($sql) ) { - echo "Could not delete post ".$arr[$i]['post_id'].""; - } - $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts_text"), $arr[$i]['post_id']); - if ( !$result = $this->db->query($sql) ) { - echo "Could not delete post text ".$arr[$i]['post_id'].""; - } - if ( !empty($arr[$i]['uid']) ) { - $sql = "UPDATE ".$this->db->prefix("users")." SET posts=posts-1 WHERE uid=".$arr[$i]['uid'].""; - if ( !$result = $this->db->query($sql) ) { - // echo "Could not update user posts."; - } - } - } - } - } - - function subject($format="Show") { - $myts =& MyTextSanitizer::getInstance(); - $smiley = 1; - if ( $this->nosmiley() ) { - $smiley = 0; - } - switch ( $format ) { - case "Show": - $subject= $myts->makeTboxData4Show($this->subject,$smiley); - break; - case "Edit": - $subject = $myts->makeTboxData4Edit($this->subject); - break; - case "Preview": - $subject = $myts->makeTboxData4Preview($this->subject,$smiley); - break; - case "InForm": - $subject = $myts->makeTboxData4PreviewInForm($this->subject); - break; - } - return $subject; - } - - function text($format="Show"){ - $myts =& MyTextSanitizer::getInstance(); - $smiley = 1; - $html = 1; - $bbcodes = 1; - if ( $this->nohtml() ) { - $html = 0; - } - if ( $this->nosmiley() ) { - $smiley = 0; - } - switch ( $format ) { - case "Show": - $text = $myts->makeTareaData4Show($this->post_text,$html,$smiley,$bbcodes); - break; - case "Edit": - $text = $myts->makeTareaData4Edit($this->post_text); - break; - case "Preview": - $text = $myts->makeTareaData4Preview($this->post_text,$html,$smiley,$bbcodes); - break; - case "InForm": - $text = $myts->makeTareaData4PreviewInForm($this->post_text); - break; - case "Quotes": - $text = $myts->makeTareaData4InsideQuotes($this->post_text); - break; - } - return $text; - } - - function postid() { - return $this->post_id; - } - - function posttime(){ - return $this->post_time; - } - - function uid(){ - return $this->uid; - } - - function uname(){ - return XoopsUser::getUnameFromId($this->uid); - } - - function posterip(){ - return $this->poster_ip; - } - - function parent(){ - return $this->pid; - } - - function topic(){ - return $this->topic_id; - } - - function nohtml(){ - return $this->nohtml; - } - - function nosmiley(){ - return $this->nosmiley; - } - - function icon(){ - return $this->icon; - } - - function forum(){ - return $this->forum_id; - } - - function attachsig(){ - return $this->attachsig; - } - - function prefix(){ - return $this->prefix; - } - - function istopic() { - if ($this->istopic) { - return true; - } - return false; - } - - function islocked() { - if ($this->islocked) { - return true; - } - return false; - } + var $post_id; + var $topic_id; + var $forum_id; + var $post_time; + var $poster_ip; + var $order; + var $subject; + var $post_text; + var $pid; + var $nohtml = 0; + var $nosmiley = 0; + var $uid; + var $icon; + var $attachsig; + var $prefix; + var $db; + var $istopic = false; + var $islocked = false; + + function ForumPosts($id=null) + { + $this->db =& Database::getInstance(); + if ( is_array($id) ) { + $this->makePost($id); + } elseif ( isset($id) ) { + $this->getPost(intval($id)); + } + } + + function setTopicId($value){ + $this->topic_id = $value; + } + + function getTopicId() { + return isset($this->topic_id) ? $this->topic_id : 0; + } + + function setOrder($value){ + $this->order = $value; + } + + // 2004-1-12 GIJOE Added routine to move to the correct + // starting position within a topic thread + function &getAllPosts($topic_id, $order="ASC", $perpage=0, &$start, $post_id=0){ + $db =& Database::getInstance(); + if( $order == "DESC" ) { + $operator_for_position = '>' ; + } else { + $order = "ASC" ; + $operator_for_position = '<' ; + } + if ($perpage <= 0) { + $perpage = 10; + } + if (empty($start)) { + $start = 0; + } + if (!empty($post_id)) { + $result = $db->query("SELECT COUNT(post_id) FROM ".$db->prefix('bb_posts')." WHERE topic_id=$topic_id AND post_id $operator_for_position $post_id"); + list($position) = $db->fetchRow($result); + $start = intval($position / $perpage) * $perpage; + } + $sql = 'SELECT p.*, t.post_text FROM '.$db->prefix('bb_posts').' p, '.$db->prefix('bb_posts_text')." t WHERE p.topic_id=$topic_id AND p.post_id = t.post_id ORDER BY p.post_id $order"; + $result = $db->query($sql,$perpage,$start); + $ret = array(); + while ($myrow = $db->fetchArray($result)) { + $ret[] = new ForumPosts($myrow); + } + return $ret; + } + + function setParent($value){ + $this->pid=$value; + } + + function setSubject($value){ + $this->subject=$value; + } + + function setText($value){ + $this->post_text=$value; + } + + function setUid($value){ + $this->uid=$value; + } + + function setForum($value){ + $this->forum_id=$value; + } + + function setIp($value){ + $this->poster_ip=$value; + } + + function setNohtml($value=0){ + $this->nohtml=$value; + } + + function setNosmiley($value=0){ + $this->nosmiley=$value; + } + + function setIcon($value){ + $this->icon=$value; + } + + function setAttachsig($value){ + $this->attachsig=$value; + } + + function store() { + $myts =& MyTextSanitizer::getInstance(); + $subject =$myts->censorString($this->subject); + $post_text =$myts->censorString($this->post_text); + $subject = $myts->makeTboxData4Save($subject); + $post_text = $myts->makeTareaData4Save($post_text); + if ( empty($this->post_id) ) { + if ( empty($this->topic_id) ) { + $this->topic_id = $this->db->genId($this->db->prefix("bb_topics")."_topic_id_seq"); + $datetime = time(); + $sql = "INSERT INTO ".$this->db->prefix("bb_topics")." (topic_id, topic_title, topic_poster, forum_id, topic_time) VALUES (".$this->topic_id.",'$subject', ".$this->uid.", ".$this->forum_id.", $datetime)"; + if ( !$result = $this->db->query($sql) ) { + return false; + } + if ( $this->topic_id == 0 ) { + $this->topic_id = $this->db->getInsertId(); + } + } + if ( !isset($this->nohtml) || $this->nohtml != 1 ) { + $this->nohtml = 0; + } + if ( !isset($this->nosmiley) || $this->nosmiley != 1 ) { + $this->nosmiley = 0; + } + if ( !isset($this->attachsig) || $this->attachsig != 1 ) { + $this->attachsig = 0; + } + $this->post_id = $this->db->genId($this->db->prefix("bb_posts")."_post_id_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (post_id, pid, topic_id, forum_id, post_time, uid, poster_ip, subject, nohtml, nosmiley, icon, attachsig) VALUES (%u, %u, %u, %u, %u, %u, '%s', '%s', %u, %u, '%s', %u)", $this->db->prefix("bb_posts"), $this->post_id, $this->pid, $this->topic_id, $this->forum_id, $datetime, $this->uid, $this->poster_ip, $subject, $this->nohtml, $this->nosmiley, $this->icon, $this->attachsig); + if ( !$result = $this->db->query($sql) ) { + return false; + } else { + if ( $this->post_id == 0 ) { + $this->post_id = $this->db->getInsertId(); + } + $sql = sprintf("INSERT INTO %s (post_id, post_text) VALUES (%u, '%s')", $this->db->prefix("bb_posts_text"), $this->post_id, $post_text); + if ( !$result = $this->db->query($sql) ) { + $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts"), $this->post_id); + $this->db->query($sql); + return false; + } + } + if ( $this->pid == 0 ) { + $sql = sprintf("UPDATE %s SET topic_last_post_id = %u, topic_time = %u WHERE topic_id = %u", $this->db->prefix("bb_topics"), $this->post_id, $datetime, $this->topic_id); + if ( !$result = $this->db->query($sql) ) { + } + $sql = sprintf("UPDATE %s SET forum_posts = forum_posts+1, forum_topics = forum_topics+1, forum_last_post_id = %u WHERE forum_id = %u", $this->db->prefix("bb_forums"), $this->post_id, $this->forum_id); + $result = $this->db->query($sql); + if ( !$result ) { + } + } else { + $sql = "UPDATE ".$this->db->prefix("bb_topics")." SET topic_replies=topic_replies+1, topic_last_post_id = ".$this->post_id.", topic_time = $datetime WHERE topic_id =".$this->topic_id.""; + if ( !$result = $this->db->query($sql) ) { + } + $sql = "UPDATE ".$this->db->prefix("bb_forums")." SET forum_posts = forum_posts+1, forum_last_post_id = ".$this->post_id." WHERE forum_id = ".$this->forum_id.""; + $result = $this->db->query($sql); + if ( !$result ) { + } + } + }else{ + if ( $this->istopic() ) { + $sql = "UPDATE ".$this->db->prefix("bb_topics")." SET topic_title = '$subject' WHERE topic_id = ".$this->topic_id.""; + if ( !$result = $this->db->query($sql) ) { + return false; + } + } + if ( !isset($this->nohtml) || $this->nohtml != 1 ) { + $this->nohtml = 0; + } + if ( !isset($this->nosmiley) || $this->nosmiley != 1 ) { + $this->nosmiley = 0; + } + if ( !isset($this->attachsig) || $this->attachsig != 1 ) { + $this->attachsig = 0; + } + $sql = "UPDATE ".$this->db->prefix("bb_posts")." SET subject='".$subject."', nohtml=".$this->nohtml.", nosmiley=".$this->nosmiley.", icon='".$this->icon."', attachsig=".$this->attachsig." WHERE post_id=".$this->post_id.""; + $result = $this->db->query($sql); + if ( !$result ) { + return false; + } else { + $sql = "UPDATE ".$this->db->prefix("bb_posts_text")." SET post_text = '".$post_text."' WHERE post_id =".$this->post_id.""; + $result = $this->db->query($sql); + if ( !$result ) { + return false; + } + } + } + return $this->post_id; + } + + function getPost($id) { + $sql = 'SELECT p.*, t.post_text, tp.topic_status FROM '.$this->db->prefix('bb_posts').' p LEFT JOIN '.$this->db->prefix('bb_posts_text').' t ON p.post_id=t.post_id LEFT JOIN '.$this->db->prefix('bb_topics').' tp ON tp.topic_id=p.topic_id WHERE p.post_id='.$id; + $array = $this->db->fetchArray($this->db->query($sql)); + $this->post_id = $array['post_id']; + $this->pid = $array['pid']; + $this->topic_id = $array['topic_id']; + $this->forum_id = $array['forum_id']; + $this->post_time = $array['post_time']; + $this->uid = $array['uid']; + $this->poster_ip = $array['poster_ip']; + $this->subject = $array['subject']; + $this->nohtml = $array['nohtml']; + $this->nosmiley = $array['nosmiley']; + $this->icon = $array['icon']; + $this->attachsig = $array['attachsig']; + $this->post_text = $array['post_text']; + if ($array['pid'] == 0) { + $this->istopic = true; + } + if ($array['topic_status'] == 1) { + $this->islocked = true; + } + } + + function makePost($array){ + foreach($array as $key=>$value){ + $this->$key = $value; + } + } + + function delete() { + $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts"), $this->post_id); + if ( !$result = $this->db->query($sql) ) { + return false; + } + $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts_text"), $this->post_id); + if ( !$result = $this->db->query($sql) ) { + echo "Could not remove posts text for Post ID:".$this->post_id.".
    "; + } + if ( !empty($this->uid) ) { + $sql = sprintf("UPDATE %s SET posts=posts-1 WHERE uid = %u", $this->db->prefix("users"), $this->uid); + if ( !$result = $this->db->query($sql) ) { + // echo "Could not update user posts."; + } + } + if ($this->istopic()) { + $sql = sprintf("DELETE FROM %s WHERE topic_id = %u", $this->db->prefix("bb_topics"), $this->topic_id); + if ( !$result = $this->db->query($sql) ) { + echo "Could not delete topic."; + } + } + $mytree = new XoopsTree($this->db->prefix("bb_posts"), "post_id", "pid"); + $arr = $mytree->getAllChild($this->post_id); + $size = count($arr); + if ( $size > 0 ) { + for ( $i = 0; $i < $size; $i++ ) { + $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts"), $arr[$i]['post_id']); + if ( !$result = $this->db->query($sql) ) { + echo "Could not delete post ".$arr[$i]['post_id'].""; + } + $sql = sprintf("DELETE FROM %s WHERE post_id = %u", $this->db->prefix("bb_posts_text"), $arr[$i]['post_id']); + if ( !$result = $this->db->query($sql) ) { + echo "Could not delete post text ".$arr[$i]['post_id'].""; + } + if ( !empty($arr[$i]['uid']) ) { + $sql = "UPDATE ".$this->db->prefix("users")." SET posts=posts-1 WHERE uid=".$arr[$i]['uid'].""; + if ( !$result = $this->db->query($sql) ) { + // echo "Could not update user posts."; + } + } + } + } + } + + function subject($format="Show") { + $myts =& MyTextSanitizer::getInstance(); + $smiley = 1; + if ( $this->nosmiley() ) { + $smiley = 0; + } + switch ( $format ) { + case "Show": + $subject= $myts->makeTboxData4Show($this->subject,$smiley); + break; + case "Edit": + $subject = $myts->makeTboxData4Edit($this->subject); + break; + case "Preview": + $subject = $myts->makeTboxData4Preview($this->subject,$smiley); + break; + case "InForm": + $subject = $myts->makeTboxData4PreviewInForm($this->subject); + break; + } + return $subject; + } + + function text($format="Show"){ + $myts =& MyTextSanitizer::getInstance(); + $smiley = 1; + $html = 1; + $bbcodes = 1; + if ( $this->nohtml() ) { + $html = 0; + } + if ( $this->nosmiley() ) { + $smiley = 0; + } + switch ( $format ) { + case "Show": + $text = $myts->makeTareaData4Show($this->post_text,$html,$smiley,$bbcodes); + break; + case "Edit": + $text = $myts->makeTareaData4Edit($this->post_text); + break; + case "Preview": + $text = $myts->makeTareaData4Preview($this->post_text,$html,$smiley,$bbcodes); + break; + case "InForm": + $text = $myts->makeTareaData4PreviewInForm($this->post_text); + break; + case "Quotes": + $text = $myts->makeTareaData4InsideQuotes($this->post_text); + break; + } + return $text; + } + + function postid() { + return $this->post_id; + } + + function posttime(){ + return $this->post_time; + } + + function uid(){ + return $this->uid; + } + + function uname(){ + return XoopsUser::getUnameFromId($this->uid); + } + + function posterip(){ + return $this->poster_ip; + } + + function parent(){ + return $this->pid; + } + + function topic(){ + return $this->topic_id; + } + + function nohtml(){ + return $this->nohtml; + } + + function nosmiley(){ + return $this->nosmiley; + } + + function icon(){ + return $this->icon; + } + + function forum(){ + return $this->forum_id; + } + + function attachsig(){ + return $this->attachsig; + } + + function prefix(){ + return $this->prefix; + } + + function istopic() { + if ($this->istopic) { + return true; + } + return false; + } + + function islocked() { + if ($this->islocked) { + return true; + } + return false; + } } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:47 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:47 +0900 Subject: [xoops-cvslog 115] CVS update: xoops2jp/html/modules/newbb/language/english Message-ID: <20050611023247.045DB2AC030@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/language/english/admin.php diff -u xoops2jp/html/modules/newbb/language/english/admin.php:1.2 xoops2jp/html/modules/newbb/language/english/admin.php:1.3 --- xoops2jp/html/modules/newbb/language/english/admin.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/language/english/admin.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ Did you assign at least one moderator? Please go back and correct the form."); +define("_MD_A_YDNFOATPOTFDYAA","You did not fill out all the parts of the form.
    Did you assign at least one moderator? Please go back and correct the form."); define("_MD_A_FORUMCREATED","Forum Created."); define("_MD_A_VTFYJC","View the forum you just created."); define("_MD_A_EYMAACBYAF","Error, you must add a category before you add forums"); Index: xoops2jp/html/modules/newbb/language/english/main.php diff -u xoops2jp/html/modules/newbb/language/english/main.php:1.2 xoops2jp/html/modules/newbb/language/english/main.php:1.3 --- xoops2jp/html/modules/newbb/language/english/main.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/language/english/main.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ Please register."); +define("_MD_ANONNOTALLOWED","Anonymous user not allowed to post.
    Please register."); define("_MD_THANKSSUBMIT","Thanks for your submission!"); define("_MD_REPLYPOSTED","A reply to your topic has been posted."); define("_MD_HELLO","Hello %s,"); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:47 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:47 +0900 Subject: [xoops-cvslog 116] CVS update: xoops2jp/html/modules/newbb/language/japanese Message-ID: <20050611023247.50ACE2AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/language/japanese/admin.php diff -u xoops2jp/html/modules/newbb/language/japanese/admin.php:1.1 xoops2jp/html/modules/newbb/language/japanese/admin.php:1.2 --- xoops2jp/html/modules/newbb/language/japanese/admin.php:1.1 Thu Sep 9 14:15:18 2004 +++ xoops2jp/html/modules/newbb/language/japanese/admin.php Sat Jun 11 11:32:47 2005 @@ -52,7 +52,7 @@ define("_MD_A_NTWNRTFUTCYMDTVTEFS","Ãí°Õ: ¥«¥Æ¥´¥ê²¼¤Î¥Õ¥©¡¼¥é¥à¤Ïºï½ü¤µ¤ì¤Þ¤»¤ó¡£¥Õ¥©¡¼¥é¥à¤Îºï½ü¤Ï¸ÄÊ̤˹ԤäƲ¼¤µ¤¤¡£"); define("_MD_A_REMOVECATEGORY","¥«¥Æ¥´¥ê¤òºï½ü"); define("_MD_A_CREATENEWCATEGORY","¿·µ¬¥«¥Æ¥´¥ê¤ÎºîÀ®"); -define("_MD_A_YDNFOATPOTFDYAA","ÆþÎÏ¥Õ¥©¡¼¥à¤ËÁ´¤Æ¤Î¥Ç¡¼¥¿¤òµ­Æþ¤·¤Æ²¼¤µ¤¤¡£
    ºÇÄã1¿Í¤Î¥â¥Ç¥ì¡¼¥¿¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ "); +define("_MD_A_YDNFOATPOTFDYAA","ÆþÎÏ¥Õ¥©¡¼¥à¤ËÁ´¤Æ¤Î¥Ç¡¼¥¿¤òµ­Æþ¤·¤Æ²¼¤µ¤¤¡£
    ºÇÄã1¿Í¤Î¥â¥Ç¥ì¡¼¥¿¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ "); define("_MD_A_FORUMCREATED","¥Õ¥©¡¼¥é¥à¤òºîÀ®¤·¤Þ¤·¤¿¡£"); define("_MD_A_VTFYJC","ºîÀ®¤·¤¿¥Õ¥©¡¼¥é¥à¤ò¸«¤ë"); define("_MD_A_EYMAACBYAF","¥¨¥é¡¼: ¥Õ¥©¡¼¥é¥à¤òÄɲ乤ëÁ°¤Ë¥«¥Æ¥´¥ê¡¼¤òÄɲ乤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£"); Index: xoops2jp/html/modules/newbb/language/japanese/main.php diff -u xoops2jp/html/modules/newbb/language/japanese/main.php:1.1 xoops2jp/html/modules/newbb/language/japanese/main.php:1.2 --- xoops2jp/html/modules/newbb/language/japanese/main.php:1.1 Thu Sep 9 14:15:18 2004 +++ xoops2jp/html/modules/newbb/language/japanese/main.php Sat Jun 11 11:32:47 2005 @@ -113,7 +113,7 @@ //post.php define("_MD_EDITNOTALLOWED","Åê¹Æʸ¤òÊÔ½¸¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£"); define("_MD_EDITEDBY","ÊÔ½¸¥í¥°¡§"); -define("_MD_ANONNOTALLOWED","¥²¥¹¥ÈˬÌä¼Ô¤ÎÊý¤Ë¤è¤ëÅê¹Æ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
    Åê¹Æ¤ò¤´´õ˾¤ÎÊý¤Ï¥á¥ó¥Ð¡¼ÅÐÏ¿¤ò¤·¤Æ²¼¤µ¤¤¡£"); +define("_MD_ANONNOTALLOWED","¥²¥¹¥ÈˬÌä¼Ô¤ÎÊý¤Ë¤è¤ëÅê¹Æ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
    Åê¹Æ¤ò¤´´õ˾¤ÎÊý¤Ï¥á¥ó¥Ð¡¼ÅÐÏ¿¤ò¤·¤Æ²¼¤µ¤¤¡£"); define("_MD_THANKSSUBMIT","Åê¹Æ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£"); define("_MD_REPLYPOSTED","ÊÖ¿®¤¬Åê¹Æ¤µ¤ì¤Þ¤·¤¿¡£"); define("_MD_HELLO","¤³¤ó¤Ë¤Á¤Ï %s ¤µ¤ó¡¢"); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:47 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:47 +0900 Subject: [xoops-cvslog 117] CVS update: xoops2jp/html/modules/newbb/templates Message-ID: <20050611023247.95E122AC032@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/templates/newbb_search.html diff -u xoops2jp/html/modules/newbb/templates/newbb_search.html:1.1 xoops2jp/html/modules/newbb/templates/newbb_search.html:1.2 --- xoops2jp/html/modules/newbb/templates/newbb_search.html:1.1 Thu Sep 9 14:15:18 2004 +++ xoops2jp/html/modules/newbb/templates/newbb_search.html Sat Jun 11 11:32:47 2005 @@ -41,6 +41,7 @@
     
    <{$lang_author}> <{$lang_replies}> <{$lang_views}><{$lang_possttime}><{$lang_possttime}>
      <{$lang_searchall}>
    <{$lang_author}> 
     
    Index: xoops2jp/html/modules/newbb/templates/newbb_viewforum.html diff -u xoops2jp/html/modules/newbb/templates/newbb_viewforum.html:1.1 xoops2jp/html/modules/newbb/templates/newbb_viewforum.html:1.2 --- xoops2jp/html/modules/newbb/templates/newbb_viewforum.html:1.1 Thu Sep 9 14:15:18 2004 +++ xoops2jp/html/modules/newbb/templates/newbb_viewforum.html Sat Jun 11 11:32:47 2005 @@ -46,6 +46,7 @@ + From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:46 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:46 +0900 Subject: [xoops-cvslog 118] CVS update: xoops2jp/html/modules/newbb Message-ID: <20050611023246.649362AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/delete.php diff -u xoops2jp/html/modules/newbb/delete.php:1.2 xoops2jp/html/modules/newbb/delete.php:1.3 --- xoops2jp/html/modules/newbb/delete.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/delete.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - if ( !is_moderator($forum, $xoopsUser->uid()) ) { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); - exit(); - } - } + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ( !is_moderator($forum, $xoopsUser->uid()) ) { + redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); + exit(); + } + } } else { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); - exit(); + redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); + exit(); } include_once 'class/class.forumposts.php'; -if ( !empty($ok) ) { - if ( !empty($post_id) ) { - $post = new ForumPosts($post_id); - $post->delete(); - sync($post->forum(), "forum"); - sync($post->topic(), "topic"); - } - if ( $post->istopic() ) { - redirect_header("viewforum.php?forum=$forum", 2, _MD_POSTSDELETED); - exit(); - } else { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTSDELETED); - exit(); - } +if ( !empty($_POST['ok']) ) { + if ( !empty($post_id) ) { + $post = new ForumPosts($post_id); + $post->delete(); + sync($post->forum(), "forum"); + sync($post->topic(), "topic"); + } + if ( $post->istopic() ) { + redirect_header("viewforum.php?forum=$forum", 2, _MD_POSTSDELETED); + exit(); + } else { + redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTSDELETED); + exit(); + } } else { - include XOOPS_ROOT_PATH."/header.php"; - xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_AREUSUREDEL); + include XOOPS_ROOT_PATH."/header.php"; + xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_AREUSUREDEL); } include XOOPS_ROOT_PATH.'/footer.php'; ?> \ No newline at end of file Index: xoops2jp/html/modules/newbb/index.php diff -u xoops2jp/html/modules/newbb/index.php:1.2 xoops2jp/html/modules/newbb/index.php:1.3 --- xoops2jp/html/modules/newbb/index.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/index.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ prefix('bb_categories').' c, '.$xoopsDB->prefix("bb_forums").' f WHERE f.cat_id=c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order'; if ( !$result = $xoopsDB->query($sql) ) { - redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); - exit(); + redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); + exit(); } -$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,$xoopsConfig['sitename']), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); +$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); $viewcat = (!empty($HTTP_GET_VARS['cat'])) ? intval($HTTP_GET_VARS['cat']) : 0; $categories = array(); while ( $cat_row = $xoopsDB->fetchArray($result) ) { - $categories[] = $cat_row; + $categories[] = $cat_row; } $sql = 'SELECT f.*, u.uname, u.uid, p.topic_id, p.post_time, p.subject, p.icon FROM '.$xoopsDB->prefix('bb_forums').' f LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = f.forum_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = p.uid'; if ( $viewcat != 0 ) { - $sql .= ' WHERE f.cat_id = '.$viewcat; - $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename'])); + $sql .= ' WHERE f.cat_id = '.$viewcat; + $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); } else { - $xoopsTpl->assign('forum_index_title', ''); + $xoopsTpl->assign('forum_index_title', ''); } $sql .= ' ORDER BY f.cat_id, f.forum_id'; if ( !$result = $xoopsDB->query($sql) ) { - exit("Error"); + exit("Error"); } $forums = array(); // RMV-FIX while ( $forum_data = $xoopsDB->fetchArray($result) ) { - $forums[] = $forum_data; + $forums[] = $forum_data; } $cat_count = count($categories); if ($cat_count > 0) { - for ( $i = 0; $i < $cat_count; $i++ ) { - $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); - if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { - $xoopsTpl->append("categories", $categories[$i]); - continue; - } - $topic_lastread = newbb_get_topics_viewed(); - foreach ( $forums as $forum_row ) { - unset($last_post); - if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { - if ($forum_row['post_time']) { - //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); - $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); - $last_post_icon = ''; - if ( $forum_row['icon'] ) { - $last_post_icon .= ''; - } else { - $last_post_icon .= ''; - } - $last_post_icon .= ''; - $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; - if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ - $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; - } else { - $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; - } - $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } else { - // no forums, so put empty values - $categories[$i]['forums']['forum_lastpost_time'][] = ""; - $categories[$i]['forums']['forum_lastpost_icon'][] = ""; - $categories[$i]['forums']['forum_lastpost_user'][] = ""; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } - $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; - $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); - $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); - $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; - $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; - $all_moderators = get_moderators($forum_row['forum_id']); - $count = 0; - $forum_moderators = ''; - foreach ( $all_moderators as $mods) { - foreach ( $mods as $mod_id => $mod_name) { - if ( $count > 0 ) { - $forum_moderators .= ', '; - } - $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; - $count = 1; - } - } - $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; - } - } - $xoopsTpl->append("categories", $categories[$i]); - } + for ( $i = 0; $i < $cat_count; $i++ ) { + $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); + if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { + $xoopsTpl->append("categories", $categories[$i]); + continue; + } + $topic_lastread = newbb_get_topics_viewed(); + foreach ( $forums as $forum_row ) { + unset($last_post); + if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { + if ($forum_row['post_time']) { + //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); + $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); + $last_post_icon = ''; + if ( $forum_row['icon'] ) { + $last_post_icon .= ''; + } else { + $last_post_icon .= ''; + } + $last_post_icon .= ''; + $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; + if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ + $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; + } else { + $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; + } + $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } else { + // no forums, so put empty values + $categories[$i]['forums']['forum_lastpost_time'][] = ""; + $categories[$i]['forums']['forum_lastpost_icon'][] = ""; + $categories[$i]['forums']['forum_lastpost_user'][] = ""; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } + $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; + $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); + $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); + $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; + $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; + $all_moderators = get_moderators($forum_row['forum_id']); + $count = 0; + $forum_moderators = ''; + foreach ( $all_moderators as $mods) { + foreach ( $mods as $mod_id => $mod_name) { + if ( $count > 0 ) { + $forum_moderators .= ', '; + } + $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; + $count = 1; + } + } + $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; + } + } + $xoopsTpl->append("categories", $categories[$i]); + } } else { - $xoopsTpl->append("categories", array()); + $xoopsTpl->append("categories", array()); } $xoopsTpl->assign(array("img_hotfolder" => $bbImage['newposts_forum'], "img_folder" => $bbImage['folder_forum'], "img_locked" => $bbImage['locked_forum'], "lang_newposts" => _MD_NEWPOSTS, "lang_private" => _MD_PRIVATEFORUM, "lang_nonewposts" => _MD_NONEWPOSTS, "lang_search" => _MD_SEARCH, "lang_advsearch" => _MD_ADVSEARCH)); include_once XOOPS_ROOT_PATH.'/footer.php'; Index: xoops2jp/html/modules/newbb/post.php diff -u xoops2jp/html/modules/newbb/post.php:1.2 xoops2jp/html/modules/newbb/post.php:1.3 --- xoops2jp/html/modules/newbb/post.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/post.php Sat Jun 11 11:32:46 2005 @@ -1,5 +1,5 @@ prefix("bb_forums")." WHERE forum_id = ".$forum; - if ( !$result = $xoopsDB->query($sql) ) { - redirect_header('index.php',2,_MD_ERROROCCURED); - exit(); - } - $forumdata = $xoopsDB->fetchArray($result); - - if ( $forumdata['forum_type'] == 1 ) { - // To get here, we have a logged-in user. So, check whether that user is allowed to view - // this private forum. - $accesserror = 0; - if ( $xoopsUser ) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - if ( !check_priv_forum_auth($xoopsUser->uid(), $HTTP_POST_VARS['forum'], true) ) { - $accesserror = 1; - } - } - } else { - $accesserror = 1; - } - - if ( $accesserror == 1 ) { - redirect_header("viewforum.php?order=".$order."&viewmode=".$viewmode."&forum=".$forum,2,_MD_NORIGHTTOPOST); - exit(); - } - } else { - $accesserror = 0; - if ( $forumdata['forum_access'] == 3 ) { - if ( $xoopsUser ) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - if ( !is_moderator($forum, $xoopsUser->uid()) ) { - $accesserror = 1; - } - } - } else { - $accesserror = 1; - } - } elseif ( $forumdata['forum_access'] == 1 && !$xoopsUser ) { - $accesserror = 1; - } - if ( $accesserror == 1 ) { - redirect_header("viewforum.php?order=".$order."&viewmode=".$viewmode."&forum=".$forum,2,_MD_NORIGHTTOPOST); - exit(); - } + if (!XoopsMultiTokenHandler::quickValidate('newbb_post')) { + redirect_header('index.php', 2, _MD_ERROROCCURED); + exit(); } - if ( !empty($HTTP_POST_VARS['contents_preview']) ) { - include XOOPS_ROOT_PATH."/header.php"; - echo"
    "; - $myts =& MyTextSanitizer::getInstance(); - $p_subject = $myts->makeTboxData4Preview($HTTP_POST_VARS['subject']); - $nosmiley = !empty($HTTP_POST_VARS['nosmiley']) ? 1 : 0; - // 2004/12/15 contribution by minahito - // prevent hacking of nohtml value - $nohtml = !empty($HTTP_POST_VARS['nohtml']) ? $forumdata['allow_html'] : 0; - if ( $nosmiley && $nohtml ) { - $p_message = $myts->makeTareaData4Preview($HTTP_POST_VARS['message'],0,0,1); - } elseif ( $nohtml ) { - $p_message = $myts->makeTareaData4Preview($HTTP_POST_VARS['message'],0,1,1); - } elseif ( $nosmiley ) { - $p_message = $myts->makeTareaData4Preview($HTTP_POST_VARS['message'],1,0,1); - } else { - $p_message = $myts->makeTareaData4Preview($HTTP_POST_VARS['message'],1,1,1); - } - themecenterposts($p_subject,$p_message); - echo "
    "; - $subject = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['subject']); - $message = $myts->makeTareaData4PreviewInForm($HTTP_POST_VARS['message']); - $hidden = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['hidden']); + $sql = "SELECT forum_type, forum_name, forum_access, allow_html, allow_sig, posts_per_page, hot_threshold, topics_per_page FROM ".$xoopsDB->prefix("bb_forums")." WHERE forum_id = ".$forum; + if ( !$result = $xoopsDB->query($sql) ) { + redirect_header('index.php',2,_MD_ERROROCCURED); + exit(); + } + $forumdata = $xoopsDB->fetchArray($result); + if (empty($forumdata['allow_html'])) { + $HTTP_POST_VARS['nohtml'] = 1; + } + if ( $forumdata['forum_type'] == 1 ) { + // To get here, we have a logged-in user. So, check whether that user is allowed to view + // this private forum. + $accesserror = 0; + if ( $xoopsUser ) { + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ( !check_priv_forum_auth($xoopsUser->uid(), $HTTP_POST_VARS['forum'], true) ) { + $accesserror = 1; + } + } + } else { + $accesserror = 1; + } + + if ( $accesserror == 1 ) { + redirect_header("viewforum.php?order=".$order."&viewmode=".$viewmode."&forum=".$forum,2,_MD_NORIGHTTOPOST); + exit(); + } + } else { + $accesserror = 0; + if ( $forumdata['forum_access'] == 3 ) { + if ( $xoopsUser ) { + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ( !is_moderator($forum, $xoopsUser->uid()) ) { + $accesserror = 1; + } + } + } else { + $accesserror = 1; + } + } elseif ( $forumdata['forum_access'] == 1 && !$xoopsUser ) { + $accesserror = 1; + } + if ( $accesserror == 1 ) { + redirect_header("viewforum.php?order=".$order."&viewmode=".$viewmode."&forum=".$forum,2,_MD_NORIGHTTOPOST); + exit(); + } + } + if ( !empty($HTTP_POST_VARS['contents_preview']) ) { + include XOOPS_ROOT_PATH."/header.php"; + echo"
    "; + $myts =& MyTextSanitizer::getInstance(); + $p_subject = $myts->makeTboxData4Preview($HTTP_POST_VARS['subject']); + $dosmiley = empty($HTTP_POST_VARS['nosmiley']) ? 1 : 0; + $dohtml = empty($HTTP_POST_VARS['nohtml']) ? 1 : 0; + $p_message = $myts->makeTareaData4Preview($HTTP_POST_VARS['message'], $dohtml, $dosmiley, 1); + + themecenterposts($p_subject,$p_message); + echo "
    "; + $subject = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['subject']); + $message = $myts->makeTareaData4PreviewInForm($HTTP_POST_VARS['message']); + $hidden = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['hidden']); $notify = !empty($HTTP_POST_VARS['notify']) ? 1 : 0; - $attachsig = !empty($HTTP_POST_VARS['attachsig']) ? 1 : 0; - include 'include/forumform.inc.php'; - echo"
    "; - } else { - include_once 'class/class.forumposts.php'; - if ( !empty($post_id) ) { - $editerror = 0; - $forumpost = new ForumPosts($post_id); - if ( $xoopsUser ) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - if ($forumpost->islocked() || ($forumpost->uid() != $xoopsUser->getVar("uid") && !is_moderator($forum, $xoopsUser->getVar("uid")))) { - $editerror = 1; - } - } - } else { - $editerror = 1; - } - if ( $editerror == 1 ) { - redirect_header("viewtopic.php?topic_id=".$topic_id."&post_id=".$post_id."&order=".$order."&viewmode=".$viewmode."&pid=".$pid."&forum=".$forum,2,_MD_EDITNOTALLOWED); - exit(); - } - $editor = $xoopsUser->getVar("uname"); - $on_date .= _MD_ON." ".formatTimestamp(time()); - //$message .= "\n\n[ "._MD_EDITEDBY." ".$editor." ".$on_date." ]"; - } else { - $isreply = 0; - $isnew = 1; - if ( $xoopsUser && empty($HTTP_POST_VARS['noname']) ) { - $uid = $xoopsUser->getVar("uid"); - } else { - if ( $forumdata['forum_access'] == 2 ) { - $uid = 0; - } else { - if ( !empty($topic_id) ) { - redirect_header("viewtopic.php?topic_id=".$topic_id."&order=".$order."&viewmode=".$viewmode."&pid=".$pid."&forum=".$forum,2,_MD_ANONNOTALLOWED); - } else { - redirect_header("viewforum.php?forum=".$forum,2,_MD_ANONNOTALLOWED); - } - exit(); - } - } - $forumpost = new ForumPosts(); - $forumpost->setForum($forum); - if (isset($pid) && $pid != "") { - $forumpost->setParent($pid); - } - if (!empty($topic_id)) { - $forumpost->setTopicId($topic_id); - $isreply = 1; - } - $forumpost->setIp($HTTP_SERVER_VARS['REMOTE_ADDR']); - $forumpost->setUid($uid); - } - $subject = xoops_trim($HTTP_POST_VARS['subject']); - $subject = ($subject == '') ? _NOTITLE : $subject; - $forumpost->setSubject($subject); - $forumpost->setText($HTTP_POST_VARS['message']); - // 2004/12/15 contribution by minahito - // prevent hacking of nohtml value - if (!empty($HTTP_POST_VARS['nohtml']) && $forumdata['allow_html']) { - $forumpost->setNohtml(0); - } else { - $forumpost->setNohtml(1); - } - $forumpost->setNosmiley($HTTP_POST_VARS['nosmiley']); - $forumpost->setIcon($HTTP_POST_VARS['icon']); - $forumpost->setAttachsig($HTTP_POST_VARS['attachsig']); - if (!$postid = $forumpost->store()) { - include_once(XOOPS_ROOT_PATH.'/header.php'); - xoops_error('Could not insert forum post'); - include_once(XOOPS_ROOT_PATH.'/footer.php'); - exit(); - } - if (is_object($xoopsUser) && !empty($isnew)) { - $xoopsUser->incrementPost(); - } - // RMV-NOTIFY - // Define tags for notification message - $tags = array(); - $tags['THREAD_NAME'] = $HTTP_POST_VARS['subject']; - $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id='.$postid.'&topic_id=' . $forumpost->topic(); - $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postid; - include_once 'include/notification.inc.php'; - $forum_info = newbb_notify_iteminfo ('forum', $forum); - $tags['FORUM_NAME'] = $forum_info['name']; - $tags['FORUM_URL'] = $forum_info['url']; - $notification_handler =& xoops_gethandler('notification'); - if (!empty($isnew)) { - if (empty($isreply)) { - // Notify of new thread - $notification_handler->triggerEvent('forum', $forum, 'new_thread', $tags); - } else { - // Notify of new post - $notification_handler->triggerEvent('thread', $topic_id, 'new_post', $tags); - } - $notification_handler->triggerEvent('global', 0, 'new_post', $tags); - $notification_handler->triggerEvent('forum', $forum, 'new_post', $tags); - $myts =& MyTextSanitizer::getInstance(); - $tags['POST_CONTENT'] = $myts->stripSlashesGPC($HTTP_POST_VARS['message']); - $tags['POST_NAME'] = $myts->stripSlashesGPC($HTTP_POST_VARS['subject']); - $notification_handler->triggerEvent('global', 0, 'new_fullpost', $tags); - } - - // If user checked notification box, subscribe them to the - // appropriate event; if unchecked, then unsubscribe - - if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) { - if (!empty($HTTP_POST_VARS['notify'])) { - $notification_handler->subscribe('thread', $forumpost->getTopicId(), 'new_post'); - } else { - $notification_handler->unsubscribe('thread', $forumpost->getTopicId(), 'new_post'); - } - } - - if ( $HTTP_POST_VARS['viewmode'] == "flat" ) { - redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=flat&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT); - exit(); - } else { - $post_id = $forumpost->postid(); - redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=thread&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT); - exit(); - } - } - include XOOPS_ROOT_PATH.'/footer.php'; + $attachsig = !empty($HTTP_POST_VARS['attachsig']) ? 1 : 0; + include 'include/forumform.inc.php'; + echo"
    "; + } else { + include_once 'class/class.forumposts.php'; + if ( !empty($post_id) ) { + $editerror = 0; + $forumpost = new ForumPosts($post_id); + if ( $xoopsUser ) { + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ($forumpost->islocked() || ($forumpost->uid() != $xoopsUser->getVar("uid") && !is_moderator($forum, $xoopsUser->getVar("uid")))) { + $editerror = 1; + } + } + } else { + $editerror = 1; + } + if ( $editerror == 1 ) { + redirect_header("viewtopic.php?topic_id=".$topic_id."&post_id=".$post_id."&order=".$order."&viewmode=".$viewmode."&pid=".$pid."&forum=".$forum,2,_MD_EDITNOTALLOWED); + exit(); + } + $editor = $xoopsUser->getVar("uname"); + $on_date .= _MD_ON." ".formatTimestamp(time()); + //$message .= "\n\n[ "._MD_EDITEDBY." ".$editor." ".$on_date." ]"; + } else { + $isreply = 0; + $isnew = 1; + if ( $xoopsUser && empty($HTTP_POST_VARS['noname']) ) { + $uid = $xoopsUser->getVar("uid"); + } else { + if ( $forumdata['forum_access'] == 2 ) { + $uid = 0; + } else { + if ( !empty($topic_id) ) { + redirect_header("viewtopic.php?topic_id=".$topic_id."&order=".$order."&viewmode=".$viewmode."&pid=".$pid."&forum=".$forum,2,_MD_ANONNOTALLOWED); + } else { + redirect_header("viewforum.php?forum=".$forum,2,_MD_ANONNOTALLOWED); + } + exit(); + } + } + $forumpost = new ForumPosts(); + $forumpost->setForum($forum); + if (isset($pid) && $pid != "") { + $forumpost->setParent($pid); + } + if (!empty($topic_id)) { + $forumpost->setTopicId($topic_id); + $isreply = 1; + } + $forumpost->setIp($HTTP_SERVER_VARS['REMOTE_ADDR']); + $forumpost->setUid($uid); + } + $subject = xoops_trim($HTTP_POST_VARS['subject']); + $subject = ($subject == '') ? _NOTITLE : $subject; + $forumpost->setSubject($subject); + $forumpost->setText($HTTP_POST_VARS['message']); + $forumpost->setNohtml($HTTP_POST_VARS['nohtml']); + $forumpost->setNosmiley($HTTP_POST_VARS['nosmiley']); + $forumpost->setIcon($HTTP_POST_VARS['icon']); + $forumpost->setAttachsig($HTTP_POST_VARS['attachsig']); + if (!$postid = $forumpost->store()) { + include_once(XOOPS_ROOT_PATH.'/header.php'); + xoops_error('Could not insert forum post'); + include_once(XOOPS_ROOT_PATH.'/footer.php'); + exit(); + } + if (is_object($xoopsUser) && !empty($isnew)) { + $xoopsUser->incrementPost(); + } + // RMV-NOTIFY + // Define tags for notification message + $tags = array(); + $tags['THREAD_NAME'] = $HTTP_POST_VARS['subject']; + $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id='.$postid.'&topic_id=' . $forumpost->topic(); + $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postid; + include_once 'include/notification.inc.php'; + $forum_info = newbb_notify_iteminfo ('forum', $forum); + $tags['FORUM_NAME'] = $forum_info['name']; + $tags['FORUM_URL'] = $forum_info['url']; + $notification_handler =& xoops_gethandler('notification'); + if (!empty($isnew)) { + if (empty($isreply)) { + // Notify of new thread + $notification_handler->triggerEvent('forum', $forum, 'new_thread', $tags); + } else { + // Notify of new post + $notification_handler->triggerEvent('thread', $topic_id, 'new_post', $tags); + } + $notification_handler->triggerEvent('global', 0, 'new_post', $tags); + $notification_handler->triggerEvent('forum', $forum, 'new_post', $tags); + $myts =& MyTextSanitizer::getInstance(); + $tags['POST_CONTENT'] = $myts->stripSlashesGPC($HTTP_POST_VARS['message']); + $tags['POST_NAME'] = $myts->stripSlashesGPC($HTTP_POST_VARS['subject']); + $notification_handler->triggerEvent('global', 0, 'new_fullpost', $tags); + } + + // If user checked notification box, subscribe them to the + // appropriate event; if unchecked, then unsubscribe + + if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) { + if (!empty($HTTP_POST_VARS['notify'])) { + $notification_handler->subscribe('thread', $forumpost->getTopicId(), 'new_post'); + } else { + $notification_handler->unsubscribe('thread', $forumpost->getTopicId(), 'new_post'); + } + } + + if ( $HTTP_POST_VARS['viewmode'] == "flat" ) { + redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=flat&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT); + exit(); + } else { + $post_id = $forumpost->postid(); + redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=thread&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT); + exit(); + } + } + include XOOPS_ROOT_PATH.'/footer.php'; } ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:48 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:48 +0900 Subject: [xoops-cvslog 119] CVS update: xoops2jp/html/modules/news/blocks Message-ID: <20050611023248.82E262AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/news/blocks/news_top.php diff -u xoops2jp/html/modules/news/blocks/news_top.php:1.2 xoops2jp/html/modules/news/blocks/news_top.php:1.3 --- xoops2jp/html/modules/news/blocks/news_top.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/news/blocks/news_top.php Sat Jun 11 11:32:48 2005 @@ -1,5 +1,5 @@ "._MB_NEWS_HITS."\n"; $form .= "\n"; $form .= " "._MB_NEWS_DISP."  "._MB_NEWS_ARTCLS.""; - $form .= " 
    "._MB_NEWS_CHARS."  "._MB_NEWS_LENGTH.""; + $form .= " 
    "._MB_NEWS_CHARS."  "._MB_NEWS_LENGTH.""; return $form; From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:48 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:48 +0900 Subject: [xoops-cvslog 120] CVS update: xoops2jp/html/modules/news Message-ID: <20050611023248.40F052AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/news/article.php diff -u xoops2jp/html/modules/news/article.php:1.2 xoops2jp/html/modules/news/article.php:1.3 --- xoops2jp/html/modules/news/article.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/news/article.php Sat Jun 11 11:32:47 2005 @@ -1,5 +1,5 @@ $v) { - ${$k} = $v; -} -$storyid = (isset($HTTP_GET_VARS['storyid'])) ? $HTTP_GET_VARS['storyid'] : 0; -$storyid = intval($storyid); +$storyid = (isset($_GET['storyid'])) ? intval($_GET['storyid']) : 0; if (empty($storyid)) { - redirect_header("index.php",2,_NW_NOSTORY); - exit(); + redirect_header("index.php",2,_NW_NOSTORY); + exit(); } $xoopsOption['template_main'] = 'news_article.html'; @@ -47,13 +43,13 @@ $article = new NewsStory($storyid); if ( $article->published() == 0 || $article->published() > time() ) { - redirect_header('index.php', 2, _NW_NOSTORY); - exit(); + redirect_header('index.php', 2, _NW_NOSTORY); + exit(); } -$storypage = isset($HTTP_GET_VARS['page']) ? intval($HTTP_GET_VARS['page']) : 0; +$storypage = isset($_GET['page']) ? intval($_GET['page']) : 0; // update counter only when viewing top page -if (empty($HTTP_GET_VARS['com_id']) && $storypage == 0) { - $article->updateCounter(); +if (empty($_GET['com_id']) && $storypage == 0) { + $article->updateCounter(); } $story['id'] = $storyid; $story['posttime'] = formatTimestamp($article->published()); @@ -62,47 +58,47 @@ $bodytext = $article->bodytext(); if ( trim($bodytext) != '' ) { - $articletext = explode("[pagebreak]", $bodytext); - $story_pages = count($articletext); + $articletext = explode("[pagebreak]", $bodytext); + $story_pages = count($articletext); - if ($story_pages > 1) { - include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; - $pagenav = new XoopsPageNav($story_pages, 1, $storypage, 'page', 'storyid='.$storyid); - $xoopsTpl->assign('pagenav', $pagenav->renderNav()); - //$xoopsTpl->assign('pagenav', $pagenav->renderImageNav()); - - if ($storypage == 0) { - $story['text'] = $story['text'].'

    '.$articletext[$storypage]; - } else { - $story['text'] = $articletext[$storypage]; - } - } else { - $story['text'] = $story['text'].'

    '.$bodytext; - } + if ($story_pages > 1) { + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; + $pagenav = new XoopsPageNav($story_pages, 1, $storypage, 'page', 'storyid='.$storyid); + $xoopsTpl->assign('pagenav', $pagenav->renderNav()); + //$xoopsTpl->assign('pagenav', $pagenav->renderImageNav()); + + if ($storypage == 0) { + $story['text'] = $story['text'].'

    '.$articletext[$storypage]; + } else { + $story['text'] = $articletext[$storypage]; + } + } else { + $story['text'] = $story['text'].'

    '.$bodytext; + } } $story['poster'] = $article->uname(); if ( $story['poster'] ) { - $story['posterid'] = $article->uid(); - $story['poster'] = ''.$story['poster'].''; + $story['posterid'] = $article->uid(); + $story['poster'] = ''.$story['poster'].''; } else { - $story['poster'] = ''; - $story['posterid'] = 0; - $story['poster'] = $xoopsConfig['anonymous']; + $story['poster'] = ''; + $story['posterid'] = 0; + $story['poster'] = $xoopsConfig['anonymous']; } $story['morelink'] = ''; $story['adminlink'] = ''; unset($isadmin); if ( $xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid')) ) { - $isadmin = true; - $story['adminlink'] = $article->adminlink(); + $isadmin = true; + $story['adminlink'] = $article->adminlink(); } $story['topicid'] = $article->topicid(); $story['imglink'] = ''; $story['align'] = ''; if ( $article->topicdisplay() ) { - $story['imglink'] = $article->imglink(); - $story['align'] = $article->topicalign(); + $story['imglink'] = $article->imglink(); + $story['align'] = $article->topicalign(); } $story['hits'] = $article->counter(); $story['mail_link'] = 'mailto:?subject='.sprintf(_NW_INTARTICLE,$xoopsConfig['sitename']).'&body='.sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/news/article.php?storyid='.$article->storyid(); Index: xoops2jp/html/modules/news/print.php diff -u xoops2jp/html/modules/news/print.php:1.2 xoops2jp/html/modules/news/print.php:1.3 --- xoops2jp/html/modules/news/print.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/news/print.php Sat Jun 11 11:32:47 2005 @@ -1,5 +1,5 @@ dirname().'/class/class.newsstory.php'; function PrintPage($storyid) { - global $xoopsConfig, $xoopsModule; - $story = new NewsStory($storyid); + global $xoopsConfig, $xoopsModule; + $story = new NewsStory($storyid); $datetime = formatTimestamp($story->published()); echo ''; - echo ''; - echo ''; - echo ''.$xoopsConfig['sitename'].''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ' -
    -
    - '; - echo '
    -

    -

    '.$story->title().'

    - '._NW_DATE.' '.$datetime.' | '._NW_TOPICC.' '.$story->topic_title().'

    '.$story->hometext().'
    '; - $bodytext = $story->bodytext(); - $bodytext = str_replace("[pagebreak]","
    ",$bodytext); - if ( $bodytext != '' ){ - echo $bodytext.'

    '; - } - echo '
    -

    '; - printf(_NW_THISCOMESFROM,$xoopsConfig['sitename']); - echo '
    '.XOOPS_URL.'

    - '._NW_URLFORSTORY.'
    - '.XOOPS_URL.'/article.php?storyid='.$story->storyid().' -
    - - - '; + echo ''; + echo ''; + echo ''.htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES).''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ' +
    +
    + '; + echo '
    +

    +

    '.$story->title().'

    + '._NW_DATE.' '.$datetime.' | '._NW_TOPICC.' '.$story->topic_title().'

    '.$story->hometext().'
    '; + $bodytext = $story->bodytext(); + $bodytext = str_replace("[pagebreak]","
    ",$bodytext); + if ( $bodytext != '' ){ + echo $bodytext.'

    '; + } + echo '
    +

    '; + printf(_NW_THISCOMESFROM,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + echo '
    '.XOOPS_URL.'

    + '._NW_URLFORSTORY.'
    + '.XOOPS_URL.'/article.php?storyid='.$story->storyid().' +
    + + + '; } PrintPage($storyid); ?> \ No newline at end of file Index: xoops2jp/html/modules/news/submit.php diff -u xoops2jp/html/modules/news/submit.php:1.2 xoops2jp/html/modules/news/submit.php:1.3 --- xoops2jp/html/modules/news/submit.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/news/submit.php Sat Jun 11 11:32:47 2005 @@ -1,5 +1,5 @@ $v ) { - ${$k} = $v; -} -if ( isset($HTTP_POST_VARS['preview'] )) { - $op = 'preview'; -} elseif ( isset($HTTP_POST_VARS['post']) ) { - $op = 'post'; +error_reporting(E_ALL); +$op = isset($_POST['op']) ? $_POST['op'] : 'form'; + +if (!empty($_POST['preview'])) { + if (XoopsMultiTokenHandler::quickValidate('news_submit')) { + $op = 'preview'; + } + else { + $op = 'form'; + } +} elseif (!empty($_POST['post'])) { + if (XoopsMultiTokenHandler::quickValidate('news_submit')) { + $op = 'post'; + } + else { + $op = 'form'; + } } + +$topic_id = isset($_POST['topic_id']) ? intval($_POST['topic_id']) : 0; +$noname = isset($_POST['noname']) ? intval($_POST['noname']) : 0; +$notifypub = isset($_POST['notifypub']) ? intval($_POST['notifypub']) : 0; +$nosmiley = isset($_POST['nosmiley']) ? intval($_POST['nosmiley']) : 0; +$myts =& MyTextSanitizer::getInstance(); switch ($op) { case "preview": - $myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object - $xt = new XoopsTopic($xoopsDB->prefix("topics"), $HTTP_POST_VARS['topic_id']); - include XOOPS_ROOT_PATH.'/header.php'; - $p_subject = $myts->makeTboxData4Preview($subject); - if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { - $nohtml = isset($nohtml) ? intval($nohtml) : 0; - } else { - $nohtml = 1; - } - $html = empty($nohtml) ? 1 : 0; - if ( isset($nosmiley) && intval($nosmiley) > 0 ) { - $nosmiley = 1; - $smiley = 0; - } else { - $nosmiley = 0; - $smiley = 1; - } - $p_message = $myts->makeTareaData4Preview($message, $html, $smiley, 1); - $subject = $myts->makeTboxData4PreviewInForm($subject); - $message = $myts->makeTareaData4PreviewInForm($message); - $noname = isset($noname) ? intval($noname) : 0; - $notifypub = isset($notifypub) ? intval($notifypub) : 0; - $p_message = ($xt->topic_imgurl() != '') ? ''.$p_message : $p_message; - themecenterposts($p_subject, $p_message); - include 'include/storyform.inc.php'; - include XOOPS_ROOT_PATH.'/footer.php'; - break; + $xt = new XoopsTopic($xoopsDB->prefix("topics"), $topic_id); + include XOOPS_ROOT_PATH.'/header.php'; + $p_subject = $myts->makeTboxData4Preview($_POST['subject']); + if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { + $nohtml = isset($_POST['nohtml']) ? intval($_POST['nohtml']) : 0; + } else { + $nohtml = 1; + } + $html = empty($nohtml) ? 1 : 0; + if ( isset($nosmiley) && intval($nosmiley) > 0 ) { + $nosmiley = 1; + $smiley = 0; + } else { + $nosmiley = 0; + $smiley = 1; + } + $p_message = $myts->makeTareaData4Preview($_POST['message'], $html, $smiley, 1); + $subject = $myts->makeTboxData4PreviewInForm($_POST['subject']); + $message = $myts->makeTareaData4PreviewInForm($_POST['message']); + $p_message = ($xt->topic_imgurl() != '') ? ''.$p_message : $p_message; + themecenterposts($p_subject, $p_message); + include 'include/storyform.inc.php'; + include XOOPS_ROOT_PATH.'/footer.php'; + break; case "post": - $nohtml_db = 1; - if ( $xoopsUser ) { - $uid = $xoopsUser->getVar('uid'); - if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) { - $nohtml_db = empty($nohtml) ? 0 : 1; - } - } else { - if ( $xoopsModuleConfig['anonpost'] == 1 ) { - $uid = 0; - } else { - redirect_header("index.php",3,_NOPERM); - exit(); - } - } - $story = new NewsStory(); - $story->setTitle($subject); - $story->setHometext($message); - $story->setUid($uid); - $story->setTopicId($topic_id); - $story->setHostname(xoops_getenv('REMOTE_ADDR')); - $story->setNohtml($nohtml_db); - $nosmiley = isset($nosmiley) ? intval($nosmiley) : 0; - $notifypub = isset($notifypub) ? intval($notifypub) : 0; - $story->setNosmiley($nosmiley); - $story->setNotifyPub($notifypub); - $story->setType('user'); + $nohtml_db = 1; + if ( $xoopsUser ) { + $uid = $xoopsUser->getVar('uid'); + if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) { + $nohtml_db = empty($_POST['nohtml']) ? 0 : 1; + } + } else { + if ( $xoopsModuleConfig['anonpost'] == 1 ) { + $uid = 0; + } else { + redirect_header("index.php",3,_NOPERM); + exit(); + } + } + $story = new NewsStory(); + $story->setTitle($_POST['subject']); + $story->setHometext($_POST['message']); + $story->setUid($uid); + $story->setTopicId($topic_id); + $story->setHostname(xoops_getenv('REMOTE_ADDR')); + $story->setNohtml($nohtml_db); + $story->setNosmiley($nosmiley); + $story->setNotifyPub($notifypub); + $story->setType('user'); if ( $xoopsModuleConfig['autoapprove'] == 1 ) { - $approve = 1; - $story->setApproved($approve); - $story->setPublished(time()); - $story->setExpired(0); - $story->setTopicalign('R'); - } - $result = $story->store(); - if ($result) { - // Notification - $notification_handler =& xoops_gethandler('notification'); - $tags = array(); - $tags['STORY_NAME'] = $subject; - $tags['STORY_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/article.php?storyid=' . $story->storyid(); - if ( $xoopsModuleConfig['autoapprove'] == 1) { - $notification_handler->triggerEvent('global', 0, 'new_story', $tags); - } else { - $tags['WAITINGSTORIES_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=newarticle'; - $notification_handler->triggerEvent('global', 0, 'story_submit', $tags); - } - // If notify checkbox is set, add subscription for approve - if ($notifypub) { - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; - $notification_handler->subscribe('story', $story->storyid(), 'approve', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); - } - /* - if ($xoopsModuleConfig['notifysubmit'] == 1 ) { - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($xoopsConfig['adminmail']); - $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject(_NW_NOTIFYSBJCT); - $body = _NW_NOTIFYMSG; - $body .= "\n\n"._NW_TITLE.": ".$story->title(); - $body .= "\n"._POSTEDBY.": ".XoopsUser::getUnameFromId($uid); - $body .= "\n"._DATE.": ".formatTimestamp(time(), 'm', $xoopsConfig['default_TZ']); - $body .= "\n\n".XOOPS_URL.'/modules/news/admin/index.php?op=edit&storyid='.$result; - $xoopsMailer->setBody($body); - $xoopsMailer->send(); - } - */ - } else { - echo 'error'; - } - redirect_header("index.php",2,_NW_THANKS); - break; + $approve = 1; + $story->setApproved($approve); + $story->setPublished(time()); + $story->setExpired(0); + $story->setTopicalign('R'); + } + $result = $story->store(); + if ($result) { + // Notification + $notification_handler =& xoops_gethandler('notification'); + $tags = array(); + $tags['STORY_NAME'] = $myts->stripSlashesGPC($_POST['subject']); + $tags['STORY_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/article.php?storyid=' . $story->storyid(); + if ( $xoopsModuleConfig['autoapprove'] == 1) { + $notification_handler->triggerEvent('global', 0, 'new_story', $tags); + } else { + $tags['WAITINGSTORIES_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=newarticle'; + $notification_handler->triggerEvent('global', 0, 'story_submit', $tags); + } + // If notify checkbox is set, add subscription for approve + if ($notifypub) { + include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; + $notification_handler->subscribe('story', $story->storyid(), 'approve', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); + } + /* + if ($xoopsModuleConfig['notifysubmit'] == 1 ) { + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setToEmails($xoopsConfig['adminmail']); + $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject(_NW_NOTIFYSBJCT); + $body = _NW_NOTIFYMSG; + $body .= "\n\n"._NW_TITLE.": ".$story->title(); + $body .= "\n"._POSTEDBY.": ".XoopsUser::getUnameFromId($uid); + $body .= "\n"._DATE.": ".formatTimestamp(time(), 'm', $xoopsConfig['default_TZ']); + $body .= "\n\n".XOOPS_URL.'/modules/news/admin/index.php?op=edit&storyid='.$result; + $xoopsMailer->setBody($body); + $xoopsMailer->send(); + } + */ + } else { + echo 'error'; + } + redirect_header("index.php",2,_NW_THANKS); + break; case 'form': default: - $xt = new XoopsTopic($xoopsDB->prefix("topics")); - include XOOPS_ROOT_PATH.'/header.php'; - $subject = ''; - $message = ''; - $noname = 0; - $nohtml = 0; - $nosmiley = 0; - $notifypub = 1; - include 'include/storyform.inc.php'; - include XOOPS_ROOT_PATH.'/footer.php'; - break; + $xt = new XoopsTopic($xoopsDB->prefix("topics")); + include XOOPS_ROOT_PATH.'/header.php'; + $subject = ''; + $message = ''; + $noname = 0; + $nohtml = 0; + $nosmiley = 0; + $notifypub = 1; + include 'include/storyform.inc.php'; + include XOOPS_ROOT_PATH.'/footer.php'; + break; } ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:49 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:49 +0900 Subject: [xoops-cvslog 121] CVS update: xoops2jp/html/modules/news/templates/blocks Message-ID: <20050611023249.0E9E52AC030@users.sourceforge.jp> Index: xoops2jp/html/modules/news/templates/blocks/news_block_bigstory.html diff -u xoops2jp/html/modules/news/templates/blocks/news_block_bigstory.html:1.1 xoops2jp/html/modules/news/templates/blocks/news_block_bigstory.html:1.2 --- xoops2jp/html/modules/news/templates/blocks/news_block_bigstory.html:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/news/templates/blocks/news_block_bigstory.html Sat Jun 11 11:32:48 2005 @@ -1,5 +1,5 @@

    <{$block.message}>

    <{if $block.story_id != ""}> -

    <{$block.story_title}>

    +

    <{$block.story_title}>

    <{/if}> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:48 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:48 +0900 Subject: [xoops-cvslog 122] CVS update: xoops2jp/html/modules/news/include Message-ID: <20050611023248.C19282AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/news/include/storyform.inc.php diff -u xoops2jp/html/modules/news/include/storyform.inc.php:1.2 xoops2jp/html/modules/news/include/storyform.inc.php:1.3 --- xoops2jp/html/modules/news/include/storyform.inc.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/news/include/storyform.inc.php Sat Jun 11 11:32:48 2005 @@ -1,5 +1,5 @@ addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('news_submit'))); $sform->addElement(new XoopsFormText(_NW_TITLE, 'subject', 50, 80, $subject), true); ob_start(); $xt->makeTopicSelBox(0); @@ -36,19 +37,19 @@ $sform->addElement(new XoopsFormDhtmlTextArea(_NW_THESCOOP, 'message', $message, 15, 60), true); $option_tray = new XoopsFormElementTray(_OPTIONS,'
    '); if ($xoopsUser) { - if ($xoopsConfig['anonpost'] == 1) { - $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname); - $noname_checkbox->addOption(1, _POSTANON); - $option_tray->addElement($noname_checkbox); - } - $notify_checkbox = new XoopsFormCheckBox('', 'notifypub', $notifypub); - $notify_checkbox->addOption(1, _NW_NOTIFYPUBLISH); - $option_tray->addElement($notify_checkbox); - if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { - $nohtml_checkbox = new XoopsFormCheckBox('', 'nohtml', $nohtml); - $nohtml_checkbox->addOption(1, _DISABLEHTML); - $option_tray->addElement($nohtml_checkbox); - } + if ($xoopsConfig['anonpost'] == 1) { + $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname); + $noname_checkbox->addOption(1, _POSTANON); + $option_tray->addElement($noname_checkbox); + } + $notify_checkbox = new XoopsFormCheckBox('', 'notifypub', $notifypub); + $notify_checkbox->addOption(1, _NW_NOTIFYPUBLISH); + $option_tray->addElement($notify_checkbox); + if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { + $nohtml_checkbox = new XoopsFormCheckBox('', 'nohtml', $nohtml); + $nohtml_checkbox->addOption(1, _DISABLEHTML); + $option_tray->addElement($nohtml_checkbox); + } } $smiley_checkbox = new XoopsFormCheckBox('', 'nosmiley', $nosmiley); $smiley_checkbox->addOption(1, _DISABLESMILEY); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:49 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:49 +0900 Subject: [xoops-cvslog 123] CVS update: xoops2jp/html/modules/sections Message-ID: <20050611023249.8FDA92AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/index.php diff -u xoops2jp/html/modules/sections/index.php:1.2 xoops2jp/html/modules/sections/index.php:1.3 --- xoops2jp/html/modules/sections/index.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/sections/index.php Sat Jun 11 11:32:49 2005 @@ -1,14 +1,14 @@ // // ------------------------------------------------------------------------ // -// Based on: // -// myPHPNUKE Web Portal System - http://myphpnuke.com/ // -// PHP-NUKE Web Portal System - http://phpnuke.org/ // -// Thatware - http://thatware.org/ // +// Based on: // +// myPHPNUKE Web Portal System - http://myphpnuke.com/ // +// PHP-NUKE Web Portal System - http://phpnuke.org/ // +// Thatware - http://thatware.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 // @@ -33,116 +33,116 @@ function listsections() { - global $xoopsConfig, $xoopsDB, $xoopsUser, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $xoopsUserIsAdmin; - include XOOPS_ROOT_PATH.'/header.php'; - $myts =& MyTextSanitizer::getInstance(); + global $xoopsConfig, $xoopsDB, $xoopsUser, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $xoopsUserIsAdmin; + include XOOPS_ROOT_PATH.'/header.php'; + $myts =& MyTextSanitizer::getInstance(); $result = $xoopsDB->query("SELECT secid, secname, image FROM ".$xoopsDB->prefix("sections")." ORDER BY secname"); - echo "
    "; - printf(_MD_WELCOMETOSEC,$xoopsConfig['sitename']); - echo "

    "; + echo "
    "; + printf(_MD_WELCOMETOSEC,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + echo "

    "; echo _MD_HEREUCANFIND.'

    '; - $count = 0; + $count = 0; while ( list($secid, $secname, $image) = $xoopsDB->fetchRow($result) ) { - $secname = $myts->makeTboxData4Show($secname); - $image = $myts->makeTboxData4Show($image); - if ( $count == 2 ) { - echo ""; - $count = 0; - } - echo ""; - } - echo ""; - } - echo "
    $secname"; - $count++; - if ( $count == 2 ) { - echo "
    "; - include '../../footer.php'; + $secname = $myts->makeTboxData4Show($secname); + $image = $myts->makeTboxData4Show($image); + if ( $count == 2 ) { + echo ""; + $count = 0; + } + echo "$secname"; + $count++; + if ( $count == 2 ) { + echo ""; + } + echo ""; + } + echo "
    "; + include '../../footer.php'; } function listarticles($secid) { - global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $xoopsUserIsAdmin; - include '../../header.php'; - $myts =& MyTextSanitizer::getInstance(); - $result = $xoopsDB->query("SELECT secname, image FROM ".$xoopsDB->prefix("sections")." WHERE secid=$secid"); - list($secname, $image) = $xoopsDB->fetchRow($result); - $secname = $myts->makeTboxData4Show($secname); - $image = $myts->makeTboxData4Show($image); - $result = $xoopsDB->query("SELECT artid, secid, title, content, counter FROM ".$xoopsDB->prefix("seccont")." WHERE secid=$secid"); - echo "


    "; - printf(_MD_THISISSECTION,$secname); - echo "
    "._MD_THEFOLLOWING."

    "; - while ( list($artid, $secid, $title, $content, $counter) = $xoopsDB->fetchRow($result) ) { - $title = $myts->makeTboxData4Show($title); - $content = $myts->makeTareaData4Show($content); - echo ""; - } + global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $xoopsUserIsAdmin; + include '../../header.php'; + $myts =& MyTextSanitizer::getInstance(); + $result = $xoopsDB->query("SELECT secname, image FROM ".$xoopsDB->prefix("sections")." WHERE secid=$secid"); + list($secname, $image) = $xoopsDB->fetchRow($result); + $secname = $myts->makeTboxData4Show($secname); + $image = $myts->makeTboxData4Show($image); + $result = $xoopsDB->query("SELECT artid, secid, title, content, counter FROM ".$xoopsDB->prefix("seccont")." WHERE secid=$secid"); + echo "


    "; + printf(_MD_THISISSECTION,$secname); + echo "
    "._MD_THEFOLLOWING."

      · $title"; - printf(" (read: %s times)",$counter); - echo "  
    "; + while ( list($artid, $secid, $title, $content, $counter) = $xoopsDB->fetchRow($result) ) { + $title = $myts->makeTboxData4Show($title); + $content = $myts->makeTareaData4Show($content); + echo ""; + } echo "
      · $title"; + printf(" (read: %s times)",$counter); + echo "  



    [ "._MD_RETURN2INDEX." ]
    "; - include '../../footer.php'; + include '../../footer.php'; } function viewarticle($artid,$page) { - global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $xoopsUserIsAdmin; - include '../../header.php'; - $myts =& MyTextSanitizer::getInstance(); + global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsTheme, $xoopsLogger, $xoopsModule, $xoopsTpl, $xoopsUserIsAdmin; + include '../../header.php'; + $myts =& MyTextSanitizer::getInstance(); $xoopsDB->queryF("UPDATE ".$xoopsDB->prefix("seccont")." SET counter=counter+1 WHERE artid=$artid"); - $result = $xoopsDB->query("SELECT artid, secid, title, content, counter FROM ".$xoopsDB->prefix("seccont")." WHERE artid=$artid"); - list($artid, $secid, $title, $content, $counter) = $xoopsDB->fetchRow($result); - $title = $myts->makeTboxData4Show($title); - $content = $myts->makeTareaData4Show($content); + $result = $xoopsDB->query("SELECT artid, secid, title, content, counter FROM ".$xoopsDB->prefix("seccont")." WHERE artid=$artid"); + list($artid, $secid, $title, $content, $counter) = $xoopsDB->fetchRow($result); + $title = $myts->makeTboxData4Show($title); + $content = $myts->makeTareaData4Show($content); $result2 = $xoopsDB->query("SELECT secid, secname FROM ".$xoopsDB->prefix("sections")." WHERE secid=$secid"); - list($secid, $secname) = $xoopsDB->fetchRow($result2); - $secname = $myts->makeTboxData4Show($secname); + list($secid, $secname) = $xoopsDB->fetchRow($result2); + $secname = $myts->makeTboxData4Show($secname); $words = count(explode(" ", $content)); //echo "
    "; - /* Rip the article into pages. Delimiter string is "[pagebreak]" */ - $contentpages = explode( "[pagebreak]", $content); - $pageno = count($contentpages); - /* Define the current page */ - if ( $page=="" || $page < 1 ) { - $page = 1; - } - if ( $page > $pageno ) { - $page = $pageno; - } - $arrayelement = (int)$page; - $arrayelement --; - echo "
    $title

    "; - if ( $page >= $pageno ) { - $next_page = '' ._MD_RETURN2INDEX.''; - } else { - $next_pagenumber = $page + 1; - $next_page = ""._MD_NEXTPAGE." ".sprintf("(%s/%s)",$next_pagenumber,$pageno)." >>"; - } - if( $page <= 1 ) { - $previous_page = '' ._MD_RETURN2INDEX.''; - } else { - $previous_pagenumber = $page -1; - $previous_page = "<< "._MD_PREVPAGE." ".sprintf("(%s/%s)",$previous_pagenumber,$pageno).""; - } + /* Rip the article into pages. Delimiter string is "[pagebreak]" */ + $contentpages = explode( "[pagebreak]", $content); + $pageno = count($contentpages); + /* Define the current page */ + if ( $page=="" || $page < 1 ) { + $page = 1; + } + if ( $page > $pageno ) { + $page = $pageno; + } + $arrayelement = (int)$page; + $arrayelement --; + echo " - +
    $title

    "; + if ( $page >= $pageno ) { + $next_page = '' ._MD_RETURN2INDEX.''; + } else { + $next_pagenumber = $page + 1; + $next_page = ""._MD_NEXTPAGE." ".sprintf("(%s/%s)",$next_pagenumber,$pageno)." >>"; + } + if( $page <= 1 ) { + $previous_page = '' ._MD_RETURN2INDEX.''; + } else { + $previous_pagenumber = $page -1; + $previous_page = "<< "._MD_PREVPAGE." ".sprintf("(%s/%s)",$previous_pagenumber,$pageno).""; + } echo ($contentpages[$arrayelement]); - echo "
    $previous_page $next_page
    "; - echo "
    [ ".sprintf(_MD_BACK2SEC,$secname)." | + echo "
    $previous_page $next_page
    "; + echo "
    [ ".sprintf(_MD_BACK2SEC,$secname)." | "._MD_RETURN2INDEX." | " . _MD_PRINTERPAGE."]
    "; include '../../footer.php'; } function PrintSecPage($artid) { - global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsTpl, $xoopsUserIsAdmin; - $myts =& MyTextSanitizer::getInstance(); + global $xoopsConfig, $xoopsUser, $xoopsDB, $xoopsTpl, $xoopsUserIsAdmin; + $myts =& MyTextSanitizer::getInstance(); $result=$xoopsDB->query("SELECT title, content FROM ".$xoopsDB->prefix("seccont")." WHERE artid=$artid"); - list($title, $content) = $xoopsDB->fetchRow($result); - $title = $myts->makeTboxData4Show($title); - $content = $myts->makeTareaData4Show($content); + list($title, $content) = $xoopsDB->fetchRow($result); + $title = $myts->makeTboxData4Show($title); + $content = $myts->makeTareaData4Show($content); echo " - ".$xoopsConfig['sitename']." + ".htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)."
    @@ -152,8 +152,8 @@ ".str_replace("[pagebreak]","",$content)."

    "; echo "
    "; echo "

    "; - printf(_MD_COMESFROM, $xoopsConfig['sitename']); - echo "
    ".XOOPS_URL."

    "; + printf(_MD_COMESFROM, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + echo "
    ".XOOPS_URL."

    "; echo _MD_URLFORTHIS."
    ".XOOPS_URL."/modules/sections/index.php?op=viewarticle&artid=$artid
    @@ -169,16 +169,16 @@ switch ( $op ) { case "viewarticle": - viewarticle($artid, $page); + viewarticle($artid, $page); break; case "listarticles": - listarticles($secid); - break; + listarticles($secid); + break; case "printpage": - PrintSecPage($artid); - break; + PrintSecPage($artid); + break; default: - listsections(); - break; + listsections(); + break; } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:49 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:49 +0900 Subject: [xoops-cvslog 124] CVS update: xoops2jp/html/modules/sections/language/english Message-ID: <20050611023249.D64B62AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/language/english/main.php diff -u xoops2jp/html/modules/sections/language/english/main.php:1.2 xoops2jp/html/modules/sections/language/english/main.php:1.3 --- xoops2jp/html/modules/sections/language/english/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/sections/language/english/main.php Sat Jun 11 11:32:49 2005 @@ -1,7 +1,7 @@ Please register or login first!"); +define("_MD_MUSTREGFIRST","You need to be a registered user or logged in to send a modify request.
    Please register or login first!"); define("_MD_WELCOMETOSEC","Welcome to the Special Sections at %s"); // %s is your site name define("_MD_HEREUCANFIND","Here you can find some cool articles that are not presented on the homepage."); define("_MD_THISISSECTION","This is Section %s"); // %s is a section name From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:49 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:49 +0900 Subject: [xoops-cvslog 125] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050611023249.4F0A62AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.2 xoops2jp/html/modules/sections/admin/index.php:1.3 --- xoops2jp/html/modules/sections/admin/index.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/sections/admin/index.php Sat Jun 11 11:32:49 2005 @@ -1,14 +1,14 @@ // // ------------------------------------------------------------------------ // -// Based on: // -// myPHPNUKE Web Portal System - http://myphpnuke.com/ // -// PHP-NUKE Web Portal System - http://phpnuke.org/ // -// Thatware - http://thatware.org/ // +// Based on: // +// myPHPNUKE Web Portal System - http://myphpnuke.com/ // +// PHP-NUKE Web Portal System - http://phpnuke.org/ // +// Thatware - http://thatware.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 // @@ -31,9 +31,9 @@ // ------------------------------------------------------------------------ // include '../../../include/cp_header.php'; if ( file_exists("../language/".$xoopsConfig['language']."/main.php") ) { - include "../language/".$xoopsConfig['language']."/main.php"; + include "../language/".$xoopsConfig['language']."/main.php"; } else { - include "../language/english/main.php"; + include "../language/english/main.php"; } /*********************************************************/ /* Sections Manager Functions */ @@ -41,299 +41,272 @@ function sections() { global $xoopsConfig, $xoopsDB, $xoopsModule; - xoops_cp_header(); - echo "

    "._AM_SECCONF."

    "; - $result = $xoopsDB->query("select secid, secname from ".$xoopsDB->prefix("sections")." order by secid"); - if ($xoopsDB->getRowsNum($result) > 0) { - $myts =& MyTextSanitizer::getInstance(); - echo "
    -
    "._MD_CURACTIVESEC."
    "._MD_CLICK2EDIT."
    -
    "; - echo "
      "; - while(list($secid, $secname) = $xoopsDB->fetchRow($result)) { - $secname=$myts->makeTboxData4Show($secname); - echo "
    • ".$secname."
    • "; - } - echo "
    "; - echo "
    "; - ?> -
    -

    -

    - "; ?>
    -
    -

    - query("select secid, secname from ".$xoopsDB->prefix("sections")." order by secid"); - $checked = "checked"; // select first section by default - while(list($secid, $secname) = $xoopsDB->fetchRow($result)) { - $secname=$myts->makeTboxData4Show($secname); - echo "$secname
    "; - $checked = ''; - } ?> -
    -
    -

    -

    - - - -
    -

    -

    -
      - query("select artid, secid, title from ".$xoopsDB->prefix("seccont")." order by artid desc",20,0); - while ( list($artid, $secid, $title) = $xoopsDB->fetchRow($result) ) { - $title = $myts->makeTboxData4Show($title); - $result2 = $xoopsDB->query("select secid, secname from ".$xoopsDB->prefix("sections")." where secid='$secid'"); - list($secid, $secname) = $xoopsDB->fetchRow($result2); - $secname = $myts->makeTboxData4Show($secname); - echo "
    • $title ($secname) [ "._MD_EDIT." ]"; - } ?> -
    - "; ?> - - - - + xoops_cp_header(); + echo "

    "._AM_SECCONF."

    "; + $result = $xoopsDB->query("select secid, secname from ".$xoopsDB->prefix("sections")." order by secid"); + if ($xoopsDB->getRowsNum($result) > 0) { + $myts =& MyTextSanitizer::getInstance(); + echo "
    +
    "._MD_CURACTIVESEC."
    "._MD_CLICK2EDIT."
    +
    "; + echo "
      "; + while(list($secid, $secname) = $xoopsDB->fetchRow($result)) { + $secname=$myts->makeTboxData4Show($secname); + echo "
    • ".$secname."
    • "; + } + echo "
    "; + echo "
    "; + ?> +
    +

    +

    + "; ?>
    +
    +

    + query("select secid, secname from ".$xoopsDB->prefix("sections")." order by secid"); + $checked = " checked='checked'"; // select first section by default + while(list($secid, $secname) = $xoopsDB->fetchRow($result)) { + $secname=$myts->makeTboxData4Show($secname); + echo "$secname
    "; + $checked = ''; + } ?> +
    +
    +

    +

    + + + +
    +

    +

    +
      + query("select artid, secid, title from ".$xoopsDB->prefix("seccont")." order by artid desc",20,0); + while ( list($artid, $secid, $title) = $xoopsDB->fetchRow($result) ) { + $title = $myts->makeTboxData4Show($title); + $result2 = $xoopsDB->query("select secid, secname from ".$xoopsDB->prefix("sections")." where secid='$secid'"); + list($secid, $secname) = $xoopsDB->fetchRow($result2); + $secname = $myts->makeTboxData4Show($secname); + echo "
    • $title ($secname) [ "._MD_EDIT." ]"; + } ?> +
    + "; ?> + + + + "; ?> -

    -

    - "; ?>
    -
    -

    -  
    -

    - - - + } + echo "
    "; ?> +

    +

    + "; ?>
    +
    +

    +  
    +

    + + + makeTboxData4Save($title); - $content = $myts->makeTareaData4Save($content); - $newid = $xoopsDB->genId($xoopsDB->prefix("seccont")."_artid_seq"); - $success = $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("seccont")." (artid, secid, title, content, counter) VALUES ($newid,$secid,'$title','$content',0)"); - if ( !$success ) { - xoops_cp_header(); - echo "
    "; - echo "

    "._AM_SECCONF."

    "; - echo _MD_DBNOTUPDATED; - echo"
    "; - xoops_cp_footer(); - exit(); - } - redirect_header("index.php?op=sections",2,_MD_DBUPDATED); - exit(); -} - function secartedit($artid) { - global $xoopsDB, $xoopsConfig, $xoopsModule; - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - echo "

    "._AM_SECCONF."

    "; - $result = $xoopsDB->query("select artid, secid, title, content from ".$xoopsDB->prefix("seccont")." where artid='$artid'"); - list($artid, $secid, $title, $content) = $xoopsDB->fetchRow($result); - $title = $myts->makeTboxData4Edit($title); - $content = $myts->makeTareaData4Edit($content); - ?> -

    -

    - "; ?>
    -
    - ">

    - query("select secid, secname from ".$xoopsDB->prefix("sections")." order by secname"); - while(list($secid2, $secname) = $xoopsDB->fetchRow($result2)) { - $secname = $myts->makeTboxData4Show($secname); - if ($secid2==$secid) { $che = "checked"; } - echo "$secname
    "; - $che = ""; - } ?> -
    -
    - - "> - -
    - - - "; ?> - "> - - -
    + global $xoopsDB, $xoopsConfig, $xoopsModule; + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + echo "

    "._AM_SECCONF."

    "; + $result = $xoopsDB->query("select artid, secid, title, content from ".$xoopsDB->prefix("seccont")." where artid='$artid'"); + list($artid, $secid, $title, $content) = $xoopsDB->fetchRow($result); + $title = $myts->makeTboxData4Edit($title); + $content = $myts->makeTareaData4Edit($content); + ?> +

    +

    + "; ?>
    +
    + " />

    + query("select secid, secname from ".$xoopsDB->prefix("sections")." order by secname"); + while(list($secid2, $secname) = $xoopsDB->fetchRow($result2)) { + $secname = $myts->makeTboxData4Show($secname); + if ($secid2==$secid) { $che = " checked='checked'"; } + echo "$secname
    "; + $che = ""; + } ?> +
    +
    + + " /> + +
    + + + "; ?> + " /> + + +
    makeTboxData4Save($secname); - if (empty($secname)) { - redirect_header("index.php", 2, _MD_ERRORSECNAME); - } - $image = $myts->makeTboxData4Save($image); - $newid = $xoopsDB->genId($xoopsDB->prefix("sections")."_secid_seq"); - $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("sections")." (secid, secname, image) VALUES ($newid,'$secname', '$image')"); - redirect_header("index.php?op=sections",2,_MD_DBUPDATED); - exit(); -} - function sectionedit($secid) { - global $xoopsDB, $xoopsConfig, $xoopsModule; - xoops_cp_header(); - echo "

    "._AM_SECCONF."


    "; - $myts =& MyTextSanitizer::getInstance(); - $result = $xoopsDB->query("select secid, secname, image from ".$xoopsDB->prefix("sections")." where secid=$secid"); - list($secid, $secname, $image) = $xoopsDB->fetchRow($result); - $secname = $myts->makeTboxData4Edit($secname); - $image = $myts->makeTboxData4Edit($image); - $result2 = $xoopsDB->query("select artid from ".$xoopsDB->prefix("seccont")." where secid=$secid"); - $number = $xoopsDB->getRowsNum($result2); - ?> -

    "; ?> -

    -
    + global $xoopsDB, $xoopsConfig, $xoopsModule; + xoops_cp_header(); + echo "

    "._AM_SECCONF."


    "; + $myts =& MyTextSanitizer::getInstance(); + $result = $xoopsDB->query("select secid, secname, image from ".$xoopsDB->prefix("sections")." where secid=$secid"); + list($secid, $secname, $image) = $xoopsDB->fetchRow($result); + $secname = $myts->makeTboxData4Edit($secname); + $image = $myts->makeTboxData4Edit($image); + $result2 = $xoopsDB->query("select artid from ".$xoopsDB->prefix("seccont")." where secid=$secid"); + $number = $xoopsDB->getRowsNum($result2); + ?> +

    "; ?> +

    +
    -

    - "; ?>
    -
    - ">

    -
    - ">

    - "> - -
    - - - "; ?> - "> - - -
    +

    + "; ?>
    +
    + " />

    +
    + " />

    + " /> + +
    + + + "; ?> + " /> + + +
    makeTboxData4Save($secname); - if (empty($secname)) { - redirect_header("index.php", 2, _MD_ERRORSECNAME); - } - $image = $myts->makeTboxData4Save($image); - $xoopsDB->query("update ".$xoopsDB->prefix("sections")." set secname='$secname', image='$image' where secid=$secid"); - redirect_header("index.php?op=sections",2,_MD_DBUPDATED); - exit(); -} - -function secartchange($artid, $secid, $title, $content) { - global $xoopsDB; - $myts =& MyTextSanitizer::getInstance(); - $title = $myts->makeTboxData4Save($title); - $content = $myts->makeTareaData4Save($content); - $xoopsDB->query("update ".$xoopsDB->prefix("seccont")." set secid='$secid', title='$title', content='$content' where artid=$artid"); - redirect_header("index.php?op=sections",2,_MD_DBUPDATED); - exit(); -} - -function sectiondelete($secid, $ok=0) { - global $xoopsDB, $xoopsConfig, $xoopsModule; - - if ( $ok == 1 ) { - $sql = sprintf("DELETE FROM %s WHERE secid = %u", $xoopsDB->prefix("seccont"), $secid); - $xoopsDB->query($sql); - $sql = sprintf("DELETE FROM %s WHERE secid = %u", $xoopsDB->prefix("sections"), $secid); - $xoopsDB->query($sql); - redirect_header("index.php?op=sections",2,_MD_DBUPDATED); - exit(); - } else { - xoops_cp_header(); - echo "

    "._AM_SECCONF."

    "; - $myts =& MyTextSanitizer::getInstance(); - $result=$xoopsDB->query("select secname from ".$xoopsDB->prefix("sections")." where secid=$secid"); - list($secname) = $xoopsDB->fetchRow($result); - $secname = $myts->makeTboxData4Show($secname); - xoops_confirm(array('op' => 'sectiondelete', 'secid' => $secid, 'ok' => 1), 'index.php', _MD_RUSUREDELSEC.'
    '._MD_THISDELETESALL); - } -} - -function secartdelete($artid, $ok=0) { - global $xoopsDB, $xoopsConfig, $xoopsModule; - if ( $ok == 1 ) { - $sql = sprintf("DELETE FROM %s WHERE artid = %u", $xoopsDB->prefix("seccont"), $artid); - $xoopsDB->query($sql); - redirect_header("index.php?op=sections",2,_MD_DBUPDATED); - exit(); - } else { - xoops_cp_header(); - echo "

    "._AM_SECCONF."

    "; - $myts =& MyTextSanitizer::getInstance(); - $result = $xoopsDB->query("select title from ".$xoopsDB->prefix("seccont")." where artid=$artid"); - list($title) = $xoopsDB->fetchRow($result); - $title = $myts->makeTboxData4Show($title); - xoops_confirm(array('op' => 'secartdelete', 'artid' => $artid, 'ok' => 1), 'index.php', sprintf(_MD_DELETETHISART,$title).'

    '._MD_RUSUREDELART); - } -} - $op = ''; -if (isset($HTTP_POST_VARS)) { - foreach ($HTTP_POST_VARS as $k => $v) { - ${$k} = $v; - } -} if (isset($HTTP_GET_VARS['op'])) { - $op = trim($HTTP_GET_VARS['op']); - if (isset($HTTP_GET_VARS['artid'])) { - $artid = intval($HTTP_GET_VARS['artid']); - } - if (isset($HTTP_GET_VARS['secid'])) { - $secid = intval($HTTP_GET_VARS['secid']); - } + $op = trim($HTTP_GET_VARS['op']); + if (isset($HTTP_GET_VARS['artid'])) { + $artid = intval($HTTP_GET_VARS['artid']); + } + if (isset($HTTP_GET_VARS['secid'])) { + $secid = intval($HTTP_GET_VARS['secid']); + } +} elseif (!empty($_POST['op'])) { + $op = $_POST['op']; + $secid = !empty($_POST['secid']) ? intval($_POST['secid']) : 0; } switch ($op) { case "sections": - sections(); - break; + sections(); + break; case "sectionedit": - sectionedit($secid); - break; + sectionedit($secid); + break; case "sectionmake": - sectionmake($secname, $image); - break; -case "sectiondelete": - sectiondelete($secid, $ok); - break; + $myts =& MyTextSanitizer::getInstance(); + $secname = !empty($_POST['secname']) ? $myts->stripSlashesGPC($_POST['secname']) : ''; + if (empty($secname)) { + redirect_header("index.php", 2, _MD_ERRORSECNAME); + } + $image = !empty($_POST['image']) ? $myts->stripSlashesGPC($_POST['image']) : ''; + $newid = $xoopsDB->genId($xoopsDB->prefix("sections")."_secid_seq"); + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("sections")." (secid, secname, image) VALUES ($newid, ".$xoopsDB->quoteString($secname).", ".$xoopsDB->quoteString($image).")"); + redirect_header("index.php?op=sections",2,_MD_DBUPDATED); + break; +case "secartdelete": + xoops_cp_header(); + echo "

    "._AM_SECCONF."

    "; + $myts =& MyTextSanitizer::getInstance(); + $artid = !empty($_POST['artid']) ? intval($_POST['artid']) : 0; + $result = $xoopsDB->query("select title from ".$xoopsDB->prefix("seccont")." where artid=$artid"); + list($title) = $xoopsDB->fetchRow($result); + $title = $myts->makeTboxData4Show($title); + xoops_confirm(array('op' => 'secartdelete_ok', 'artid' => $artid), 'index.php', sprintf(_MD_DELETETHISART,$title).'

    '._MD_RUSUREDELART); + break; +case 'secartdelete_ok': + $artid = !empty($_POST['artid']) ? intval($_POST['artid']) : 0; + if ($artid <= 0) { + redirect_header("index.php?op=sections",2,_MD_DBNOTUPDATED); + } + $sql = sprintf("DELETE FROM %s WHERE artid = %u", $xoopsDB->prefix("seccont"), $artid); + $xoopsDB->query($sql); + redirect_header("index.php?op=sections",2,_MD_DBUPDATED); + break; case "sectionchange": - sectionchange($secid, $secname, $image); - break; + if ($secid <= 0) { + redirect_header("index.php?op=sections",2,_MD_DBNOTUPDATED); + } + $myts =& MyTextSanitizer::getInstance(); + $secname = !empty($_POST['secname']) ? $myts->stripSlashesGPC($_POST['secname']) : ''; + if (empty($secname)) { + redirect_header("index.php", 2, _MD_ERRORSECNAME); + } + $image = !empty($_POST['image']) ? $myts->stripSlashesGPC($_POST['image']) : ''; + $xoopsDB->query("update ".$xoopsDB->prefix("sections")." set secname=".$xoopsDB->quoteString($secname).", image=".$xoopsDB->quoteString($image)." where secid=$secid"); + redirect_header("index.php?op=sections",2,_MD_DBUPDATED); + break; case "secarticleadd": - secarticleadd($secid, $title, $content); - break; + if ($secid <= 0) { + redirect_header("index.php?op=sections",2,_MD_DBNOTUPDATED); + } + $myts =& MyTextSanitizer::getInstance(); + $title = !empty($_POST['title']) ? $myts->stripSlashesGPC($_POST['title']) : ''; + $content = !empty($_POST['content']) ? $myts->stripSlashesGPC($_POST['content']) : ''; + $newid = $xoopsDB->genId($xoopsDB->prefix("seccont")."_artid_seq"); + $success = $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("seccont")." (artid, secid, title, content, counter) VALUES ($newid, $secid, ".$xoopsDB->quoteString($title).", ".$xoopsDB->quoteString($content).", 0)"); + if ( !$success ) { + xoops_cp_header(); + echo "
    "; + echo "

    "._AM_SECCONF."

    "; + echo _MD_DBNOTUPDATED; + echo"
    "; + xoops_cp_footer(); + exit(); + } + redirect_header("index.php?op=sections",2,_MD_DBUPDATED); + break; case "secartedit": - secartedit($artid); - break; + $artid = !empty($_REQUEST['artid']) ? intval($_REQUEST['artid']) : 0; + if ($artid > 0) { + secartedit($artid); + } + break; case "secartchange": - secartchange($artid, $secid, $title, $content); - break; -case "secartdelete": - secartdelete($artid, $ok); - break; + $artid = !empty($_POST['artid']) ? intval($_POST['artid']) : 0; + if ($artid <= 0) { + redirect_header("index.php?op=sections",2,_MD_DBNOTUPDATED); + } + $myts =& MyTextSanitizer::getInstance(); + $title = !empty($_POST['title']) ? $myts->stripSlashesGPC($_POST['title']) : ''; + $content = !empty($_POST['content']) ? $myts->stripSlashesGPC($_POST['content']) : ''; + $xoopsDB->query("update ".$xoopsDB->prefix("seccont")." set secid=$secid, title=".$xoopsDB->quoteString($title).", content=".$xoopsDB->quoteString($content)." where artid=$artid"); + redirect_header("index.php?op=sections",2,_MD_DBUPDATED); + break; +case "sectiondelete": + xoops_cp_header(); + echo "

    "._AM_SECCONF."

    "; + xoops_confirm(array('op' => 'sectiondelete_ok', 'secid' => $secid), 'index.php', _MD_RUSUREDELSEC.'
    '._MD_THISDELETESALL); + break; +case 'sectiondelete_ok': + $sql = sprintf("DELETE FROM %s WHERE secid = %u", $xoopsDB->prefix("seccont"), $secid); + $xoopsDB->query($sql); + $sql = sprintf("DELETE FROM %s WHERE secid = %u", $xoopsDB->prefix("sections"), $secid); + $xoopsDB->query($sql); + redirect_header("index.php?op=sections",2,_MD_DBUPDATED); + break; default: - sections(); - break; + sections(); + break; } xoops_cp_footer(); ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:50 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:50 +0900 Subject: [xoops-cvslog 126] CVS update: xoops2jp/html/modules/system/admin/avatars Message-ID: <20050611023250.6E5012AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/avatars/main.php diff -u xoops2jp/html/modules/system/admin/avatars/main.php:1.2 xoops2jp/html/modules/system/admin/avatars/main.php:1.3 --- xoops2jp/html/modules/system/admin/avatars/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/avatars/main.php Sat Jun 11 11:32:49 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); } else { - $op = 'list'; - if (isset($_POST)) { - foreach ( $_POST as $k => $v ) { - ${$k} = $v; - } - } - if (isset($_GET['op'])) { - $op = trim($_GET['op']); - } - if ($op == 'list') { - xoops_cp_header(); - echo '

    '._MD_AVATARMAN.'

    '; - $avt_handler =& xoops_gethandler('avatar'); - $savatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'S')); - $cavatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'C')); - echo '
    • '._MD_SYSAVATARS.' ('.sprintf(_NUMIMAGES, ''.$savatar_count.'').') ['._LIST.']
    • '._MD_CSTAVATARS.' ('.sprintf(_NUMIMAGES, ''.$cavatar_count.'').') ['._LIST.']
    '; - include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $form = new XoopsThemeForm(_MD_ADDAVT, 'avatar_form', 'admin.php'); - $form->setExtra('enctype="multipart/form-data"'); - $form->addElement(new XoopsFormText(_IMAGENAME, 'avatar_name', 50, 255), true); - $form->addElement(new XoopsFormFile(_IMAGEFILE, 'avatar_file', 500000)); - $form->addElement(new XoopsFormText(_IMGWEIGHT, 'avatar_weight', 3, 4, 0)); - $form->addElement(new XoopsFormRadioYN(_IMGDISPLAY, 'avatar_display', 1, _YES, _NO)); - $form->addElement(new XoopsFormHidden('op', 'addfile')); - $form->addElement(new XoopsFormHidden('fct', 'avatars')); - $form->addElement(new XoopsFormButton('', 'avt_button', _SUBMIT, 'submit')); - $form->display(); - xoops_cp_footer(); - exit(); - } - - if ($op == 'listavt') { - $avt_handler =& xoops_gethandler('avatar'); - xoops_cp_header(); - $type = (isset($_GET['type']) && $_GET['type'] == 'C') ? 'C' : 'S'; - echo ''. _MD_AVATARMAN .' »» '; - if ($type == 'S') { - echo _MD_SYSAVATARS; - } else { - echo _MD_CSTAVATARS; - } - echo '

    '; - $criteria = new Criteria('avatar_type', $type); - $avtcount = $avt_handler->getCount($criteria); - $start = isset($_GET['start']) ? intval($_GET['start']) : 0; - $criteria->setStart($start); - $criteria->setLimit(10); - $avatars =& $avt_handler->getObjects($criteria, true); - if ($type == 'S') { - foreach (array_keys($avatars) as $i) { - echo '
    '; - $id = $avatars[$i]->getVar('avatar_id'); - echo '
    '._IMAGENAME,'
    '._IMAGEMIME.''.$avatars[$i]->getVar('avatar_mimetype').'
    '._MD_USERS.''.$avatars[$i]->getUserCount().'
    '._IMGWEIGHT.'
    '._IMGDISPLAY.'getVar('avatar_display') == 1) { - echo ' checked="checked"'; - } - echo ' />
     '._DELETE.'

    '; - } - } else { - foreach (array_keys($avatars) as $i) { - echo '
    '._IMAGENAME,''.$avatars[$i]->getVar('avatar_name').'
    '._IMAGEMIME.''.$avatars[$i]->getVar('avatar_mimetype').'
     '._DELETE.'

    '; - } - } - if ($avtcount > 0) { - if ($avtcount > 10) { - include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; - $nav = new XoopsPageNav($avtcount, 10, $start, 'start', 'fct=avatars&type='.$type.'&op=listavt'); - echo '
    '.$nav->renderImageNav().'
    '; - } - if ($type == 'S') { - echo '
    '; - } - } - xoops_cp_footer(); - exit(); - } - - if ($op == 'save') { - $count = count($avatar_id); - if ($count > 0) { - $avt_handler =& xoops_gethandler('avatar'); - $error = array(); - for ($i = 0; $i < $count; $i++) { - $avatar =& $avt_handler->get($avatar_id[$i]); - if (!is_object($avatar)) { - $error[] = sprintf(_FAILGETIMG, $avatar_id[$i]); - continue; - } - $avatar_display[$i] = empty($avatar_display[$i]) ? 0 : 1; - $avatar->setVar('avatar_display', $avatar_display[$i]); - $avatar->setVar('avatar_weight', $avatar_weight[$i]); - $avatar->setVar('avatar_name', $avatar_name[$i]); - if (!$avt_handler->insert($avatar)) { - $error[] = sprintf(_FAILSAVEIMG, $avatar_id[$i]); - } - unset($avatar_id[$i]); - unset($avatar_name[$i]); - unset($avatar_weight[$i]); - unset($avatar_display[$i]); - } - if (count($error) > 0) { - xoops_cp_header(); - foreach ($error as $err) { - echo $err.'
    '; - } - xoops_cp_footer(); - exit(); - } - } - redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED); - } - - if ($op == 'addfile') { - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), 500000); - $uploader->setPrefix('savt'); - $err = array(); - $ucount = count($_POST['xoops_upload_file']); - for ($i = 0; $i < $ucount; $i++) { - if ($uploader->fetchMedia($_POST['xoops_upload_file'][$i])) { - if (!$uploader->upload()) { - $err[] = $uploader->getErrors(); - } else { - $avt_handler =& xoops_gethandler('avatar'); - $avatar =& $avt_handler->create(); - $avatar->setVar('avatar_file', $uploader->getSavedFileName()); - $avatar->setVar('avatar_name', $avatar_name); - $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); - $avatar_display = empty($avatar_display) ? 0 : 1; - $avatar->setVar('avatar_display', $avatar_display); - $avatar->setVar('avatar_weight', $avatar_weight); - $avatar->setVar('avatar_type', 'S'); - if (!$avt_handler->insert($avatar)) { - $err[] = sprintf(_FAILSAVEIMG, $avatar->getVar('avatar_name')); - } - } - } else { - $err[] = sprintf(_FAILFETCHIMG, $i); - } - } - if (count($err) > 0) { - xoops_cp_header(); - xoops_error($err); - xoops_cp_footer(); - exit(); - } - redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED); - } - - if ($op == 'delfile') { - xoops_cp_header(); - $user_id = isset($_GET['user_id']) ? intval($_GET['user_id']) : 0; - xoops_confirm(array('op' => 'delfileok', 'avatar_id' => intval($_GET['avatar_id']), 'fct' => 'avatars', 'user_id' => $user_id), 'admin.php', _MD_RUDELIMG); - xoops_cp_footer(); - exit(); - } - - if ($op == 'delfileok') { - $avatar_id = intval($avatar_id); - if ($avatar_id <= 0) { - redirect_header('admin.php?fct=avatars',1); - } - $avt_handler = xoops_gethandler('avatar'); - $avatar =& $avt_handler->get($avatar_id); - if (!is_object($avatar)) { - redirect_header('admin.php?fct=avatars',1); - } - if (!$avt_handler->delete($avatar)) { - xoops_cp_header(); - xoops_error(sprintf(_MD_FAILDEL, $avatar->getVar('avatar_id'))); - xoops_cp_footer(); - exit(); - } - $file = $avatar->getVar('avatar_file'); - @unlink(XOOPS_UPLOAD_PATH.'/'.$file); - if (isset($user_id) && $avatar->getVar('avatar_type') == 'C') { - $xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif' WHERE uid=".intval($user_id)); - } else { - $xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif' WHERE user_avatar='".$file."'"); - } - redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED); - } + $op = 'list'; + if (isset($_GET['op'])) { + $op = trim($_GET['op']); + } elseif (isset($_POST['op'])) { + $op = trim($_POST['op']); + } + if ($op == 'list') { + xoops_cp_header(); + echo '

    '._MD_AVATARMAN.'

    '; + $avt_handler =& xoops_gethandler('avatar'); + $savatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'S')); + $cavatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'C')); + echo '
    • '._MD_SYSAVATARS.' ('.sprintf(_NUMIMAGES, ''.$savatar_count.'').') ['._LIST.']
    • '._MD_CSTAVATARS.' ('.sprintf(_NUMIMAGES, ''.$cavatar_count.'').') ['._LIST.']
    '; + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; + $form = new XoopsThemeForm(_MD_ADDAVT, 'avatar_form', 'admin.php'); + $form->setExtra('enctype="multipart/form-data"'); + $form->addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('avatars_addfile'))); + $form->addElement(new XoopsFormText(_IMAGENAME, 'avatar_name', 50, 255), true); + $form->addElement(new XoopsFormFile(_IMAGEFILE, 'avatar_file', 500000)); + $form->addElement(new XoopsFormText(_IMGWEIGHT, 'avatar_weight', 3, 4, 0)); + $form->addElement(new XoopsFormRadioYN(_IMGDISPLAY, 'avatar_display', 1, _YES, _NO)); + $form->addElement(new XoopsFormHidden('op', 'addfile')); + $form->addElement(new XoopsFormHidden('fct', 'avatars')); + $form->addElement(new XoopsFormButton('', 'avt_button', _SUBMIT, 'submit')); + $form->display(); + xoops_cp_footer(); + exit(); + } + + if ($op == 'listavt') { + $avt_handler =& xoops_gethandler('avatar'); + xoops_cp_header(); + $type = (isset($_GET['type']) && $_GET['type'] == 'C') ? 'C' : 'S'; + echo ''. _MD_AVATARMAN .' »» '; + if ($type == 'S') { + echo _MD_SYSAVATARS; + } else { + echo _MD_CSTAVATARS; + } + echo '

    '; + $criteria = new Criteria('avatar_type', $type); + $avtcount = $avt_handler->getCount($criteria); + $start = isset($_GET['start']) ? intval($_GET['start']) : 0; + $criteria->setStart($start); + $criteria->setLimit(10); + $avatars =& $avt_handler->getObjects($criteria, true); + + $token =& XoopsMultiTokenHandler::quickCreate('avatars_save'); + + if ($type == 'S') { + foreach (array_keys($avatars) as $i) { + echo '
    '; + echo $token->getHtml(); + $id = $avatars[$i]->getVar('avatar_id'); + echo '
    '._IMAGENAME,'
    '._IMAGEMIME.''.$avatars[$i]->getVar('avatar_mimetype').'
    '._MD_USERS.''.$avatars[$i]->getUserCount().'
    '._IMGWEIGHT.'
    '._IMGDISPLAY.'getVar('avatar_display') == 1) { + echo ' checked="checked"'; + } + echo ' />
     '._DELETE.'

    '; + } + } else { + foreach (array_keys($avatars) as $i) { + echo '
    '._IMAGENAME,''.$avatars[$i]->getVar('avatar_name').'
    '._IMAGEMIME.''.$avatars[$i]->getVar('avatar_mimetype').'
     '._DELETE.'

    '; + } + } + if ($avtcount > 0) { + if ($avtcount > 10) { + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; + $nav = new XoopsPageNav($avtcount, 10, $start, 'start', 'fct=avatars&type='.$type.'&op=listavt'); + echo '
    '.$nav->renderImageNav().'
    '; + } + if ($type == 'S') { + echo '
    '; + } + } + xoops_cp_footer(); + exit(); + } + + if ($op == 'save') { + if(!XoopsMultiTokenHandler::quickValidate('avatars_save')) { + xoops_cp_header(); + xoops_error('Ticket Error'); + xoops_cp_footer(); + exit(); + } + + $count = count($_POST['avatar_id']); + if ($count > 0) { + $avt_handler =& xoops_gethandler('avatar'); + $error = array(); + for ($i = 0; $i < $count; $i++) { + $avatar =& $avt_handler->get($_POST['avatar_id'][$i]); + if (!is_object($avatar)) { + $error[] = sprintf(_FAILGETIMG, $_POST['avatar_id'][$i]); + continue; + } + $avatar_display[$i] = empty($_POST['avatar_display'][$i]) ? 0 : 1; + $avatar->setVar('avatar_display', $avatar_display[$i]); + $avatar->setVar('avatar_weight', $_POST['avatar_weight'][$i]); + $avatar->setVar('avatar_name', $_POST['avatar_name'][$i]); + if (!$avt_handler->insert($avatar)) { + $error[] = sprintf(_FAILSAVEIMG, $_POST['avatar_id'][$i]); + } + unset($avatar_id[$i]); + unset($avatar_name[$i]); + unset($avatar_weight[$i]); + unset($avatar_display[$i]); + } + if (count($error) > 0) { + xoops_cp_header(); + foreach ($error as $err) { + echo $err.'
    '; + } + xoops_cp_footer(); + exit(); + } + } + redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED); + } + + if ($op == 'addfile') { + if(!XoopsMultiTokenHandler::quickValidate('avatars_addfile')) { + xoops_cp_header(); + xoops_error('Ticket Error'); + xoops_cp_footer(); + exit(); + } + + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), 500000); + $uploader->setAllowedExtensions(array('gif', 'jpeg', 'jpg', 'png')); + $uploader->setPrefix('savt'); + $err = array(); + $ucount = count($_POST['xoops_upload_file']); + for ($i = 0; $i < $ucount; $i++) { + if ($uploader->fetchMedia($_POST['xoops_upload_file'][$i])) { + if (!$uploader->upload()) { + $err[] = $uploader->getErrors(); + } else { + $avt_handler =& xoops_gethandler('avatar'); + $avatar =& $avt_handler->create(); + $avatar->setVar('avatar_file', $uploader->getSavedFileName()); + $avatar->setVar('avatar_name', $_POST['avatar_name']); + $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); + $avatar_display = empty($_POST['avatar_display']) ? 0 : 1; + $avatar->setVar('avatar_display', $avatar_display); + $avatar->setVar('avatar_weight', $_POST['avatar_weight']); + $avatar->setVar('avatar_type', 'S'); + if (!$avt_handler->insert($avatar)) { + $err[] = sprintf(_FAILSAVEIMG, $avatar->getVar('avatar_name')); + } + } + } else { + $err[] = sprintf(_FAILFETCHIMG, $i); + } + } + if (count($err) > 0) { + xoops_cp_header(); + xoops_error($err); + xoops_cp_footer(); + exit(); + } + redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED); + } + + if ($op == 'delfile') { + xoops_cp_header(); + $user_id = isset($_GET['user_id']) ? intval($_GET['user_id']) : 0; + xoops_token_confirm(array('op' => 'delfileok', 'avatar_id' => intval($_GET['avatar_id']), 'fct' => 'avatars', 'user_id' => $user_id), 'admin.php', _MD_RUDELIMG); + xoops_cp_footer(); + exit(); + } + + if ($op == 'delfileok') { + if(!xoops_confirm_validate()) { + xoops_cp_header(); + xoops_error("Ticket Error"); + xoops_cp_footer(); + exit(); + } + + $avatar_id = intval($_POST['avatar_id']); + if ($avatar_id <= 0) { + redirect_header('admin.php?fct=avatars',1); + } + $avt_handler = xoops_gethandler('avatar'); + $avatar =& $avt_handler->get($avatar_id); + if (!is_object($avatar)) { + redirect_header('admin.php?fct=avatars',1); + } + if (!$avt_handler->delete($avatar)) { + xoops_cp_header(); + xoops_error(sprintf(_MD_FAILDEL, $avatar->getVar('avatar_id'))); + xoops_cp_footer(); + exit(); + } + $file = $avatar->getVar('avatar_file'); + @unlink(XOOPS_UPLOAD_PATH.'/'.$file); + if (isset($user_id) && $avatar->getVar('avatar_type') == 'C') { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif' WHERE uid=".intval($user_id)); + } else { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif' WHERE user_avatar='".$file."'"); + } + redirect_header('admin.php?fct=avatars',2,_MD_AM_DBUPDATED); + } } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:51 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:51 +0900 Subject: [xoops-cvslog 127] CVS update: xoops2jp/html/modules/system/admin/comments Message-ID: <20050611023251.64D782AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/comments/main.php diff -u xoops2jp/html/modules/system/admin/comments/main.php:1.2 xoops2jp/html/modules/system/admin/comments/main.php:1.3 --- xoops2jp/html/modules/system/admin/comments/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/comments/main.php Sat Jun 11 11:32:51 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->getVar('mid')) ) { - exit("Access Denied"); + exit("Access Denied"); } else { - $op = 'list'; -// if (isset($_POST)) { -// foreach ( $_POST as $k => $v ) { -// ${$k} = $v; -// } -// } - if (isset($_GET['op'])) { - $op = trim($_GET['op']); - } - switch ($op) { - case 'list': - include_once XOOPS_ROOT_PATH.'/include/comment_constants.php'; - include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php'; - $limit_array = array(10, 20, 50, 100); - $status_array = array(XOOPS_COMMENT_PENDING => _CM_PENDING, XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, XOOPS_COMMENT_HIDDEN => _CM_HIDDEN); - $status_array2 = array(XOOPS_COMMENT_PENDING => ''._CM_PENDING.'', XOOPS_COMMENT_ACTIVE => ''._CM_ACTIVE.'', XOOPS_COMMENT_HIDDEN => ''._CM_HIDDEN.''); - $status = (!isset($_GET['status']) || !in_array(intval($_GET['status']), array_keys($status_array))) ? 0 : intval($_GET['status']); - $module = !isset($_GET['module']) ? 0 : intval($_GET['module']); - $module_handler =& xoops_gethandler('module'); - $module_array =& $module_handler->getList(new Criteria('hascomments', 1)); - $comment_handler =& xoops_gethandler('comment'); - $criteria = new CriteriaCompo(); - if ($status > 0) { - $criteria->add(new Criteria('com_status', $status)); - } - if ($module > 0) { - $criteria->add(new Criteria('com_modid', $module)); - } - $total = $comment_handler->getCount($criteria); - if ($total > 0) { - $start = isset($_GET['start']) ? intval($_GET['start']) : 0; - $limit = isset($_GET['limit']) ? intval($_GET['limit']) : 0; - if (!in_array($limit, $limit_array)) { - $limit = 50; - } - $sort = (!isset($_GET['sort']) || !in_array($_GET['sort'], array('com_modid', 'com_status', 'com_created', 'com_uid', 'com_ip', 'com_title'))) ? 'com_id' : $_GET['sort']; - if (!isset($_GET['order']) || $_GET['order'] != 'ASC') { - $order = 'DESC'; - $otherorder = 'ASC'; - } else { - $order = 'ASC'; - $otherorder = 'DESC'; - } - $criteria->setSort($sort); - $criteria->setOrder($order); - $criteria->setLimit($limit); - $criteria->setStart($start); - $comments =& $comment_handler->getObjects($criteria, true); - } else { - $start = 0; - $limit = 0; - $otherorder = 'DESC'; - $comments = array(); - } - $form = '
    '; - $form .= '   
    '; - - xoops_cp_header(); - echo '

    '._MD_AM_COMMMAN.'

    '; - echo $form; - echo ''; - $class = 'even'; - foreach (array_keys($comments) as $i) { - $class = ($class == 'odd') ? 'even' : 'odd'; - $poster_uname = $xoopsConfig['anonymous']; - if ($comments[$i]->getVar('com_uid') > 0) { - $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid')); - if (is_object($poster)) { - $poster_uname = ''.$poster->getVar('uname').''; - } - } - $icon = ($comments[$i]->getVar('com_icon') != '') ? '' : ''; - echo ''; - } - echo '
    '._MD_AM_LISTCOMM.'
     '._CM_TITLE.''._CM_POSTED.''._CM_POSTER.'IP'._MD_AM_MODULE.''._CM_STATUS.' 
    '.$icon.''. $comments[$i]->getVar('com_title').''.formatTimestamp($comments[$i]->getVar('com_created'), 'm').''.$poster_uname.''.$comments[$i]->getVar('com_ip').''.$module_array[$comments[$i]->getVar('com_modid')].''.$status_array2[$comments[$i]->getVar('com_status')].''._EDIT.' '._DELETE.'
    '; - echo '
    '.sprintf(_MD_AM_COMFOUND, ''.$total.''); - if ($total > $limit) { - include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; - $nav = new XoopsPageNav($total, $limit, $start, 'start', 'fct=comments&op=list&limit='.$limit.'&sort='.$sort.'&order='.$order.'&module='.$module); - echo ''.$nav->renderNav(); - } - echo '
    '; - xoops_cp_footer(); - break; - - case 'jump': - $com_id = (isset($_GET['com_id'])) ? intval($_GET['com_id']) : 0; - if ($com_id > 0) { - $comment_handler =& xoops_gethandler('comment'); - $comment =& $comment_handler->get($com_id); - if (is_object($comment)) { - $module_handler =& xoops_gethandler('module'); - $module =& $module_handler->get($comment->getVar('com_modid')); - $comment_config = $module->getInfo('comments'); - header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); - exit(); - } - } - redirect_header('admin.php?fct=comments', 1); - break; - - default: - break; - } + $op = 'list'; + if (isset($_GET['op'])) { + $op = trim($_GET['op']); + } + switch ($op) { + case 'list': + include_once XOOPS_ROOT_PATH.'/include/comment_constants.php'; + include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php'; + $limit_array = array(10, 20, 50, 100); + $status_array = array(XOOPS_COMMENT_PENDING => _CM_PENDING, XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, XOOPS_COMMENT_HIDDEN => _CM_HIDDEN); + $status_array2 = array(XOOPS_COMMENT_PENDING => ''._CM_PENDING.'', XOOPS_COMMENT_ACTIVE => ''._CM_ACTIVE.'', XOOPS_COMMENT_HIDDEN => ''._CM_HIDDEN.''); + $status = (!isset($_GET['status']) || !in_array(intval($_GET['status']), array_keys($status_array))) ? 0 : intval($_GET['status']); + $module = !isset($_GET['module']) ? 0 : intval($_GET['module']); + $module_handler =& xoops_gethandler('module'); + $module_array =& $module_handler->getList(new Criteria('hascomments', 1)); + $comment_handler =& xoops_gethandler('comment'); + $criteria = new CriteriaCompo(); + if ($status > 0) { + $criteria->add(new Criteria('com_status', $status)); + } + if ($module > 0) { + $criteria->add(new Criteria('com_modid', $module)); + } + $total = $comment_handler->getCount($criteria); + if ($total > 0) { + $start = isset($_GET['start']) ? intval($_GET['start']) : 0; + $limit = isset($_GET['limit']) ? intval($_GET['limit']) : 0; + if (!in_array($limit, $limit_array)) { + $limit = 50; + } + $sort = (!isset($_GET['sort']) || !in_array($_GET['sort'], array('com_modid', 'com_status', 'com_created', 'com_uid', 'com_ip', 'com_title'))) ? 'com_id' : $_GET['sort']; + if (!isset($_GET['order']) || $_GET['order'] != 'ASC') { + $order = 'DESC'; + $otherorder = 'ASC'; + } else { + $order = 'ASC'; + $otherorder = 'DESC'; + } + $criteria->setSort($sort); + $criteria->setOrder($order); + $criteria->setLimit($limit); + $criteria->setStart($start); + $comments =& $comment_handler->getObjects($criteria, true); + } else { + $start = 0; + $limit = 0; + $otherorder = 'DESC'; + $comments = array(); + } + $form = '
    '; + $form .= '   
    '; + + xoops_cp_header(); + echo '

    '._MD_AM_COMMMAN.'

    '; + echo $form; + echo ''; + $class = 'even'; + foreach (array_keys($comments) as $i) { + $class = ($class == 'odd') ? 'even' : 'odd'; + $poster_uname = $xoopsConfig['anonymous']; + if ($comments[$i]->getVar('com_uid') > 0) { + $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid')); + if (is_object($poster)) { + $poster_uname = ''.$poster->getVar('uname').''; + } + } + $icon = ($comments[$i]->getVar('com_icon') != '') ? '' : ''; + echo ''; + } + echo '
    '._MD_AM_LISTCOMM.'
     '._CM_TITLE.''._CM_POSTED.''._CM_POSTER.'IP'._MD_AM_MODULE.''._CM_STATUS.' 
    '.$icon.''. $comments[$i]->getVar('com_title').''.formatTimestamp($comments[$i]->getVar('com_created'), 'm').''.$poster_uname.''.$comments[$i]->getVar('com_ip').''.$module_array[$comments[$i]->getVar('com_modid')].''.$status_array2[$comments[$i]->getVar('com_status')].''._EDIT.' '._DELETE.'
    '; + echo '
    '.sprintf(_MD_AM_COMFOUND, ''.$total.''); + if ($total > $limit) { + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; + $nav = new XoopsPageNav($total, $limit, $start, 'start', 'fct=comments&op=list&limit='.$limit.'&sort='.$sort.'&order='.$order.'&module='.$module); + echo ''.$nav->renderNav(); + } + echo '
    '; + xoops_cp_footer(); + break; + + case 'jump': + $com_id = (isset($_GET['com_id'])) ? intval($_GET['com_id']) : 0; + if ($com_id > 0) { + $comment_handler =& xoops_gethandler('comment'); + $comment =& $comment_handler->get($com_id); + if (is_object($comment)) { + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->get($comment->getVar('com_modid')); + $comment_config = $module->getInfo('comments'); + header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); + exit(); + } + } + redirect_header('admin.php?fct=comments', 1); + break; + + default: + break; + } } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:51 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:51 +0900 Subject: [xoops-cvslog 128] CVS update: xoops2jp/html/modules/system/admin/groups Message-ID: <20050611023251.B17012AC02F@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/groups/groupform.php diff -u xoops2jp/html/modules/system/admin/groups/groupform.php:1.2 xoops2jp/html/modules/system/admin/groups/groupform.php:1.3 --- xoops2jp/html/modules/system/admin/groups/groupform.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/groups/groupform.php Sat Jun 11 11:32:51 2005 @@ -1,5 +1,5 @@ addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('groups_'.$op_value))); $form->addElement($name_text); $form->addElement($desc_text); $form->addElement($s_cat_checkbox); Index: xoops2jp/html/modules/system/admin/groups/groups.php diff -u xoops2jp/html/modules/system/admin/groups/groups.php:1.2 xoops2jp/html/modules/system/admin/groups/groups.php:1.3 --- xoops2jp/html/modules/system/admin/groups/groups.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/groups/groups.php Sat Jun 11 11:32:51 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); +} + +/** + * Display error message & exit (Tentative) + */ +function system_groups_error($message) +{ + xoops_cp_header(); + xoops_error($message); + xoops_cp_footer(); + exit(); } /*********************************************************/ @@ -38,158 +49,167 @@ /*********************************************************/ function displayGroups() { - xoops_cp_header(); - //OpenTable(); - echo "

    "._AM_EDITADG."

    "; - $member_handler =& xoops_gethandler('member'); - $groups =& $member_handler->getGroups(); + xoops_cp_header(); + //OpenTable(); + echo "

    "._AM_EDITADG."

    "; + $member_handler =& xoops_gethandler('member'); + $groups =& $member_handler->getGroups(); echo ""; - $count = count($groups); - for ($i = 0; $i < $count; $i++) { - $id = $groups[$i]->getVar('groupid'); + $count = count($groups); + for ($i = 0; $i < $count; $i++) { + $id = $groups[$i]->getVar('groupid'); echo ''; - echo ''; - } else { - echo ' '._AM_DELETE.''; - } - } - echo "
    "._AM_EDITADG."
    '.$groups[$i]->getVar('name').''._AM_MODIFY.''; - if (XOOPS_GROUP_ADMIN == $id || XOOPS_GROUP_USERS == $id || XOOPS_GROUP_ANONYMOUS == $id) { - echo '
    "; - $name_value = ""; - $desc_value = ""; - $s_cat_value = ''; - $a_mod_value = array(); - $r_mod_value = array(); - $r_block_value = array(); - $op_value = "add"; - $submit_value = _AM_CREATENEWADG; - $g_id_value = ""; - $type_value = ""; - $form_title = _AM_CREATENEWADG; - include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php"; - //CloseTable(); - xoops_cp_footer(); + echo ''._AM_MODIFY.''; + if (XOOPS_GROUP_ADMIN == $id || XOOPS_GROUP_USERS == $id || XOOPS_GROUP_ANONYMOUS == $id) { + echo ''; + } else { + echo ' '._AM_DELETE.''; + } + } + echo ""; + $name_value = ""; + $desc_value = ""; + $s_cat_value = ''; + $a_mod_value = array(); + $r_mod_value = array(); + $r_block_value = array(); + $op_value = "add"; + $submit_value = _AM_CREATENEWADG; + $g_id_value = ""; + $type_value = ""; + $form_title = _AM_CREATENEWADG; + include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php"; + //CloseTable(); + xoops_cp_footer(); } function modifyGroup($g_id) { - $userstart = $memstart = 0; - if ( !empty($_POST['userstart']) ) { - $userstart = intval($_POST['userstart']); - } elseif (!empty($_GET['userstart'])) { - $userstart = intval($_GET['userstart']); - } - if ( !empty($_POST['memstart']) ) { - $memstart = intval($_POST['memstart']); - } elseif (!empty($_GET['memstart'])) { - $memstart = intval($_GET['memstart']); - } - xoops_cp_header(); - //OpenTable(); - echo ''. _AM_GROUPSMAIN .' »» '. _AM_MODIFYADG.'

    '; - $member_handler =& xoops_gethandler('member'); - $thisgroup =& $member_handler->getGroup($g_id); - $name_value = $thisgroup->getVar("name", "E"); - $desc_value = $thisgroup->getVar("description", "E"); - $moduleperm_handler =& xoops_gethandler('groupperm'); - $a_mod_value =& $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid')); - $r_mod_value =& $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid')); - $r_block_value =& XoopsBlock::getAllBlocksByGroup($thisgroup->getVar("groupid"), false); - $op_value = "update"; - $submit_value = _AM_UPDATEADG; - $g_id_value = $thisgroup->getVar("groupid"); - $type_value = $thisgroup->getVar("group_type", "E"); - $form_title = _AM_MODIFYADG; - if (XOOPS_GROUP_ADMIN == $g_id) { - $s_cat_disable = true; - } - - $sysperm_handler =& xoops_gethandler('groupperm'); - $s_cat_value =& $sysperm_handler->getItemIds('system_admin', $g_id); - - include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php"; - echo "

    "._AM_EDITMEMBER."

    "; - $usercount = $member_handler->getUserCount(new Criteria('level', 0, '>')); - $member_handler =& xoops_gethandler('member'); - $membercount = $member_handler->getUserCountByGroup($g_id); - if ($usercount < 200 && $membercount < 200) { - // do the old way only when counts are small - $mlist = array(); - $members =& $member_handler->getUsersByGroup($g_id, false); - if (count($members) > 0) { - $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN"); - $member_criteria->setSort('uname'); - $mlist = $member_handler->getUserList($member_criteria); - } - $criteria = new Criteria('level', 0, '>'); - $criteria->setSort('uname'); - $userslist =& $member_handler->getUserList($criteria); - $users =& array_diff($userslist, $mlist); - echo ' - - - - -
    '._AM_NONMEMBERS.'
    '; - - echo '
    '._AM_MEMBERS.'
    '; - echo '
    -
    - '; - echo "
    - - - - -
    -
    - - - - -
    "; - echo ""; - echo '
    '; - } else { - $members =& $member_handler->getUsersByGroup($g_id, false, 200, $memstart); - $mlist = array(); - if (count($members) > 0) { - $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN"); - $member_criteria->setSort('uname'); - $mlist = $member_handler->getUserList($member_criteria); - } - echo ''._AM_FINDU4GROUP.'
    '; - echo '
    - - - -
    '._AM_MEMBERS.'
    '; - $nav = new XoopsPageNav($membercount, 200, $memstart, "memstart", "fct=groups&op=modify&g_id=".$g_id); - echo $nav->renderNav(4); - echo "
    - - - - -
    - -
    -
    "; - } - //CloseTable(); - xoops_cp_footer(); + $userstart = $memstart = 0; + if ( !empty($_POST['userstart']) ) { + $userstart = intval($_POST['userstart']); + } elseif (!empty($_GET['userstart'])) { + $userstart = intval($_GET['userstart']); + } + if ( !empty($_POST['memstart']) ) { + $memstart = intval($_POST['memstart']); + } elseif (!empty($_GET['memstart'])) { + $memstart = intval($_GET['memstart']); + } + xoops_cp_header(); + //OpenTable(); + echo ''. _AM_GROUPSMAIN .' »» '. _AM_MODIFYADG.'

    '; + $member_handler =& xoops_gethandler('member'); + $thisgroup =& $member_handler->getGroup($g_id); + $name_value = $thisgroup->getVar("name", "E"); + $desc_value = $thisgroup->getVar("description", "E"); + $moduleperm_handler =& xoops_gethandler('groupperm'); + $a_mod_value =& $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid')); + $r_mod_value =& $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid')); + $r_block_value =& XoopsBlock::getAllBlocksByGroup($thisgroup->getVar("groupid"), false); + $op_value = "update"; + $submit_value = _AM_UPDATEADG; + $g_id_value = $thisgroup->getVar("groupid"); + $type_value = $thisgroup->getVar("group_type", "E"); + $form_title = _AM_MODIFYADG; + if (XOOPS_GROUP_ADMIN == $g_id) { + $s_cat_disable = true; + } + + $sysperm_handler =& xoops_gethandler('groupperm'); + $s_cat_value =& $sysperm_handler->getItemIds('system_admin', $g_id); + + include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php"; + echo "

    "._AM_EDITMEMBER."

    "; + $usercount = $member_handler->getUserCount(new Criteria('level', 0, '>')); + $member_handler =& xoops_gethandler('member'); + $membercount = $member_handler->getUserCountByGroup($g_id); + $token=&XoopsMultiTokenHandler::quickCreate('groups_User'); + if ($usercount < 200 && $membercount < 200) { + // do the old way only when counts are small + $mlist = array(); + $members =& $member_handler->getUsersByGroup($g_id, false); + if (count($members) > 0) { + $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN"); + $member_criteria->setSort('uname'); + $mlist = $member_handler->getUserList($member_criteria); + } + $criteria = new Criteria('level', 0, '>'); + $criteria->setSort('uname'); + $userslist =& $member_handler->getUserList($criteria); + $users =& array_diff($userslist, $mlist); + echo ' + + + + +
    '._AM_NONMEMBERS.'
    '; + echo '
    '._AM_MEMBERS.'
    '; + echo '
    +
    '; + + echo $token->getHtml(); + + echo ''; + + + echo "
    + + + + +
    +
    "; + + echo $token->getHtml(); + + echo " + + + +
    "; + echo ""; + echo '
    '; + } else { + $members =& $member_handler->getUsersByGroup($g_id, false, 200, $memstart); + $mlist = array(); + if (count($members) > 0) { + $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN"); + $member_criteria->setSort('uname'); + $mlist = $member_handler->getUserList($member_criteria); + } + echo ''._AM_FINDU4GROUP.'
    '; + echo '
    + + + +
    '._AM_MEMBERS.'
    '; + $nav = new XoopsPageNav($membercount, 200, $memstart, "memstart", "fct=groups&op=modify&g_id=".$g_id); + echo $token->getHtml(); + echo $nav->renderNav(4); + echo "
    + + + + +
    + +
    +
    "; + } + //CloseTable(); + xoops_cp_footer(); } ?> \ No newline at end of file Index: xoops2jp/html/modules/system/admin/groups/main.php diff -u xoops2jp/html/modules/system/admin/groups/main.php:1.2 xoops2jp/html/modules/system/admin/groups/main.php:1.3 --- xoops2jp/html/modules/system/admin/groups/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/groups/main.php Sat Jun 11 11:32:51 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); } else { - include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; - include_once XOOPS_ROOT_PATH."/modules/system/admin/groups/groups.php"; - $op = "display"; - if ( isset($_POST) ) { - foreach ( $_POST as $k => $v ) { - $$k = $v; - } - } - if ( isset($_GET['op']) ) { - if ($_GET['op'] == "modify" || $_GET['op'] == "del") { - $op = $_GET['op']; - $g_id = $_GET['g_id']; - } - } - - // from finduser section - if ( !empty($memberslist_id) && is_array($memberslist_id) ) { - $op = "addUser"; - $uids =& $memberslist_id; - } - - switch ($op) { - case "modify": - include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; - modifyGroup($g_id); - break; - case "update": - $system_catids = empty($system_catids) ? array() : $system_catids; - $admin_mids = empty($admin_mids) ? array() : $admin_mids; - $read_mids = empty($read_mids) ? array() : $read_mids; - $read_bids = empty($read_bids) ? array() : $read_bids; - $member_handler =& xoops_gethandler('member'); - $group =& $member_handler->getGroup($g_id); - $group->setVar('name', $name); - $group->setVar('description', $desc); - // if this group is not one of the default groups - if (!in_array($group->getVar('groupid'), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) { - if (count($system_catids) > 0) { - $group->setVar('group_type', 'Admin'); - } else { - $group->setVar('group_type', ''); - } - } - if (!$member_handler->insertGroup($group)) { - xoops_cp_header(); - echo $group->getHtmlErrors(); - xoops_cp_footer(); - } else { - $groupid = $group->getVar('groupid'); - $gperm_handler =& xoops_gethandler('groupperm'); - $criteria = new CriteriaCompo(new Criteria('gperm_groupid', $groupid)); - $criteria->add(new Criteria('gperm_modid', 1)); - $criteria2 = new CriteriaCompo(new Criteria('gperm_name', 'system_admin')); - $criteria2->add(new Criteria('gperm_name', 'module_admin'), 'OR'); - $criteria2->add(new Criteria('gperm_name', 'module_read'), 'OR'); - $criteria2->add(new Criteria('gperm_name', 'block_read'), 'OR'); - $criteria->add($criteria2); - $gperm_handler->deleteAll($criteria); - if (count($system_catids) > 0) { - array_push($admin_mids, 1); - foreach ($system_catids as $s_cid) { - $sysperm =& $gperm_handler->create(); - $sysperm->setVar('gperm_groupid', $groupid); - $sysperm->setVar('gperm_itemid', $s_cid); - $sysperm->setVar('gperm_name', 'system_admin'); - $sysperm->setVar('gperm_modid', 1); - $gperm_handler->insert($sysperm); - } - } - foreach ($admin_mids as $a_mid) { - $modperm =& $gperm_handler->create(); - $modperm->setVar('gperm_groupid', $groupid); - $modperm->setVar('gperm_itemid', $a_mid); - $modperm->setVar('gperm_name', 'module_admin'); - $modperm->setVar('gperm_modid', 1); - $gperm_handler->insert($modperm); - } - array_push($read_mids, 1); - foreach ($read_mids as $r_mid) { - $modperm =& $gperm_handler->create(); - $modperm->setVar('gperm_groupid', $groupid); - $modperm->setVar('gperm_itemid', $r_mid); - $modperm->setVar('gperm_name', 'module_read'); - $modperm->setVar('gperm_modid', 1); - $gperm_handler->insert($modperm); - } - foreach ($read_bids as $r_bid) { - $blockperm =& $gperm_handler->create(); - $blockperm->setVar('gperm_groupid', $groupid); - $blockperm->setVar('gperm_itemid', $r_bid); - $blockperm->setVar('gperm_name', 'block_read'); - $blockperm->setVar('gperm_modid', 1); - $gperm_handler->insert($blockperm); - } - redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); - } - break; - case "add": - if (!$name) { - xoops_cp_header(); - echo _AM_UNEED2ENTER; - xoops_cp_footer(); - exit(); - } - $system_catids = empty($system_catids) ? array() : $system_catids; - $admin_mids = empty($admin_mids) ? array() : $admin_mids; - $read_mids = empty($read_mids) ? array() : $read_mids; - $read_bids = empty($read_bids) ? array() : $read_bids; - $member_handler =& xoops_gethandler('member'); - $group =& $member_handler->createGroup(); - $group->setVar("name", $name); - $group->setVar("description", $desc); - if (count($system_catids) > 0) { - $group->setVar("group_type", 'Admin'); - } - if (!$member_handler->insertGroup($group)) { - xoops_cp_header(); - echo $group->getHtmlErrors(); - xoops_cp_footer(); - } else { - $groupid = $group->getVar('groupid'); - $gperm_handler =& xoops_gethandler('groupperm'); - if (count($system_catids) > 0) { - array_push($admin_mids, 1); - foreach ($system_catids as $s_cid) { - $sysperm =& $gperm_handler->create(); - $sysperm->setVar('gperm_groupid', $groupid); - $sysperm->setVar('gperm_itemid', $s_cid); - $sysperm->setVar('gperm_name', 'system_admin'); - $sysperm->setVar('gperm_modid', 1); - $gperm_handler->insert($sysperm); - } - } - foreach ($admin_mids as $a_mid) { - $modperm =& $gperm_handler->create(); - $modperm->setVar('gperm_groupid', $groupid); - $modperm->setVar('gperm_itemid', $a_mid); - $modperm->setVar('gperm_name', 'module_admin'); - $modperm->setVar('gperm_modid', 1); - $gperm_handler->insert($modperm); - } - array_push($read_mids, 1); - foreach ($read_mids as $r_mid) { - $modperm =& $gperm_handler->create(); - $modperm->setVar('gperm_groupid', $groupid); - $modperm->setVar('gperm_itemid', $r_mid); - $modperm->setVar('gperm_name', 'module_read'); - $modperm->setVar('gperm_modid', 1); - $gperm_handler->insert($modperm); - } - foreach ($read_bids as $r_bid) { - $blockperm =& $gperm_handler->create(); - $blockperm->setVar('gperm_groupid', $groupid); - $blockperm->setVar('gperm_itemid', $r_bid); - $blockperm->setVar('gperm_name', 'block_read'); - $blockperm->setVar('gperm_modid', 1); - $gperm_handler->insert($blockperm); - } - redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); - } + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; + include_once XOOPS_ROOT_PATH."/modules/system/admin/groups/groups.php"; + $op = "display"; + + if ( isset($_GET['op']) ) { + if ($_GET['op'] == "modify" || $_GET['op'] == "del") { + $op = $_GET['op']; + $g_id = $_GET['g_id']; + } + } elseif (isset($_POST['op'])) { + $op = $_POST['op']; + } + + // from finduser section + if ( !empty($_POST['memberslist_id']) && is_array($_POST['memberslist_id']) ) { + $op = "addUser"; + $_POST['uids'] = $_POST['memberslist_id']; + } + + switch ($op) { + case "modify": + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; + modifyGroup($g_id); + break; + case "update": + if(!XoopsMultiTokenHandler::quickValidate('groups_update')) + system_groups_error("Ticket Error"); + + $g_id = !empty($_POST['g_id']) ? intval($_POST['g_id']) : 0; + if ($g_id <= 0) { + exit(); + } + $system_catids = empty($_POST['system_catids']) ? array() : $_POST['system_catids']; + $admin_mids = empty($_POST['admin_mids']) ? array() : $_POST['admin_mids']; + $read_mids = empty($_POST['read_mids']) ? array() : $_POST['read_mids']; + $read_bids = empty($_POST['read_bids']) ? array() : $_POST['read_bids']; + $member_handler =& xoops_gethandler('member'); + $group =& $member_handler->getGroup($g_id); + $group->setVar('name', $_POST['name']); + $group->setVar('description', $_POST['desc']); + // if this group is not one of the default groups + if (!in_array($group->getVar('groupid'), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) { + if (count($system_catids) > 0) { + $group->setVar('group_type', 'Admin'); + } else { + $group->setVar('group_type', ''); + } + } + if (!$member_handler->insertGroup($group)) { + xoops_cp_header(); + echo $group->getHtmlErrors(); + xoops_cp_footer(); + } else { + $groupid = $group->getVar('groupid'); + $gperm_handler =& xoops_gethandler('groupperm'); + $criteria = new CriteriaCompo(new Criteria('gperm_groupid', $groupid)); + $criteria->add(new Criteria('gperm_modid', 1)); + $criteria2 = new CriteriaCompo(new Criteria('gperm_name', 'system_admin')); + $criteria2->add(new Criteria('gperm_name', 'module_admin'), 'OR'); + $criteria2->add(new Criteria('gperm_name', 'module_read'), 'OR'); + $criteria2->add(new Criteria('gperm_name', 'block_read'), 'OR'); + $criteria->add($criteria2); + $gperm_handler->deleteAll($criteria); + if (count($system_catids) > 0) { + array_push($admin_mids, 1); + foreach ($system_catids as $s_cid) { + $sysperm =& $gperm_handler->create(); + $sysperm->setVar('gperm_groupid', $groupid); + $sysperm->setVar('gperm_itemid', $s_cid); + $sysperm->setVar('gperm_name', 'system_admin'); + $sysperm->setVar('gperm_modid', 1); + $gperm_handler->insert($sysperm); + } + } + foreach ($admin_mids as $a_mid) { + $modperm =& $gperm_handler->create(); + $modperm->setVar('gperm_groupid', $groupid); + $modperm->setVar('gperm_itemid', $a_mid); + $modperm->setVar('gperm_name', 'module_admin'); + $modperm->setVar('gperm_modid', 1); + $gperm_handler->insert($modperm); + } + array_push($read_mids, 1); + foreach ($read_mids as $r_mid) { + $modperm =& $gperm_handler->create(); + $modperm->setVar('gperm_groupid', $groupid); + $modperm->setVar('gperm_itemid', $r_mid); + $modperm->setVar('gperm_name', 'module_read'); + $modperm->setVar('gperm_modid', 1); + $gperm_handler->insert($modperm); + } + foreach ($read_bids as $r_bid) { + $blockperm =& $gperm_handler->create(); + $blockperm->setVar('gperm_groupid', $groupid); + $blockperm->setVar('gperm_itemid', $r_bid); + $blockperm->setVar('gperm_name', 'block_read'); + $blockperm->setVar('gperm_modid', 1); + $gperm_handler->insert($blockperm); + } + redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); + } + break; + case "add": + if(!XoopsMultiTokenHandler::quickValidate('groups_add')) + system_groups_error("Ticket Error"); + + $name = !empty($_POST['name']) ? trim($_POST['name']) : ''; + if ($name == '') { + xoops_cp_header(); + echo _AM_UNEED2ENTER; + xoops_cp_footer(); + exit(); + } + $system_catids = empty($_POST['system_catids']) ? array() : $_POST['system_catids']; + $admin_mids = empty($_POST['admin_mids']) ? array() : $_POST['admin_mids']; + $read_mids = empty($_POST['read_mids']) ? array() : $_POST['read_mids']; + $read_bids = empty($_POST['read_bids']) ? array() : $_POST['read_bids']; + $member_handler =& xoops_gethandler('member'); + $group =& $member_handler->createGroup(); + $group->setVar("name", $name); + $group->setVar("description", $_POST['desc']); + if (count($system_catids) > 0) { + $group->setVar("group_type", 'Admin'); + } + if (!$member_handler->insertGroup($group)) { + xoops_cp_header(); + echo $group->getHtmlErrors(); + xoops_cp_footer(); + } else { + $groupid = $group->getVar('groupid'); + $gperm_handler =& xoops_gethandler('groupperm'); + if (count($system_catids) > 0) { + array_push($admin_mids, 1); + foreach ($system_catids as $s_cid) { + $sysperm =& $gperm_handler->create(); + $sysperm->setVar('gperm_groupid', $groupid); + $sysperm->setVar('gperm_itemid', $s_cid); + $sysperm->setVar('gperm_name', 'system_admin'); + $sysperm->setVar('gperm_modid', 1); + $gperm_handler->insert($sysperm); + } + } + foreach ($admin_mids as $a_mid) { + $modperm =& $gperm_handler->create(); + $modperm->setVar('gperm_groupid', $groupid); + $modperm->setVar('gperm_itemid', $a_mid); + $modperm->setVar('gperm_name', 'module_admin'); + $modperm->setVar('gperm_modid', 1); + $gperm_handler->insert($modperm); + } + array_push($read_mids, 1); + foreach ($read_mids as $r_mid) { + $modperm =& $gperm_handler->create(); + $modperm->setVar('gperm_groupid', $groupid); + $modperm->setVar('gperm_itemid', $r_mid); + $modperm->setVar('gperm_name', 'module_read'); + $modperm->setVar('gperm_modid', 1); + $gperm_handler->insert($modperm); + } + foreach ($read_bids as $r_bid) { + $blockperm =& $gperm_handler->create(); + $blockperm->setVar('gperm_groupid', $groupid); + $blockperm->setVar('gperm_itemid', $r_bid); + $blockperm->setVar('gperm_name', 'block_read'); + $blockperm->setVar('gperm_modid', 1); + $gperm_handler->insert($blockperm); + } + redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); + } break; case "del": - xoops_cp_header(); - xoops_confirm(array('fct' => 'groups', 'op' => 'delConf', 'g_id' => $g_id), 'admin.php', _AM_AREUSUREDEL); + xoops_cp_header(); + $member_handler =& xoops_gethandler('member'); + $group =& $member_handler->getGroup($g_id); + xoops_token_confirm(array('fct' => 'groups', 'op' => 'delConf', 'g_id' => $g_id), 'admin.php', sprintf(_AM_AREUSUREDEL,$group->getVar('name'))); xoops_cp_footer(); break; - case "delConf": - if (intval($g_id) > 0 && !in_array($g_id, array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) { - $member_handler =& xoops_gethandler('member'); - $group =& $member_handler->getGroup($g_id); - $member_handler->deleteGroup($group); - $gperm_handler =& xoops_gethandler('groupperm'); - $gperm_handler->deleteByGroup($g_id); - } - redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); - break; - case "addUser": - $member_handler =& xoops_gethandler('member'); - $size = count($uids); - for ( $i = 0; $i < $size; $i++ ) { - $member_handler->addUserToGroup($groupid, $uids[$i]); - } - redirect_header("admin.php?fct=groups&op=modify&g_id=".$groupid."",0,_AM_DBUPDATED); - break; - case "delUser": - if (intval($groupid) > 0) { - $member_handler =& xoops_gethandler('member'); - $memstart = isset($memstart) ? intval($memstart) : 0; - if ($groupid == XOOPS_GROUP_ADMIN) { - if ($member_handler->getUserCountByGroup($groupid) > count($uids)){ - $member_handler->removeUsersFromGroup($groupid, $uids); - } - } else { - $member_handler->removeUsersFromGroup($groupid, $uids); - } - redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_DBUPDATED); - } - break; - case "display": - default: - displayGroups(); - break; - } + case "delConf": + if(!xoops_confirm_validate()) + system_groups_error("Ticket Error"); + + $g_id = !empty($_POST['g_id']) ? intval($_POST['g_id']) : 0; + if ($g_id > 0 && !in_array($g_id, array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) { + $member_handler =& xoops_gethandler('member'); + $group =& $member_handler->getGroup($g_id); + $member_handler->deleteGroup($group); + $gperm_handler =& xoops_gethandler('groupperm'); + $gperm_handler->deleteByGroup($g_id); + } + redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); + break; + case "addUser": + if(!XoopsMultiTokenHandler::quickValidate('groups_User')) + system_groups_error("Ticket Error"); + + $member_handler =& xoops_gethandler('member'); + $groupid = intval($_POST['groupid']); + if ($groupid > 0) { + $size = count($_POST['uids']); + for ( $i = 0; $i < $size; $i++ ) { + $member_handler->addUserToGroup($_POST['groupid'], $_POST['uids'][$i]); + } + } + redirect_header("admin.php?fct=groups&op=modify&g_id=".$groupid, 0, _AM_DBUPDATED); + break; + case "delUser": + if(!XoopsMultiTokenHandler::quickValidate('groups_User')) + system_groups_error("Ticket Error"); + + $groupid = !empty($_POST['groupid']) ? intval($_POST['groupid']) : 0; + if ($groupid > 0) { + $member_handler =& xoops_gethandler('member'); + $memstart = isset($_POST['memstart']) ? intval($_POST['memstart']) : 0; + if ($groupid == XOOPS_GROUP_ADMIN) { + if ($member_handler->getUserCountByGroup($groupid) > count($_POST['uids'])){ + $member_handler->removeUsersFromGroup($groupid, $_POST['uids']); + } + } else { + $member_handler->removeUsersFromGroup($groupid, $_POST['uids']); + } + redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_DBUPDATED); + } + break; + case "display": + default: + displayGroups(); + break; + } } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:52 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:52 +0900 Subject: [xoops-cvslog 129] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20050611023252.4B41F2AC030@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailform.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2 xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.3 --- xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailform.php Sat Jun 11 11:32:52 2005 @@ -1,5 +1,5 @@ addElement(new XoopsFormToken(XoopsSingleTokenHandler::quickCreate('mailusers_send'))); // from finduser section if (!empty($_POST['memberslist_id'])) { - $user_count = count($_POST['memberslist_id']); - $display_names = ""; - for ( $i = 0; $i < $user_count; $i++ ) { - $uid_hidden = new XoopsFormHidden("mail_to_user[]", $_POST['memberslist_id'][$i]); - $form->addElement($uid_hidden); - $display_names .= "".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]].", "; - unset($uid_hidden); - } - $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2)); - $form->addElement($users_label); - $display_criteria = 0; + $user_count = count($_POST['memberslist_id']); + $display_names = ""; + for ( $i = 0; $i < $user_count; $i++ ) { + $uid_hidden = new XoopsFormHidden("mail_to_user[]", $_POST['memberslist_id'][$i]); + $form->addElement($uid_hidden); + $display_names .= "".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]].", "; + unset($uid_hidden); + } + $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2)); + $form->addElement($users_label); + $display_criteria = 0; } if ( !empty($display_criteria) ) { - $selected_groups = array(); - $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."
    ", "mail_to_group", false, $selected_groups, 5, true); - $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_min", 20, 10); - $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_max", 20, 10); - $regd_min = new XoopsFormText(_AM_REGDMIN."
    "._AM_TIMEFORMAT."
    ", "mail_regd_min", 20, 10); - $regd_max = new XoopsFormText(_AM_REGDMAX."
    "._AM_TIMEFORMAT."
    ", "mail_regd_max", 20, 10); - $idle_more = new XoopsFormText(_AM_IDLEMORE."
    ", "mail_idle_more", 10, 5); - $idle_less = new XoopsFormText(_AM_IDLELESS."
    ", "mail_idle_less", 10, 5); - $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); - $mailok_cbox->addOption(1, _AM_MAILOK); - $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."
    ", "mail_inactive"); - $inactive_cbox->addOption(1, _AMIFCHECKD); - $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); - $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "

    "); - $criteria_tray->addElement($group_select); - $criteria_tray->addElement($lastlog_min); - $criteria_tray->addElement($lastlog_max); - $criteria_tray->addElement($idle_more); - $criteria_tray->addElement($idle_less); - $criteria_tray->addElement($mailok_cbox); - $criteria_tray->addElement($inactive_cbox); - $criteria_tray->addElement($regd_min); - $criteria_tray->addElement($regd_max); - $form->addElement($criteria_tray); + $selected_groups = array(); + $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."
    ", "mail_to_group", false, $selected_groups, 5, true); + $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_min", 20, 10); + $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_max", 20, 10); + $regd_min = new XoopsFormText(_AM_REGDMIN."
    "._AM_TIMEFORMAT."
    ", "mail_regd_min", 20, 10); + $regd_max = new XoopsFormText(_AM_REGDMAX."
    "._AM_TIMEFORMAT."
    ", "mail_regd_max", 20, 10); + $idle_more = new XoopsFormText(_AM_IDLEMORE."
    ", "mail_idle_more", 10, 5); + $idle_less = new XoopsFormText(_AM_IDLELESS."
    ", "mail_idle_less", 10, 5); + $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); + $mailok_cbox->addOption(1, _AM_MAILOK); + $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."
    ", "mail_inactive"); + $inactive_cbox->addOption(1, _AMIFCHECKD); + $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); + $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "

    "); + $criteria_tray->addElement($group_select); + $criteria_tray->addElement($lastlog_min); + $criteria_tray->addElement($lastlog_max); + $criteria_tray->addElement($idle_more); + $criteria_tray->addElement($idle_less); + $criteria_tray->addElement($mailok_cbox); + $criteria_tray->addElement($inactive_cbox); + $criteria_tray->addElement($regd_min); + $criteria_tray->addElement($regd_max); + $form->addElement($criteria_tray); } -$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, $xoopsConfig['sitename']); +$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E"); $femail_text = new XoopsFormText(_AM_MAILFMAIL, "mail_fromemail", 30, 255, $fromemail); //$subject_caption = _AM_MAILSUBJECT."

    "._AM_MAILTAGS."
    "._AM_MAILTAGS1."
    "._AM_MAILTAGS2."
    "._AM_MAILTAGS3."
    "; Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.3 --- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php Sat Jun 11 11:32:52 2005 @@ -1,5 +1,5 @@ $mail_end ) { $form = new XoopsThemeForm(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers"); + $form->addElement(new XoopsFormToken(XoopsSingleTokenHandler::quickCreate('mailusers_send'))); if ( !empty($_POST['mail_to_group']) ) { foreach ( $_POST['mail_to_group'] as $mailgroup) { $group_hidden = new XoopsFormHidden("mail_to_group[]", $mailgroup); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:55 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:55 +0900 Subject: [xoops-cvslog 130] CVS update: xoops2jp/html/modules/system/templates Message-ID: <20050611023255.437F42AC02F@users.sourceforge.jp> Index: xoops2jp/html/modules/system/templates/system_comments_flat.html diff -u xoops2jp/html/modules/system/templates/system_comments_flat.html:1.1 xoops2jp/html/modules/system/templates/system_comments_flat.html:1.2 --- xoops2jp/html/modules/system/templates/system_comments_flat.html:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/system/templates/system_comments_flat.html Sat Jun 11 11:32:55 2005 @@ -1,7 +1,7 @@ - + <{foreach item=comment from=$comments}> <{include file="db:system_comment.html" comment=$comment}> Index: xoops2jp/html/modules/system/templates/system_siteclosed.html diff -u xoops2jp/html/modules/system/templates/system_siteclosed.html:1.1 xoops2jp/html/modules/system/templates/system_siteclosed.html:1.2 --- xoops2jp/html/modules/system/templates/system_siteclosed.html:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/system/templates/system_siteclosed.html Sat Jun 11 11:32:55 2005 @@ -1,4 +1,4 @@ - + @@ -43,7 +43,9 @@
    <{$lang_poster}> - <{$lang_thread}> + <{$lang_poster}><{$lang_thread}>
    - + + +
     
     
    Index: xoops2jp/html/modules/system/templates/system_userinfo.html diff -u xoops2jp/html/modules/system/templates/system_userinfo.html:1.1 xoops2jp/html/modules/system/templates/system_userinfo.html:1.2 --- xoops2jp/html/modules/system/templates/system_userinfo.html:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/system/templates/system_userinfo.html Sat Jun 11 11:32:55 2005 @@ -27,7 +27,7 @@
    - +
    From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:54 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:54 +0900 Subject: [xoops-cvslog 131] CVS update: xoops2jp/html/modules/system/templates/blocks Message-ID: <20050611023254.F24DF2AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/system/templates/blocks/system_block_notification.html diff -u xoops2jp/html/modules/system/templates/blocks/system_block_notification.html:1.1 xoops2jp/html/modules/system/templates/blocks/system_block_notification.html:1.2 --- xoops2jp/html/modules/system/templates/blocks/system_block_notification.html:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/system/templates/blocks/system_block_notification.html Sat Jun 11 11:32:54 2005 @@ -14,7 +14,7 @@ <{/foreach}> <{/foreach}> - + \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:53 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:53 +0900 Subject: [xoops-cvslog 132] CVS update: xoops2jp/html/modules/system/admin/smilies Message-ID: <20050611023253.35AEA2AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/smilies/main.php diff -u xoops2jp/html/modules/system/admin/smilies/main.php:1.2 xoops2jp/html/modules/system/admin/smilies/main.php:1.3 --- xoops2jp/html/modules/system/admin/smilies/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/smilies/main.php Sat Jun 11 11:32:52 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); } + include_once XOOPS_ROOT_PATH."/modules/system/admin/smilies/smilies.php"; $op ='SmilesAdmin'; -$ok = 0; -foreach ($_POST as $k => $v) { - ${$k} = $v; -} -if (isset($_GET['op']) && ($_GET['op'] == 'SmilesEdit' || $_GET['op'] == 'SmilesDel')) { - $op = $_GET['op']; - $id = isset($_GET['id']) ? intval($_GET['id']) : 0; +if (!empty($_GET['op'])) { + $op = $_GET['op']; +} elseif (!empty($_POST['op'])) { + $op = $_POST['op']; } switch($op) { -case "update": - $count = count($smile_id); - for ($i = 0; $i < $count; $i++) { - $smile_display[$i] = empty($smile_display[$i]) ? 0 : 1; - if ($old_display[$i] != $smile_display[$i]) { - $xoopsDB->query('UPDATE '.$xoopsDB->prefix('smiles').' SET display='.$smile_display[$i].' WHERE id ='.intval($smile_id[$i])); - } - } - redirect_header('admin.php?fct=smilies',2,_AM_DBUPDATED); - break; + +case "SmilesUpdate": + if (!XoopsMultiTokenHandler::quickValidate('smilies_SmilesUpdate')) { + redirect_header('admin.php?fct=smilies',3,"Ticket Error"); + } + $count = (!empty($_POST['smile_id']) && is_array($_POST['smile_id'])) ? count($_POST['smile_id']) : 0; + $db =& Database::getInstance(); + for ($i = 0; $i < $count; $i++) { + $smile_id = intval($_POST['smile_id'][$i]); + if (empty($smile_id)) { + continue; + } + $smile_display = empty($_POST['smile_display'][$i]) ? 0 : 1; + if (isset($_POST['old_display'][$i]) && $_POST['old_display'][$i] != $smile_display[$i]) { + $db->query('UPDATE '.$db->prefix('smiles').' SET display='.$smile_display.' WHERE id ='.$smile_id); + } + } + redirect_header('admin.php?fct=smilies',2,_AM_DBUPDATED); + break; + case "SmilesAdd": - SmilesAdd($smile_code, $smile_url, $smile_desc, $smile_display); - break; + if (!XoopsMultiTokenHandler::quickValidate('smilies_SmilesAdd')) { + redirect_header('admin.php?fct=smilies',3,"Ticket Error"); + } + $db =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); + $uploader->setAllowedExtensions(array('gif', 'jpeg', 'jpg', 'png')); + $uploader->setPrefix('smil'); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + if (!$uploader->upload()) { + $err = $uploader->getErrors(); + } else { + $smile_url = $uploader->getSavedFileName(); + $smile_code = $myts->stripSlashesGPC($_POST['smile_code']); + $smile_desc = $myts->stripSlashesGPC($_POST['smile_desc']); + $smile_display = intval($_POST['smile_display']) > 0 ? 1 : 0; + $newid = $db->genId($db->prefix('smilies')."_id_seq"); + $sql = sprintf("INSERT INTO %s (id, code, smile_url, emotion, display) VALUES (%d, %s, %s, %s, %d)", $db->prefix('smiles'), $newid, $db->quoteString($smile_code), $db->quoteString($smile_url), $db->quoteString($smile_desc), $smile_display); + if (!$db->query($sql)) { + $err = 'Failed storing smiley data into the database'; + } + } + } else { + $err = $uploader->getErrors(); + } + if (!isset($err)) { + redirect_header('admin.php?fct=smilies&op=SmilesAdmin',2,_AM_DBUPDATED); + } else { + xoops_cp_header(); + xoops_error($err); + xoops_cp_footer(); + } + break; + case "SmilesEdit": - SmilesEdit($id); - break; + $id = isset($_GET['id']) ? intval($_GET['id']) : 0; + if ($id > 0) { + SmilesEdit($id); + } + break; + case "SmilesSave": - SmilesSave($id, $smile_code, $smile_url, $smile_desc, $smile_display, $old_smile); - break; + $id = isset($_POST['id']) ? intval($_POST['id']) : 0; + if ($id <= 0 || !XoopsMultiTokenHandler::quickValidate('smilies_SmilesSave')) { + redirect_header('admin.php?fct=smilies',3,"Ticket Error"); + } + $myts =& MyTextSanitizer::getInstance(); + $smile_code = $myts->stripSlashesGPC($_POST['smile_code']); + $smile_desc = $myts->stripSlashesGPC($_POST['smile_desc']); + $smile_display = intval($_POST['smile_display']) > 0 ? 1 : 0; + $db =& Database::getInstance(); + if (!empty($_POST['smile_url'])) { + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); + $uploader->setAllowedExtensions(array('gif', 'jpeg', 'jpg', 'png')); + $uploader->setPrefix('smil'); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + if (!$uploader->upload()) { + $err = $uploader->getErrors(); + } else { + $smile_url = $uploader->getSavedFileName(); + if (!$db->query(sprintf("UPDATE %s SET code = %s, smile_url = %s, emotion = %s, display = %d WHERE id = %d", $db->prefix('smiles'), $db->quoteString($smile_code), $db->quoteString($smile_url), $db->quoteString($smile_desc), $smile_display, $id))) { + $err = 'Failed storing smiley data into the database'; + } else { + $oldsmile_path = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.trim($_POST['old_smile']))); + if (0 === strpos($oldsmile_path, XOOPS_UPLOAD_PATH) && is_file($oldsmile_path)) { + unlink($oldsmile_path); + } + } + } + } else { + $err = $uploader->getErrors(); + } + } else { + $sql = sprintf("UPDATE %s SET code = %s, emotion = %s, display = %d WHERE id = %d", $db->prefix('smiles'), $db->quoteString($smile_code), $db->quoteString($smile_desc), $smile_display, $id); + if (!$db->query($sql)) { + $err = 'Failed storing smiley data into the database'; + } + } + if (!isset($err)) { + redirect_header('admin.php?fct=smilies&op=SmilesAdmin',2,_AM_DBUPDATED); + } else { + xoops_cp_header(); + xoops_error($err); + xoops_cp_footer(); + exit(); + } + break; + case "SmilesDel": - SmilesDel($id, $ok); - break; + $id = isset($_GET['id']) ? intval($_GET['id']) : 0; + if ($id > 0 ) { + xoops_cp_header(); + xoops_token_confirm(array('fct' => 'smilies', 'op' => 'SmilesDelOk', 'id' => $id), 'admin.php', _AM_WAYSYWTDTS); + xoops_cp_footer(); + } + break; + +case "SmilesDelOk": + $id = isset($_POST['id']) ? intval($_POST['id']) : 0; + if ($id <= 0 || !xoops_confirm_validate()) { + redirect_header('admin.php?fct=smilies',3,"Ticket Error"); + } + $db =& Database::getInstance(); + $sql = sprintf("DELETE FROM %s WHERE id = %u", $db->prefix('smiles'), $id); + $db->query($sql); + redirect_header("admin.php?fct=smilies&op=SmilesAdmin",2,_AM_DBUPDATED); + break; + case "SmilesAdmin": default: - SmilesAdmin(); - break; + SmilesAdmin(); + break; } ?> \ No newline at end of file Index: xoops2jp/html/modules/system/admin/smilies/smileform.php diff -u xoops2jp/html/modules/system/admin/smilies/smileform.php:1.2 xoops2jp/html/modules/system/admin/smilies/smileform.php:1.3 --- xoops2jp/html/modules/system/admin/smilies/smileform.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/smilies/smileform.php Sat Jun 11 11:32:52 2005 @@ -1,5 +1,5 @@ setExtra('enctype="multipart/form-data"'); +$smile_form->addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('smilies_'.$smiles['op']))); $smile_form->addElement(new XoopsFormText(_AM_SMILECODE, 'smile_code', 26, 25, $smiles['smile_code']), true); $smile_form->addElement(new XoopsFormText(_AM_SMILEEMOTION, 'smile_desc', 26, 25, $smiles['smile_desc']), true); $smile_select = new XoopsFormFile('', 'smile_url', 5000000); Index: xoops2jp/html/modules/system/admin/smilies/smilies.php diff -u xoops2jp/html/modules/system/admin/smilies/smilies.php:1.2 xoops2jp/html/modules/system/admin/smilies/smilies.php:1.3 --- xoops2jp/html/modules/system/admin/smilies/smilies.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/smilies/smilies.php Sat Jun 11 11:32:52 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); } - function SmilesAdmin() { - $db =& Database::getInstance(); - $url_smiles = XOOPS_UPLOAD_URL; - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - echo "

    "._AM_SMILESCONTROL."

    "; - - if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))) { - if (($numsmiles = $db->getRowsNum($getsmiles)) == "0") { - //EMPTY - } else { - echo '
    '; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $i = 0; - while ($smiles = $db->fetchArray($getsmiles)) { - if ($i % 2 == 0) { - $class = 'even'; - } else { - $class= 'odd'; - } - $smiles['code'] = $myts->makeTboxData4Show($smiles['code']); - $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']); - $smiles['smile_emotion'] = $myts->makeTboxData4Edit($smiles['emotion']); - echo ""; - echo ""; - echo ""; - echo ''; - echo '"; - echo "\n"; - $i++; - } - echo '
    " ._AM_CODE."" ._AM_SMILIE.""._AM_SMILEEMOTION."" ._AM_DISPLAYF.""._AM_ACTION."
    ".$smiles['code']."'.$smiles['smile_emotion'].'" ._AM_EDIT." "; - echo "" ._AM_DEL."
    '; - } - } else { - echo _AM_CNRFTSD; - } - $smiles['smile_code'] = ''; - $smiles['smile_url'] = 'blank.gif'; - $smiles['smile_desc'] = ''; - $smiles['smile_display'] = 1; - $smiles['smile_form'] = _AM_ADDSMILE; - $smiles['op'] = 'SmilesAdd'; - $smiles['id'] = ''; - include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php'; - $smile_form->display(); - xoops_cp_footer(); + $db =& Database::getInstance(); + $url_smiles = XOOPS_UPLOAD_URL; + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + echo "

    "._AM_SMILESCONTROL."

    "; + + if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))) { + if (($numsmiles = $db->getRowsNum($getsmiles)) == "0") { + //EMPTY + } else { + $token=&XoopsMultiTokenHandler::quickCreate('smilies_SmilesUpdate'); + echo '
    '; + echo $token->getHtml(); + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $i = 0; + while ($smiles = $db->fetchArray($getsmiles)) { + if ($i % 2 == 0) { + $class = 'even'; + } else { + $class= 'odd'; + } + $smiles['code'] = $myts->makeTboxData4Show($smiles['code']); + $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']); + $smiles['smile_emotion'] = $myts->makeTboxData4Edit($smiles['emotion']); + echo ""; + echo ""; + echo ""; + echo ''; + echo '"; + echo "\n"; + $i++; + } + echo '
    " ._AM_CODE."" ._AM_SMILIE.""._AM_SMILEEMOTION."" ._AM_DISPLAYF.""._AM_ACTION."
    ".$smiles['code']."'.$smiles['smile_emotion'].'" ._AM_EDIT." "; + echo "" ._AM_DEL."
    '; + //echo xoops_token_gethtml(); + echo '
    '; + } + } else { + echo _AM_CNRFTSD; + } + $smiles['smile_code'] = ''; + $smiles['smile_url'] = 'blank.gif'; + $smiles['smile_desc'] = ''; + $smiles['smile_display'] = 1; + $smiles['smile_form'] = _AM_ADDSMILE; + $smiles['op'] = 'SmilesAdd'; + $smiles['id'] = ''; + include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php'; + $smile_form->display(); + xoops_cp_footer(); } function SmilesEdit($id) { - $db =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - echo ''._AM_SMILESCONTROL .' »» '._AM_EDITSMILE.'

    '; - if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles")." WHERE id = $id")) { - $numsmiles = $db->getRowsNum($getsmiles); - if ( $numsmiles == 0 ) { - //EMPTY - } else { - if ($smiles = $db->fetchArray($getsmiles)) { - $smiles['smile_code'] = $myts->makeTboxData4Edit($smiles['code']); - $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']); - $smiles['smile_desc'] = $myts->makeTboxData4Edit($smiles['emotion']); - $smiles['smile_display'] = $smiles['display']; - $smiles['smile_form'] = _AM_EDITSMILE; - $smiles['op'] = 'SmilesSave'; - include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php'; - $smile_form->addElement(new XoopsFormHidden('old_smile', $smiles['smile_url'])); - $smile_form->display(); - } - } - } else { - echo _AM_CNRFTSD; - } - xoops_cp_footer(); -} - -function SmilesAdd($smile_code, $smile_url, $smile_desc, $smile_display) -{ - $db =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); - $uploader->setPrefix('smil'); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - if (!$uploader->upload()) { - $err = $uploader->getErrors(); - } else { - $smile_url = $myts->makeTboxData4Save($uploader->getSavedFileName()); - $smile_code = $myts->makeTboxData4Save($smile_code); - $smile_desc = $myts->makeTboxData4Save($smile_desc); - $smile_display = intval($smile_display) > 0 ? 1 : 0; - $newid = $db->genId($db->prefix('smilies')."_id_seq"); - if (!$db->query("INSERT INTO ".$db->prefix('smiles')." (id, code, smile_url, emotion, display) VALUES ($newid, '$smile_code','$smile_url','$smile_desc', $smile_display)")) { - $err = 'Failed storing smiley data into the database'; - } - } - } else { - $err = $uploader->getErrors(); - } - if (!isset($err)) { - redirect_header('admin.php?fct=smilies&op=SmilesAdmin',2,_AM_DBUPDATED); - } else { - xoops_cp_header(); - xoops_error($err); - xoops_cp_footer(); - exit(); - } -} - -function SmilesSave($id, $smile_code, $smile_url, $smile_desc, $smile_display, $old_smile) -{ - $db =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - if (isset($smile_url) && trim($smile_url) != '') { - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); - $uploader->setPrefix('smil'); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - if (!$uploader->upload()) { - $err = $uploader->getErrors(); - } else { - $smile_url = $myts->makeTboxData4Save($uploader->getSavedFileName()); - $smile_code = $myts->makeTboxData4Save($smile_code); - $smile_desc = $myts->makeTboxData4Save($smile_desc); - $smile_display = intval($smile_display) > 0 ? 1 : 0; - if (!$db->query("UPDATE ".$db->prefix('smiles')." SET code = '$smile_code', smile_url = '$smile_url', emotion = '$smile_desc', display=$smile_display WHERE id =".intval($id))) { - $err = 'Failed storing smiley data into the database'; - } else { - @unlink(XOOPS_UPLOAD_PATH.'/'.$old_smile); - } - } - } else { - $err = $uploader->getErrors(); - } - } else { - $smile_code = $myts->makeTboxData4Save($smile_code); - $smile_desc = $myts->makeTboxData4Save($smile_desc); - $smile_display = intval($smile_display) > 0 ? 1 : 0; - if (!$db->query("UPDATE ".$db->prefix('smiles')." SET code = '$smile_code', emotion = '$smile_desc', display=$smile_display WHERE id =".intval($id))) { - $err = 'Failed storing smiley data into the database'; - } - } - if (!isset($err)) { - redirect_header('admin.php?fct=smilies&op=SmilesAdmin',2,_AM_DBUPDATED); - } else { - xoops_cp_header(); - xoops_error($err); - xoops_cp_footer(); - exit(); - } -} - -function SmilesDel($id, $ok=0) -{ - $db =& Database::getInstance(); - if ($ok == 1) { - $sql = sprintf("DELETE FROM %s WHERE id = %u", $db->prefix('smiles'), intval($id)); - $db->query($sql); - redirect_header("admin.php?fct=smilies&op=SmilesAdmin",2,_AM_DBUPDATED); - exit(); + $db =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + echo ''._AM_SMILESCONTROL .' »» '._AM_EDITSMILE.'

    '; + if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles")." WHERE id = $id")) { + $numsmiles = $db->getRowsNum($getsmiles); + if ( $numsmiles == 0 ) { + //EMPTY + } else { + if ($smiles = $db->fetchArray($getsmiles)) { + $smiles['smile_code'] = $myts->makeTboxData4Edit($smiles['code']); + $smiles['smile_url'] = $myts->makeTboxData4Edit($smiles['smile_url']); + $smiles['smile_desc'] = $myts->makeTboxData4Edit($smiles['emotion']); + $smiles['smile_display'] = $smiles['display']; + $smiles['smile_form'] = _AM_EDITSMILE; + $smiles['op'] = 'SmilesSave'; + include XOOPS_ROOT_PATH.'/modules/system/admin/smilies/smileform.php'; + //$smile_form->addElement(new XoopsFormHidden('old_smile', $smiles['smile_url'])); + $smile_form->display(); + } + } } else { - xoops_cp_header(); - xoops_confirm(array('fct' => 'smilies', 'op' => 'SmilesDel', 'ok' => 1, 'id' => $id), 'admin.php', _AM_WAYSYWTDTS); - xoops_cp_footer(); - } + echo _AM_CNRFTSD; + } + xoops_cp_footer(); } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:54 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:54 +0900 Subject: [xoops-cvslog 133] CVS update: xoops2jp/html/modules/system/admin/version Message-ID: <20050611023254.6AF412AC032@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/version/main.php diff -u xoops2jp/html/modules/system/admin/version/main.php:1.2 xoops2jp/html/modules/system/admin/version/main.php:1.3 --- xoops2jp/html/modules/system/admin/version/main.php:1.2 Fri Mar 18 21:52:48 2005 +++ xoops2jp/html/modules/system/admin/version/main.php Sat Jun 11 11:32:54 2005 @@ -1,113 +1,106 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // -error_reporting(E_ALL); -if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid')) || !isset($_GET['mid'])) { - exit("Access Denied"); -} - -if (is_numeric($_GET['mid'])) { - $module_handler =& xoops_gethandler('module'); - $versioninfo =& $module_handler->get($_GET['mid']); -} elseif (file_exists(XOOPS_ROOT_PATH.'/modules/'.trim($_GET['mid']).'/xoops_version.php')) { - $module_handler =& xoops_gethandler('module'); - $versioninfo =& $module_handler->create(); - $versioninfo->loadInfo(trim($_GET['mid'])); -} else { - exit(); -} - -if (!is_object($versioninfo)) { - exit(); -} - -//$css = getCss($theme); -echo "\n\n"; -echo "\n"; -echo "".$xoopsConfig['sitename']."\n"; - -?> - -\n\n"; -} -*/ -echo "\n"; -echo "\n"; -echo "
    "; -echo "
    "; -echo "




    "; -echo "getInfo('dirname')."/".$versioninfo->getInfo('image')."\" border=\"0\" />
    "; -echo "".$versioninfo->getInfo('name').""; - -echo "

    "; -echo "Version
    "; -echo round($versioninfo->getInfo('version'), 2); - -echo "

    "; -echo "Description
    "; -echo $versioninfo->getInfo('description'); - -echo "

    "; -echo "Author
    "; -echo $versioninfo->getInfo('author'); - -echo "

    "; -echo "Credits
    "; -echo $versioninfo->getInfo('credits'); - -echo "

    "; -echo "License
    "; -echo $versioninfo->getInfo('license'); - -echo "




    "; -echo "




    "; -echo "Close"; -echo "





    "; -echo "
    "; -echo ""; + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // + +if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid')) || !isset($_GET['mid'])) { + exit("Access Denied"); +} + +if (intval($_GET['mid'])) { + $module_handler =& xoops_gethandler('module'); + $versioninfo =& $module_handler->get(intval($_GET['mid'])); +} else { + $mid = str_replace('..', '', trim($_GET['mid'])); + if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$mid.'/xoops_version.php')) { + $module_handler =& xoops_gethandler('module'); + $versioninfo =& $module_handler->create(); + $versioninfo->loadInfo($mid); + } +} +if (!isset($versioninfo) || !is_object($versioninfo)) { + exit(); +} + +//$css = getCss($theme); +echo "\n\n"; +echo "\n"; +echo "".htmlspecialchars($xoopsConfig['sitename'])."\n"; + +?> + +\n\n"; +} +*/ +echo "\n"; +echo "\n"; +echo "





    "; +if ($modimage = $versioninfo->getInfo('image')) { + $modimage_path = '/modules/'.$versioninfo->getInfo('dirname').'/'.$modimage; + $modimage_realpath = str_replace("\\", "/", realpath(XOOPS_ROOT_PATH.$modimage_path)); + if (0 === strpos($modimage_realpath, XOOPS_ROOT_PATH) && is_file($modimage_realpath)) { + echo "
    "; + } +} +if ($modname = $versioninfo->getInfo('name')) { + echo "".htmlspecialchars($modname).""; +} + +$modinfo = array('Version', 'Description', 'Author', 'Credits', 'License'); +foreach ($modinfo as $info) { + if ($info_output = $versioninfo->getInfo(strtolower($info))) { + echo "

    $info
    "; + echo htmlspecialchars($info_output); + } +} +echo "




    "; +echo "




    "; +echo "Close"; +echo "





    "; +echo "
    "; +echo ""; ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:56 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:56 +0900 Subject: [xoops-cvslog 134] CVS update: xoops2jp/html/modules/xoopsfaq/templates Message-ID: <20050611023256.235992AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsfaq/templates/xoopsfaq_category.html diff -u xoops2jp/html/modules/xoopsfaq/templates/xoopsfaq_category.html:1.1 xoops2jp/html/modules/xoopsfaq/templates/xoopsfaq_category.html:1.2 --- xoops2jp/html/modules/xoopsfaq/templates/xoopsfaq_category.html:1.1 Thu Sep 9 19:03:27 2004 +++ xoops2jp/html/modules/xoopsfaq/templates/xoopsfaq_category.html Sat Jun 11 11:32:55 2005 @@ -1,5 +1,5 @@

    <{$lang_faq}>

    -<{$lang_main}> »» <{$category_name}>

    +<{$lang_main}> »» <{$category_name}>

    From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:55 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:55 +0900 Subject: [xoops-cvslog 135] CVS update: xoops2jp/html/modules/xoopsfaq/admin Message-ID: <20050611023255.923BC2AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsfaq/admin/index.php diff -u xoops2jp/html/modules/xoopsfaq/admin/index.php:1.2 xoops2jp/html/modules/xoopsfaq/admin/index.php:1.3 --- xoops2jp/html/modules/xoopsfaq/admin/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopsfaq/admin/index.php Sat Jun 11 11:32:55 2005 @@ -1,5 +1,5 @@ $v) { - $$k = $v; - } -} - -if (isset($HTTP_POST_VARS)) { - foreach ($HTTP_POST_VARS as $k => $v) { - $$k = $v; - } -} - -if ( !empty($contents_preview) ) { - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - - $html = empty($contents_nohtml) ? 1 : 0; - $smiley = empty($contents_nosmiley) ? 1 : 0; - $xcode = empty($contents_noxcode) ? 1 : 0; - $p_title = $myts->makeTboxData4Preview($contents_title); - $p_contents = $myts->makeTareaData4Preview($contents_contents, $html, $smiley, $xcode); - echo"
    <{$lang_toc}>
    - -
    $p_title
    $p_contents

    "; - $contents_title = $myts->makeTboxData4PreviewInForm($contents_title); - $contents_contents = $myts->makeTareaData4PreviewInForm($contents_contents); - include "contentsform.php"; +if (!empty($_GET['op'])) { + $cat_id = !empty($_GET['cat_id']) ? intval($_GET['cat_id']) : 0; + $op = $_GET['op']; +} elseif (!empty($_POST['op'])) { + $op = $_POST['op']; +} + +if ( !empty($_POST['contents_preview']) ) { + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + + $contents_nohtml = !empty($_POST['contents_nohtml']) ? 1 : 0; + $contents_nosmiley = !empty($_POST['contents_nosmiley']) ? 1 : 0; + $contents_noxcode = !empty($_POST['contents_noxcode']) ? 1 : 0; + $html = empty($contents_nohtml) ? 1 : 0; + $smiley = empty($contents_nosmiley) ? 1 : 0; + $xcode = empty($contents_noxcode) ? 1 : 0; + $contents_visible = !empty($_POST['contents_visible']) ? 1 : 0; + $contents_order = !empty($_POST['contents_order']) ? intval($_POST['contents_order']) : 0; + $contents_id = !empty($_POST['contents_id']) ? intval($_POST['contents_id']) : 0; + $category_id = !empty($_POST['category_id']) ? intval($_POST['category_id']) : 0; + $p_title = $myts->makeTboxData4Preview($_POST['contents_title']); + $p_contents = $myts->makeTareaData4Preview($_POST['contents_contents'], $contents_nohtml, $contents_nosmiley, $contents_noxcode); + echo"
    + +
    $p_title
    $p_contents

    "; + $contents_title = $myts->makeTboxData4PreviewInForm($_POST['contents_title']); + $contents_contents = $myts->makeTareaData4PreviewInForm($_POST['contents_contents']); + include "contentsform.php"; - xoops_cp_footer(); - exit(); + xoops_cp_footer(); + exit(); } if ($op == "listcat") { - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); - echo " -

    "._XD_DOCS."

    -
    -
    - - "; - $result = $xoopsDB->query("SELECT c.category_id, c.category_title, c.category_order, COUNT(f.category_id) FROM ".$xoopsDB->prefix("xoopsfaq_categories")." c LEFT JOIN ".$xoopsDB->prefix("xoopsfaq_contents")." f ON f.category_id=c.category_id GROUP BY c.category_id ORDER BY c.category_order ASC"); - $count = 0; - while ( list($cat_id, $category, $category_order, $faq_count) = $xoopsDB->fetchRow($result) ) { - $category=$myts->makeTboxData4Edit($category); - echo " - - - "; - $count++; - } - if ($count > 0) { - echo ""; - } - echo "
    "._XD_CATEGORY.""._XD_ORDER.""._XD_CONTENTS." 
    $faq_count" ._XD_CONTENTS." | "._DELETE."
    -

    -

    "._XD_ADDCAT."

    -
    -
    - - -
    "._XD_TITLE."
    "._XD_ORDER."
     
    "; + echo " +

    "._XD_DOCS."

    +
    +
    + + "; + $result = $xoopsDB->query("SELECT c.category_id, c.category_title, c.category_order, COUNT(f.category_id) FROM ".$xoopsDB->prefix("xoopsfaq_categories")." c LEFT JOIN ".$xoopsDB->prefix("xoopsfaq_contents")." f ON f.category_id=c.category_id GROUP BY c.category_id ORDER BY c.category_order ASC"); + $count = 0; + while ( list($cat_id, $category, $category_order, $faq_count) = $xoopsDB->fetchRow($result) ) { + $category=$myts->makeTboxData4Edit($category); + echo " + + + "; + $count++; + } + if ($count > 0) { + echo ""; + } + echo "
    "._XD_CATEGORY.""._XD_ORDER.""._XD_CONTENTS." 
    $faq_count" ._XD_CONTENTS." | "._DELETE."
    +

    +

    "._XD_ADDCAT."

    +
    +
    + + +
    "._XD_TITLE."
    "._XD_ORDER."
     
    "; - xoops_cp_footer(); - exit(); + xoops_cp_footer(); + exit(); } if ($op == "addcatgo") { - $myts =& MyTextSanitizer::getInstance(); - $category = $myts->makeTboxData4Save($category); - $newid = $xoopsDB->genId($xoopsDB->prefix("xoopsfaq_categories")."_category_id_seq"); - $sql = "INSERT INTO ".$xoopsDB->prefix("xoopsfaq_categories")." (category_id, category_title, category_order) VALUES ($newid, '".$category."', ".intval($order).")"; - if (!$xoopsDB->query($sql)) { - xoops_cp_header(); - echo "Could not add category"; - xoops_cp_footer(); - } else { - redirect_header("index.php?op=listcat",1,_XD_DBSUCCESS); - } - exit(); + $myts =& MyTextSanitizer::getInstance(); + $category = $myts->stripSlashesGPC($_POST['category']); + $newid = $xoopsDB->genId($xoopsDB->prefix("xoopsfaq_categories")."_category_id_seq"); + $sql = "INSERT INTO ".$xoopsDB->prefix("xoopsfaq_categories")." (category_id, category_title, category_order) VALUES ($newid, ".$xoopsDB->quoteString($category).", ".intval($_POST['order']).")"; + if (!$xoopsDB->query($sql)) { + xoops_cp_header(); + echo "Could not add category"; + xoops_cp_footer(); + } else { + redirect_header("index.php?op=listcat",1,_XD_DBSUCCESS); + } + exit(); } if ($op == "editcatgo") { - $myts =& MyTextSanitizer::getInstance(); - $count = count($newcategory); - for ($i = 0; $i < $count; $i++) { - if ( $newcategory[$i] != $oldcategory[$i] || $neworder[$i] != $oldorder[$i] ) { - $category = $myts->makeTboxData4Save($newcategory[$i]); - $sql = "UPDATE ".$xoopsDB->prefix("xoopsfaq_categories")." SET category_title='".$category."', category_order=".intval($neworder[$i])." WHERE category_id=".$cat_id[$i].""; - $xoopsDB->query($sql); - } - } - redirect_header("index.php?op=listcat",1,_XD_DBSUCCESS); - exit(); + $myts =& MyTextSanitizer::getInstance(); + $count = count($_POST['newcategory']); + for ($i = 0; $i < $count; $i++) { + if ( $_POST['newcategory'][$i] != $_POST['oldcategory'][$i] || $_POST['neworder'][$i] != $_POST['oldorder'][$i] ) { + $category = $myts->stripSlashesGPC($_POST['newcategory'][$i]); + $sql = "UPDATE ".$xoopsDB->prefix("xoopsfaq_categories")." SET category_title=".$xoopsDB->quoteString($category).", category_order=".intval($_POST['neworder'][$i])." WHERE category_id=".intval($_POST['cat_id'][$i]); + $xoopsDB->query($sql); + } + } + redirect_header("index.php?op=listcat",1,_XD_DBSUCCESS); + exit(); } if ($op == "listcontents") { - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - $sql = "SELECT category_title FROM ".$xoopsDB->prefix("xoopsfaq_categories")." WHERE category_id='".$cat_id."'"; - $result = $xoopsDB->query($sql); - list($category) = $xoopsDB->fetchRow($result); - $category = $myts->makeTboxData4Show($category); - - echo "" ._XD_MAIN." »» ".$category."

    -

    "._XD_CONTENTS."

    -
    -
    - - "; - $result = $xoopsDB->query("SELECT contents_id, contents_title, contents_time, contents_order, contents_visible FROM ".$xoopsDB->prefix("xoopsfaq_contents")." WHERE category_id='".$cat_id."' ORDER BY contents_order"); - $count = 0; - while(list($id, $title, $time, $order, $visible) = $xoopsDB->fetchRow($result)) { - $title = $myts->makeTboxData4Show($title); - echo " - "; - $checked = ($visible == 1) ? " checked='checked'" : ""; - echo " - "; - $count++; - } - if ($count > 0) { - echo ""; - } - echo "
    "._XD_TITLE.""._XD_ORDER.""._XD_DISPLAY." 
    ".$title.""._EDIT." | "._DELETE."
    -

    -

    "._XD_ADDCONTENTS."

    "; - $contents_title = ""; - $contents_contents = ""; - $contents_order = 0; - $contents_visible = 1; - $contents_nohtml = 0; - $contents_nosmiley = 0; - $contents_noxcode = 0; - $contents_id = 0; - $category_id = $cat_id; - $op = "addcontentsgo"; - include "contentsform.php"; + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + $sql = "SELECT category_title FROM ".$xoopsDB->prefix("xoopsfaq_categories")." WHERE category_id=".$cat_id; + $result = $xoopsDB->query($sql); + list($category) = $xoopsDB->fetchRow($result); + $category = $myts->makeTboxData4Show($category); + + echo "" ._XD_MAIN." »» ".$category."

    +

    "._XD_CONTENTS."

    +
    +
    + + "; + $result = $xoopsDB->query("SELECT contents_id, contents_title, contents_time, contents_order, contents_visible FROM ".$xoopsDB->prefix("xoopsfaq_contents")." WHERE category_id=".$cat_id." ORDER BY contents_order"); + $count = 0; + while(list($id, $title, $time, $order, $visible) = $xoopsDB->fetchRow($result)) { + $title = $myts->makeTboxData4Show($title); + echo " + "; + $checked = ($visible == 1) ? " checked='checked'" : ""; + echo " + "; + $count++; + } + if ($count > 0) { + echo ""; + } + echo "
    "._XD_TITLE.""._XD_ORDER.""._XD_DISPLAY." 
    ".$title.""._EDIT." | "._DELETE."
    +

    +

    "._XD_ADDCONTENTS."

    "; + $contents_title = ""; + $contents_contents = ""; + $contents_order = 0; + $contents_visible = 1; + $contents_nohtml = 0; + $contents_nosmiley = 0; + $contents_noxcode = 0; + $contents_id = 0; + $category_id = $cat_id; + $op = "addcontentsgo"; + include "contentsform.php"; - xoops_cp_footer(); - exit(); + xoops_cp_footer(); + exit(); } if ($op == "quickeditcontents") { - $myts =& MyTextSanitizer::getInstance(); - $count = count($id); - for ($i = 0; $i < $count; $i++) { - $index = $id[$i]; - if ( $neworder[$index] != $oldorder[$index] || $newvisible[$index] != $oldvisible[$index] ) { - $xoopsDB->query("UPDATE ".$xoopsDB->prefix("xoopsfaq_contents")." SET contents_order=".intval($neworder[$index]).", contents_visible=".intval($newvisible[$index])." WHERE contents_id=".$index.""); - } - } - redirect_header("index.php?op=listcontents&cat_id=$cat_id",1,_XD_DBSUCCESS); - exit(); + $myts =& MyTextSanitizer::getInstance(); + $cat_id = !empty($_POST['cat_id']) ? intval($_POST['cat_id']) : 0; + $count = count($_POST['id']); + for ($i = 0; $i < $count; $i++) { + $index = intval($_POST['id'][$i]); + if ( $_POST['neworder'][$index] != $_POST['oldorder'][$index] || $_POST['newvisible'][$index] != $_POST['oldvisible'][$index] ) { + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("xoopsfaq_contents")." SET contents_order=".intval($_POST['neworder'][$index]).", contents_visible=".intval($_POST['newvisible'][$index])." WHERE contents_id=".$index); + } + } + redirect_header("index.php?op=listcontents&cat_id=$cat_id",1,_XD_DBSUCCESS); + exit(); } if ($op == "addcontentsgo") { - $myts =& MyTextSanitizer::getInstance(); - $title = $myts->makeTboxData4Save($contents_title); - $contents = $myts->makeTareaData4Save($contents_contents); - $newid = $xoopsDB->genId($xoopsDB->prefix("xoopsfaq_contents")."_contents_id_seq"); - $sql = "INSERT INTO ".$xoopsDB->prefix("xoopsfaq_contents")." (contents_id, category_id, contents_title, contents_contents, contents_time, contents_order, contents_visible, contents_nohtml, contents_nosmiley, contents_noxcode) VALUES (".$newid.", ".$category_id.", '".$title."', '".$contents."', ".time().", ".intval($contents_order).", ".intval($contents_visible).", ".intval($contents_nohtml).", ".intval($contents_nosmiley).", ".intval($contents_noxcode).")"; - if (!$xoopsDB->query($sql)) { - xoops_cp_header(); - echo "Could not add contents"; - xoops_cp_footer(); - } else { - redirect_header("index.php?op=listcontents&cat_id=$category_id",1,_XD_DBSUCCESS); - } - exit(); + $category_id = !empty($_POST['category_id']) ? intval($_POST['category_id']) : 0; + if ($category_id > 0) { + $myts =& MyTextSanitizer::getInstance(); + $title = $myts->stripSlashesGPC($_POST['contents_title']); + $contents = $myts->makeTareaData4Save($_POST['contents_contents']); + $newid = $xoopsDB->genId($xoopsDB->prefix("xoopsfaq_contents")."_contents_id_seq"); + $sql = "INSERT INTO ".$xoopsDB->prefix("xoopsfaq_contents")." (contents_id, category_id, contents_title, contents_contents, contents_time, contents_order, contents_visible, contents_nohtml, contents_nosmiley, contents_noxcode) VALUES ($newid, $category_id, ".$xoopsDB->quoteString($title).", ".$xoopsDB->quoteString($contents).", ".time().", ".intval($_POST['contents_order']).", ".intval($_POST['contents_visible']).", ".intval($_POST['contents_nohtml']).", ".intval($_POST['contents_nosmiley']).", ".intval($_POST['contents_noxcode']).")"; + if (!$xoopsDB->query($sql)) { + xoops_cp_header(); + echo "Could not add contents"; + xoops_cp_footer(); + } else { + redirect_header("index.php?op=listcontents&cat_id=$category_id",1,_XD_DBSUCCESS); + } + } + exit(); } if ($op == "editcontents") { - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - $sql = "SELECT category_title FROM ".$xoopsDB->prefix("xoopsfaq_categories")." WHERE category_id='".$cat_id."'"; - $result = $xoopsDB->query($sql); - list($category) = $xoopsDB->fetchRow($result); - $category = $myts->makeTboxData4Show($category); - $result = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("xoopsfaq_contents")." WHERE contents_id='$id'"); - $myrow = $xoopsDB->fetchArray($result); - $contents_title = $myts->makeTboxData4Edit($myrow['contents_title']); - $contents_contents = $myts->makeTareaData4Edit($myrow['contents_contents']); - $contents_order = $myrow['contents_order']; - $contents_visible = $myrow['contents_visible']; - $contents_nohtml = $myrow['contents_nohtml']; - $contents_nosmiley = $myrow['contents_nosmiley']; - $contents_noxcode = $myrow['contents_noxcode']; - $contents_id = $myrow['contents_id']; - $category_id = $myrow['category_id']; - $op = "editcontentsgo"; - - echo "" ._XD_MAIN." »» ".$category." »» "._XD_EDITCONTENTS."

    -

    "._XD_EDITCONTENTS."

    "; - include "contentsform.php"; + $id = !empty($_GET['id']) ? intval($_GET['id']) : 0; + if ($id <= 0 || $cat_id <= 0) { + exit(); + } + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + $sql = "SELECT category_title FROM ".$xoopsDB->prefix("xoopsfaq_categories")." WHERE category_id=".$cat_id; + $result = $xoopsDB->query($sql); + list($category) = $xoopsDB->fetchRow($result); + $category = $myts->makeTboxData4Show($category); + $result = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("xoopsfaq_contents")." WHERE contents_id=$id"); + $myrow = $xoopsDB->fetchArray($result); + $contents_title = $myts->makeTboxData4Edit($myrow['contents_title']); + $contents_contents = $myts->makeTareaData4Edit($myrow['contents_contents']); + $contents_order = $myrow['contents_order']; + $contents_visible = $myrow['contents_visible']; + $contents_nohtml = $myrow['contents_nohtml']; + $contents_nosmiley = $myrow['contents_nosmiley']; + $contents_noxcode = $myrow['contents_noxcode']; + $contents_id = $myrow['contents_id']; + $category_id = $myrow['category_id']; + $op = "editcontentsgo"; + + echo "" ._XD_MAIN." »» ".$category." »» "._XD_EDITCONTENTS."

    +

    "._XD_EDITCONTENTS."

    "; + include "contentsform.php"; - xoops_cp_footer(); - exit(); + xoops_cp_footer(); + exit(); } if ($op == "editcontentsgo") { - $myts =& MyTextSanitizer::getInstance(); - $title = $myts->makeTboxData4Save($contents_title); - $contents = $myts->makeTareaData4Save($contents_contents); - $nohtml = empty($contents_nohtml) ? 0 : 1; - $nosmiley = empty($contents_nosmiley) ? 0 : 1; - $noxcode = empty($contents_noxcode) ? 0 : 1; - $sql = "UPDATE ".$xoopsDB->prefix("xoopsfaq_contents")." set contents_title='".$title."', contents_contents='".$contents."', contents_time=".time().", contents_order=".intval($contents_order).", contents_visible=".intval($contents_visible).", contents_nohtml=".$nohtml.", contents_nosmiley=".$nosmiley.", contents_noxcode=".$noxcode." WHERE contents_id=".$contents_id.""; - if (!$xoopsDB->query($sql)) { - xoops_cp_header(); - echo "Could not update contents"; - xoops_cp_footer(); - } else { - redirect_header("index.php?op=listcontents&cat_id=$category_id",1,_XD_DBSUCCESS); - } - exit(); -} - -if ($op == "delcat") { - if ($ok == 1) { - $sql = sprintf("DELETE FROM %s WHERE category_id = %u", $xoopsDB->prefix("xoopsfaq_categories"), $cat_id); - if (!$xoopsDB->query($sql)) { - xoops_cp_header(); - echo "Could not delete category"; - xoops_cp_footer(); - } else { - $sql = sprintf("DELETE FROM %s WHERE category_id = %u", $xoopsDB->prefix("xoopsfaq_contents"), $cat_id); - $xoopsDB->query($sql); - // delete comments - xoops_comment_delete($xoopsModule->getVar('mid'), $cat_id); - redirect_header("index.php?op=listcat",1,_XD_DBSUCCESS); - } - exit(); - } else { - xoops_cp_header(); - xoops_confirm(array('op' => 'delcat', 'cat_id' => $cat_id, 'ok' => 1), 'index.php', _XD_RUSURECAT); - xoops_cp_footer(); - exit(); - } + $contents_id = !empty($_POST['contents_id']) ? intval($_POST['contents_id']) : 0; + $myts =& MyTextSanitizer::getInstance(); + $title = !empty($_POST['contents_title']) ? $myts->stripSlashesGPC($_POST['contents_title']) : ''; + $contents = !empty($_POST['contents_contents']) ? $myts->stripSlashesGPC($_POST['contents_contents']) : ''; + $contents_nohtml = empty($_POST['contents_nohtml']) ? 0 : 1; + $contents_nosmiley = empty($_POST['contents_nosmiley']) ? 0 : 1; + $contents_noxcode = empty($_POST['contents_noxcode']) ? 0 : 1; + $contents_visible = !empty($_POST['contents_visible']) ? 1 : 0; + $contents_order = !empty($_POST['contents_order']) ? intval($_POST['contents_order']) : 0; + $sql = "UPDATE ".$xoopsDB->prefix("xoopsfaq_contents")." set contents_title=".$xoopsDB->quoteSTring($title).", contents_contents=".$xoopsDB->quoteSTring($contents).", contents_time=".time().", contents_order=".$contents_order.", contents_visible=".$contents_visible.", contents_nohtml=".$contents_nohtml.", contents_nosmiley=".$contents_nosmiley.", contents_noxcode=".$contents_noxcode." WHERE contents_id=".$contents_id; + if (!$xoopsDB->query($sql)) { + xoops_cp_header(); + echo "Could not update contents"; + xoops_cp_footer(); + } else { + redirect_header("index.php?op=listcontents&cat_id=".intval($_POST['category_id']),1,_XD_DBSUCCESS); + } + exit(); +} + +if ($op == "delcatgo") { + $cat_id = !empty($_POST['cat_id']) ? intval($_POST['cat_id']) : 0; + if ($cat_id <= 0) { + exit(); + } + $sql = sprintf("DELETE FROM %s WHERE category_id = %u", $xoopsDB->prefix("xoopsfaq_categories"), $cat_id); + if (!$xoopsDB->query($sql)) { + xoops_cp_header(); + echo "Could not delete category"; + xoops_cp_footer(); + } else { + $sql = sprintf("DELETE FROM %s WHERE category_id = %u", $xoopsDB->prefix("xoopsfaq_contents"), $cat_id); + $xoopsDB->query($sql); + // delete comments + xoops_comment_delete($xoopsModule->getVar('mid'), $cat_id); + redirect_header("index.php?op=listcat",1,_XD_DBSUCCESS); + } + exit(); +} + +if ($op == 'delcat') { + xoops_cp_header(); + xoops_confirm(array('op' => 'delcatgo', 'cat_id' => $cat_id), 'index.php', _XD_RUSURECAT); + xoops_cp_footer(); + exit(); +} + +if ($op == "delcontentsgo") { + $id = !empty($_POST['id']) ? intval($_POST['id']) : 0; + if ($id <= 0) { + exit(); + } + $sql = sprintf("DELETE FROM %s WHERE contents_id = %u", $xoopsDB->prefix("xoopsfaq_contents"), $id); + if (!$xoopsDB->query($sql)) { + xoops_cp_header(); + echo "Could not delete contents"; + xoops_cp_footer(); + } else { + redirect_header("index.php?op=listcontents&cat_id=".intval($_POST['cat_id']),1,_XD_DBSUCCESS); + } + exit(); } if ($op == "delcontents") { - if ($ok == 1) { - $sql = sprintf("DELETE FROM %s WHERE contents_id = %u", $xoopsDB->prefix("xoopsfaq_contents"), $id); - if (!$xoopsDB->query($sql)) { - xoops_cp_header(); - echo "Could not delete contents"; - xoops_cp_footer(); - } else { - redirect_header("index.php?op=listcontents&cat_id=$cat_id",1,_XD_DBSUCCESS); - } - exit(); - } else { - xoops_cp_header(); - xoops_confirm(array('op' => 'delcontents', 'id' => $id, 'ok' => 1), 'index.php', _XD_RUSURECAT); - xoops_cp_footer(); - exit(); - } + $id = !empty($_GET['id']) ? intval($_GET['id']) : 0; + xoops_cp_header(); + xoops_confirm(array('op' => 'delcontentsgo', 'id' => $id, 'cat_id' => $cat_id), 'index.php', _XD_RUSURECAT); + xoops_cp_footer(); + exit(); } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:56 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:56 +0900 Subject: [xoops-cvslog 136] CVS update: xoops2jp/html/modules/xoopsheadline/language/japanese Message-ID: <20050611023256.EF8FD2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php diff -u xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2 xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.3 --- xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2 Fri Mar 18 22:00:59 2005 +++ xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php Sat Jun 11 11:32:56 2005 @@ -1,5 +1,5 @@ ¥µ¥¤¥È̾¡§ %s'); +define('_AM_WANTDEL','ËÜÅö¤Ë¤³¤Î¥Ø¥Ã¥É¥é¥¤¥ó¤òºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡©
    ¥µ¥¤¥È̾¡§ %s'); define('_AM_INVALIDID', 'ID¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó'); define('_AM_OBJECTNG', '¥ª¥Ö¥¸¥§¥¯¥È¤¬Â¸ºß¤·¤Þ¤»¤ó'); -define('_AM_FAILUPDATE', '¥Ø¥Ã¥É¥é¥¤¥ó¤ÎÊݸ¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); -define('_AM_FAILDELETE', '¥Ø¥Ã¥É¥é¥¤¥ó¤Îºï½ü¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); +define('_AM_FAILUPDATE', '¥Ø¥Ã¥É¥é¥¤¥ó¤ÎÊݸ¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); +define('_AM_FAILDELETE', '¥Ø¥Ã¥É¥é¥¤¥ó¤Îºï½ü¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:56 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:56 +0900 Subject: [xoops-cvslog 137] CVS update: xoops2jp/html/modules/xoopsheadline/class Message-ID: <20050611023256.A7D4F2AC02F@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/class/headline.php diff -u xoops2jp/html/modules/xoopsheadline/class/headline.php:1.2 xoops2jp/html/modules/xoopsheadline/class/headline.php:1.3 --- xoops2jp/html/modules/xoopsheadline/class/headline.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopsheadline/class/headline.php Sat Jun 11 11:32:56 2005 @@ -1,5 +1,5 @@ XoopsObject(); - $this->initVar('headline_id', XOBJ_DTYPE_INT, null, false); - $this->initVar('headline_name', XOBJ_DTYPE_TXTBOX, null, true, 255); - $this->initVar('headline_url', XOBJ_DTYPE_TXTBOX, null, true, 255); - $this->initVar('headline_rssurl', XOBJ_DTYPE_TXTBOX, null, true, 255); - $this->initVar('headline_cachetime', XOBJ_DTYPE_INT, 600, false); - $this->initVar('headline_asblock', XOBJ_DTYPE_INT, 0, false); - $this->initVar('headline_display', XOBJ_DTYPE_INT, 0, false); - $this->initVar('headline_encoding', XOBJ_DTYPE_OTHER, null, false); - $this->initVar('headline_weight', XOBJ_DTYPE_INT, 0, false); - $this->initVar('headline_mainimg', XOBJ_DTYPE_INT, 1, false); - $this->initVar('headline_mainfull', XOBJ_DTYPE_INT, 1, false); - $this->initVar('headline_mainmax', XOBJ_DTYPE_INT, 10, false); - $this->initVar('headline_blockimg', XOBJ_DTYPE_INT, 0, false); - $this->initVar('headline_blockmax', XOBJ_DTYPE_INT, 10, false); - $this->initVar('headline_xml', XOBJ_DTYPE_SOURCE, null, false); - $this->initVar('headline_updated', XOBJ_DTYPE_INT, 0, false); - } - - function cacheExpired() - { - if (time() - $this->getVar('headline_updated') > $this->getVar('headline_cachetime')) { - return true; - } - return false; - } + function XoopsheadlineHeadline() + { + $this->XoopsObject(); + $this->initVar('headline_id', XOBJ_DTYPE_INT, null, false); + $this->initVar('headline_name', XOBJ_DTYPE_TXTBOX, null, true, 255); + $this->initVar('headline_url', XOBJ_DTYPE_TXTBOX, null, true, 255); + $this->initVar('headline_rssurl', XOBJ_DTYPE_TXTBOX, null, true, 255); + $this->initVar('headline_cachetime', XOBJ_DTYPE_INT, 600, false); + $this->initVar('headline_asblock', XOBJ_DTYPE_INT, 0, false); + $this->initVar('headline_display', XOBJ_DTYPE_INT, 0, false); + $this->initVar('headline_encoding', XOBJ_DTYPE_OTHER, null, false); + $this->initVar('headline_weight', XOBJ_DTYPE_INT, 0, false); + $this->initVar('headline_mainimg', XOBJ_DTYPE_INT, 1, false); + $this->initVar('headline_mainfull', XOBJ_DTYPE_INT, 1, false); + $this->initVar('headline_mainmax', XOBJ_DTYPE_INT, 10, false); + $this->initVar('headline_blockimg', XOBJ_DTYPE_INT, 0, false); + $this->initVar('headline_blockmax', XOBJ_DTYPE_INT, 10, false); + $this->initVar('headline_xml', XOBJ_DTYPE_SOURCE, null, false); + $this->initVar('headline_updated', XOBJ_DTYPE_INT, 0, false); + } + + function cacheExpired() + { + if (time() - $this->getVar('headline_updated') > $this->getVar('headline_cachetime')) { + return true; + } + return false; + } } class xoopsheadlineHeadlineHandler { - var $db; + var $db; - function XoopsheadlineHeadlineHandler(&$db) - { - $this->db =& $db; - } - - function &getInstance(&$db) - { - static $instance; - if (!isset($instance)) { - $instance = new XoopsheadlineHeadlineHandler($db); - } - return $instance; - } - - function &create() - { - return new XoopsheadlineHeadline(); - } - - function &get($id) - { - $id = intval($id); - if ($id > 0) { - $sql = 'SELECT * FROM '.$this->db->prefix('xoopsheadline').' WHERE headline_id='.$id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if ($numrows == 1) { - $headline = new XoopsheadlineHeadline(); - $headline->assignVars($this->db->fetchArray($result)); - return $headline; - } - } - return false; - } - - function insert(&$headline) - { - if (get_class($headline) != 'xoopsheadlineheadline') { - return false; - } - if (!$headline->cleanVars()) { - return false; - } - foreach ($headline->cleanVars as $k => $v) { - ${$k} = $v; - } - if (empty($headline_id)) { - $headline_id = $this->db->genId('xoopsheadline_headline_id_seq'); - $sql = 'INSERT INTO '.$this->db->prefix('xoopsheadline').' (headline_id, headline_name, headline_url, headline_rssurl, headline_encoding, headline_cachetime, headline_asblock, headline_display, headline_weight, headline_mainimg, headline_mainfull, headline_mainmax, headline_blockimg, headline_blockmax, headline_xml, headline_updated) VALUES ('.$headline_id.', '.$this->db->quoteString($headline_name).', '.$this->db->quoteString($headline_url).', '.$this->db->quoteString($headline_rssurl).', '.$this->db->quoteString($headline_encoding).', '.$headline_cachetime.', '.$headline_asblock.', '.$headline_display.', '.$headline_weight.', '.$headline_mainimg.', '.$headline_mainfull.', '.$headline_mainmax.', '.$headline_blockimg.', '.$headline_blockmax.', '.$this->db->quoteString($headline_xml).', '.time().')'; - } else { - $sql = 'UPDATE '.$this->db->prefix('xoopsheadline').' SET headline_name='.$this->db->quoteString($headline_name).', headline_url='.$this->db->quoteString($headline_url).', headline_rssurl='.$this->db->quoteString($headline_rssurl).', headline_encoding='.$this->db->quoteString($headline_encoding).', headline_cachetime='.$headline_cachetime.', headline_asblock='.$headline_asblock.', headline_display='.$headline_display.', headline_weight='.$headline_weight.', headline_mainimg='.$headline_mainimg.', headline_mainfull='.$headline_mainfull.', headline_mainmax='.$headline_mainmax.', headline_blockimg='.$headline_blockimg.', headline_blockmax='.$headline_blockmax.', headline_xml = '.$this->db->quoteString($headline_xml).', headline_updated='.$headline_updated.' WHERE headline_id='.$headline_id; - } - if (!$result = $this->db->queryF($sql)) { - return false; - } - if (empty($headline_id)) { - $headline_id = $this->db->getInsertId(); - } - $headline->assignVar('headline_id', $headline_id); - return $headline_id; - } - - function delete(&$headline) - { - if (get_class($headline) != 'xoopsheadlineheadline') { - return false; - } - $sql = sprintf("DELETE FROM %s WHERE headline_id = %u", $this->db->prefix('xoopsheadline'), $headline->getVar('headline_id')); - if (!$result = $this->db->query($sql)) { - return false; - } - return true; - } - - function &getObjects($criteria = null) - { - $ret = array(); - $limit = $start = 0; - $sql = 'SELECT * FROM '.$this->db->prefix('xoopsheadline'); - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' '.$criteria->renderWhere(); - $sql .= ' ORDER BY headline_weight '.$criteria->getOrder(); - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $headline = new XoopsheadlineHeadline(); - $headline->assignVars($myrow); - $ret[] =& $headline; - unset($headline); - } - return $ret; - } - - function getCount($criteria = null) - { - $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('xoopsheadline'); - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' '.$criteria->renderWhere(); - } - if (!$result =& $this->db->query($sql)) { - return 0; - } - list($count) = $this->db->fetchRow($result); - return $count; - } + function XoopsheadlineHeadlineHandler(&$db) + { + $this->db =& $db; + } + + function &getInstance(&$db) + { + static $instance; + if (!isset($instance)) { + $instance = new XoopsheadlineHeadlineHandler($db); + } + return $instance; + } + + function &create() + { + return new XoopsheadlineHeadline(); + } + + function &get($id) + { + $id = intval($id); + if ($id > 0) { + $sql = 'SELECT * FROM '.$this->db->prefix('xoopsheadline').' WHERE headline_id='.$id; + if (!$result = $this->db->query($sql)) { + return false; + } + $numrows = $this->db->getRowsNum($result); + if ($numrows == 1) { + $headline = new XoopsheadlineHeadline(); + $headline->assignVars($this->db->fetchArray($result)); + return $headline; + } + } + return false; + } + + function insert(&$headline) + { + if (strtolower(get_class($headline)) != 'xoopsheadlineheadline') { + return false; + } + if (!$headline->cleanVars()) { + return false; + } + foreach ($headline->cleanVars as $k => $v) { + ${$k} = $v; + } + if (empty($headline_id)) { + $headline_id = $this->db->genId('xoopsheadline_headline_id_seq'); + $sql = 'INSERT INTO '.$this->db->prefix('xoopsheadline').' (headline_id, headline_name, headline_url, headline_rssurl, headline_encoding, headline_cachetime, headline_asblock, headline_display, headline_weight, headline_mainimg, headline_mainfull, headline_mainmax, headline_blockimg, headline_blockmax, headline_xml, headline_updated) VALUES ('.$headline_id.', '.$this->db->quoteString($headline_name).', '.$this->db->quoteString($headline_url).', '.$this->db->quoteString($headline_rssurl).', '.$this->db->quoteString($headline_encoding).', '.$headline_cachetime.', '.$headline_asblock.', '.$headline_display.', '.$headline_weight.', '.$headline_mainimg.', '.$headline_mainfull.', '.$headline_mainmax.', '.$headline_blockimg.', '.$headline_blockmax.', '.$this->db->quoteString($headline_xml).', '.time().')'; + } else { + $sql = 'UPDATE '.$this->db->prefix('xoopsheadline').' SET headline_name='.$this->db->quoteString($headline_name).', headline_url='.$this->db->quoteString($headline_url).', headline_rssurl='.$this->db->quoteString($headline_rssurl).', headline_encoding='.$this->db->quoteString($headline_encoding).', headline_cachetime='.$headline_cachetime.', headline_asblock='.$headline_asblock.', headline_display='.$headline_display.', headline_weight='.$headline_weight.', headline_mainimg='.$headline_mainimg.', headline_mainfull='.$headline_mainfull.', headline_mainmax='.$headline_mainmax.', headline_blockimg='.$headline_blockimg.', headline_blockmax='.$headline_blockmax.', headline_xml = '.$this->db->quoteString($headline_xml).', headline_updated='.$headline_updated.' WHERE headline_id='.$headline_id; + } + if (!$result = $this->db->queryF($sql)) { + return false; + } + if (empty($headline_id)) { + $headline_id = $this->db->getInsertId(); + } + $headline->assignVar('headline_id', $headline_id); + return $headline_id; + } + + function delete(&$headline) + { + if (get_class($headline) != 'xoopsheadlineheadline') { + return false; + } + $sql = sprintf("DELETE FROM %s WHERE headline_id = %u", $this->db->prefix('xoopsheadline'), $headline->getVar('headline_id')); + if (!$result = $this->db->query($sql)) { + return false; + } + return true; + } + + function &getObjects($criteria = null) + { + $ret = array(); + $limit = $start = 0; + $sql = 'SELECT * FROM '.$this->db->prefix('xoopsheadline'); + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + $sql .= ' ORDER BY headline_weight '.$criteria->getOrder(); + $limit = $criteria->getLimit(); + $start = $criteria->getStart(); + } + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $headline = new XoopsheadlineHeadline(); + $headline->assignVars($myrow); + $ret[] =& $headline; + unset($headline); + } + return $ret; + } + + function getCount($criteria = null) + { + $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('xoopsheadline'); + if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { + $sql .= ' '.$criteria->renderWhere(); + } + if (!$result =& $this->db->query($sql)) { + return 0; + } + list($count) = $this->db->fetchRow($result); + return $count; + } } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:56 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:56 +0900 Subject: [xoops-cvslog 138] CVS update: xoops2jp/html/modules/xoopsheadline/admin Message-ID: <20050611023256.6636B2AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/admin/index.php diff -u xoops2jp/html/modules/xoopsheadline/admin/index.php:1.2 xoops2jp/html/modules/xoopsheadline/admin/index.php:1.3 --- xoops2jp/html/modules/xoopsheadline/admin/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopsheadline/admin/index.php Sat Jun 11 11:32:56 2005 @@ -1,5 +1,5 @@ $v) { - ${$k} = $v; - } +if (!empty($_GET['op']) && ($_GET['op'] == 'delete' || $_GET['op'] == 'edit')) { + $op = $_GET['op']; + $headline_id = intval($_GET['headline_id']); +} elseif (!empty($_POST['op'])) { + $op = $_POST['op']; } if ($op == 'list') { - include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $hlman =& xoops_getmodulehandler('headline');; - $headlines =& $hlman->getObjects(); - $count = count($headlines); - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - echo '
    '; - for ($i = 0; $i < $count; $i++) { - echo ' - - '; - echo ''; - echo ''; - echo ''; - } - echo '
    '._AM_SITENAME.''._AM_CACHETIME.''._AM_ENCODING.''._AM_DISPLAY.''._AM_ASBLOCK.''._AM_ORDER.' 
    '.$headlines[$i]->getVar('headline_name').'getVar('headline_display')) { - echo ' checked="checked"'; - } - echo ' />getVar('headline_asblock')) { - echo ' checked="checked"'; - } - echo ' />'._EDIT.' '._DELETE.'
    '; - $form = new XoopsThemeForm(_AM_ADDHEADL, 'xoopsheadline_form_new', 'index.php'); - $form->addElement(new XoopsFormText(_AM_SITENAME, 'headline_name', 50, 255), true); - $form->addElement(new XoopsFormText(_AM_URL, 'headline_url', 50, 255, 'http://'), true); - $form->addElement(new XoopsFormText(_AM_URLEDFXML, 'headline_rssurl', 50, 255, 'http://'), true); - $form->addElement(new XoopsFormText(_AM_ORDER, 'headline_weight', 4, 3, 0)); $enc_sel = new XoopsFormSelect(_AM_ENCODING, 'headline_encoding', 'utf-8'); - $enc_sel->addOptionArray(array('utf-8' => 'UTF-8', 'iso-8859-1' => 'ISO-8859-1', 'us-ascii' => 'US-ASCII')); - $form->addElement($enc_sel); - $cache_sel = new XoopsFormSelect(_AM_CACHETIME, 'headline_cachetime', 86400); - $cache_sel->addOptionArray(array('3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH)); - $form->addElement($cache_sel); - - $form->insertBreak(_AM_MAINSETT); - $form->addElement(new XoopsFormRadioYN(_AM_DISPLAY, 'headline_display', 1, _YES, _NO)); - $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_mainimg', 0, _YES, _NO)); - $form->addElement(new XoopsFormRadioYN(_AM_DISPFULL, 'headline_mainfull', 0, _YES, _NO)); - $mmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_mainmax', 10); - $mmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); - $form->addElement($mmax_sel); - - $form->insertBreak(_AM_BLOCKSETT); - $form->addElement(new XoopsFormRadioYN(_AM_ASBLOCK, 'headline_asblock', 1, _YES, _NO)); - $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_blockimg', 0, _YES, _NO)); - $bmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_blockmax', 5); - $bmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); - $form->addElement($bmax_sel); - - - $form->insertBreak(); - $form->addElement(new XoopsFormHidden('op', 'addgo')); - $form->addElement(new XoopsFormButton('', 'headline_submit2', _SUBMIT, 'submit')); - $form->display(); - xoops_cp_footer(); - exit(); + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; + $hlman =& xoops_getmodulehandler('headline');; + $headlines =& $hlman->getObjects(); + $count = count($headlines); + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + echo '
    '; + for ($i = 0; $i < $count; $i++) { + echo ' + + '; + echo ''; + echo ''; + echo ''; + } + echo '
    '._AM_SITENAME.''._AM_CACHETIME.''._AM_ENCODING.''._AM_DISPLAY.''._AM_ASBLOCK.''._AM_ORDER.' 
    '.$headlines[$i]->getVar('headline_name').'getVar('headline_display')) { + echo ' checked="checked"'; + } + echo ' />getVar('headline_asblock')) { + echo ' checked="checked"'; + } + echo ' />'._EDIT.' '._DELETE.'
    '; + $form = new XoopsThemeForm(_AM_ADDHEADL, 'xoopsheadline_form_new', 'index.php'); + $form->addElement(new XoopsFormText(_AM_SITENAME, 'headline_name', 50, 255), true); + $form->addElement(new XoopsFormText(_AM_URL, 'headline_url', 50, 255, 'http://'), true); + $form->addElement(new XoopsFormText(_AM_URLEDFXML, 'headline_rssurl', 50, 255, 'http://'), true); + $form->addElement(new XoopsFormText(_AM_ORDER, 'headline_weight', 4, 3, 0)); $enc_sel = new XoopsFormSelect(_AM_ENCODING, 'headline_encoding', 'utf-8'); + $enc_sel->addOptionArray(array('utf-8' => 'UTF-8', 'iso-8859-1' => 'ISO-8859-1', 'us-ascii' => 'US-ASCII')); + $form->addElement($enc_sel); + $cache_sel = new XoopsFormSelect(_AM_CACHETIME, 'headline_cachetime', 86400); + $cache_sel->addOptionArray(array('3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH)); + $form->addElement($cache_sel); + + $form->insertBreak(_AM_MAINSETT); + $form->addElement(new XoopsFormRadioYN(_AM_DISPLAY, 'headline_display', 1, _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_mainimg', 0, _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_DISPFULL, 'headline_mainfull', 0, _YES, _NO)); + $mmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_mainmax', 10); + $mmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); + $form->addElement($mmax_sel); + + $form->insertBreak(_AM_BLOCKSETT); + $form->addElement(new XoopsFormRadioYN(_AM_ASBLOCK, 'headline_asblock', 1, _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_blockimg', 0, _YES, _NO)); + $bmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_blockmax', 5); + $bmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); + $form->addElement($bmax_sel); + + + $form->insertBreak(); + $form->addElement(new XoopsFormHidden('op', 'addgo')); + $form->addElement(new XoopsFormButton('', 'headline_submit2', _SUBMIT, 'submit')); + $form->display(); + xoops_cp_footer(); + exit(); } if ($op == 'update') { - $hlman =& xoops_getmodulehandler('headline');; - $i = 0; - $msg = ''; - foreach ($headline_id as $id) { - $hl =& $hlman->get($id); - if (!is_object($hl)) { - $i++; - continue; - } - $headline_display[$id] = empty($headline_display[$id]) ? 0 : $headline_display[$id]; - $headline_asblock[$id] = empty($headline_asblock[$id]) ? 0 : $headline_asblock[$id]; - $old_cachetime = $hl->getVar('headline_cachetime'); - $hl->setVar('headline_cachetime', $headline_cachetime[$i]); - $old_display = $hl->getVar('headline_display'); - $hl->setVar('headline_display', $headline_display[$id]); - $hl->setVar('headline_weight', $headline_weight[$i]); - $old_asblock = $hl->getVar('headline_asblock'); - $hl->setVar('headline_asblock', $headline_asblock[$id]); - $old_encoding = $hl->getVar('headline_encoding'); - if (!$hlman->insert($hl)) { - $msg .= '
    '.sprintf(_AM_FAILUPDATE, $hl->getVar('headline_name')); - } else { - if ($hl->getVar('headline_xml') == '') { - $renderer =& xoopsheadline_getrenderer($hl); - $renderer->updateCache(); - } - } - $i++; - } - if ($msg != '') { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error($msg); - xoops_cp_footer(); - exit(); - } - redirect_header('index.php', 2, _AM_DBUPDATED); + $hlman =& xoops_getmodulehandler('headline');; + $i = 0; + $msg = ''; + foreach ($_POST['headline_id'] as $id) { + $hl =& $hlman->get($id); + if (!is_object($hl)) { + $i++; + continue; + } + $headline_display[$id] = empty($_POST['headline_display'][$id]) ? 0 : $_POST['headline_display'][$id]; + $headline_asblock[$id] = empty($_POST['headline_asblock'][$id]) ? 0 : $_POST['headline_asblock'][$id]; + $old_cachetime = $hl->getVar('headline_cachetime'); + $hl->setVar('headline_cachetime', $_POST['headline_cachetime'][$i]); + $old_display = $hl->getVar('headline_display'); + $hl->setVar('headline_display', $headline_display[$id]); + $hl->setVar('headline_weight', $_POST['headline_weight'][$i]); + $old_asblock = $hl->getVar('headline_asblock'); + $hl->setVar('headline_asblock', $headline_asblock[$id]); + $old_encoding = $hl->getVar('headline_encoding'); + if (!$hlman->insert($hl)) { + $msg .= '
    '.sprintf(_AM_FAILUPDATE, $hl->getVar('headline_name')); + } else { + if ($hl->getVar('headline_xml') == '') { + $renderer =& xoopsheadline_getrenderer($hl); + $renderer->updateCache(); + } + } + $i++; + } + if ($msg != '') { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error($msg); + xoops_cp_footer(); + exit(); + } + redirect_header('index.php', 2, _AM_DBUPDATED); } if ($op == 'addgo') { - $hlman =& xoops_getmodulehandler('headline');; - $hl =& $hlman->create(); - $hl->setVar('headline_name', $headline_name); - $hl->setVar('headline_url', $headline_url); - $hl->setVar('headline_rssurl', $headline_rssurl); - $hl->setVar('headline_display', $headline_display); - $hl->setVar('headline_weight', $headline_weight); - $hl->setVar('headline_asblock', $headline_asblock); - $hl->setVar('headline_encoding', $headline_encoding); - $hl->setVar('headline_cachetime', $headline_cachetime); - $hl->setVar('headline_mainfull', $headline_mainfull); - $hl->setVar('headline_mainimg', $headline_mainimg); - $hl->setVar('headline_mainmax', $headline_mainmax); - $hl->setVar('headline_blockimg', $headline_blockimg); - $hl->setVar('headline_blockmax', $headline_blockmax); - if (!$hlman->insert($hl)) { - $msg = sprintf(_AM_FAILUPDATE, $hl->getVar('headline_name')); - $msg .= '
    '.$hl->getErrors(); - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error($msg); - xoops_cp_footer(); - exit(); - } else { - if ($hl->getVar('headline_xml') == '') { - $renderer =& xoopsheadline_getrenderer($hl); - $renderer->updateCache(); - } - } - redirect_header('index.php', 2, _AM_DBUPDATED); + $hlman =& xoops_getmodulehandler('headline');; + $hl =& $hlman->create(); + $hl->setVar('headline_name', $_POST['headline_name']); + $hl->setVar('headline_url', $_POST['headline_url']); + $hl->setVar('headline_rssurl', $_POST['headline_rssurl']); + $hl->setVar('headline_display', $_POST['headline_display']); + $hl->setVar('headline_weight', $_POST['headline_weight']); + $hl->setVar('headline_asblock', $_POST['headline_asblock']); + $hl->setVar('headline_encoding', $_POST['headline_encoding']); + $hl->setVar('headline_cachetime', $_POST['headline_cachetime']); + $hl->setVar('headline_mainfull', $_POST['headline_mainfull']); + $hl->setVar('headline_mainimg', $_POST['headline_mainimg']); + $hl->setVar('headline_mainmax', $_POST['headline_mainmax']); + $hl->setVar('headline_blockimg', $_POST['headline_blockimg']); + $hl->setVar('headline_blockmax', $_POST['headline_blockmax']); + if (!$hlman->insert($hl)) { + $msg = sprintf(_AM_FAILUPDATE, $hl->getVar('headline_name')); + $msg .= '
    '.$hl->getErrors(); + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error($msg); + xoops_cp_footer(); + exit(); + } else { + if ($hl->getVar('headline_xml') == '') { + $renderer =& xoopsheadline_getrenderer($hl); + $renderer->updateCache(); + } + } + redirect_header('index.php', 2, _AM_DBUPDATED); } if ($op == 'edit') { - if ($headline_id <= 0) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_INVALIDID); - xoops_cp_footer(); - exit(); - } - $hlman =& xoops_getmodulehandler('headline');; - $hl =& $hlman->get($headline_id); - if (!is_object($hl)) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_OBJECTNG); - xoops_cp_footer(); - exit(); - } - include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $form = new XoopsThemeForm(_AM_EDITHEADL, 'xoopsheadline_form', 'index.php'); - $form->addElement(new XoopsFormText(_AM_SITENAME, 'headline_name', 50, 255, $hl->getVar('headline_name')), true); - $form->addElement(new XoopsFormText(_AM_URL, 'headline_url', 50, 255, $hl->getVar('headline_url')), true); - $form->addElement(new XoopsFormText(_AM_URLEDFXML, 'headline_rssurl', 50, 255, $hl->getVar('headline_rssurl')), true); - $form->addElement(new XoopsFormText(_AM_ORDER, 'headline_weight', 4, 3, $hl->getVar('headline_weight'))); - $enc_sel = new XoopsFormSelect(_AM_ENCODING, 'headline_encoding', $hl->getVar('headline_encoding')); - $enc_sel->addOptionArray(array('utf-8' => 'UTF-8', 'iso-8859-1' => 'ISO-8859-1', 'us-ascii' => 'US-ASCII')); - $form->addElement($enc_sel); - $cache_sel = new XoopsFormSelect(_AM_CACHETIME, 'headline_cachetime', $hl->getVar('headline_cachetime')); - $cache_sel->addOptionArray(array('3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH)); - $form->addElement($cache_sel); - - $form->insertBreak(_AM_MAINSETT); - $form->addElement(new XoopsFormRadioYN(_AM_DISPLAY, 'headline_display', $hl->getVar('headline_display'), _YES, _NO)); - $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_mainimg', $hl->getVar('headline_mainimg'), _YES, _NO)); - $form->addElement(new XoopsFormRadioYN(_AM_DISPFULL, 'headline_mainfull', $hl->getVar('headline_mainfull'), _YES, _NO)); - $mmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_mainmax', $hl->getVar('headline_mainmax')); - $mmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); - $form->addElement($mmax_sel); - - $form->insertBreak(_AM_BLOCKSETT); - $form->addElement(new XoopsFormRadioYN(_AM_ASBLOCK, 'headline_asblock', $hl->getVar('headline_asblock'), _YES, _NO)); - $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_blockimg', $hl->getVar('headline_blockimg'), _YES, _NO)); - $bmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_blockmax', $hl->getVar('headline_blockmax')); - $bmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); - $form->addElement($bmax_sel); - $form->insertBreak(); - $form->addElement(new XoopsFormHidden('headline_id', $hl->getVar('headline_id'))); - $form->addElement(new XoopsFormHidden('op', 'editgo')); - $form->addElement(new XoopsFormButton('', 'headline_submit', _SUBMIT, 'submit')); - xoops_cp_header(); - echo "

    "._AM_HEADLINES."


    "; - //echo ''. _AM_HLMAIN .' »» '.$hl->getVar('headline_name').'

    '; - $form->display(); - xoops_cp_footer(); - exit(); + + if ($headline_id <= 0) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_INVALIDID); + xoops_cp_footer(); + exit(); + } + $hlman =& xoops_getmodulehandler('headline');; + $hl =& $hlman->get($headline_id); + if (!is_object($hl)) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_OBJECTNG); + xoops_cp_footer(); + exit(); + } + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; + $form = new XoopsThemeForm(_AM_EDITHEADL, 'xoopsheadline_form', 'index.php'); + $form->addElement(new XoopsFormText(_AM_SITENAME, 'headline_name', 50, 255, $hl->getVar('headline_name')), true); + $form->addElement(new XoopsFormText(_AM_URL, 'headline_url', 50, 255, $hl->getVar('headline_url')), true); + $form->addElement(new XoopsFormText(_AM_URLEDFXML, 'headline_rssurl', 50, 255, $hl->getVar('headline_rssurl')), true); + $form->addElement(new XoopsFormText(_AM_ORDER, 'headline_weight', 4, 3, $hl->getVar('headline_weight'))); + $enc_sel = new XoopsFormSelect(_AM_ENCODING, 'headline_encoding', $hl->getVar('headline_encoding')); + $enc_sel->addOptionArray(array('utf-8' => 'UTF-8', 'iso-8859-1' => 'ISO-8859-1', 'us-ascii' => 'US-ASCII')); + $form->addElement($enc_sel); + $cache_sel = new XoopsFormSelect(_AM_CACHETIME, 'headline_cachetime', $hl->getVar('headline_cachetime')); + $cache_sel->addOptionArray(array('3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH)); + $form->addElement($cache_sel); + + $form->insertBreak(_AM_MAINSETT); + $form->addElement(new XoopsFormRadioYN(_AM_DISPLAY, 'headline_display', $hl->getVar('headline_display'), _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_mainimg', $hl->getVar('headline_mainimg'), _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_DISPFULL, 'headline_mainfull', $hl->getVar('headline_mainfull'), _YES, _NO)); + $mmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_mainmax', $hl->getVar('headline_mainmax')); + $mmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); + $form->addElement($mmax_sel); + + $form->insertBreak(_AM_BLOCKSETT); + $form->addElement(new XoopsFormRadioYN(_AM_ASBLOCK, 'headline_asblock', $hl->getVar('headline_asblock'), _YES, _NO)); + $form->addElement(new XoopsFormRadioYN(_AM_DISPIMG, 'headline_blockimg', $hl->getVar('headline_blockimg'), _YES, _NO)); + $bmax_sel = new XoopsFormSelect(_AM_DISPMAX, 'headline_blockmax', $hl->getVar('headline_blockmax')); + $bmax_sel->addOptionArray(array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)); + $form->addElement($bmax_sel); + $form->insertBreak(); + $form->addElement(new XoopsFormHidden('headline_id', $hl->getVar('headline_id'))); + $form->addElement(new XoopsFormHidden('op', 'editgo')); + $form->addElement(new XoopsFormButton('', 'headline_submit', _SUBMIT, 'submit')); + xoops_cp_header(); + echo "

    "._AM_HEADLINES."


    "; + //echo ''. _AM_HLMAIN .' »» '.$hl->getVar('headline_name').'

    '; + $form->display(); + xoops_cp_footer(); + exit(); } if ($op == 'editgo') { - $headline_id = intval($headline_id); - if ($headline_id <= 0) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_INVALIDID); - xoops_cp_footer(); - exit(); - } - $hlman =& xoops_getmodulehandler('headline');; - $hl =& $hlman->get($headline_id); - if (!is_object($hl)) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_OBJECTNG); - xoops_cp_footer(); - exit(); - } - $hl->setVar('headline_name', $headline_name); - $hl->setVar('headline_url', $headline_url); - $hl->setVar('headline_encoding', $headline_encoding); - $hl->setVar('headline_rssurl', $headline_rssurl); - $hl->setVar('headline_display', $headline_display); - $hl->setVar('headline_weight', $headline_weight); - $hl->setVar('headline_asblock', $headline_asblock); - $hl->setVar('headline_cachetime', $headline_cachetime); - $hl->setVar('headline_mainfull', $headline_mainfull); - $hl->setVar('headline_mainimg', $headline_mainimg); - $hl->setVar('headline_mainmax', $headline_mainmax); - $hl->setVar('headline_blockimg', $headline_blockimg); - $hl->setVar('headline_blockmax', $headline_blockmax); - if (!$hlman->insert($hl)) { - $msg = sprintf(_AM_FAILUPDATE, $hl->getVar('headline_name')); - $msg .= '
    '.$hl->getErrors(); - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error($msg); - xoops_cp_footer(); - exit(); - } else { - if ($hl->getVar('headline_xml') == '') { - $renderer =& xoopsheadline_getrenderer($hl); - $renderer->updateCache(); - } - } - redirect_header('index.php', 2, _AM_DBUPDATED); + $headline_id = !empty($_POST['headline_id']) ? intval($_POST['headline_id']) : 0; + if ($headline_id <= 0) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_INVALIDID); + xoops_cp_footer(); + exit(); + } + $hlman =& xoops_getmodulehandler('headline');; + $hl =& $hlman->get($headline_id); + if (!is_object($hl)) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_OBJECTNG); + xoops_cp_footer(); + exit(); + } + $hl->setVar('headline_name', $_POST['headline_name']); + $hl->setVar('headline_url', $_POST['headline_url']); + $hl->setVar('headline_encoding', $_POST['headline_encoding']); + $hl->setVar('headline_rssurl', $_POST['headline_rssurl']); + $hl->setVar('headline_display', $_POST['headline_display']); + $hl->setVar('headline_weight', $_POST['headline_weight']); + $hl->setVar('headline_asblock', $_POST['headline_asblock']); + $hl->setVar('headline_cachetime', $_POST['headline_cachetime']); + $hl->setVar('headline_mainfull', $_POST['headline_mainfull']); + $hl->setVar('headline_mainimg', $_POST['headline_mainimg']); + $hl->setVar('headline_mainmax', $_POST['headline_mainmax']); + $hl->setVar('headline_blockimg', $_POST['headline_blockimg']); + $hl->setVar('headline_blockmax', $_POST['headline_blockmax']); + + if (!$res = $hlman->insert($hl)) { + $msg = sprintf(_AM_FAILUPDATE, $hl->getVar('headline_name')); + $msg .= '
    '.$hl->getHtmlErrors(); + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error($msg); + xoops_cp_footer(); + exit(); + } else { + if ($hl->getVar('headline_xml') == '') { + $renderer =& xoopsheadline_getrenderer($hl); + $renderer->updateCache(); + } + } + redirect_header('index.php', 2, _AM_DBUPDATED); } if ($op == 'delete') { - if ($headline_id <= 0) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_INVALIDID); - xoops_cp_footer(); - exit(); - } - $hlman =& xoops_getmodulehandler('headline');; - $hl =& $hlman->get($headline_id); - if (!is_object($hl)) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_OBJECTNG); - xoops_cp_footer(); - exit(); - } - xoops_cp_header(); - $name = $hl->getVar('headline_name'); - echo "

    "._AM_HEADLINES."

    "; - //echo ''. _AM_HLMAIN .' »» '.$name.'

    '; - xoops_confirm(array('op' => 'deletego', 'headline_id' => $hl->getVar('headline_id')), 'index.php', sprintf(_AM_WANTDEL, $name)); - xoops_cp_footer(); - exit(); + if ($headline_id <= 0) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_INVALIDID); + xoops_cp_footer(); + exit(); + } + $hlman =& xoops_getmodulehandler('headline');; + $hl =& $hlman->get($headline_id); + if (!is_object($hl)) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_OBJECTNG); + xoops_cp_footer(); + exit(); + } + xoops_cp_header(); + $name = $hl->getVar('headline_name'); + echo "

    "._AM_HEADLINES."

    "; + xoops_confirm(array('op' => 'deletego', 'headline_id' => $hl->getVar('headline_id')), 'index.php', sprintf(_AM_WANTDEL, $name)); + xoops_cp_footer(); + exit(); } if ($op == 'deletego') { - $headline_id = intval($headline_id); - if ($headline_id <= 0) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_INVALIDID); - xoops_cp_footer(); - exit(); - } - $hlman =& xoops_getmodulehandler('headline');; - $hl =& $hlman->get($headline_id); - if (!is_object($hl)) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(_AM_OBJECTNG); - xoops_cp_footer(); - exit(); - } - if (!$hlman->delete($hl)) { - xoops_cp_header(); - echo "

    "._AM_HEADLINES."

    "; - xoops_error(sprintf(_AM_FAILDELETE, $hl->getVar('headline_name'))); - xoops_cp_footer(); - exit(); - } - redirect_header('index.php', 2, _AM_DBUPDATED); + $headline_id = !empty($_POST['headline_id']) ? intval($_POST['headline_id']) : 0; + if ($headline_id <= 0) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_INVALIDID); + xoops_cp_footer(); + exit(); + } + $hlman =& xoops_getmodulehandler('headline');; + $hl =& $hlman->get($headline_id); + if (!is_object($hl)) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(_AM_OBJECTNG); + xoops_cp_footer(); + exit(); + } + if (!$hlman->delete($hl)) { + xoops_cp_header(); + echo "

    "._AM_HEADLINES."

    "; + xoops_error(sprintf(_AM_FAILDELETE, $hl->getVar('headline_name'))); + xoops_cp_footer(); + exit(); + } + redirect_header('index.php', 2, _AM_DBUPDATED); } ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:53 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:53 +0900 Subject: [xoops-cvslog 139] CVS update: xoops2jp/html/modules/system/admin/userrank Message-ID: <20050611023253.C4A942AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/userrank/main.php diff -u xoops2jp/html/modules/system/admin/userrank/main.php:1.2 xoops2jp/html/modules/system/admin/userrank/main.php:1.3 --- xoops2jp/html/modules/system/admin/userrank/main.php:1.2 Fri Mar 18 21:52:48 2005 +++ xoops2jp/html/modules/system/admin/userrank/main.php Sat Jun 11 11:32:53 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); } -/** - * load the rank management functions - */ -include_once XOOPS_ROOT_PATH."/modules/system/admin/userrank/userrank.php"; - $op = 'RankForumAdmin'; -// hotfix for register_globals=off (Bunny) -extract($_POST); -extract($_FILES); - -if (isset($_GET['rank_id'])) { - $rank_id = intval($_GET['rank_id']); -} - if (isset($_GET['op'])) { - $op = $_GET['op']; + $op = $_GET['op']; +} elseif (isset($_POST['op'])) { + $op = $_POST['op']; } switch ($op) { -case "RankForumAdmin": - RankForumAdmin(); - break; + case "RankForumEdit": - RankForumEdit($rank_id); + $rank_id = isset($_GET['rank_id']) ? intval($_GET['rank_id']) : 0; + if ($rank_id > 0) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/userrank/userrank.php"; + RankForumEdit($rank_id); + } break; + case "RankForumDel": - RankForumDel($rank_id, $ok); + $rank_id = isset($_GET['rank_id']) ? intval($_GET['rank_id']) : 0; + if ($rank_id > 0) { + xoops_cp_header(); + xoops_token_confirm(array('fct' => 'userrank', 'op' => 'RankForumDelGo', 'rank_id' => $rank_id), 'admin.php', _AM_WAYSYWTDTR); + xoops_cp_footer(); + } + break; + +case "RankForumDelGo": + $rank_id = isset($_POST['rank_id']) ? intval($_POST['rank_id']) : 0; + if ($rank_id <= 0 || !xoops_confirm_validate()) { + redirect_header("admin.php?fct=userrank"); + } + $db =& Database::getInstance(); + $sql = sprintf("DELETE FROM %s WHERE rank_id = %u", $db->prefix("ranks"), $rank_id); + $db->query($sql); + redirect_header("admin.php?fct=userrank&op=ForumAdmin",1,_AM_DBUPDATED); break; + case "RankForumAdd": - RankForumAdd($rank_title,$rank_min,$rank_max,$rank_image,$rank_special); + if (!XoopsMultiTokenHandler::quickValidate('userrank_RankForumAdd')) { + redirect_header("admin.php?fct=userrank"); + } + $db =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + $rank_special = isset($_POST['rank_special']) && intval($_POST['rank_special']) ? 1 : 0; + $rank_title = $myts->stripSlashesGPC($_POST['rank_title']); + $rank_image = ''; + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); + $uploader->setAllowedExtensions(array('gif', 'jpeg', 'jpg', 'png')); + $uploader->setPrefix('rank'); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + if ($uploader->upload()) { + $rank_image = $uploader->getSavedFileName(); + } + } + $newid = $db->genId($db->prefix("ranks")."_rank_id_seq"); + if ($rank_special == 1) { + $sql = "INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, ".$db->quoteString($rank_title).", -1, -1, 1, ".$db->quoteString($rank_image).")"; + } else { + $sql = "INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, ".$db->quoteString($rank_title).", ".intval($_POST['rank_min'])." , ".intval($_POST['rank_max'])." , 0, ".$db->quoteString($rank_image).")"; + } + if (!$db->query($sql)) { + xoops_cp_header(); + xoops_error('Failed storing rank data into the database'); + xoops_cp_footer(); + } else { + redirect_header("admin.php?fct=userrank&op=RankForumAdmin",1,_AM_DBUPDATED); + } break; + case "RankForumSave": - RankForumSave($rank_id, $rank_title, $rank_min, $rank_max, $rank_image, $rank_special, $old_rank); + $rank_id = isset($_POST['rank_id']) ? intval($_POST['rank_id']) : 0; + if ($rank_id <= 0 || !XoopsMultiTokenHandler::quickValidate('userrank_RankForumSave')) { + redirect_header("admin.php?fct=userrank"); + } + $db =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + $rank_special = isset($_POST['rank_special']) && intval($_POST['rank_special']) ? 1 : 0; + $rank_title = $myts->stripSlashesGPC($_POST['rank_title']); + $delete_old_image = false; + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); + $uploader->setAllowedExtensions(array('gif', 'jpeg', 'jpg', 'png')); + $uploader->setPrefix('rank'); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + if ($uploader->upload()) { + $rank_image = $uploader->getSavedFileName(); + $delete_old_image = true; + } + } + if ($rank_special > 0) { + $_POST['rank_min'] = $_POST['rank_max'] = -1; + } + $sql = "UPDATE ".$db->prefix("ranks")." SET rank_title = ".$db->quoteString($rank_title).", rank_min = ".intval($_POST['rank_min']).", rank_max = ".intval($_POST['rank_max']).", rank_special = ".$rank_special; + if ($delete_old_image) { + $sql .= ", rank_image = ".$db->quoteString($rank_image); + } + $sql .= " WHERE rank_id = ".$rank_id; + if (!$db->query($sql)) { + xoops_cp_header(); + xoops_error('Failed storing rank data into the database'); + xoops_cp_footer(); + } else { + if ($delete_old_image) { + $old_rank_path = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.trim($_POST['old_rank']))); + if (0 === strpos($old_rank_path, XOOPS_UPLOAD_PATH) && is_file($old_rank_path)) { + unlink($old_rank_path); + } + } + redirect_header("admin.php?fct=userrank&op=RankForumAdmin",1,_AM_DBUPDATED); + } break; + default: - RankForumAdmin(); + include_once XOOPS_ROOT_PATH."/modules/system/admin/userrank/userrank.php"; + RankForumAdmin(); break; } ?> \ No newline at end of file Index: xoops2jp/html/modules/system/admin/userrank/rankform.php diff -u xoops2jp/html/modules/system/admin/userrank/rankform.php:1.2 xoops2jp/html/modules/system/admin/userrank/rankform.php:1.3 --- xoops2jp/html/modules/system/admin/userrank/rankform.php:1.2 Fri Mar 18 21:52:48 2005 +++ xoops2jp/html/modules/system/admin/userrank/rankform.php Sat Jun 11 11:32:53 2005 @@ -1,5 +1,5 @@ setExtra('enctype="multipart/form-data"'); +$rank_form->addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('userrank_'.$rank['op']))); $rank_form->addElement(new XoopsFormText(_AM_RANKTITLE, 'rank_title', 50, 50, $rank['rank_title']), true); $rank_form->addElement(new XoopsFormText(_AM_MINPOST, 'rank_min', 10, 10, $rank['rank_min'])); $rank_form->addElement(new XoopsFormText(_AM_MAXPOST, 'rank_max', 10, 10, $rank['rank_max'])); @@ -39,8 +40,8 @@ $rank_select = new XoopsFormFile('', 'rank_image', 5000000); $rank_tray->addElement($rank_select); if (trim($rank['rank_image']) != '' && file_exists(XOOPS_UPLOAD_PATH.'/'.$rank['rank_image'])) { - $rank_label = new XoopsFormLabel('', ''); - $rank_tray->addElement($rank_label); + $rank_label = new XoopsFormLabel('', ''); + $rank_tray->addElement($rank_label); } $rank_form->addElement($rank_tray); $tray = new XoopsFormElementTray(_AM_SPECIAL, '
    '); Index: xoops2jp/html/modules/system/admin/userrank/userrank.php diff -u xoops2jp/html/modules/system/admin/userrank/userrank.php:1.2 xoops2jp/html/modules/system/admin/userrank/userrank.php:1.3 --- xoops2jp/html/modules/system/admin/userrank/userrank.php:1.2 Fri Mar 18 21:52:48 2005 +++ xoops2jp/html/modules/system/admin/userrank/userrank.php Sat Jun 11 11:32:53 2005 @@ -1,223 +1,108 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // - -if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); -} - -function RankForumAdmin() -{ - $db =& Database::getInstance(); - xoops_cp_header(); - echo "

    "._AM_RANKSSETTINGS."

    - - - - - - - - "; - $result = $db->query("SELECT * FROM ".$db->prefix("ranks")." ORDER BY rank_id"); - $count = 0; - while ( $rank = $db->fetchArray($result) ) { - if ($count % 2 == 0) { - $class = 'even'; - } else { - $class = 'odd'; - } - echo " - - - - '; - } else { - echo ' '; - } - if ($rank['rank_special'] == 1) { - echo ''; - } else { - echo ''; - } - echo""; - $count++; - } - echo '
    "._AM_TITLE.""._AM_MINPOST.""._AM_MAXPOST.""._AM_IMAGE.""._AM_SPERANK.""._AM_ACTION."
    ".$rank['rank_title']."".$rank['rank_min']."".$rank['rank_max'].""; - if ($rank['rank_image'] && file_exists(XOOPS_UPLOAD_PATH.'/'.$rank['rank_image'])) { - echo ''._AM_ON.''._AM_OFF.'"._AM_EDIT." "._AM_DEL."


    '; - $rank['rank_min'] = 0; - $rank['rank_max'] = 0; - $rank['rank_special'] = 0; - $rank['rank_id'] = ''; - $rank['rank_title'] = ''; - $rank['rank_image'] = 'blank.gif'; - $rank['form_title'] = _AM_ADDNEWRANK; - $rank['op'] = 'RankForumAdd'; - include_once XOOPS_ROOT_PATH.'/modules/system/admin/userrank/rankform.php'; - $rank_form->display(); - xoops_cp_footer(); -} - -function RankForumAdd($rank_title,$rank_min,$rank_max,$rank_image,$rank_special) -{ - $db =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - if (isset($rank_image['name']) && trim($rank_image['name']) != '') { - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); - $uploader->setPrefix('rank'); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - if (!$uploader->upload()) { - $err = $uploader->getErrors(); - } else { - $rank_title = $myts->makeTboxData4Save($rank_title); - $rank_image = $myts->makeTboxData4Save($uploader->getSavedFileName()); - $newid = $db->genId($db->prefix("ranks")."_rank_id_seq"); - if ($rank_special == 1) { - $db->query("INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, '$rank_title', -1 ,-1 ,1,'$rank_image')"); - } else { - $db->query("INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, '$rank_title', '$rank_min' ,'$rank_max' , 0, '$rank_image')"); - } - } - } else { - $err = $uploader->getErrors(); - } - } else { - $rank_title = $myts->makeTboxData4Save($rank_title); - $newid = $db->genId($db->prefix("ranks")."_rank_id_seq"); - if ($rank_special == 1) { - if(!$db->query("INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, '$rank_title', -1 ,-1 ,1,'')")) { - $err = 'Failed storing rank data into the database'; - } - } else { - if (!$db->query("INSERT INTO ".$db->prefix("ranks")." (rank_id, rank_title, rank_min, rank_max, rank_special, rank_image) VALUES ($newid, '$rank_title', '$rank_min' ,'$rank_max' , 0, '')")) { - $err = 'Failed storing rank data into the database'; - } - } - } - if (!isset($err)) { - redirect_header("admin.php?fct=userrank&op=RankForumAdmin",1,_AM_DBUPDATED); - } else { - xoops_cp_header(); - xoops_error($err); - xoops_cp_footer(); - exit(); - } -} - -function RankForumEdit($rank_id) -{ - $db =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - echo ''. _AM_RANKSSETTINGS .' »» '._AM_EDITRANK.'

    '; - $result = $db->query("SELECT * FROM ".$db->prefix("ranks")." WHERE rank_id=".$rank_id); - $rank = $db->fetchArray($result); - $rank['rank_title'] = $myts->makeTboxData4Edit($rank['rank_title']); - $rank['rank_image'] = $myts->makeTboxData4Edit($rank['rank_image']); - $rank['form_title'] = _AM_EDITRANK; - $rank['op'] = 'RankForumSave'; - include_once XOOPS_ROOT_PATH.'/modules/system/admin/userrank/rankform.php'; - $rank_form->addElement(new XoopsFormHidden('old_rank', $rank['rank_image'])); - $rank_form->display(); - xoops_cp_footer(); -} - -/** - * Saves a new/updated rank into the database - * - * @todo $_FILES['rank_image'] is an array and should be treated as such! - */ - -function RankForumSave($rank_id, $rank_title, $rank_min, $rank_max, $rank_image, $rank_special, $old_rank) -{ - $db =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - if (isset($rank_image['name']) && trim($rank_image['name']) != '') { - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png'), 100000, 120, 120); - $uploader->setPrefix('rank'); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - if (!$uploader->upload()) { - $err = $uploader->getErrors(); - } else { - $rank_title = $myts->makeTboxData4Save($rank_title); - $rank_image = $myts->makeTboxData4Save($uploader->getSavedFileName()); - if ($rank_special != 1) { - $sql = "UPDATE ".$db->prefix("ranks")." SET rank_title='$rank_title',rank_min=".intval($rank_min).", rank_max=".intval($rank_max).", rank_special=0, rank_image='$rank_image' WHERE rank_id=".$rank_id; - } else { - $sql = "UPDATE ".$db->prefix("ranks")." SET rank_title='$rank_title', rank_min=-1, rank_max=-1, rank_special=1, rank_image='$rank_image' WHERE rank_id=".$rank_id; - } - if (!$db->query($sql)) { - $err = 'Failed storing rank data into the database'; - } else { - @unlink(XOOPS_UPLOAD_PATH.'/'.$old_rank); - } - } - } else { - $err = $uploader->getErrors(); - } - } else { - $rank_title = $myts->makeTboxData4Save($rank_title); - if ($rank_special != 1) { - $sql = "UPDATE ".$db->prefix("ranks")." SET rank_title='$rank_title',rank_min=".intval($rank_min).", rank_max=".intval($rank_max).", rank_special=0 WHERE rank_id=".$rank_id; - } else { - $sql = "UPDATE ".$db->prefix("ranks")." SET rank_title='$rank_title', rank_min=-1, rank_max=-1, rank_special=1 WHERE rank_id=".$rank_id; - } - if (!$db->query($sql)) { - $err = 'Failed storing rank data into the database'; - } - } - if (!isset($err)) { - redirect_header("admin.php?fct=userrank&op=RankForumAdmin",1,_AM_DBUPDATED); - } else { - xoops_cp_header(); - xoops_error($err); - xoops_cp_footer(); - exit(); - } -} - -function RankForumDel($rank_id, $ok=0) -{ - $db =& Database::getInstance(); - if ($ok == 1) { - $sql = sprintf("DELETE FROM %s WHERE rank_id = %u", $db->prefix("ranks"), $rank_id); - $db->query($sql); - redirect_header("admin.php?fct=userrank&op=ForumAdmin",1,_AM_DBUPDATED); - exit(); - } else { - xoops_cp_header(); - xoops_confirm(array('fct' => 'userrank', 'op' => 'RankForumDel', 'rank_id' => $rank_id, 'ok' => 1), 'admin.php', _AM_WAYSYWTDTR); - } - xoops_cp_footer(); -} + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // + +if ( !is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + exit("Access Denied"); +} + +function RankForumAdmin() +{ + $db =& Database::getInstance(); + xoops_cp_header(); + echo "

    "._AM_RANKSSETTINGS."

    + + + + + + + + "; + $result = $db->query("SELECT * FROM ".$db->prefix("ranks")." ORDER BY rank_id"); + $count = 0; + while ( $rank = $db->fetchArray($result) ) { + if ($count % 2 == 0) { + $class = 'even'; + } else { + $class = 'odd'; + } + echo " + + + + '; + } else { + echo ' '; + } + if ($rank['rank_special'] == 1) { + echo ''; + } else { + echo ''; + } + echo""; + $count++; + } + echo '
    "._AM_TITLE.""._AM_MINPOST.""._AM_MAXPOST.""._AM_IMAGE.""._AM_SPERANK.""._AM_ACTION."
    ".$rank['rank_title']."".$rank['rank_min']."".$rank['rank_max'].""; + if ($rank['rank_image'] && file_exists(XOOPS_UPLOAD_PATH.'/'.$rank['rank_image'])) { + echo ''._AM_ON.''._AM_OFF.'"._AM_EDIT." "._AM_DEL."


    '; + $rank['rank_min'] = 0; + $rank['rank_max'] = 0; + $rank['rank_special'] = 0; + $rank['rank_id'] = ''; + $rank['rank_title'] = ''; + $rank['rank_image'] = 'blank.gif'; + $rank['form_title'] = _AM_ADDNEWRANK; + $rank['op'] = 'RankForumAdd'; + include_once XOOPS_ROOT_PATH.'/modules/system/admin/userrank/rankform.php'; + $rank_form->display(); + xoops_cp_footer(); +} + + +function RankForumEdit($rank_id) +{ + $db =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + echo ''. _AM_RANKSSETTINGS .' »» '._AM_EDITRANK.'

    '; + $result = $db->query("SELECT * FROM ".$db->prefix("ranks")." WHERE rank_id=".$rank_id); + $rank = $db->fetchArray($result); + $rank['rank_title'] = $myts->makeTboxData4Edit($rank['rank_title']); + $rank['rank_image'] = $myts->makeTboxData4Edit($rank['rank_image']); + $rank['form_title'] = _AM_EDITRANK; + $rank['op'] = 'RankForumSave'; + include_once XOOPS_ROOT_PATH.'/modules/system/admin/userrank/rankform.php'; + $rank_form->addElement(new XoopsFormHidden('old_rank', $rank['rank_image'])); + $rank_form->display(); + xoops_cp_footer(); +} + ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:57 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:57 +0900 Subject: [xoops-cvslog 140] CVS update: xoops2jp/html/modules/xoopsheadline/templates Message-ID: <20050611023257.3B0252AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/templates/xoopsheadline_feed.html diff -u xoops2jp/html/modules/xoopsheadline/templates/xoopsheadline_feed.html:1.1 xoops2jp/html/modules/xoopsheadline/templates/xoopsheadline_feed.html:1.2 --- xoops2jp/html/modules/xoopsheadline/templates/xoopsheadline_feed.html:1.1 Thu Sep 9 19:03:28 2004 +++ xoops2jp/html/modules/xoopsheadline/templates/xoopsheadline_feed.html Sat Jun 11 11:32:56 2005 @@ -43,7 +43,7 @@ <{if $items[i].category != ""}> <{$lang_category}> - <{$items[i].category}> + <{$items[i].category}> <{/if}> <{if $items[i].pubdate != ""}> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:57 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:57 +0900 Subject: [xoops-cvslog 141] CVS update: xoops2jp/html/modules/xoopspartners/admin Message-ID: <20050611023257.804BA2AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/admin/index.php diff -u xoops2jp/html/modules/xoopspartners/admin/index.php:1.2 xoops2jp/html/modules/xoopspartners/admin/index.php:1.3 --- xoops2jp/html/modules/xoopspartners/admin/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopspartners/admin/index.php Sat Jun 11 11:32:57 2005 @@ -1,5 +1,5 @@ "._MD_PARTNERADMIN." -
    - - - - - - - - "; - $result = $xoopsDB->query("SELECT id, hits, url, weight, image, title, description, status FROM ".$xoopsDB->prefix("partners")." ORDER BY status DESC, weight ASC, title DESC"); - $class = 'even'; - while (list($id, $hits, $url, $weight, $image, $title, $description, $status) = $xoopsDB->fetchrow($result)) { - $url = formatURL($myts->makeTboxData4Show($url)); - $image = formatURL($myts->makeTboxData4Show($image)); - $title = $myts->makeTboxData4Show($title); - $description = $myts->makeTboxData4Show($description); - $imageInfo = @getimagesize($image); - $imageWidth = $imageInfo[0]; - $imageHeight = $imageInfo[1]; - $check1 = ""; - $check2 = ""; - if( $status == 1){ $check1 = "selected='selected'"; }else{ $check2 = "selected='selected'"; } - if( $imageWidth >= 110 or $imageHeight >= 50 ){ - $errorMsg = "
    "._MD_IMAGE_ERROR; - } else { - $errorMsg = ""; - } - echo " - - - - "; - $class = ($class == 'odd') ? 'even' : 'odd'; - } - echo "
    " ._MD_TITLE."" ._MD_IMAGE."" ._MD_DESCRIPTION."" ._MD_ACTIVE."" ._MD_WEIGHT."" ._MD_HITS." 
    ".$title.""; - if ( !empty($image) ) { - echo "".$title."".$errorMsg; - } - echo "".$description." - - "; - echo ""; - echo "".$hits." - "._MD_EDIT."
    --
    "._MD_DELETE." -
    - - - - -
    "; - xoops_cp_footer(); -} - -function reorderPartners($weight,$status) -{ - $xoopsDB =& Database::getInstance(); - foreach ($weight as $id=>$order) { - if ( isset($id) && is_numeric($id) && isset($order) ) { - if ( !is_numeric($order) or empty($order)) { $order = 0; } - $xoopsDB->query("UPDATE ".$xoopsDB->prefix("partners")." SET weight='$order', status='$status[$id]' WHERE id=$id"); - } - } - redirect_header("./index.php", 1, _MD_UPDATED); - exit(); + $xoopsDB =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + echo "

    "._MD_PARTNERADMIN."

    +
    + + + + + + + + "; + $result = $xoopsDB->query("SELECT id, hits, url, weight, image, title, description, status FROM ".$xoopsDB->prefix("partners")." ORDER BY status DESC, weight ASC, title DESC"); + $class = 'even'; + while (list($id, $hits, $url, $weight, $image, $title, $description, $status) = $xoopsDB->fetchrow($result)) { + $url = formatURL($myts->makeTboxData4Show($url)); + $image = formatURL($myts->makeTboxData4Show($image)); + $title = $myts->makeTboxData4Show($title); + $description = $myts->makeTboxData4Show($description); + $imageInfo = @getimagesize($image); + $imageWidth = $imageInfo[0]; + $imageHeight = $imageInfo[1]; + $check1 = ""; + $check2 = ""; + if( $status == 1){ $check1 = "selected='selected'"; }else{ $check2 = "selected='selected'"; } + if( $imageWidth >= 110 or $imageHeight >= 50 ){ + $errorMsg = "
    "._MD_IMAGE_ERROR; + } else { + $errorMsg = ""; + } + echo " + + + + "; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + echo "
    " ._MD_TITLE."" ._MD_IMAGE."" ._MD_DESCRIPTION."" ._MD_ACTIVE."" ._MD_WEIGHT."" ._MD_HITS." 
    ".$title.""; + if ( !empty($image) ) { + echo "".$title."".$errorMsg; + } + echo "".$description." + + "; + echo ""; + echo "".$hits." + "._MD_EDIT."
    --
    "._MD_DELETE." +
    + + + + +
    "; + xoops_cp_footer(); } function reorderAutoPartners() { - $xoopsDB =& Database::getInstance(); - $weight = 0; - $result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("partners")." ORDER BY weight ASC"); - while (list($id) = $xoopsDB->fetchrow($result)) { - $weight++; - $xoopsDB->queryF("UPDATE ".$xoopsDB->prefix("partners")." SET weight='$weight' WHERE id=$id"); - } - redirect_header("./index.php", 1, _MD_UPDATED); - exit(); + $xoopsDB =& Database::getInstance(); + $weight = 0; + $result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("partners")." ORDER BY weight ASC"); + while (list($id) = $xoopsDB->fetchrow($result)) { + $weight++; + $xoopsDB->queryF("UPDATE ".$xoopsDB->prefix("partners")." SET weight='$weight' WHERE id=$id"); + } + redirect_header("./index.php", 1, _MD_UPDATED); + exit(); } function partnersAdminAdd() { - $xoopsDB =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); + $xoopsDB =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); echo "

    "._MD_PARTNERADMIN."

    "; - include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - $form = new XoopsThemeForm(_MD_ADDPARTNER, "addform", "index.php"); - $formweight = new XoopsFormText(_MD_WEIGHT, "weight", 3, 10, 0); - $formimage = new XoopsFormText(_MD_IMAGE, "image", 50, 150, 'http://'); - $formurl = new XoopsFormText(_MD_URL, "url", 50, 150, 'http://'); - $formtitle = new XoopsFormText(_MD_TITLE, "title", 50, 50); - $formdesc = new XoopsFormTextArea(_MD_DESCRIPTION, "description","", 10, "60"); - $formstat = new XoopsFormSelect(_MD_STATUS, "status"); - $formstat->addOption("1", _MD_ACTIVE); - $formstat->addOption("0", _MD_INACTIVE); - $op_hidden = new XoopsFormHidden("op", "addPartner"); - $submit_button = new XoopsFormButton("", "submir", _MD_ADDPARTNER, "submit"); - $form->addElement($formweight); - $form->addElement($formimage); - $form->addElement($formurl, true); - $form->addElement($formtitle, true); - $form->addElement($formdesc, true); - $form->addElement($formstat); - $form->addElement($op_hidden); - $form->addElement($submit_button); - $form->display(); - xoops_cp_footer(); -} - -function addPartner($weight, $url, $image, $title, $description, $status) -{ - $xoopsDB =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - $title = isset($title) ? trim($title) : ''; - $image = isset($image) ? trim($image) : ''; - $url = isset($url) ? trim($url) : ''; - $description = isset($description) ? trim($description) : ''; - if ($title == '' || $url == '' || $description == '') { - redirect_header("index.php", 1, _MD_BESURE); - exit(); - } - $url = $myts->makeTboxData4Save(formatURL($url)); - $image = $myts->makeTboxData4Save(formatURL($image)); - $title = $myts->makeTboxData4Save($title); - $description = $myts->makeTboxData4Save($description); - $image_info = @getimagesize($image); - $status = isset($status) ? intval($status) : 0; - $type = $image_info[2]; - /* - if ($type == 0) { - redirect_header("index.php", 1, _MD_NOEXITS); - exit(); - } - */ - $sql = "INSERT INTO ".$xoopsDB->prefix("partners")." VALUES (NULL, ".intval($weight).", 0, '$url', '$image', '$title', '$description', $status)"; - if ($xoopsDB->query($sql)) { - redirect_header("index.php", 1, _MD_UPDATED); - } else { - redirect_header("index.php", 1, _MD_NOTUPDATED); - } - exit(); + include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; + $form = new XoopsThemeForm(_MD_ADDPARTNER, "addform", "index.php"); + $formweight = new XoopsFormText(_MD_WEIGHT, "weight", 3, 10, 0); + $formimage = new XoopsFormText(_MD_IMAGE, "image", 50, 150, 'http://'); + $formurl = new XoopsFormText(_MD_URL, "url", 50, 150, 'http://'); + $formtitle = new XoopsFormText(_MD_TITLE, "title", 50, 50); + $formdesc = new XoopsFormTextArea(_MD_DESCRIPTION, "description","", 10, "60"); + $formstat = new XoopsFormSelect(_MD_STATUS, "status"); + $formstat->addOption("1", _MD_ACTIVE); + $formstat->addOption("0", _MD_INACTIVE); + $op_hidden = new XoopsFormHidden("op", "addPartner"); + $submit_button = new XoopsFormButton("", "submir", _MD_ADDPARTNER, "submit"); + $form->addElement($formweight); + $form->addElement($formimage); + $form->addElement($formurl, true); + $form->addElement($formtitle, true); + $form->addElement($formdesc, true); + $form->addElement($formstat); + $form->addElement($op_hidden); + $form->addElement($submit_button); + $form->display(); + xoops_cp_footer(); } function editPartner($id) { - $xoopsDB =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - xoops_cp_header(); - echo "

    "._MD_PARTNERADMIN."

    "; - $result = $xoopsDB->query("SELECT weight, hits, url, image, title, description, status FROM ".$xoopsDB->prefix("partners")." WHERE id=$id"); - list($weight, $hits, $url, $image, $title, $description, $status) = $xoopsDB->fetchrow($result); - $url = $myts->makeTboxData4Edit($url); - $image = $myts->makeTboxData4Edit($image); - $title = $myts->makeTboxData4Edit($title); - $description = $myts->makeTboxData4Edit($description); - include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - $form = new XoopsThemeForm(_MD_EDITPARTNER, "editform", "index.php"); - $formweight = new XoopsFormText(_MD_WEIGHT, "weight", 3, 10, $weight); - $formhits = new XoopsFormText(_MD_HITS, "hits", 3, 10, $hits); - $formimage = new XoopsFormText(_MD_IMAGE, "image", 50, 150, $image); - $formurl = new XoopsFormText(_MD_URL, "url", 50, 150, $url); - $formtitle = new XoopsFormText(_MD_TITLE, "title", 50, 50, $title); - $formdesc = new XoopsFormTextArea(_MD_DESCRIPTION, "description", $description, 10, "100%"); - $formstat = new XoopsFormSelect(_MD_STATUS, "status", $status); - $formstat->addOption("1", _MD_ACTIVE); - $formstat->addOption("0", _MD_INACTIVE); - $id_hidden = new XoopsFormHidden("id", $id); - $op_hidden = new XoopsFormHidden("op", "updatePartner"); - $submit_button = new XoopsFormButton("", "submit", _MD_EDITPARTNER, "submit"); - $form->addElement($formweight); - $form->addElement($formhits); - $form->addElement($formimage); - $form->addElement($formurl, true); - $form->addElement($formtitle, true); - $form->addElement($formdesc, true); - $form->addElement($formstat); - $form->addElement($id_hidden); - $form->addElement($op_hidden); - $form->addElement($submit_button); - $form->display(); - xoops_cp_footer(); -} - -function updatePartner($id, $weight, $hits, $url, $image, $title, $description, $status) -{ - $xoopsDB =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - $title = isset($title) ? trim($title) : ''; - $image = isset($image) ? trim($image) : ''; - $url = isset($url) ? trim($url) : ''; - $description = isset($description) ? trim($description) : ''; - $id = intval($id); - $status = isset($status) ? intval($status) : 0; - if ($title == '' || $url == '' || empty($id) || $description == '') { - redirect_header("index.php?op=edit_partner&id=$id", 1, _MD_BESURE); - exit(); - } - $url = $myts->makeTboxData4Save(formatURL($url)); - $image = $myts->makeTboxData4Save(formatURL($image)); - $title = $myts->makeTboxData4Save($title); - $description = $myts->makeTboxData4Save($description); - $image_info = @getimagesize($image); - $type = $image_info[2]; - if ($type == 0) { - redirect_header("index.php?op=edit_partner&id=$id", 1, _MD_NOEXITS); - exit(); - } - if ($xoopsDB->query("UPDATE ".$xoopsDB->prefix("partners")." SET hits=".intval($hits).", weight=".intval($weight).", url='$url', image='$image', title='$title', description='$description', status=$status WHERE id=$id")) { - redirect_header("index.php", 1, _MD_UPDATED); - } else { - redirect_header("index.php", 1, _MD_NOTUPDATED); - } - exit(); + $xoopsDB =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + xoops_cp_header(); + echo "

    "._MD_PARTNERADMIN."

    "; + $result = $xoopsDB->query("SELECT weight, hits, url, image, title, description, status FROM ".$xoopsDB->prefix("partners")." WHERE id=$id"); + list($weight, $hits, $url, $image, $title, $description, $status) = $xoopsDB->fetchrow($result); + $url = $myts->makeTboxData4Edit($url); + $image = $myts->makeTboxData4Edit($image); + $title = $myts->makeTboxData4Edit($title); + $description = $myts->makeTboxData4Edit($description); + include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; + $form = new XoopsThemeForm(_MD_EDITPARTNER, "editform", "index.php"); + $formweight = new XoopsFormText(_MD_WEIGHT, "weight", 3, 10, $weight); + $formhits = new XoopsFormText(_MD_HITS, "hits", 3, 10, $hits); + $formimage = new XoopsFormText(_MD_IMAGE, "image", 50, 150, $image); + $formurl = new XoopsFormText(_MD_URL, "url", 50, 150, $url); + $formtitle = new XoopsFormText(_MD_TITLE, "title", 50, 50, $title); + $formdesc = new XoopsFormTextArea(_MD_DESCRIPTION, "description", $description, 10, "100%"); + $formstat = new XoopsFormSelect(_MD_STATUS, "status", $status); + $formstat->addOption("1", _MD_ACTIVE); + $formstat->addOption("0", _MD_INACTIVE); + $id_hidden = new XoopsFormHidden("id", $id); + $op_hidden = new XoopsFormHidden("op", "updatePartner"); + $submit_button = new XoopsFormButton("", "submit", _MD_EDITPARTNER, "submit"); + $form->addElement($formweight); + $form->addElement($formhits); + $form->addElement($formimage); + $form->addElement($formurl, true); + $form->addElement($formtitle, true); + $form->addElement($formdesc, true); + $form->addElement($formstat); + $form->addElement($id_hidden); + $form->addElement($op_hidden); + $form->addElement($submit_button); + $form->display(); + xoops_cp_footer(); } -function delPartner($id, $del=0) -{ - $xoopsDB =& Database::getInstance(); - if ( $del == 1 ) { - $sql = sprintf("DELETE FROM %s WHERE id = %u", $xoopsDB->prefix("partners"), $id); - if ( $xoopsDB->query($sql) ) { - redirect_header("index.php", 1, _MD_UPDATED); - } else { - redirect_header("index.php", 1, _MD_NOTUPDATED); - } - exit(); - } else { - xoops_cp_header(); - echo "

    "._MD_PARTNERADMIN."

    "; - xoops_confirm(array('op' => 'delPartner', 'id' => $id, 'del' => 1), 'index.php', _MD_SUREDELETE); - xoops_cp_footer(); - } -} $op = ''; -foreach ($HTTP_POST_VARS as $k => $v) { - ${$k} = $v; -} -if (isset($HTTP_GET_VARS['op'])) { - $op = $HTTP_GET_VARS['op']; - if (isset($HTTP_GET_VARS['id'])) { - $id = intval($HTTP_GET_VARS['id']); - } +if (!empty($_GET['op'])) { + $op = $_GET['op']; + if (isset($_GET['id'])) { + $id = intval($_GET['id']); + } +} elseif (!empty($_POST['op'])) { + $op = $_POST['op']; } switch ($op) { + case "partnersAdminAdd": - partnersAdminAdd(); - break; + partnersAdminAdd(); + break; + case "updatePartner": - updatePartner($id, $weight, $hits, $url, $image, $title, $description, $status); - break; + $xoopsDB =& Database::getInstance(); + $myts =& MyTextSanitizer::getInstance(); + $title = isset($_POST['title']) ? trim($_POST['title']) : ''; + $image = isset($_POST['image']) ? trim($_POST['image']) : ''; + $url = isset($_POST['url']) ? trim($_POST['url']) : ''; + $description = isset($_POST['description']) ? trim($_POST['description']) : ''; + $id = intval($_POST['id']); + $status = isset($_POST['status']) ? intval($_POST['status']) : 0; + if ($title == '' || $url == '' || empty($id) || $description == '') { + redirect_header("index.php?op=edit_partner&id=$id", 1, _MD_BESURE); + exit(); + } + $url = $myts->makeTboxData4Save(formatURL($url)); + $image = $myts->makeTboxData4Save(formatURL($image)); + $title = $myts->makeTboxData4Save($title); + $description = $myts->makeTboxData4Save($description); + if ($xoopsDB->query("UPDATE ".$xoopsDB->prefix("partners")." SET hits=".intval($_POST['hits']).", weight=".intval($_POST['weight']).", url='$url', image='$image', title='$title', description='$description', status=$status WHERE id=$id")) { + redirect_header("index.php", 1, _MD_UPDATED); + } else { + redirect_header("index.php", 1, _MD_NOTUPDATED); + } + break; + case "addPartner": - addPartner($weight, $url, $image, $title, $description, $status); - break; + $myts =& MyTextSanitizer::getInstance(); + $title = isset($_POST['title']) ? trim($_POST['title']) : ''; + $image = isset($_POST['image']) ? trim($_POST['image']) : ''; + $url = isset($_POST['url']) ? trim($_POST['url']) : ''; + $description = isset($_POST['description']) ? trim($_POST['description']) : ''; + if ($title == '' || $url == '' || $description == '') { + redirect_header("index.php", 1, _MD_BESURE); + exit(); + } + $url = $myts->makeTboxData4Save(formatURL($url)); + $image = $myts->makeTboxData4Save(formatURL($image)); + $title = $myts->makeTboxData4Save($title); + $description = $myts->makeTboxData4Save($description); + $status = isset($_POST['status']) ? intval($_POST['status']) : 0; + $sql = "INSERT INTO ".$xoopsDB->prefix("partners")." VALUES (NULL, ".intval($_POST['weight']).", 0, '$url', '$image', '$title', '$description', $status)"; + if ($xoopsDB->query($sql)) { + redirect_header("index.php", 1, _MD_UPDATED); + } else { + redirect_header("index.php", 1, _MD_NOTUPDATED); + } + exit(); + break; + case "delPartner": - delPartner($id, $del); - break; + xoops_cp_header(); + echo "

    "._MD_PARTNERADMIN."

    "; + xoops_confirm(array('op' => 'delPartnerOk', 'id' => $id), 'index.php', _MD_SUREDELETE); + xoops_cp_footer(); + break; + +case "delPartnerOk": + $xoopsDB =& Database::getInstance(); + $sql = sprintf("DELETE FROM %s WHERE id = %u", $xoopsDB->prefix("partners"), $_POST['id']); + if ( $xoopsDB->query($sql) ) { + redirect_header("index.php", 1, _MD_UPDATED); + } else { + redirect_header("index.php", 1, _MD_NOTUPDATED); + } + break; + case "editPartner": - editPartner($id); - break; + editPartner($id); + break; + case "reorderPartners": - reorderPartners($weight,$status); - break; + $xoopsDB =& Database::getInstance(); + foreach ($_POST['weight'] as $id=>$order) { + if ( isset($id) && is_numeric($id) && isset($order) ) { + if ( !is_numeric($order) or empty($order)) { $order = 0; } + $xoopsDB->query("UPDATE ".$xoopsDB->prefix("partners")." SET weight='$order', status='".$_POST['status'][$id]."' WHERE id=$id"); + } + } + redirect_header("./index.php", 1, _MD_UPDATED); + exit(); + break; + case "reorderAutoPartners": - reorderAutoPartners(); - break; + reorderAutoPartners(); + break; + default: - partnersAdmin(); - break; + partnersAdmin(); + break; } ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:58 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:58 +0900 Subject: [xoops-cvslog 142] CVS update: xoops2jp/html/themes/default Message-ID: <20050611023258.681672AC02F@users.sourceforge.jp> Index: xoops2jp/html/themes/default/theme.html diff -u xoops2jp/html/themes/default/theme.html:1.3 xoops2jp/html/themes/default/theme.html:1.4 --- xoops2jp/html/themes/default/theme.html:1.3 Fri Mar 18 21:53:09 2005 +++ xoops2jp/html/themes/default/theme.html Sat Jun 11 11:32:58 2005 @@ -107,7 +107,7 @@ - +
    From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:32:57 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:32:57 +0900 Subject: [xoops-cvslog 143] CVS update: xoops2jp/html/modules/xoopspartners Message-ID: <20050611023257.C594A2AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/index.php diff -u xoops2jp/html/modules/xoopspartners/index.php:1.2 xoops2jp/html/modules/xoopspartners/index.php:1.3 --- xoops2jp/html/modules/xoopspartners/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopspartners/index.php Sat Jun 11 11:32:57 2005 @@ -1,5 +1,5 @@ assign("partner_join" ,""._MD_JOIN.""); + $xoopsTpl->assign("partner_join" ,""._MD_JOIN.""); } $query = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("partners")." WHERE status=1"); list($numrows) = $xoopsDB->fetchrow($query); if( $xoopsModuleConfig['modlimit'] != 0 ) { - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); }else{ - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); } foreach ( $partners as $part_obj ) { - $array_partners[] = array( - "id" => $part_obj->getVar("id"), - "hits" => $part_obj->getVar("hits"), - "url" => $part_obj->getVar("url"), - "image" => $part_obj->getVar("image"), - "title" => $part_obj->getVar("title"), - "description" => $part_obj->getVar("description") - ); + $array_partners[] = array( + "id" => $part_obj->getVar("id"), + "hits" => $part_obj->getVar("hits"), + "url" => $part_obj->getVar("url"), + "image" => $part_obj->getVar("image"), + "title" => $part_obj->getVar("title"), + "description" => $part_obj->getVar("description") + ); } $partner_count = count($array_partners); for ( $i = 0; $i < $partner_count; $i++ ) { - $ImagePartner = ""; - if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { - $ImagePartner .= "".$array_partners[$i]["url"].""; - } - if ( $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= "
    "; - } - if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= $array_partners[$i]["title"]; - } - $ImagePartner .= "
    "; - $partner[$i]['id'] = $array_partners[$i]['id']; - $partner[$i]['hits'] = $array_partners[$i]['hits']; - $partner[$i]['url'] = $array_partners[$i]['url']; - $partner[$i]['image'] = $ImagePartner; - $partner[$i]['title'] = $array_partners[$i]['title']; - $partner[$i]['description'] = $array_partners[$i]['description']; - if ($xoopsUserIsAdmin) { - $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; - } - $xoopsTpl->append("partners", $partner[$i]); + $ImagePartner = ""; + if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { + $ImagePartner .= "".$array_partners[$i]["url"].""; + } + if ( $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= "
    "; + } + if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= $array_partners[$i]["title"]; + } + $ImagePartner .= "
    "; + $partner[$i]['id'] = $array_partners[$i]['id']; + $partner[$i]['hits'] = $array_partners[$i]['hits']; + $partner[$i]['url'] = $array_partners[$i]['url']; + $partner[$i]['image'] = $ImagePartner; + $partner[$i]['title'] = $array_partners[$i]['title']; + $partner[$i]['description'] = $array_partners[$i]['description']; + if ($xoopsUserIsAdmin) { + $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; + } + $xoopsTpl->append("partners", $partner[$i]); } if ( $xoopsModuleConfig['modlimit'] != 0 ) { - $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); - $pagenav = $nav->renderImageNav(); + $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); + $pagenav = $nav->renderImageNav(); } $xoopsTpl->assign(array( - "lang_partner" => _MD_PARTNER, - "lang_desc" => _MD_DESCRIPTION, - "lang_hits" => _MD_HITS, - "lang_no_partners" => _MD_NOPART, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'], - "pagenav" => $pagenav - )); + "lang_partner" => _MD_PARTNER, + "lang_desc" => _MD_DESCRIPTION, + "lang_hits" => _MD_HITS, + "lang_no_partners" => _MD_NOPART, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']), + "pagenav" => $pagenav + )); include_once XOOPS_ROOT_PATH.'/footer.php'; ?> \ No newline at end of file Index: xoops2jp/html/modules/xoopspartners/join.php diff -u xoops2jp/html/modules/xoopspartners/join.php:1.2 xoops2jp/html/modules/xoopspartners/join.php:1.3 --- xoops2jp/html/modules/xoopspartners/join.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopspartners/join.php Sat Jun 11 11:32:57 2005 @@ -1,5 +1,5 @@ assign(array( - "content4join" => _MD_ERROR1, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'] - )); - $xoopsContentsTpl = 'partnerjoin.html'; - include_once XOOPS_ROOT_PATH.'/footer.php'; - exit(); - } - $url = formatURL($myts->makeTboxData4Show($url)); - $image = formatURL($myts->makeTboxData4Show($image)); - $title = $myts->makeTboxData4Show($title); - $description = $myts->makeTboxData4Show($description); - $imageInfo = @getimagesize($image); - $imageWidth = $imageInfo[0]; - $imageHeight = $imageInfo[1]; - $type = $imageInfo[2]; - if ($type == 0) { - $xoopsTpl->assign(array( - "content4join" => _MD_ERROR3, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'] - )); - $xoopsContentsTpl = 'partnerjoin.html'; - include_once XOOPS_ROOT_PATH.'/footer.php'; - exit(); - } - if ( $imageWidth >= 110 or $imageHeight >=50 ) { - $xoopsTpl->assign(array( - "content4join" => _MD_ERROR2, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'] - )); - $xoopsContentsTpl = 'partnerjoin.html'; - include_once XOOPS_ROOT_PATH.'/footer.php'; - exit(); - } - if( $image == "http://" ) { - $image = ""; - } - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/xoopspartners/language/'.$xoopsConfig['language'].'/'); - $xoopsMailer->setTemplate("join.tpl"); - $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); - $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); - $xoopsMailer->assign("IP", $HTTP_SERVER_VARS['REMOTE_ADDR']); - $xoopsMailer->assign("URL", $url); - $xoopsMailer->assign("IMAGE", $image); - $xoopsMailer->assign("TITLE", $title); - $xoopsMailer->assign("DESCRIPTION", $description); - $xoopsMailer->assign("USER", $xoopsUser->getVar("uname")); - $xoopsMailer->setToEmails($xoopsConfig['adminmail']); - $xoopsMailer->setFromEmail($xoopsUser->getVar("email")); - $xoopsMailer->setFromName($xoopsUser->getVar("uname")); - $xoopsMailer->setSubject(sprintf(_MD_NEWPARTNER,$xoopsConfig['sitename'])); - if ( !$xoopsMailer->send() ) { - $xoopsTpl->assign(array( - "content4join" => "
    ".$xoopsMailer->getErrors()._MD_GOBACK, - "lang_main_partner" => _MD_PARTNERS, - "lang_join" => _MD_JOIN, - "sitename" => $xoopsConfig['sitename'] - )); - } else { - $xoopsTpl->assign(array( - "content4join" => "
    "._MD_SENDMAIL, - "lang_main_partner" => _MD_PARTNERS, - "lang_join" => _MD_JOIN, - "sitename" => $xoopsConfig['sitename'] - )); - } - $xoopsContentsTpl = 'partnerjoin.html'; - } else { - include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - $form = new XoopsThemeForm("", "joinform", "join.php"); - $titlePartern = new XoopsFormText(_MD_TITLE, "title", 30, 50); - $imagePartern = new XoopsFormText(_MD_IMAGE, "image", 30, 150, "http://"); - $urlPartern = new XoopsFormText(_MD_URL, "url", 30, 150, "http://"); - $descriptionPartern = new XoopsFormTextArea(_MD_DESCRIPTION, "description","", 7, 50); - $op_hidden = new XoopsFormHidden("op", "sendMail"); - $submit_button = new XoopsFormButton("", "dbsubmit", _MD_SEND, "submit"); - $form->addElement($titlePartern); - $form->addElement($imagePartern); - $form->addElement($urlPartern); - $form->addElement($descriptionPartern); - $form->addElement($op_hidden); - $form->addElement($submit_button); - $form->setRequired($titlePartern); - $form->setRequired($urlPartern); - $form->setRequired($descriptionPartern); - $content = $form->render(); - $xoopsTpl->assign(array( - "content4join" => $content, - "lang_main_partner" => _MD_PARTNERS, - "lang_join" => _MD_JOIN, - "sitename" => $xoopsConfig['sitename'] - )); - } + if ( !empty($_POST['op']) && $_POST['op'] == "sendMail" ) { + include XOOPS_ROOT_PATH."/class/xoopsmailer.php"; + if ( empty($_POST['title']) or empty($_POST['url']) or empty($_POST['description']) or $_POST['url'] == "http://" ) { + $xoopsTpl->assign(array( + "content4join" => _MD_ERROR1, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']) + )); + $xoopsContentsTpl = 'partnerjoin.html'; + include_once XOOPS_ROOT_PATH.'/footer.php'; + exit(); + } + $url = formatURL($myts->makeTboxData4Show($_POST['url'])); + $image = formatURL($myts->makeTboxData4Show($_POST['image'])); + $title = $myts->makeTboxData4Show($_POST['title']); + $description = $myts->makeTboxData4Show($_POST['description']); + $imageInfo = @getimagesize($image); + $imageWidth = $imageInfo[0]; + $imageHeight = $imageInfo[1]; + $type = $imageInfo[2]; + if ($type == 0) { + $xoopsTpl->assign(array( + "content4join" => _MD_ERROR3, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']) + )); + $xoopsContentsTpl = 'partnerjoin.html'; + include_once XOOPS_ROOT_PATH.'/footer.php'; + exit(); + } + if ( $imageWidth >= 110 or $imageHeight >=50 ) { + $xoopsTpl->assign(array( + "content4join" => _MD_ERROR2, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']) + )); + $xoopsContentsTpl = 'partnerjoin.html'; + include_once XOOPS_ROOT_PATH.'/footer.php'; + exit(); + } + if( $image == "http://" ) { + $image = ""; + } + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/xoopspartners/language/'.$xoopsConfig['language'].'/'); + $xoopsMailer->setTemplate("join.tpl"); + $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); + $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); + $xoopsMailer->assign("IP", $HTTP_SERVER_VARS['REMOTE_ADDR']); + $xoopsMailer->assign("URL", $url); + $xoopsMailer->assign("IMAGE", $image); + $xoopsMailer->assign("TITLE", $title); + $xoopsMailer->assign("DESCRIPTION", $description); + $xoopsMailer->assign("USER", $xoopsUser->getVar("uname")); + $xoopsMailer->setToEmails($xoopsConfig['adminmail']); + $xoopsMailer->setFromEmail($xoopsUser->getVar("email")); + $xoopsMailer->setFromName($xoopsUser->getVar("uname")); + $xoopsMailer->setSubject(sprintf(_MD_NEWPARTNER,$xoopsConfig['sitename'])); + if ( !$xoopsMailer->send() ) { + $xoopsTpl->assign(array( + "content4join" => "
    ".$xoopsMailer->getErrors()._MD_GOBACK, + "lang_main_partner" => _MD_PARTNERS, + "lang_join" => _MD_JOIN, + "sitename" => htmlspecialchars($xoopsConfig['sitename']) + )); + } else { + $xoopsTpl->assign(array( + "content4join" => "
    "._MD_SENDMAIL, + "lang_main_partner" => _MD_PARTNERS, + "lang_join" => _MD_JOIN, + "sitename" => htmlspecialchars($xoopsConfig['sitename']) + )); + } + $xoopsContentsTpl = 'partnerjoin.html'; + } else { + include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; + $form = new XoopsThemeForm("", "joinform", "join.php"); + $titlePartern = new XoopsFormText(_MD_TITLE, "title", 30, 50); + $imagePartern = new XoopsFormText(_MD_IMAGE, "image", 30, 150, "http://"); + $urlPartern = new XoopsFormText(_MD_URL, "url", 30, 150, "http://"); + $descriptionPartern = new XoopsFormTextArea(_MD_DESCRIPTION, "description","", 7, 50); + $op_hidden = new XoopsFormHidden("op", "sendMail"); + $submit_button = new XoopsFormButton("", "dbsubmit", _MD_SEND, "submit"); + $form->addElement($titlePartern); + $form->addElement($imagePartern); + $form->addElement($urlPartern); + $form->addElement($descriptionPartern); + $form->addElement($op_hidden); + $form->addElement($submit_button); + $form->setRequired($titlePartern); + $form->setRequired($urlPartern); + $form->setRequired($descriptionPartern); + $content = $form->render(); + $xoopsTpl->assign(array( + "content4join" => $content, + "lang_main_partner" => _MD_PARTNERS, + "lang_join" => _MD_JOIN, + "sitename" => htmlspecialchars($xoopsConfig['sitename']) + )); + } } else { // else -- if ( $xoopsUser ) - redirect_header("index.php",2,_NOPERM); + redirect_header("index.php",2,_NOPERM); } include_once XOOPS_ROOT_PATH.'/footer.php'; ?> \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:10 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:10 +0900 Subject: [xoops-cvslog 144] CVS update: xoops2jp/docs Message-ID: <20050611025010.381942AC022@users.sourceforge.jp> Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.2.6.6.2.1 xoops2jp/docs/CHANGES.txt:1.2.6.6.2.2 --- xoops2jp/docs/CHANGES.txt:1.2.6.6.2.1 Thu Jun 2 08:53:45 2005 +++ xoops2jp/docs/CHANGES.txt Sat Jun 11 11:50:09 2005 @@ -1,6 +1,16 @@ XOOPS v2 Changelog ============================ +2005/ 6/10: Version 2.0.10 JP +=============================== +- Added fix for better module version number handling +- Fixed possible fatal error when using the template manager +- Fixed more invalid usages of HTML +- Fixed bug not being able to change password in user admin area +- Changed <{$xoops_moduledir}> to <{$xoops_dirname}> for xoops.org 2.0.10 compatibility +- Fixed <{$show_lblock}> not being assigned when no left blocks + + 2005/ 6/2: Version 2.0.10 JP RC2 =============================== - Fixed Invalid usages of HTML From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:10 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:10 +0900 Subject: [xoops-cvslog 145] CVS update: xoops2jp/html Message-ID: <20050611025010.E46422AC029@users.sourceforge.jp> Index: xoops2jp/html/header.php diff -u xoops2jp/html/header.php:1.2.6.4 xoops2jp/html/header.php:1.2.6.4.2.1 --- xoops2jp/html/header.php:1.2.6.4 Sat May 28 08:42:07 2005 +++ xoops2jp/html/header.php Sat Jun 11 11:50:10 2005 @@ -1,5 +1,5 @@ assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin)); if (!empty($xoopsModule)) { // set page title - $xoopsTpl->assign(array('xoops_pagetitle' => $xoopsModule->getVar('name'), 'xoops_modulename' => $xoopsModule->getVar('name'), 'xoops_moduledir' => $xoopsModule->getVar('dirname'))); + $xoopsTpl->assign(array('xoops_pagetitle' => $xoopsModule->getVar('name'), 'xoops_modulename' => $xoopsModule->getVar('name'), 'xoops_dirname' => $xoopsModule->getVar('dirname'))); if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) { $block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE); } else { @@ -203,6 +203,9 @@ unset($bcontent); } //unset($block_arr); + if (!isset($show_lblock)) { + $xoopsTpl->assign('xoops_showlblock', 0); + } if (!isset($show_rblock)) { $xoopsTpl->assign('xoops_showrblock', 0); } Index: xoops2jp/html/misc.php diff -u xoops2jp/html/misc.php:1.2.6.3 xoops2jp/html/misc.php:1.2.6.3.2.1 --- xoops2jp/html/misc.php:1.2.6.3 Fri May 13 19:30:39 2005 +++ xoops2jp/html/misc.php Sat Jun 11 11:50:10 2005 @@ -1,5 +1,5 @@

    -
    + '> getVar("uname", 'e'); $ymail = $xoopsUser->getVar("email", 'e'); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:11 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:11 +0900 Subject: [xoops-cvslog 146] CVS update: xoops2jp/html/include Message-ID: <20050611025011.384562AC02B@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.4.6.4 xoops2jp/html/include/version.php:1.4.6.4.2.1 --- xoops2jp/html/include/version.php:1.4.6.4 Wed Jun 1 23:01:43 2005 +++ xoops2jp/html/include/version.php Sat Jun 11 11:50:10 2005 @@ -1,4 +1,4 @@ \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:11 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:11 +0900 Subject: [xoops-cvslog 147] CVS update: xoops2jp/html/install Message-ID: <20050611025011.78E892AC022@users.sourceforge.jp> Index: xoops2jp/html/install/install_tpl.php diff -u xoops2jp/html/install/install_tpl.php:1.1 xoops2jp/html/install/install_tpl.php:1.1.10.1 --- xoops2jp/html/install/install_tpl.php:1.1 Thu Sep 9 14:15:04 2004 +++ xoops2jp/html/install/install_tpl.php Sat Jun 11 11:50:11 2005 @@ -17,7 +17,7 @@ - + @@ -26,7 +26,7 @@
     
    - @@ -76,9 +76,9 @@ function b_reload($option=''){ if(empty($option)) return ''; - if (!defined('_INSTALL_L200')) { - define('_INSTALL_L200', 'Reload'); - } + if (!defined('_INSTALL_L200')) { + define('_INSTALL_L200', 'Reload'); + } return " "; } From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:11 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:11 +0900 Subject: [xoops-cvslog 148] CVS update: xoops2jp/html/kernel Message-ID: <20050611025011.BE54D2AC029@users.sourceforge.jp> Index: xoops2jp/html/kernel/module.php diff -u xoops2jp/html/kernel/module.php:1.2.6.1 xoops2jp/html/kernel/module.php:1.2.6.1.2.1 --- xoops2jp/html/kernel/module.php:1.2.6.1 Sun Apr 24 18:10:14 2005 +++ xoops2jp/html/kernel/module.php Sat Jun 11 11:50:11 2005 @@ -1,5 +1,5 @@ loadInfo($dirname, $verbose); } $this->setVar('name', $this->modinfo['name'], true); - $this->setVar('version', 100 * $this->modinfo['version']); + $this->setVar('version', round(100 * $this->modinfo['version'])); $this->setVar('dirname', $this->modinfo['dirname'], true); $hasmain = (isset($this->modinfo['hasMain']) && $this->modinfo['hasMain'] == 1) ? 1 : 0; $hasadmin = (isset($this->modinfo['hasAdmin']) && $this->modinfo['hasAdmin'] == 1) ? 1 : 0; From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:12 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:12 +0900 Subject: [xoops-cvslog 149] CVS update: xoops2jp/html/modules/mydownloads Message-ID: <20050611025012.0BE442AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/ratefile.php diff -u xoops2jp/html/modules/mydownloads/ratefile.php:1.2 xoops2jp/html/modules/mydownloads/ratefile.php:1.2.10.1 --- xoops2jp/html/modules/mydownloads/ratefile.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/ratefile.php Sat Jun 11 11:50:11 2005 @@ -1,5 +1,5 @@ getVar('uid'); - } - - //Make sure only 1 anonymous from an IP in a single day. - $anonwaitdays = 1; - $ip = getenv("REMOTE_ADDR"); - $lid = intval($HTTP_POST_VARS['lid']); - $cid = intval($HTTP_POST_VARS['cid']); - $rating = intval($HTTP_POST_VARS['rating']); - - // Check if Rating is Null - if ($rating=="--") { - redirect_header("ratefile.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); - exit(); - } - - // Check if Download POSTER is voting (UNLESS Anonymous users allowed to post) - if ($ratinguser != 0) { - $result=$xoopsDB->query("SELECT submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); - while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { - if ($ratinguserDB==$ratinguser) { - redirect_header("index.php",4,_MD_CANTVOTEOWN); - exit(); - } - } - - // Check if REG user is trying to vote twice. - $result=$xoopsDB->query("SELECT ratinguser FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid"); - while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { - if ($ratinguserDB==$ratinguser) { - redirect_header("index.php",4,_MD_VOTEONCE); - exit(); - } - } - - } else { - - // Check if ANONYMOUS user is trying to vote more than once per day. - $yesterday = (time()-(86400 * $anonwaitdays)); - $result=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); - list($anonvotecount) = $xoopsDB->fetchRow($result); - if ($anonvotecount >= 1) { - redirect_header("index.php",4,_MD_VOTEONCE); - exit(); - } - } - - //All is well. Add to Line Item Rate to DB. - $newid = $xoopsDB->genId($xoopsDB->prefix("mydownloads_votedata")."_ratingid_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mydownloads_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); - $xoopsDB->query($sql) or $eh("0013"); - - //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. - updaterating($lid); - $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKYOU,$xoopsConfig[sitename]); - redirect_header("index.php",4,$ratemessage); - exit(); + $eh = new ErrorHandler; //ErrorHandler object + if(empty($xoopsUser)){ + $ratinguser = 0; + }else{ + $ratinguser = $xoopsUser->getVar('uid'); + } + + //Make sure only 1 anonymous from an IP in a single day. + $anonwaitdays = 1; + $ip = getenv("REMOTE_ADDR"); + $lid = intval($HTTP_POST_VARS['lid']); + $cid = intval($HTTP_POST_VARS['cid']); + $rating = intval($HTTP_POST_VARS['rating']); + + // Check if Rating is Null + if ($rating=="--") { + redirect_header("ratefile.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); + exit(); + } + + // Check if Download POSTER is voting (UNLESS Anonymous users allowed to post) + if ($ratinguser != 0) { + $result=$xoopsDB->query("SELECT submitter FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); + while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { + if ($ratinguserDB==$ratinguser) { + redirect_header("index.php",4,_MD_CANTVOTEOWN); + exit(); + } + } + + // Check if REG user is trying to vote twice. + $result=$xoopsDB->query("SELECT ratinguser FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid"); + while(list($ratinguserDB)=$xoopsDB->fetchRow($result)) { + if ($ratinguserDB==$ratinguser) { + redirect_header("index.php",4,_MD_VOTEONCE); + exit(); + } + } + + } else { + + // Check if ANONYMOUS user is trying to vote more than once per day. + $yesterday = (time()-(86400 * $anonwaitdays)); + $result=$xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); + list($anonvotecount) = $xoopsDB->fetchRow($result); + if ($anonvotecount >= 1) { + redirect_header("index.php",4,_MD_VOTEONCE); + exit(); + } + } + + //All is well. Add to Line Item Rate to DB. + $newid = $xoopsDB->genId($xoopsDB->prefix("mydownloads_votedata")."_ratingid_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mydownloads_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); + $xoopsDB->query($sql) or $eh("0013"); + + //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. + updaterating($lid); + $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKYOU, htmlspecialchars($xoopsConfig['sitename'])); + redirect_header("index.php",4,$ratemessage); + exit(); } else { - $xoopsOption['template_main'] = 'mydownloads_ratefile.html'; + $xoopsOption['template_main'] = 'mydownloads_ratefile.html'; include XOOPS_ROOT_PATH."/header.php"; $lid = intval($HTTP_GET_VARS['lid']); $result=$xoopsDB->query("SELECT title FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:12 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:12 +0900 Subject: [xoops-cvslog 150] CVS update: xoops2jp/html/modules/mylinks/admin Message-ID: <20050611025012.5A36C2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/admin/index.php diff -u xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1 xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1.2.1 --- xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1 Mon May 30 21:26:41 2005 +++ xoops2jp/html/modules/mylinks/admin/index.php Sat Jun 11 11:50:12 2005 @@ -308,7 +308,7 @@ echo "
      '.$title.''; echo '
    '.$content.'
    '; ?>
    \n"; echo myTextForm("index.php?op=linksConfigMenu", _MD_CANCEL); echo "
    \n"; - echo "
    "; + echo "
    "; $result5=$xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid = $lid"); list($totalvotes) = $xoopsDB->fetchRow($result5); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:12 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:12 +0900 Subject: [xoops-cvslog 151] CVS update: xoops2jp/html/modules/mylinks Message-ID: <20050611025012.DCBFA2AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/ratelink.php diff -u xoops2jp/html/modules/mylinks/ratelink.php:1.2 xoops2jp/html/modules/mylinks/ratelink.php:1.2.10.1 --- xoops2jp/html/modules/mylinks/ratelink.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/ratelink.php Sat Jun 11 11:50:12 2005 @@ -1,5 +1,5 @@ getVar('uid'); - } - - //Make sure only 1 anonymous from an IP in a single day. - $anonwaitdays = 1; - $ip = getenv("REMOTE_ADDR"); - $lid = intval($HTTP_POST_VARS['lid']); - $cid = intval($HTTP_POST_VARS['cid']); - $rating = intval($HTTP_POST_VARS['rating']); - - // Check if Rating is Null - if ($rating=="--") { - redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); - exit(); - } - - // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) - if ($ratinguser != 0) { - $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); - while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { - if ($ratinguserDB == $ratinguser) { - redirect_header("index.php",4,_MD_CANTVOTEOWN); - exit(); - } - } - - // Check if REG user is trying to vote twice. - $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid"); - while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { - if ($ratinguserDB == $ratinguser) { - redirect_header("index.php",4,_MD_VOTEONCE2); - exit(); - } - } - - } else { - - // Check if ANONYMOUS user is trying to vote more than once per day. - $yesterday = (time()-(86400 * $anonwaitdays)); - $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); - list($anonvotecount) = $xoopsDB->fetchRow($result); - if ($anonvotecount > 0) { - redirect_header("index.php",4,_MD_VOTEONCE2); - exit(); - } - } - if($rating > 10){ - $rating = 10; - } + $eh = new ErrorHandler; //ErrorHandler object + if(empty($xoopsUser)){ + $ratinguser = 0; + }else{ + $ratinguser = $xoopsUser->getVar('uid'); + } + + //Make sure only 1 anonymous from an IP in a single day. + $anonwaitdays = 1; + $ip = getenv("REMOTE_ADDR"); + $lid = intval($HTTP_POST_VARS['lid']); + $cid = intval($HTTP_POST_VARS['cid']); + $rating = intval($HTTP_POST_VARS['rating']); + + // Check if Rating is Null + if ($rating=="--") { + redirect_header("ratelink.php?cid=".$cid."&lid=".$lid."",4,_MD_NORATING); + exit(); + } + + // Check if Link POSTER is voting (UNLESS Anonymous users allowed to post) + if ($ratinguser != 0) { + $result=$xoopsDB->query("select submitter from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); + while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { + if ($ratinguserDB == $ratinguser) { + redirect_header("index.php",4,_MD_CANTVOTEOWN); + exit(); + } + } + + // Check if REG user is trying to vote twice. + $result=$xoopsDB->query("select ratinguser from ".$xoopsDB->prefix("mylinks_votedata")." where lid=$lid"); + while(list($ratinguserDB) = $xoopsDB->fetchRow($result)) { + if ($ratinguserDB == $ratinguser) { + redirect_header("index.php",4,_MD_VOTEONCE2); + exit(); + } + } + + } else { + + // Check if ANONYMOUS user is trying to vote more than once per day. + $yesterday = (time()-(86400 * $anonwaitdays)); + $result=$xoopsDB->query("select count(*) FROM ".$xoopsDB->prefix("mylinks_votedata")." WHERE lid=$lid AND ratinguser=0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); + list($anonvotecount) = $xoopsDB->fetchRow($result); + if ($anonvotecount > 0) { + redirect_header("index.php",4,_MD_VOTEONCE2); + exit(); + } + } + if($rating > 10){ + $rating = 10; + } //All is well. Add to Line Item Rate to DB. - $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq"); - $datetime = time(); - $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); - $xoopsDB->query($sql) or $eh->show("0013"); + $newid = $xoopsDB->genId($xoopsDB->prefix("mylinks_votedata")."_ratingid_seq"); + $datetime = time(); + $sql = sprintf("INSERT INTO %s (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (%u, %u, %u, %u, '%s', %u)", $xoopsDB->prefix("mylinks_votedata"), $newid, $lid, $ratinguser, $rating, $ip, $datetime); + $xoopsDB->query($sql) or $eh->show("0013"); //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. updaterating($lid); - $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKURATE,$xoopsConfig[sitename]); - redirect_header("index.php",2,$ratemessage); - exit(); + $ratemessage = _MD_VOTEAPPRE."
    ".sprintf(_MD_THANKURATE, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); + redirect_header("index.php",2,$ratemessage); + exit(); } else { - $xoopsOption['template_main'] = 'mylinks_ratelink.html'; - include XOOPS_ROOT_PATH."/header.php"; - $lid = intval($HTTP_GET_VARS['lid']); - $cid = intval($HTTP_GET_VARS['cid']); - $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); - list($title) = $xoopsDB->fetchRow($result); - $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title))); - $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE); - $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE); - $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE); - $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE); - $xoopsTpl->assign('lang_rateit', _MD_RATEIT); - $xoopsTpl->assign('lang_cancel', _CANCEL); - include XOOPS_ROOT_PATH.'/footer.php'; + $xoopsOption['template_main'] = 'mylinks_ratelink.html'; + include XOOPS_ROOT_PATH."/header.php"; + $lid = intval($HTTP_GET_VARS['lid']); + $cid = intval($HTTP_GET_VARS['cid']); + $result=$xoopsDB->query("select title from ".$xoopsDB->prefix("mylinks_links")." where lid=$lid"); + list($title) = $xoopsDB->fetchRow($result); + $xoopsTpl->assign('link', array('id' => $lid, 'cid' => $cid, 'title' => $myts->htmlSpecialChars($title))); + $xoopsTpl->assign('lang_voteonce', _MD_VOTEONCE); + $xoopsTpl->assign('lang_ratingscale', _MD_RATINGSCALE); + $xoopsTpl->assign('lang_beobjective', _MD_BEOBJECTIVE); + $xoopsTpl->assign('lang_donotvote', _MD_DONOTVOTE); + $xoopsTpl->assign('lang_rateit', _MD_RATEIT); + $xoopsTpl->assign('lang_cancel', _CANCEL); + include XOOPS_ROOT_PATH.'/footer.php'; } ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:12 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:12 +0900 Subject: [xoops-cvslog 152] CVS update: xoops2jp/html/modules/mylinks/language/japanese Message-ID: <20050611025012.9AF4A2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/language/japanese/main.php diff -u xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1 xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1.10.1 --- xoops2jp/html/modules/mylinks/language/japanese/main.php:1.1 Thu Sep 9 14:15:16 2004 +++ xoops2jp/html/modules/mylinks/language/japanese/main.php Sat Jun 11 11:50:12 2005 @@ -1,6 +1,6 @@ ¤Þ¤ºÅÐÏ¿¤µ¤ì¤ë¤«¡¢¥í¥°¥¤¥ó¤·¤Æ²¼¤µ¤¤¡£"); +define("_MD_MUSTREGFIRST","¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¤¬¤¢¤Ê¤¿¤Ï¤³¤Î¥Ú¡¼¥¸¤Ë¤Ï¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¡£
    ¤Þ¤ºÅÐÏ¿¤µ¤ì¤ë¤«¡¢¥í¥°¥¤¥ó¤·¤Æ²¼¤µ¤¤¡£"); define("_MD_NORATING","ɾ²Á¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); -define("_MD_CANTVOTEOWN","¤¢¤Ê¤¿¤¬ÅÐÏ¿¤·¤¿¥ê¥ó¥¯¤Ë¤ÏÅêɼ¤Ç¤­¤Þ¤»¤ó¡£
    Åêɼ¤ÏÁ´¤Æµ­Ï¿¤µ¤ìÄ´ºº¤µ¤ì¤Þ¤¹¡£"); +define("_MD_CANTVOTEOWN","¤¢¤Ê¤¿¤¬ÅÐÏ¿¤·¤¿¥ê¥ó¥¯¤Ë¤ÏÅêɼ¤Ç¤­¤Þ¤»¤ó¡£
    Åêɼ¤ÏÁ´¤Æµ­Ï¿¤µ¤ìÄ´ºº¤µ¤ì¤Þ¤¹¡£"); define("_MD_VOTEONCE2","¿½¤·Ìõ¤¢¤ê¤Þ¤»¤ó¤¬¡¢Æ±°ì¥ê¥ó¥¯¾ðÊó¤Ø¤ÎÅêɼ¤Ï°ì²ó¸Â¤ê¤È¤µ¤»¤Æ¤¤¤¿¤À¤¤¤Æ¤¤¤Þ¤¹¡£"); -//%%%%%% Module Name 'MyLinks' (Admin) %%%%% +//%%%%%% Module Name 'MyLinks' (Admin) %%%%% define("_MD_WEBLINKSCONF","¥ê¥ó¥¯½¸´ÉÍý"); define("_MD_GENERALSET","°ìÈÌÀßÄê"); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:13 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:13 +0900 Subject: [xoops-cvslog 153] CVS update: xoops2jp/html/modules/newbb Message-ID: <20050611025013.9B1FC2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/index.php diff -u xoops2jp/html/modules/newbb/index.php:1.2 xoops2jp/html/modules/newbb/index.php:1.2.10.1 --- xoops2jp/html/modules/newbb/index.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/index.php Sat Jun 11 11:50:13 2005 @@ -1,5 +1,5 @@ prefix('bb_categories').' c, '.$xoopsDB->prefix("bb_forums").' f WHERE f.cat_id=c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order'; if ( !$result = $xoopsDB->query($sql) ) { - redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); - exit(); + redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); + exit(); } -$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,$xoopsConfig['sitename']), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); +$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); $viewcat = (!empty($HTTP_GET_VARS['cat'])) ? intval($HTTP_GET_VARS['cat']) : 0; $categories = array(); while ( $cat_row = $xoopsDB->fetchArray($result) ) { - $categories[] = $cat_row; + $categories[] = $cat_row; } $sql = 'SELECT f.*, u.uname, u.uid, p.topic_id, p.post_time, p.subject, p.icon FROM '.$xoopsDB->prefix('bb_forums').' f LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = f.forum_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = p.uid'; if ( $viewcat != 0 ) { - $sql .= ' WHERE f.cat_id = '.$viewcat; - $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename'])); + $sql .= ' WHERE f.cat_id = '.$viewcat; + $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); } else { - $xoopsTpl->assign('forum_index_title', ''); + $xoopsTpl->assign('forum_index_title', ''); } $sql .= ' ORDER BY f.cat_id, f.forum_id'; if ( !$result = $xoopsDB->query($sql) ) { - exit("Error"); + exit("Error"); } $forums = array(); // RMV-FIX while ( $forum_data = $xoopsDB->fetchArray($result) ) { - $forums[] = $forum_data; + $forums[] = $forum_data; } $cat_count = count($categories); if ($cat_count > 0) { - for ( $i = 0; $i < $cat_count; $i++ ) { - $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); - if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { - $xoopsTpl->append("categories", $categories[$i]); - continue; - } - $topic_lastread = newbb_get_topics_viewed(); - foreach ( $forums as $forum_row ) { - unset($last_post); - if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { - if ($forum_row['post_time']) { - //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); - $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); - $last_post_icon = ''; - if ( $forum_row['icon'] ) { - $last_post_icon .= ''; - } else { - $last_post_icon .= ''; - } - $last_post_icon .= ''; - $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; - if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ - $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; - } else { - $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; - } - $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } else { - // no forums, so put empty values - $categories[$i]['forums']['forum_lastpost_time'][] = ""; - $categories[$i]['forums']['forum_lastpost_icon'][] = ""; - $categories[$i]['forums']['forum_lastpost_user'][] = ""; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } - $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; - $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); - $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); - $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; - $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; - $all_moderators = get_moderators($forum_row['forum_id']); - $count = 0; - $forum_moderators = ''; - foreach ( $all_moderators as $mods) { - foreach ( $mods as $mod_id => $mod_name) { - if ( $count > 0 ) { - $forum_moderators .= ', '; - } - $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; - $count = 1; - } - } - $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; - } - } - $xoopsTpl->append("categories", $categories[$i]); - } + for ( $i = 0; $i < $cat_count; $i++ ) { + $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); + if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { + $xoopsTpl->append("categories", $categories[$i]); + continue; + } + $topic_lastread = newbb_get_topics_viewed(); + foreach ( $forums as $forum_row ) { + unset($last_post); + if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { + if ($forum_row['post_time']) { + //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); + $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); + $last_post_icon = ''; + if ( $forum_row['icon'] ) { + $last_post_icon .= ''; + } else { + $last_post_icon .= ''; + } + $last_post_icon .= ''; + $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; + if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ + $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; + } else { + $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; + } + $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } else { + // no forums, so put empty values + $categories[$i]['forums']['forum_lastpost_time'][] = ""; + $categories[$i]['forums']['forum_lastpost_icon'][] = ""; + $categories[$i]['forums']['forum_lastpost_user'][] = ""; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } + $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; + $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); + $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); + $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; + $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; + $all_moderators = get_moderators($forum_row['forum_id']); + $count = 0; + $forum_moderators = ''; + foreach ( $all_moderators as $mods) { + foreach ( $mods as $mod_id => $mod_name) { + if ( $count > 0 ) { + $forum_moderators .= ', '; + } + $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; + $count = 1; + } + } + $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; + } + } + $xoopsTpl->append("categories", $categories[$i]); + } } else { - $xoopsTpl->append("categories", array()); + $xoopsTpl->append("categories", array()); } $xoopsTpl->assign(array("img_hotfolder" => $bbImage['newposts_forum'], "img_folder" => $bbImage['folder_forum'], "img_locked" => $bbImage['locked_forum'], "lang_newposts" => _MD_NEWPOSTS, "lang_private" => _MD_PRIVATEFORUM, "lang_nonewposts" => _MD_NONEWPOSTS, "lang_search" => _MD_SEARCH, "lang_advsearch" => _MD_ADVSEARCH)); include_once XOOPS_ROOT_PATH.'/footer.php'; From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:13 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:13 +0900 Subject: [xoops-cvslog 154] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050611025013.DF67D2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.2.6.2 xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.1 --- xoops2jp/html/modules/sections/admin/index.php:1.2.6.2 Mon May 30 20:17:28 2005 +++ xoops2jp/html/modules/sections/admin/index.php Sat Jun 11 11:50:13 2005 @@ -1,5 +1,5 @@ "; ?>
    -

    +



    "; ?>

    From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:13 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:13 +0900 Subject: [xoops-cvslog 155] CVS update: xoops2jp/html/modules/newbb/admin Message-ID: <20050611025013.3C8BF2AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/admin/admin_forums.php diff -u xoops2jp/html/modules/newbb/admin/admin_forums.php:1.2.6.2 xoops2jp/html/modules/newbb/admin/admin_forums.php:1.2.6.2.2.1 --- xoops2jp/html/modules/newbb/admin/admin_forums.php:1.2.6.2 Mon May 30 20:05:19 2005 +++ xoops2jp/html/modules/newbb/admin/admin_forums.php Sat Jun 11 11:50:12 2005 @@ -6,7 +6,7 @@ copyright : (C) 2001 The phpBB Group email : support ¡÷ phpbb.com - $Id: admin_forums.php,v 1.2.6.2 2005/05/30 11:05:19 onokazu Exp $ + $Id: admin_forums.php,v 1.2.6.2.2.1 2005/06/11 02:50:12 onokazu Exp $ ***************************************************************************/ /*************************************************************************** @@ -158,21 +158,21 @@ echo "

    "._MD_A_FORUMCONF."

    "; ?> -
    +
    - + - + - + @@ -180,7 +180,7 @@ prefix("users")." u, ".$xoopsDB->prefix("bb_forum_mods")." f WHERE f.forum_id = $forum AND u.uid = f.user_id"; if ( !$r = $xoopsDB->query($sql) ) { - echo"
    "; + echo"
    "; xoops_cp_footer(); exit(); } @@ -205,7 +205,7 @@ } $sql .= "ORDER BY uname"; if ( !$r = $xoopsDB->query($sql) ) { - echo""; + echo""; xoops_cp_footer(); exit(); } @@ -213,9 +213,9 @@ do { $s = ""; if ( $row['uid'] == $myrow['forum_moderator'] ) { - $s = "SELECTED"; + $s = " selected='selected'"; } - echo "\n"; + echo "\n"; } while ( $row = $xoopsDB->fetchArray($r) ); } else { echo "\n"; @@ -237,9 +237,9 @@ do { $s = ""; if ( $row['cat_id'] == $myrow['cat_id'] ) { - $s = "SELECTED"; + $s = " selected='selected'"; } - echo "\n"; + echo "\n"; } while ( $row = $xoopsDB->fetchArray($r) ); } else { echo "\n"; @@ -249,22 +249,22 @@ Access Level: @@ -274,27 +274,27 @@ - - + + ". _MD_A_ALLOWHTML ." "._MD_A_YES.""._MD_A_NO ." ". _MD_A_ALLOWSIGNATURES ." @@ -304,7 +304,7 @@ ". _MD_A_TOPICPERFORUM ."
    ". _MD_A_TITNOTPFTWBDPPOAF .""; echo "  "; - echo ""; + echo ""; } if ( !isset($_POST['submit']) && !isset($_POST['save']) ) { xoops_cp_header(); @@ -313,13 +313,13 @@ echo "

    "._MD_A_FORUMCONF."

    "; ?>
    -
    +
    - - -
      
    +
    makeTboxData4Edit($cat_data["cat_title"]); ?>
    -
    +
    - + - -
    - +
    +
    prefix("bb_categories")." ORDER BY cat_order"; @@ -407,27 +405,26 @@ echo "

    "._MD_A_FORUMCONF."

    "; ?>
    -
    +
    - + - -
      
    +
    - +

    "._MD_A_FORUMCONF."

    "; ?>
    -
    +
    @@ -520,8 +517,7 @@ - -
    +
    -
    +
    - + - + @@ -694,8 +690,7 @@ - -
    +
    -
    +

    @@ -788,7 +783,7 @@ $last_id = $m['cat_id']; } ?> -
    +
    Index: xoops2jp/html/modules/sections/language/english/main.php diff -u xoops2jp/html/modules/sections/language/english/main.php:1.2 xoops2jp/html/modules/sections/language/english/main.php:1.2.10.1 --- xoops2jp/html/modules/sections/language/english/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/sections/language/english/main.php Sat Jun 11 11:50:13 2005 @@ -1,7 +1,7 @@ Please register or login first!"); +define("_MD_MUSTREGFIRST","You need to be a registered user or logged in to send a modify request.
    Please register or login first!"); define("_MD_WELCOMETOSEC","Welcome to the Special Sections at %s"); // %s is your site name define("_MD_HEREUCANFIND","Here you can find some cool articles that are not presented on the homepage."); define("_MD_THISISSECTION","This is Section %s"); // %s is a section name From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:14 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:14 +0900 Subject: [xoops-cvslog 157] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20050611025014.732542AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailform.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2.6.2 xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2.6.2.2.1 --- xoops2jp/html/modules/system/admin/mailusers/mailform.php:1.2.6.2 Fri May 13 20:02:32 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailform.php Sat Jun 11 11:50:14 2005 @@ -1,5 +1,5 @@ addElement($uid_hidden); - $display_names .= "".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]].", "; - unset($uid_hidden); - } - $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2)); - $form->addElement($users_label); - $display_criteria = 0; + $user_count = count($_POST['memberslist_id']); + $display_names = ""; + for ( $i = 0; $i < $user_count; $i++ ) { + $uid_hidden = new XoopsFormHidden("mail_to_user[]", $_POST['memberslist_id'][$i]); + $form->addElement($uid_hidden); + $display_names .= "".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]].", "; + unset($uid_hidden); + } + $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2)); + $form->addElement($users_label); + $display_criteria = 0; } if ( !empty($display_criteria) ) { - $selected_groups = array(); - $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."
    ", "mail_to_group", false, $selected_groups, 5, true); - $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_min", 20, 10); - $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_max", 20, 10); - $regd_min = new XoopsFormText(_AM_REGDMIN."
    "._AM_TIMEFORMAT."
    ", "mail_regd_min", 20, 10); - $regd_max = new XoopsFormText(_AM_REGDMAX."
    "._AM_TIMEFORMAT."
    ", "mail_regd_max", 20, 10); - $idle_more = new XoopsFormText(_AM_IDLEMORE."
    ", "mail_idle_more", 10, 5); - $idle_less = new XoopsFormText(_AM_IDLELESS."
    ", "mail_idle_less", 10, 5); - $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); - $mailok_cbox->addOption(1, _AM_MAILOK); - $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."
    ", "mail_inactive"); - $inactive_cbox->addOption(1, _AMIFCHECKD); - $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); - $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "

    "); - $criteria_tray->addElement($group_select); - $criteria_tray->addElement($lastlog_min); - $criteria_tray->addElement($lastlog_max); - $criteria_tray->addElement($idle_more); - $criteria_tray->addElement($idle_less); - $criteria_tray->addElement($mailok_cbox); - $criteria_tray->addElement($inactive_cbox); - $criteria_tray->addElement($regd_min); - $criteria_tray->addElement($regd_max); - $form->addElement($criteria_tray); + $selected_groups = array(); + $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."
    ", "mail_to_group", false, $selected_groups, 5, true); + $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_min", 20, 10); + $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."
    "._AM_TIMEFORMAT."
    ", "mail_lastlog_max", 20, 10); + $regd_min = new XoopsFormText(_AM_REGDMIN."
    "._AM_TIMEFORMAT."
    ", "mail_regd_min", 20, 10); + $regd_max = new XoopsFormText(_AM_REGDMAX."
    "._AM_TIMEFORMAT."
    ", "mail_regd_max", 20, 10); + $idle_more = new XoopsFormText(_AM_IDLEMORE."
    ", "mail_idle_more", 10, 5); + $idle_less = new XoopsFormText(_AM_IDLELESS."
    ", "mail_idle_less", 10, 5); + $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); + $mailok_cbox->addOption(1, _AM_MAILOK); + $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."
    ", "mail_inactive"); + $inactive_cbox->addOption(1, _AMIFCHECKD); + $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'"); + $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "

    "); + $criteria_tray->addElement($group_select); + $criteria_tray->addElement($lastlog_min); + $criteria_tray->addElement($lastlog_max); + $criteria_tray->addElement($idle_more); + $criteria_tray->addElement($idle_less); + $criteria_tray->addElement($mailok_cbox); + $criteria_tray->addElement($inactive_cbox); + $criteria_tray->addElement($regd_min); + $criteria_tray->addElement($regd_max); + $form->addElement($criteria_tray); } -$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, $xoopsConfig['sitename']); +$fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E"); $femail_text = new XoopsFormText(_AM_MAILFMAIL, "mail_fromemail", 30, 255, $fromemail); //$subject_caption = _AM_MAILSUBJECT."

    "._AM_MAILTAGS."
    "._AM_MAILTAGS1."
    "._AM_MAILTAGS2."
    "._AM_MAILTAGS3."
    "; From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:14 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:14 +0900 Subject: [xoops-cvslog 158] CVS update: xoops2jp/html/modules/system/admin/tplsets Message-ID: <20050611025014.D30102AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/tplsets/main.php diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9 xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.1 --- xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9 Mon May 16 20:30:26 2005 +++ xoops2jp/html/modules/system/admin/tplsets/main.php Sat Jun 11 11:50:14 2005 @@ -1,5 +1,5 @@ '; foreach ($tplstats as $moddir => $filecount) { $module =& $module_handler->getByDirname($moddir); - if ($installed_mods[$moddir] > $filecount) { - $filecount = ''.$filecount.''; + if (is_object($module)) { + if ($installed_mods[$moddir] > $filecount) { + $filecount = ''.$filecount.''; + } + echo '
  • '.$module->getVar('name').' ['._LIST.' ('.$filecount.')]
  • '; } - echo '
  • '.$module->getVar('name').' ['._LIST.' ('.$filecount.')]
  • '; unset($module); } $not_installed = array_diff(array_keys($installed_mods), array_keys($tplstats)); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:15 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:15 +0900 Subject: [xoops-cvslog 159] CVS update: xoops2jp/html/modules/system/templates Message-ID: <20050611025015.668EF2AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/system/templates/system_comments_flat.html diff -u xoops2jp/html/modules/system/templates/system_comments_flat.html:1.1.6.1 xoops2jp/html/modules/system/templates/system_comments_flat.html:1.1.6.1.2.1 --- xoops2jp/html/modules/system/templates/system_comments_flat.html:1.1.6.1 Mon May 30 19:51:41 2005 +++ xoops2jp/html/modules/system/templates/system_comments_flat.html Sat Jun 11 11:50:15 2005 @@ -1,6 +1,6 @@ - <{foreach item=comment from=$comments}> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:15 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:15 +0900 Subject: [xoops-cvslog 160] CVS update: xoops2jp/html/modules/system/admin/users Message-ID: <20050611025015.20EAE2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/users/userform.php diff -u xoops2jp/html/modules/system/admin/users/userform.php:1.2.6.2 xoops2jp/html/modules/system/admin/users/userform.php:1.2.6.2.2.1 --- xoops2jp/html/modules/system/admin/users/userform.php:1.2.6.2 Fri May 13 20:04:10 2005 +++ xoops2jp/html/modules/system/admin/users/userform.php Sat Jun 11 11:50:14 2005 @@ -1,5 +1,5 @@ addOption(1, _AM_AOUTVTEAD); $email_tray->addElement($email_cbox); $url_text = new XoopsFormText(_AM_URL, "url", 30, 100, $url_value); -// $avatar_select = new XoopsFormSelect("", "user_avatar", $avatar_value); -// $avatar_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); -// $avatar_select->addOptionArray($avatar_array); -// $a_dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); -// $a_dir_labels = array(); -// $a_count = 0; -// $a_dir_link = "XOOPS"; -// $a_count = $a_count + count($avatar_array); -// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); -// foreach ($a_dirlist as $a_dir) { -// if ( $a_dir == "users" ) { -// continue; -// } -// $avatars_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/"); -// $avatar_select->addOptionArray($avatars_array); -// $a_dir_link = "".$a_dir.""; -// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); -// $a_count = $a_count + count($avatars_array); -// } -// if (!empty($uid_value)) { -// $myavatar = avatarExists($uid_value); -// if ( $myavatar != false ) { -// $avatar_select->addOption($myavatar, _US_MYAVATAR); -// } -// } -// $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'"); -// $avatar_label = new XoopsFormLabel("", ""); -// $avatar_tray = new XoopsFormElementTray(_AM_AVATAR, " "); -// $avatar_tray->addElement($avatar_select); -// $avatar_tray->addElement($avatar_label); -// foreach ($a_dir_labels as $a_dir_label) { -// $avatar_tray->addElement($a_dir_label); -// } -// $theme_select = new XoopsFormSelectTheme(_AM_THEME, "theme", $theme_value); +// $avatar_select = new XoopsFormSelect("", "user_avatar", $avatar_value); +// $avatar_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); +// $avatar_select->addOptionArray($avatar_array); +// $a_dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH."/images/avatar/"); +// $a_dir_labels = array(); +// $a_count = 0; +// $a_dir_link = "XOOPS"; +// $a_count = $a_count + count($avatar_array); +// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); +// foreach ($a_dirlist as $a_dir) { +// if ( $a_dir == "users" ) { +// continue; +// } +// $avatars_array = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH."/images/avatar/".$a_dir."/", $a_dir."/"); +// $avatar_select->addOptionArray($avatars_array); +// $a_dir_link = "".$a_dir.""; +// $a_dir_labels[] = new XoopsFormLabel("", $a_dir_link); +// $a_count = $a_count + count($avatars_array); +// } +// if (!empty($uid_value)) { +// $myavatar = avatarExists($uid_value); +// if ( $myavatar != false ) { +// $avatar_select->addOption($myavatar, _US_MYAVATAR); +// } +// } +// $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"images/avatar\", \"\", \"".XOOPS_URL."\")'"); +// $avatar_label = new XoopsFormLabel("", ""); +// $avatar_tray = new XoopsFormElementTray(_AM_AVATAR, " "); +// $avatar_tray->addElement($avatar_select); +// $avatar_tray->addElement($avatar_label); +// foreach ($a_dir_labels as $a_dir_label) { +// $avatar_tray->addElement($a_dir_label); +// } +// $theme_select = new XoopsFormSelectTheme(_AM_THEME, "theme", $theme_value); $timezone_select = new XoopsFormSelectTimezone(_US_TIMEZONE, "timezone_offset", $timezone_value); $icq_text = new XoopsFormText(_AM_ICQ, "user_icq", 15, 15, $icq_value); $aim_text = new XoopsFormText(_AM_AIM, "user_aim", 18, 18, $aim_value); @@ -102,13 +102,13 @@ $rank_select = new XoopsFormSelect(_AM_RANK, "rank", $rank_value); $ranklist = XoopsLists::getUserRankList(); if ( count($ranklist) > 0 ) { - $rank_select->addOption(0, _AM_NSRA); - $rank_select->addOption(0, "--------------"); - $rank_select->addOptionArray($ranklist); + $rank_select->addOption(0, _AM_NSRA); + $rank_select->addOption(0, "--------------"); + $rank_select->addOptionArray($ranklist); } else { - $rank_select->addOption(0, _AM_NSRID); + $rank_select->addOption(0, _AM_NSRID); } -$pwd_text = new XoopsFormPassword(_AM_PASSWORD, "password", 10, 32); +$pwd_text = new XoopsFormPassword(_AM_PASSWORD, "pass", 10, 32); $pwd_text2 = new XoopsFormPassword(_AM_RETYPEPD, "pass2", 10, 32); $mailok_radio = new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $mailok_value); @@ -135,8 +135,8 @@ $form->addElement($name_text); $form->addElement($email_tray, true); $form->addElement($url_text); -// $form->addElement($avatar_tray); -// $form->addElement($theme_select); +// $form->addElement($avatar_tray); +// $form->addElement($theme_select); $form->addElement($timezone_select); $form->addElement($icq_text); $form->addElement($aim_text); @@ -155,11 +155,11 @@ $form->addElement($rank_select); // adding a new user requires password fields if (!$form_isedit) { - $form->addElement($pwd_text, true); - $form->addElement($pwd_text2, true); + $form->addElement($pwd_text, true); + $form->addElement($pwd_text2, true); } else { - $form->addElement($pwd_text); - $form->addElement($pwd_text2); + $form->addElement($pwd_text); + $form->addElement($pwd_text2); } $form->addElement($mailok_radio); $form->addElement($group_select); @@ -167,8 +167,8 @@ $form->addElement($op_hidden); $form->addElement($submit_button); if ( !empty($uid_value) ) { - $uid_hidden = new XoopsFormHidden("uid", $uid_value); - $form->addElement($uid_hidden); + $uid_hidden = new XoopsFormHidden("uid", $uid_value); + $form->addElement($uid_hidden); } //$form->setRequired($uname_text); //$form->setRequired($email_text); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:15 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:15 +0900 Subject: [xoops-cvslog 161] CVS update: xoops2jp/html/modules/xoopsheadline/language/japanese Message-ID: <20050611025015.A7EFB2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php diff -u xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2 xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2.10.1 --- xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php:1.2 Fri Mar 18 22:00:59 2005 +++ xoops2jp/html/modules/xoopsheadline/language/japanese/admin.php Sat Jun 11 11:50:15 2005 @@ -1,5 +1,5 @@ ¥µ¥¤¥È̾¡§ %s'); +define('_AM_WANTDEL','ËÜÅö¤Ë¤³¤Î¥Ø¥Ã¥É¥é¥¤¥ó¤òºï½ü¤·¤Æ¤â¤è¤í¤·¤¤¤Ç¤¹¤«¡©
    ¥µ¥¤¥È̾¡§ %s'); define('_AM_INVALIDID', 'ID¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó'); define('_AM_OBJECTNG', '¥ª¥Ö¥¸¥§¥¯¥È¤¬Â¸ºß¤·¤Þ¤»¤ó'); -define('_AM_FAILUPDATE', '¥Ø¥Ã¥É¥é¥¤¥ó¤ÎÊݸ¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); -define('_AM_FAILDELETE', '¥Ø¥Ã¥É¥é¥¤¥ó¤Îºï½ü¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); +define('_AM_FAILUPDATE', '¥Ø¥Ã¥É¥é¥¤¥ó¤ÎÊݸ¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); +define('_AM_FAILDELETE', '¥Ø¥Ã¥É¥é¥¤¥ó¤Îºï½ü¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿
    %s'); ?> From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:16 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:16 +0900 Subject: [xoops-cvslog 162] CVS update: xoops2jp/html/modules/xoopspoll/admin Message-ID: <20050611025016.408552AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspoll/admin/index.php diff -u xoops2jp/html/modules/xoopspoll/admin/index.php:1.2.6.1 xoops2jp/html/modules/xoopspoll/admin/index.php:1.2.6.1.2.1 --- xoops2jp/html/modules/xoopspoll/admin/index.php:1.2.6.1 Thu Apr 21 18:41:15 2005 +++ xoops2jp/html/modules/xoopspoll/admin/index.php Sat Jun 11 11:50:16 2005 @@ -1,5 +1,5 @@ "._AM_POLLCONF.""; - echo "
    View Log
    Sorry, not yet. ;-)"; + echo "
    View Log
    Sorry, not yet. ;-)"; xoops_cp_footer(); exit(); } From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:50:15 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:50:15 +0900 Subject: [xoops-cvslog 163] CVS update: xoops2jp/html/modules/xoopspartners Message-ID: <20050611025015.EF1752AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/index.php diff -u xoops2jp/html/modules/xoopspartners/index.php:1.2 xoops2jp/html/modules/xoopspartners/index.php:1.2.10.1 --- xoops2jp/html/modules/xoopspartners/index.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopspartners/index.php Sat Jun 11 11:50:15 2005 @@ -1,5 +1,5 @@ assign("partner_join" ,""._MD_JOIN.""); + $xoopsTpl->assign("partner_join" ,""._MD_JOIN.""); } $query = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("partners")." WHERE status=1"); list($numrows) = $xoopsDB->fetchrow($query); if( $xoopsModuleConfig['modlimit'] != 0 ) { - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); }else{ - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); } foreach ( $partners as $part_obj ) { - $array_partners[] = array( - "id" => $part_obj->getVar("id"), - "hits" => $part_obj->getVar("hits"), - "url" => $part_obj->getVar("url"), - "image" => $part_obj->getVar("image"), - "title" => $part_obj->getVar("title"), - "description" => $part_obj->getVar("description") - ); + $array_partners[] = array( + "id" => $part_obj->getVar("id"), + "hits" => $part_obj->getVar("hits"), + "url" => $part_obj->getVar("url"), + "image" => $part_obj->getVar("image"), + "title" => $part_obj->getVar("title"), + "description" => $part_obj->getVar("description") + ); } $partner_count = count($array_partners); for ( $i = 0; $i < $partner_count; $i++ ) { - $ImagePartner = ""; - if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { - $ImagePartner .= "".$array_partners[$i]["url"].""; - } - if ( $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= "
    "; - } - if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { - $ImagePartner .= $array_partners[$i]["title"]; - } - $ImagePartner .= "
    "; - $partner[$i]['id'] = $array_partners[$i]['id']; - $partner[$i]['hits'] = $array_partners[$i]['hits']; - $partner[$i]['url'] = $array_partners[$i]['url']; - $partner[$i]['image'] = $ImagePartner; - $partner[$i]['title'] = $array_partners[$i]['title']; - $partner[$i]['description'] = $array_partners[$i]['description']; - if ($xoopsUserIsAdmin) { - $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; - } - $xoopsTpl->append("partners", $partner[$i]); + $ImagePartner = ""; + if ( !empty($array_partners[$i]["image"]) && ($xoopsModuleConfig['modshow'] == 1 || $xoopsModuleConfig['modshow'] == 3) ) { + $ImagePartner .= "".$array_partners[$i]["url"].""; + } + if ( $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= "
    "; + } + if ( empty($array_partners[$i]["image"]) || $xoopsModuleConfig['modshow'] == 2 || $xoopsModuleConfig['modshow'] == 3 ) { + $ImagePartner .= $array_partners[$i]["title"]; + } + $ImagePartner .= "
    "; + $partner[$i]['id'] = $array_partners[$i]['id']; + $partner[$i]['hits'] = $array_partners[$i]['hits']; + $partner[$i]['url'] = $array_partners[$i]['url']; + $partner[$i]['image'] = $ImagePartner; + $partner[$i]['title'] = $array_partners[$i]['title']; + $partner[$i]['description'] = $array_partners[$i]['description']; + if ($xoopsUserIsAdmin) { + $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; + } + $xoopsTpl->append("partners", $partner[$i]); } if ( $xoopsModuleConfig['modlimit'] != 0 ) { - $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); - $pagenav = $nav->renderImageNav(); + $nav = new XoopsPageNav($numrows,$xoopsModuleConfig['modlimit'],$start); + $pagenav = $nav->renderImageNav(); } $xoopsTpl->assign(array( - "lang_partner" => _MD_PARTNER, - "lang_desc" => _MD_DESCRIPTION, - "lang_hits" => _MD_HITS, - "lang_no_partners" => _MD_NOPART, - "lang_main_partner" => _MD_PARTNERS, - "sitename" => $xoopsConfig['sitename'], - "pagenav" => $pagenav - )); + "lang_partner" => _MD_PARTNER, + "lang_desc" => _MD_DESCRIPTION, + "lang_hits" => _MD_HITS, + "lang_no_partners" => _MD_NOPART, + "lang_main_partner" => _MD_PARTNERS, + "sitename" => htmlspecialchars($xoopsConfig['sitename']), + "pagenav" => $pagenav + )); include_once XOOPS_ROOT_PATH.'/footer.php'; ?> \ No newline at end of file Index: xoops2jp/html/modules/xoopspartners/join.php diff -u xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1 xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1.2.1 --- xoops2jp/html/modules/xoopspartners/join.php:1.2.6.1 Thu Apr 21 19:06:35 2005 +++ xoops2jp/html/modules/xoopspartners/join.php Sat Jun 11 11:50:15 2005 @@ -1,5 +1,5 @@ $content, "lang_main_partner" => _MD_PARTNERS, "lang_join" => _MD_JOIN, - "sitename" => $xoopsConfig['sitename'] + "sitename" => htmlspecialchars($xoopsConfig['sitename']) )); } } else { // else -- if ( $xoopsUser ) From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:53:10 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:53:10 +0900 Subject: [xoops-cvslog 164] CVS update: xoops2jp/html/include Message-ID: <20050611025310.AABC12AC029@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.4.6.4.2.1 xoops2jp/html/include/version.php:1.4.6.4.2.2 --- xoops2jp/html/include/version.php:1.4.6.4.2.1 Sat Jun 11 11:50:10 2005 +++ xoops2jp/html/include/version.php Sat Jun 11 11:53:10 2005 @@ -1,4 +1,4 @@ \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:57:08 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:57:08 +0900 Subject: [xoops-cvslog 165] CVS update: xoops2jp/html/modules/system/admin/users Message-ID: <20050611025708.82F042AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/users/main.php diff -u xoops2jp/html/modules/system/admin/users/main.php:1.2.6.4 xoops2jp/html/modules/system/admin/users/main.php:1.2.6.4.2.1 --- xoops2jp/html/modules/system/admin/users/main.php:1.2.6.4 Fri May 27 06:15:56 2005 +++ xoops2jp/html/modules/system/admin/users/main.php Sat Jun 11 11:57:08 2005 @@ -1,5 +1,5 @@ stripSlashesGPC(trim($_POST['username'])) : ''; $email = !empty($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : ''; - $password = !empty($_POST['password']) ? $myts->stripSlashesGPC(trim($_POST['password'])) : ''; + $password = !empty($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : ''; if ($username == '' || $email == '' || $password == '') { $adduser_errormsg = _AM_YMCACF; } else { @@ -257,14 +257,14 @@ $newuser->setVar("user_yim", $_POST['user_yim']); $newuser->setVar("user_msnm", $_POST['user_msnm']); if ($_POST['pass2'] != "") { - if ( $_POST['password'] != $_POST['pass2'] ) { + if ( $_POST['pass'] != $_POST['pass2'] ) { xoops_cp_header(); echo " "._AM_STNPDNM.""; xoops_cp_footer(); exit(); } - $newuser->setVar("pass", md5($_POST['password'])); + $newuser->setVar("pass", md5($_POST['pass'])); } $newuser->setVar("timezone_offset", $_POST['timezone_offset']); $newuser->setVar("uorder", $_POST['uorder']); From onokazu ¡÷ users.sourceforge.jp Sat Jun 11 11:58:47 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 11 Jun 2005 11:58:47 +0900 Subject: [xoops-cvslog 166] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050611025847.7B4392AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.1 xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.2 --- xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.1 Sat Jun 11 11:50:13 2005 +++ xoops2jp/html/modules/sections/admin/index.php Sat Jun 11 11:58:47 2005 @@ -1,5 +1,5 @@ query("select artid from ".$xoopsDB->prefix("seccont")." where secid=$secid"); $number = $xoopsDB->getRowsNum($result2); ?> -

    "; ?> +

    "; ?>


    Index: xoops2jp/html/modules/newbb/delete.php diff -u xoops2jp/html/modules/newbb/delete.php:1.2.6.1 xoops2jp/html/modules/newbb/delete.php:1.2.6.1.2.1 --- xoops2jp/html/modules/newbb/delete.php:1.2.6.1 Thu Mar 31 00:49:04 2005 +++ xoops2jp/html/modules/newbb/delete.php Sat Jun 11 12:04:57 2005 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/system/admin/findusers/main.php diff -u xoops2jp/html/modules/system/admin/findusers/main.php:1.2.6.2 xoops2jp/html/modules/system/admin/findusers/main.php:1.2.6.2.2.1 --- xoops2jp/html/modules/system/admin/findusers/main.php:1.2.6.2 Tue Apr 19 17:09:22 2005 +++ xoops2jp/html/modules/system/admin/findusers/main.php Sun Jun 12 20:16:55 2005 @@ -1,5 +1,5 @@ "; + echo "  " . _MD_PRINTERPAGE.""; } echo "
    <{$lang_poster}> + <{$lang_poster}> <{$lang_thread}>
     "; + if (!empty($token) && is_object($token)) { + echo $token->getHtml(); + } if ( $group > 0 ) { echo ""; } From nobunobu ¡÷ users.sourceforge.jp Tue Jun 14 01:51:53 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Tue, 14 Jun 2005 01:51:53 +0900 Subject: [xoops-cvslog 169] CVS update: xoops2jp/html/modules/news/include Message-ID: <20050613165153.242702AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/news/include/storyform.inc.php diff -u xoops2jp/html/modules/news/include/storyform.inc.php:1.2.6.3 xoops2jp/html/modules/news/include/storyform.inc.php:1.2.6.3.2.1 --- xoops2jp/html/modules/news/include/storyform.inc.php:1.2.6.3 Fri May 13 20:18:28 2005 +++ xoops2jp/html/modules/news/include/storyform.inc.php Tue Jun 14 01:51:52 2005 @@ -1,5 +1,5 @@ addElement(new XoopsFormDhtmlTextArea(_NW_THESCOOP, 'message', $message, 15, 60), true); $option_tray = new XoopsFormElementTray(_OPTIONS,'
    '); if ($xoopsUser) { - if ($xoopsConfig['anonpost'] == 1) { + if ($xoopsModuleConfig['anonpost'] == 1) { $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname); $noname_checkbox->addOption(1, _POSTANON); $option_tray->addElement($noname_checkbox); From nobunobu ¡÷ users.sourceforge.jp Tue Jun 14 01:51:53 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Tue, 14 Jun 2005 01:51:53 +0900 Subject: [xoops-cvslog 170] CVS update: xoops2jp/html/modules/news Message-ID: <20050613165153.6414C2AC011@users.sourceforge.jp> Index: xoops2jp/html/modules/news/submit.php diff -u xoops2jp/html/modules/news/submit.php:1.2.6.4 xoops2jp/html/modules/news/submit.php:1.2.6.4.2.1 --- xoops2jp/html/modules/news/submit.php:1.2.6.4 Fri May 13 20:18:28 2005 +++ xoops2jp/html/modules/news/submit.php Tue Jun 14 01:51:53 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { $nohtml_db = empty($_POST['nohtml']) ? 0 : 1; } + if ($noname) { + $uid = 0; + } } else { if ( $xoopsModuleConfig['anonpost'] == 1 ) { $uid = 0; From nobunobu ¡÷ users.sourceforge.jp Tue Jun 14 02:06:39 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Tue, 14 Jun 2005 02:06:39 +0900 Subject: [xoops-cvslog 171] CVS update: xoops2jp/html/modules/news Message-ID: <20050613170639.803DB2AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/news/submit.php diff -u xoops2jp/html/modules/news/submit.php:1.2.6.4.2.1 xoops2jp/html/modules/news/submit.php:1.2.6.4.2.2 --- xoops2jp/html/modules/news/submit.php:1.2.6.4.2.1 Tue Jun 14 01:51:53 2005 +++ xoops2jp/html/modules/news/submit.php Tue Jun 14 02:06:39 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { $nohtml_db = empty($_POST['nohtml']) ? 0 : 1; } - if ($noname) { + if (( $xoopsModuleConfig['anonpost'] == 1 ) && $noname) { $uid = 0; } } else { From onokazu ¡÷ users.sourceforge.jp Wed Jun 15 23:33:11 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 15 Jun 2005 23:33:11 +0900 Subject: [xoops-cvslog 172] CVS update: xoops2jp/docs Message-ID: <20050615143311.171812AC015@users.sourceforge.jp> Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.2.6.6.2.2 xoops2jp/docs/CHANGES.txt:1.2.6.6.2.3 --- xoops2jp/docs/CHANGES.txt:1.2.6.6.2.2 Sat Jun 11 11:50:09 2005 +++ xoops2jp/docs/CHANGES.txt Wed Jun 15 23:33:10 2005 @@ -1,6 +1,15 @@ XOOPS v2 Changelog ============================ +2005/ 6/15: Version 2.0.11 JP Beta +=============================== +- Fixed parse error in the sections module +- Fixed incorrect use of anonpost option variable in the news module +- Fixed bug not being able to add users to group when active users over 200 +- Fixed bug not being able to add user from the user admin page +- Fixed bug not being able to delete posts in the newbb module + + 2005/ 6/10: Version 2.0.10 JP =============================== - Added fix for better module version number handling @@ -26,7 +35,7 @@ 2005/ 5/28: Version 2.0.10 JP RC1 =============================== - Temporarily disabled showing XOOPS News on admin top page -- Changed the name of XoopsMediaUploader::checkFileType() to its original XoopsMediaUploader::checkMimeType() to maintain compatibility +- Changed the name of XoopsMediaUploader::checkFileType() to its original XoopsMediaUploader::checkFileType() to maintain compatibility - Fixed group name not showing in group admin error message - Fixed typo in /kernel/object.php, modules/system/admin/smiles/main.php, include/xoopscodes.php, class/xoopsform/dhtmltextarea.php - Changed token lifetime from 900 seconds to unlimited @@ -48,8 +57,8 @@ - Implemented new token system for validating form origination and increased protection against CSRF - Security fix to avoid the usage of fopen and unlink when preview/debug - Fixed bug in header.php, assign $xoops_lblocks -- Fixed sf.net bug #1157029 - Bug in include/checklogin.php -- Fixed sf.net bug #1060061 - renderValidationJS showing htmlentities instead of intended characters +- Fixed bug #1157029 - Bug in include/checklogin.php +- Fixed bug #1060061 - renderValidationJS showing htmlentities instead of intended characters - Removed foreach ($_POST as $k => $v) {${$k} = $v;} and similar ones which can be insecure under certain circumstances - Fixed CSRF vulnerability in block/template preview - Fixed CSRF vulnerability in news/newbb preview From minahito ¡÷ users.sourceforge.jp Thu Jun 16 22:35:53 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Thu, 16 Jun 2005 22:35:53 +0900 Subject: [xoops-cvslog 173] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20050616133553.C749D2AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.1 --- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2 Fri May 13 20:02:42 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php Thu Jun 16 22:35:53 2005 @@ -1,5 +1,5 @@ getUsersByGroup($groupid, false); - // Mith: Changed this to not fetch user objects with getUsersByGroup - // as it is resource-intensive and all we want is the userIDs - $user_list = array_merge($members, $user_list); + } + if (!empty($_POST['mail_to_group'])) { + $member_handler =& xoops_gethandler('member'); + $user_list = array(); + foreach ($_POST['mail_to_group'] as $groupid ) { + $members =& $member_handler->getUsersByGroup($groupid, false); + // Mith: Changed this to not fetch user objects with getUsersByGroup + // as it is resource-intensive and all we want is the userIDs + $user_list = array_merge($members, $user_list); - // RMV: changed this because makes more sense to me - // if options all grouped by 'AND', not 'OR' - /* - foreach ($members as $member) { - if (!in_array($member->getVar('uid'), $user_list)) { - $user_list[] = $member->getVar('uid'); - } + // RMV: changed this because makes more sense to me + // if options all grouped by 'AND', not 'OR' + /* + foreach ($members as $member) { + if (!in_array($member->getVar('uid'), $user_list)) { + $user_list[] = $member->getVar('uid'); } - */ - // if (!in_array($member->getVar('uid'), $added_id) ) { - // $added_id[] = $member->getVar('uid'); - // $added[] =& $member; - // unset($member); - // } - //} - } - if (!empty($user_list)) { - $criteria[] = 'uid IN (' . join(',', $user_list) . ')'; } + */ + // if (!in_array($member->getVar('uid'), $added_id) ) { + // $added_id[] = $member->getVar('uid'); + // $added[] =& $member; + // unset($member); + // } + //} + } + if (!empty($user_list)) { + $criteria[] = 'uid IN (' . join(',', $user_list) . ')'; } } if ( !empty($_POST['mail_lastlog_min']) ) { @@ -202,7 +201,8 @@ $form->addElement($group_hidden); } } - $inactive_hidden = new XoopsFormHidden("mail_inactive", $mail_inactive); + $inactive_hidden = new XoopsFormHidden("mail_inactive", intval($_POST['mail_inactive'])); + $mailok_hidden = new XoopsFormHidden("mail_mailok", intval($_POST['mail_mailok'])); $lastlog_min_hidden = new XoopsFormHidden("mail_lastlog_min", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_min'])); $lastlog_max_hidden = new XoopsFormHidden("mail_lastlog_max", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_max'])); $regd_min_hidden = new XoopsFormHidden("mail_regd_min", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max'])); @@ -220,6 +220,7 @@ $sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count)); $form->addElement($sent_label); $form->addElement($inactive_hidden); + $form->addElement($mailok_hidden); $form->addElement($lastlog_min_hidden); $form->addElement($lastlog_max_hidden); $form->addElement($regd_min_hidden); From nobunobu ¡÷ users.sourceforge.jp Fri Jun 17 00:54:16 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Fri, 17 Jun 2005 00:54:16 +0900 Subject: [xoops-cvslog 174] CVS update: xoops2jp/html Message-ID: <20050616155416.D36BB2AC010@users.sourceforge.jp> Index: xoops2jp/html/footer.php diff -u xoops2jp/html/footer.php:1.2.6.1 xoops2jp/html/footer.php:1.2.6.1.2.1 --- xoops2jp/html/footer.php:1.2.6.1 Thu Mar 31 00:49:04 2005 +++ xoops2jp/html/footer.php Fri Jun 17 00:54:16 2005 @@ -1,5 +1,5 @@ xoops_setCaching(0); $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); From minahito ¡÷ users.sourceforge.jp Fri Jun 17 18:22:17 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Fri, 17 Jun 2005 18:22:17 +0900 Subject: [xoops-cvslog 175] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20050617092217.AA8742AC01A@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.1 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.2 --- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.1 Thu Jun 16 22:35:53 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php Fri Jun 17 18:22:17 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { exit("Access Denied"); } else { @@ -171,7 +173,7 @@ //OpenTable(); if ( $added_count > 0 ) { $mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0; - $mail_end = ($added_count > ($mail_start + 100)) ? ($mail_start + 100) : $added_count; + $mail_end = ($added_count > ($mail_start + SIM_PROCESS_AMMO)) ? ($mail_start + SIM_PROCESS_AMMO) : $added_count; $myts =& MyTextSanitizer::getInstance(); $xoopsMailer =& getMailer(); for ( $i = $mail_start; $i < $mail_end; $i++) { @@ -201,8 +203,10 @@ $form->addElement($group_hidden); } } - $inactive_hidden = new XoopsFormHidden("mail_inactive", intval($_POST['mail_inactive'])); - $mailok_hidden = new XoopsFormHidden("mail_mailok", intval($_POST['mail_mailok'])); + if(isset($_POST['mail_inactive'])) + $form->addElement(new XoopsFormHidden("mail_inactive", intval($_POST['mail_inactive']))); + if(isset($_POST['mail_mailok'])) + $form->addElement(new XoopsFormHidden("mail_mailok", intval($_POST['mail_mailok']))); $lastlog_min_hidden = new XoopsFormHidden("mail_lastlog_min", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_min'])); $lastlog_max_hidden = new XoopsFormHidden("mail_lastlog_max", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_max'])); $regd_min_hidden = new XoopsFormHidden("mail_regd_min", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max'])); @@ -219,8 +223,6 @@ $submit_button = new XoopsFormButton("", "mail_submit", _AM_SENDNEXT, "submit"); $sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count)); $form->addElement($sent_label); - $form->addElement($inactive_hidden); - $form->addElement($mailok_hidden); $form->addElement($lastlog_min_hidden); $form->addElement($lastlog_max_hidden); $form->addElement($regd_min_hidden); From minahito ¡÷ users.sourceforge.jp Fri Jun 17 18:26:44 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Fri, 17 Jun 2005 18:26:44 +0900 Subject: [xoops-cvslog 176] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20050617092644.1C8FA2AC01A@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.2 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.3 --- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.2 Fri Jun 17 18:22:17 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php Fri Jun 17 18:26:43 2005 @@ -1,5 +1,5 @@ 0 ) { $mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0; - $mail_end = ($added_count > ($mail_start + SIM_PROCESS_AMMO)) ? ($mail_start + SIM_PROCESS_AMMO) : $added_count; + $mail_end = ($added_count > ($mail_start + SEND_SIM_PROCESS_AMMO)) ? ($mail_start + SEND_SIM_PROCESS_AMMO) : $added_count; $myts =& MyTextSanitizer::getInstance(); $xoopsMailer =& getMailer(); for ( $i = $mail_start; $i < $mail_end; $i++) { From nobunobu ¡÷ users.sourceforge.jp Sat Jun 18 12:09:06 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sat, 18 Jun 2005 12:09:06 +0900 Subject: [xoops-cvslog 177] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050618030906.55EFD2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.2 xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.3 --- xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.2 Sat Jun 11 11:58:47 2005 +++ xoops2jp/html/modules/sections/admin/index.php Sat Jun 18 12:09:05 2005 @@ -1,5 +1,5 @@ query("select secid, secname from ".$xoopsDB->prefix("sections")." where secid='$secid'"); list($secid, $secname) = $xoopsDB->fetchRow($result2); $secname = $myts->makeTboxData4Show($secname); - echo "
  • $title ($secname) [ "._MD_EDIT." ]"; + echo "
  • $title ($secname) [ "._MD_EDIT." ]
  • "; } ?> "; ?> From nobunobu ¡÷ users.sourceforge.jp Sat Jun 18 12:09:06 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sat, 18 Jun 2005 12:09:06 +0900 Subject: [xoops-cvslog 178] CVS update: xoops2jp/html/modules/sections Message-ID: <20050618030906.978172AC02E@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/index.php diff -u xoops2jp/html/modules/sections/index.php:1.2.6.2 xoops2jp/html/modules/sections/index.php:1.2.6.2.2.1 --- xoops2jp/html/modules/sections/index.php:1.2.6.2 Mon May 30 20:17:28 2005 +++ xoops2jp/html/modules/sections/index.php Sat Jun 18 12:09:06 2005 @@ -1,5 +1,5 @@ makeTareaData4Show($content); echo "
      · $title"; printf(" (read: %s times)",$counter); - echo "  



    [ "._MD_RETURN2INDEX." ]"; include '../../footer.php'; From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:11 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:11 +0900 Subject: [xoops-cvslog 179] CVS update: xoops2jp/html/class Message-ID: <20050618155111.26C0F2AC00F@users.sourceforge.jp> Index: xoops2jp/html/class/xoopscomments.php diff -u xoops2jp/html/class/xoopscomments.php:1.2 xoops2jp/html/class/xoopscomments.php:1.2.10.1 --- xoops2jp/html/class/xoopscomments.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/xoopscomments.php Sun Jun 19 00:51:10 2005 @@ -1,5 +1,5 @@ getVar("user_aim") != "" ) { - $aim_image = "aim"; + $aim_image = "aim"; } else { $aim_image = ""; } if ( $poster->getVar("user_yim") != "" ) { - $yim_image = "yim"; + $yim_image = "yim"; } else { $yim_image = ""; } Index: xoops2jp/html/class/xoopstree.php diff -u xoops2jp/html/class/xoopstree.php:1.2 xoops2jp/html/class/xoopstree.php:1.2.10.1 --- xoops2jp/html/class/xoopstree.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/xoopstree.php Sun Jun 19 00:51:10 2005 @@ -1,5 +1,5 @@ db->fetchRow($result); $myts =& MyTextSanitizer::getInstance(); $name = $myts->makeTboxData4Show($name); - $path = "".$name." : ".$path.""; + $path = "".$name." : ".$path.""; if ( $parentid == 0 ) { return $path; } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:11 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:11 +0900 Subject: [xoops-cvslog 180] CVS update: xoops2jp/html Message-ID: <20050618155111.7C94A2AC019@users.sourceforge.jp> Index: xoops2jp/html/imagemanager.php diff -u xoops2jp/html/imagemanager.php:1.2.6.5 xoops2jp/html/imagemanager.php:1.2.6.5.2.1 --- xoops2jp/html/imagemanager.php:1.2.6.5 Mon May 16 20:15:26 2005 +++ xoops2jp/html/imagemanager.php Sun Jun 19 00:51:11 2005 @@ -1,5 +1,5 @@ \ No newline at end of file Index: xoops2jp/html/search.php diff -u xoops2jp/html/search.php:1.2.6.2 xoops2jp/html/search.php:1.2.6.2.2.1 --- xoops2jp/html/search.php:1.2.6.2 Sat Apr 2 00:21:51 2005 +++ xoops2jp/html/search.php Sun Jun 19 00:51:11 2005 @@ -1,5 +1,5 @@ '._SR_SHOWALLR.'

    '; } } @@ -255,15 +255,15 @@ '; $search_url = XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' ', $queries))); - $search_url .= "&mid=$mid&action=$action&andor=$andor"; + $search_url .= "&mid=$mid&action=$action&andor=$andor"; if ($action=='showallbyuser') { - $search_url .= "&uid=$uid"; + $search_url .= "&uid=$uid"; } if ( $start > 0 ) { $prev = $start - 20; echo ' '; - $search_url_prev = $search_url."&start=$prev"; + $search_url_prev = $search_url."&start=$prev"; echo ''._SR_PREVIOUS.' '; } @@ -271,7 +271,7 @@ '; if (false != $has_next) { $next = $start + 20; - $search_url_next = $search_url."&start=$next"; + $search_url_next = $search_url."&start=$next"; echo ''._SR_NEXT.' '; } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:11 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:11 +0900 Subject: [xoops-cvslog 181] CVS update: xoops2jp/html/include Message-ID: <20050618155111.BE0AC2AC00F@users.sourceforge.jp> Index: xoops2jp/html/include/notification_update.php diff -u xoops2jp/html/include/notification_update.php:1.2 xoops2jp/html/include/notification_update.php:1.2.10.1 --- xoops2jp/html/include/notification_update.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/include/notification_update.php Sun Jun 19 00:51:11 2005 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/mydownloads/admin/index.php diff -u xoops2jp/html/modules/mydownloads/admin/index.php:1.2.6.2 xoops2jp/html/modules/mydownloads/admin/index.php:1.2.6.2.2.1 --- xoops2jp/html/modules/mydownloads/admin/index.php:1.2.6.2 Tue May 31 12:48:18 2005 +++ xoops2jp/html/modules/mydownloads/admin/index.php Sun Jun 19 00:51:11 2005 @@ -1,5 +1,5 @@ "; echo ""; echo "\n"; - echo myTextForm("index.php?op=delNewDownload&lid=$lid",_MD_DELETE); + echo myTextForm("index.php?op=delNewDownload&lid=$lid",_MD_DELETE); echo "

    "; } }else{ @@ -327,7 +327,7 @@ echo ""; echo "\n"; echo "
    \n"; - echo myTextForm("index.php?op=delDownload&lid=".$lid , _MD_DELETE); + echo myTextForm("index.php?op=delDownload&lid=".$lid , _MD_DELETE); echo "\n"; echo myTextForm("index.php?op=downloadsConfigMenu", _MD_CANCEL); echo "
    \n"; @@ -363,11 +363,11 @@ $useravgrating = $useravgrating / $uservotes; $useravgrating = number_format($useravgrating, 1); $ratinguname = XoopsUser::getUnameFromId($ratinguser); - // echo "$ratinguname$ratinghostname$rating$useravgrating$uservotes$formatted_dateX\n"; + // echo "$ratinguname$ratinghostname$rating$useravgrating$uservotes$formatted_dateX\n"; // echo "$ratinguname$ratinghostname$rating$useravgrating$uservotes$formatted_date"; echo "$ratinguname$ratinghostname$rating$useravgrating$uservotes$formatted_date"; //echo "
    \n"; - echo myTextForm("index.php?op=delVote&lid=$lid&rid=$ratingid" , "X"); + echo myTextForm("index.php?op=delVote&lid=$lid&rid=$ratingid" , "X"); // echo "
    \n"; echo "\n"; @@ -393,11 +393,11 @@ $colorswitch="dddddd"; while(list($ratingid, $rating, $ratinghostname, $ratingtimestamp)=$xoopsDB->fetchRow($result5)) { $formatted_date = formatTimestamp($ratingtimestamp); - // echo "$ratinghostname$rating$formatted_dateX"; + // echo "$ratinghostname$rating$formatted_dateX"; echo "$ratinghostname$rating$formatted_date"; //echo "
    \n"; //align=\"center\" - echo myTextForm("index.php?op=delVote&lid=$lid&rid=$ratingid" , "X"); + echo myTextForm("index.php?op=delVote&lid=$lid&rid=$ratingid" , "X"); //echo "
    \n"; echo ""; @@ -474,11 +474,11 @@ echo "$ownername"; } echo "\n"; - echo myTextForm("index.php?op=ignoreBrokenDownloads&lid=$lid" , "X"); + echo myTextForm("index.php?op=ignoreBrokenDownloads&lid=$lid" , "X"); echo "\n"; - echo myTextForm("index.php?op=modDownload&lid=$lid" , "X"); + echo myTextForm("index.php?op=modDownload&lid=$lid" , "X"); echo "\n"; - echo myTextForm("index.php?op=delBrokenDownloads&lid=$lid" , "X"); + echo myTextForm("index.php?op=delBrokenDownloads&lid=$lid" , "X"); echo "\n"; if ($colorswitch=="#dddddd") { $colorswitch="#ffffff"; @@ -611,11 +611,11 @@ } echo "\n"; echo "
    \n"; - echo myTextForm("index.php?op=changeModReq&requestid=$requestid" , _MD_APPROVE); + echo myTextForm("index.php?op=changeModReq&requestid=$requestid" , _MD_APPROVE); echo "\n"; - echo myTextForm("index.php?op=modDownload&lid=$lookup_lid[$requestid]", _EDIT); + echo myTextForm("index.php?op=modDownload&lid=$lookup_lid[$requestid]", _EDIT); echo "\n"; - echo myTextForm("index.php?op=ignoreModReq&requestid=$requestid", _MD_IGNORE); + echo myTextForm("index.php?op=ignoreModReq&requestid=$requestid", _MD_IGNORE); echo "
    \n"; echo "
    \n"; echo "

    "; From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:12 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:12 +0900 Subject: [xoops-cvslog 183] CVS update: xoops2jp/html/modules/mydownloads Message-ID: <20050618155112.6C6C02AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/index.php diff -u xoops2jp/html/modules/mydownloads/index.php:1.2.6.1 xoops2jp/html/modules/mydownloads/index.php:1.2.6.1.2.1 --- xoops2jp/html/modules/mydownloads/index.php:1.2.6.1 Mon May 30 21:00:10 2005 +++ xoops2jp/html/modules/mydownloads/index.php Sun Jun 19 00:51:12 2005 @@ -1,5 +1,5 @@ '._MD_EDITTHISDL.''; + $adminlink = ''._MD_EDITTHISDL.''; } else { $adminlink = ''; } Index: xoops2jp/html/modules/mydownloads/singlefile.php diff -u xoops2jp/html/modules/mydownloads/singlefile.php:1.2.6.1 xoops2jp/html/modules/mydownloads/singlefile.php:1.2.6.1.2.1 --- xoops2jp/html/modules/mydownloads/singlefile.php:1.2.6.1 Mon May 30 21:00:10 2005 +++ xoops2jp/html/modules/mydownloads/singlefile.php Sun Jun 19 00:51:12 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid())) { - $adminlink = ''._MD_EDITTHISDL.''; + $adminlink = ''._MD_EDITTHISDL.''; } else { $adminlink = ''; } Index: xoops2jp/html/modules/mydownloads/submit.php diff -u xoops2jp/html/modules/mydownloads/submit.php:1.2 xoops2jp/html/modules/mydownloads/submit.php:1.2.10.1 --- xoops2jp/html/modules/mydownloads/submit.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/submit.php Sun Jun 19 00:51:12 2005 @@ -1,5 +1,5 @@ getVar('dirname') . '/singlefile.php?cid=' . $cid . '&lid=' . $newid; + $tags['FILE_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/singlefile.php?cid=' . $cid . '&lid=' . $newid; $sql = "SELECT title FROM " . $xoopsDB->prefix("mydownloads_cat") . " WHERE cid=" . $cid; $result = $xoopsDB->query($sql); $row = $xoopsDB->fetchArray($result); From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:12 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:12 +0900 Subject: [xoops-cvslog 184] CVS update: xoops2jp/html/modules/mylinks/admin Message-ID: <20050618155112.B91DC2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/admin/index.php diff -u xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1.2.1 xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1.2.2 --- xoops2jp/html/modules/mylinks/admin/index.php:1.2.6.1.2.1 Sat Jun 11 11:50:12 2005 +++ xoops2jp/html/modules/mylinks/admin/index.php Sun Jun 19 00:51:12 2005 @@ -440,11 +440,11 @@ } echo "\n"; - echo myTextForm("index.php?op=ignoreBrokenLinks&lid=$lid" , "X"); + echo myTextForm("index.php?op=ignoreBrokenLinks&lid=$lid" , "X"); echo "\n"; - echo myTextForm("index.php?op=modLink&lid=$lid" , "X"); + echo myTextForm("index.php?op=modLink&lid=$lid" , "X"); echo "\n"; - echo myTextForm("index.php?op=delBrokenLinks&lid=$lid" , "X"); + echo myTextForm("index.php?op=delBrokenLinks&lid=$lid" , "X"); echo "\n"; if ( $colorswitch == "#dddddd" ) { @@ -570,11 +570,11 @@ } echo "\n"; echo "
    \n"; - echo myTextForm("index.php?op=changeModReq&requestid=$requestid" , _MD_APPROVE); + echo myTextForm("index.php?op=changeModReq&requestid=$requestid" , _MD_APPROVE); echo "\n"; - echo myTextForm("index.php?op=modLink&lid=$lookup_lid[$requestid]", _EDIT); + echo myTextForm("index.php?op=modLink&lid=$lookup_lid[$requestid]", _EDIT); echo "\n"; - echo myTextForm("index.php?op=ignoreModReq&requestid=$requestid", _MD_IGNORE); + echo myTextForm("index.php?op=ignoreModReq&requestid=$requestid", _MD_IGNORE); echo "
    \n"; echo "
    \n"; echo "

    "; From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:13 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:13 +0900 Subject: [xoops-cvslog 182] CVS update: xoops2jp/html/modules/mylinks Message-ID: <20050618155113.04DDF2AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/submit.php diff -u xoops2jp/html/modules/mylinks/submit.php:1.2 xoops2jp/html/modules/mylinks/submit.php:1.2.10.1 --- xoops2jp/html/modules/mylinks/submit.php:1.2 Fri Mar 18 21:52:24 2005 +++ xoops2jp/html/modules/mylinks/submit.php Sun Jun 19 00:51:12 2005 @@ -1,5 +1,5 @@ getVar('dirname') . '/singlelink.php?cid=' . $cid . '&lid=' . $newid; + $tags['LINK_URL'] = XOOPS_URL . '/modules/'. $xoopsModule->getVar('dirname') . '/singlelink.php?cid=' . $cid . '&lid=' . $newid; $sql = "SELECT title FROM " . $xoopsDB->prefix("mylinks_cat") . " WHERE cid=" . $cid; $result = $xoopsDB->query($sql); $row = $xoopsDB->fetchArray($result); From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:13 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:13 +0900 Subject: [xoops-cvslog 183] CVS update: xoops2jp/html/modules/newbb/admin Message-ID: <20050618155113.588922AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/admin/admin_priv_forums.php diff -u xoops2jp/html/modules/newbb/admin/admin_priv_forums.php:1.2.6.1 xoops2jp/html/modules/newbb/admin/admin_priv_forums.php:1.2.6.1.2.1 --- xoops2jp/html/modules/newbb/admin/admin_priv_forums.php:1.2.6.1 Wed Apr 20 19:04:15 2005 +++ xoops2jp/html/modules/newbb/admin/admin_priv_forums.php Sun Jun 19 00:51:13 2005 @@ -6,7 +6,7 @@ copyright : (C) 2001 The phpBB Group email : support ¡÷ phpbb.com - $Id: admin_priv_forums.php,v 1.2.6.1 2005/04/20 10:04:15 onokazu Exp $ + $Id: admin_priv_forums.php,v 1.2.6.1.2.1 2005/06/18 15:51:13 nobunobu Exp $ ***************************************************************************/ /*************************************************************************** @@ -286,7 +286,7 @@ { $post_text = ($row['can_post']) ? "can" : "can't"; $post_text .= " post"; - $post_toggle_link = XOOPS_URL."/modules/newbb/admin/admin_priv_forums.php?forum=$forum&op_userid=".$row['uid']."&op="; + $post_toggle_link = XOOPS_URL."/modules/newbb/admin/admin_priv_forums.php?forum=$forum&op_userid=".$row['uid']."&op="; if ($row['can_post']) { $post_toggle_link .= "revokeuserpost"; Index: xoops2jp/html/modules/newbb/admin/index.php diff -u xoops2jp/html/modules/newbb/admin/index.php:1.2.6.1 xoops2jp/html/modules/newbb/admin/index.php:1.2.6.1.2.1 --- xoops2jp/html/modules/newbb/admin/index.php:1.2.6.1 Fri May 27 16:59:04 2005 +++ xoops2jp/html/modules/newbb/admin/index.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ - +   From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:13 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:13 +0900 Subject: [xoops-cvslog 184] CVS update: xoops2jp/html/modules/newbb Message-ID: <20050618155113.C31CC2AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/delete.php diff -u xoops2jp/html/modules/newbb/delete.php:1.2.6.1.2.1 xoops2jp/html/modules/newbb/delete.php:1.2.6.1.2.2 --- xoops2jp/html/modules/newbb/delete.php:1.2.6.1.2.1 Sat Jun 11 12:04:57 2005 +++ xoops2jp/html/modules/newbb/delete.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { if ( !is_moderator($forum, $xoopsUser->uid()) ) { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); + redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); exit(); } } } else { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); + redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); exit(); } @@ -75,7 +75,7 @@ redirect_header("viewforum.php?forum=$forum", 2, _MD_POSTSDELETED); exit(); } else { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTSDELETED); + redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTSDELETED); exit(); } } else { Index: xoops2jp/html/modules/newbb/edit.php diff -u xoops2jp/html/modules/newbb/edit.php:1.2 xoops2jp/html/modules/newbb/edit.php:1.2.10.1 --- xoops2jp/html/modules/newbb/edit.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/edit.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ nohtml(); Index: xoops2jp/html/modules/newbb/newtopic.php diff -u xoops2jp/html/modules/newbb/newtopic.php:1.2 xoops2jp/html/modules/newbb/newtopic.php:1.2.10.1 --- xoops2jp/html/modules/newbb/newtopic.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/newtopic.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ getVar("uname"); @@ -138,7 +138,7 @@ $uid = 0; } else { if ( !empty($topic_id) ) { - redirect_header("viewtopic.php?topic_id=".$topic_id."&order=".$order."&viewmode=".$viewmode."&pid=".$pid."&forum=".$forum,2,_MD_ANONNOTALLOWED); + redirect_header("viewtopic.php?topic_id=".$topic_id."&order=".$order."&viewmode=".$viewmode."&pid=".$pid."&forum=".$forum,2,_MD_ANONNOTALLOWED); } else { redirect_header("viewforum.php?forum=".$forum,2,_MD_ANONNOTALLOWED); } @@ -178,7 +178,7 @@ // Define tags for notification message $tags = array(); $tags['THREAD_NAME'] = $HTTP_POST_VARS['subject']; - $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id='.$postid.'&topic_id=' . $forumpost->topic(); + $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id='.$postid.'&topic_id=' . $forumpost->topic(); $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postid; include_once 'include/notification.inc.php'; $forum_info = newbb_notify_iteminfo ('forum', $forum); Index: xoops2jp/html/modules/newbb/reply.php diff -u xoops2jp/html/modules/newbb/reply.php:1.2 xoops2jp/html/modules/newbb/reply.php:1.2.10.1 --- xoops2jp/html/modules/newbb/reply.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/reply.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ prefix("bb_forums")." WHERE forum_id = $forum"; @@ -68,7 +68,7 @@ $accesserror = 1; } if ( $accesserror == 1 ) { - redirect_header("viewtopic.php?topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum",2,_MD_NORIGHTTOPOST); + redirect_header("viewtopic.php?topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum",2,_MD_NORIGHTTOPOST); exit(); } // Ok, looks like we're good. @@ -88,7 +88,7 @@ $accesserror = 1; } if ( $accesserror == 1 ) { - redirect_header("viewtopic.php?topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum",2,_MD_NORIGHTTOPOST); + redirect_header("viewtopic.php?topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum",2,_MD_NORIGHTTOPOST); exit(); } } Index: xoops2jp/html/modules/newbb/viewforum.php diff -u xoops2jp/html/modules/newbb/viewforum.php:1.2 xoops2jp/html/modules/newbb/viewforum.php:1.2.10.1 --- xoops2jp/html/modules/newbb/viewforum.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/viewforum.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ 3 && $i < $totalpages ) { $pagination .= "..."; } else { - $addlink = '&start='.(($i - 1) * $forumdata['posts_per_page']); + $addlink = '&start='.(($i - 1) * $forumdata['posts_per_page']); $pagination .= '['.$i.']'; } } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:14 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:14 +0900 Subject: [xoops-cvslog 185] CVS update: xoops2jp/html/modules/newbb/include Message-ID: <20050618155114.133CE2AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/include/notification.inc.php diff -u xoops2jp/html/modules/newbb/include/notification.inc.php:1.2 xoops2jp/html/modules/newbb/include/notification.inc.php:1.2.10.1 --- xoops2jp/html/modules/newbb/include/notification.inc.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/include/notification.inc.php Sun Jun 19 00:51:13 2005 @@ -1,5 +1,5 @@ query($sql); // TODO: error check $result_array = $xoopsDB->fetchArray($result); $item['name'] = $result_array['topic_title']; - $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/viewtopic.php?forum=' . $result_array['forum_id'] . '&topic_id=' . $item_id; + $item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/viewtopic.php?forum=' . $result_array['forum_id'] . '&topic_id=' . $item_id; return $item; } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:14 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:14 +0900 Subject: [xoops-cvslog 186] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050618155114.564BF2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.3 xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.4 --- xoops2jp/html/modules/sections/admin/index.php:1.2.6.2.2.3 Sat Jun 18 12:09:05 2005 +++ xoops2jp/html/modules/sections/admin/index.php Sun Jun 19 00:51:14 2005 @@ -1,5 +1,5 @@ "; while(list($secid, $secname) = $xoopsDB->fetchRow($result)) { $secname=$myts->makeTboxData4Show($secname); - echo "
  • ".$secname."
  • "; + echo "
  • ".$secname."
  • "; } echo ""; echo ""; @@ -89,7 +89,7 @@ $result2 = $xoopsDB->query("select secid, secname from ".$xoopsDB->prefix("sections")." where secid='$secid'"); list($secid, $secname) = $xoopsDB->fetchRow($result2); $secname = $myts->makeTboxData4Show($secname); - echo "
  • $title ($secname) [ "._MD_EDIT." ]
  • "; + echo "
  • $title ($secname) [ "._MD_EDIT." ]
  • "; } ?> "; ?> From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:14 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:14 +0900 Subject: [xoops-cvslog 187] CVS update: xoops2jp/html/modules/sections Message-ID: <20050618155114.9A9212AC03B@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/index.php diff -u xoops2jp/html/modules/sections/index.php:1.2.6.2.2.1 xoops2jp/html/modules/sections/index.php:1.2.6.2.2.2 --- xoops2jp/html/modules/sections/index.php:1.2.6.2.2.1 Sat Jun 18 12:09:06 2005 +++ xoops2jp/html/modules/sections/index.php Sun Jun 19 00:51:14 2005 @@ -1,5 +1,5 @@ "; $count = 0; } - echo "$secname"; + echo "$secname"; $count++; if ( $count == 2 ) { echo ""; @@ -76,9 +76,9 @@ while ( list($artid, $secid, $title, $content, $counter) = $xoopsDB->fetchRow($result) ) { $title = $myts->makeTboxData4Show($title); $content = $myts->makeTareaData4Show($content); - echo "  · $title"; + echo "  · $title"; printf(" (read: %s times)",$counter); - echo "  " . _MD_PRINTERPAGE.""; + echo "  " . _MD_PRINTERPAGE.""; } echo "


    [ "._MD_RETURN2INDEX." ]"; include '../../footer.php'; @@ -116,19 +116,19 @@ $next_page = '' ._MD_RETURN2INDEX.''; } else { $next_pagenumber = $page + 1; - $next_page = ""._MD_NEXTPAGE." ".sprintf("(%s/%s)",$next_pagenumber,$pageno)." >>"; + $next_page = ""._MD_NEXTPAGE." ".sprintf("(%s/%s)",$next_pagenumber,$pageno)." >>"; } if( $page <= 1 ) { $previous_page = '' ._MD_RETURN2INDEX.''; } else { $previous_pagenumber = $page -1; - $previous_page = "<< "._MD_PREVPAGE." ".sprintf("(%s/%s)",$previous_pagenumber,$pageno).""; + $previous_page = "<< "._MD_PREVPAGE." ".sprintf("(%s/%s)",$previous_pagenumber,$pageno).""; } echo ($contentpages[$arrayelement]); echo "
    $previous_page $next_page
    "; echo " - [ ".sprintf(_MD_BACK2SEC,$secname)." | - "._MD_RETURN2INDEX." | " . _MD_PRINTERPAGE."]"; + [ ".sprintf(_MD_BACK2SEC,$secname)." | + "._MD_RETURN2INDEX." | " . _MD_PRINTERPAGE."]"; include '../../footer.php'; } @@ -155,7 +155,7 @@ printf(_MD_COMESFROM, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); echo "
    ".XOOPS_URL."

    "; echo _MD_URLFORTHIS."
    - ".XOOPS_URL."/modules/sections/index.php?op=viewarticle&artid=$artid + ".XOOPS_URL."/modules/sections/index.php?op=viewarticle&artid=$artid "; From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 00:51:15 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 00:51:15 +0900 Subject: [xoops-cvslog 188] CVS update: xoops2jp/html/modules/system/admin/blocksadmin Message-ID: <20050618155115.12B7B2AC00F@users.sourceforge.jp> From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 01:03:51 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 01:03:51 +0900 Subject: [xoops-cvslog 189] CVS update: xoops2jp/html/modules/system/admin/comments Message-ID: <20050618160351.61A8F2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/comments/main.php diff -u xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1 xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.1 --- xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1 Mon Apr 18 22:15:07 2005 +++ xoops2jp/html/modules/system/admin/comments/main.php Sun Jun 19 01:03:51 2005 @@ -1,5 +1,5 @@ get($comment->getVar('com_modid')); $comment_config = $module->getInfo('comments'); - header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); + header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); exit(); } } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 01:03:51 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 01:03:51 +0900 Subject: [xoops-cvslog 190] CVS update: xoops2jp/html/modules/system/admin/tplsets Message-ID: <20050618160351.A0F012AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/tplsets/themeimgform.php diff -u xoops2jp/html/modules/system/admin/tplsets/themeimgform.php:1.2 xoops2jp/html/modules/system/admin/tplsets/themeimgform.php:1.2.10.1 --- xoops2jp/html/modules/system/admin/tplsets/themeimgform.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/tplsets/themeimgform.php Sun Jun 19 01:03:51 2005 @@ -1,5 +1,5 @@ 0) { echo '
    '; for ($i = 0; $i < $icount; $i++) { - echo ''; + echo ''; } echo '
    '._MD_EDITSKINIMG.'
    '._MD_IMGFILE.''.$imgs[$i]->getVar('imgsetimg_file').'
    '._MD_IMGNEWFILE.'
    '._MD_IMGDELETE.'
    '._MD_IMGFILE.''.$imgs[$i]->getVar('imgsetimg_file').'
    '._MD_IMGNEWFILE.'
    '._MD_IMGDELETE.'
    '; } @@ -49,7 +49,7 @@ } else { echo ''; for ($i = 0; $i < $icount; $i++) { - echo ''; + echo ''; } echo '
    '._MD_SKINIMGS.'
    '._MD_IMGFILE.''.$imgs[$i]->getVar('imgsetimg_file').'
    '._MD_IMGFILE.''.$imgs[$i]->getVar('imgsetimg_file').'
    '; } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 01:03:51 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 01:03:51 +0900 Subject: [xoops-cvslog 191] CVS update: xoops2jp/html/modules/xoopspartners/admin Message-ID: <20050618160351.E37342AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/admin/index.php diff -u xoops2jp/html/modules/xoopspartners/admin/index.php:1.2.6.2 xoops2jp/html/modules/xoopspartners/admin/index.php:1.2.6.2.2.1 --- xoops2jp/html/modules/xoopspartners/admin/index.php:1.2.6.2 Mon May 30 19:55:03 2005 +++ xoops2jp/html/modules/xoopspartners/admin/index.php Sun Jun 19 01:03:51 2005 @@ -1,5 +1,5 @@ makeTboxData4Save(formatURL($url)); From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 01:03:52 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 01:03:52 +0900 Subject: [xoops-cvslog 192] CVS update: xoops2jp/html/modules/xoopspartners Message-ID: <20050618160352.31A702AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/index.php diff -u xoops2jp/html/modules/xoopspartners/index.php:1.2.10.1 xoops2jp/html/modules/xoopspartners/index.php:1.2.10.2 --- xoops2jp/html/modules/xoopspartners/index.php:1.2.10.1 Sat Jun 11 11:50:15 2005 +++ xoops2jp/html/modules/xoopspartners/index.php Sun Jun 19 01:03:51 2005 @@ -1,5 +1,5 @@ ["._MD_EDIT."] ["._MD_DELETE."]"; + $partner[$i]['admin_option'] = "
    ["._MD_EDIT."] ["._MD_DELETE."]"; } $xoopsTpl->append("partners", $partner[$i]); } From nobunobu ¡÷ users.sourceforge.jp Sun Jun 19 01:26:12 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Sun, 19 Jun 2005 01:26:12 +0900 Subject: [xoops-cvslog 193] CVS update: xoops2jp/html/include Message-ID: <20050618162612.E3DA42AC00F@users.sourceforge.jp> Index: xoops2jp/html/include/comment_form.php diff -u xoops2jp/html/include/comment_form.php:1.2.6.2 xoops2jp/html/include/comment_form.php:1.2.6.2.2.1 --- xoops2jp/html/include/comment_form.php:1.2.6.2 Mon Apr 25 13:04:51 2005 +++ xoops2jp/html/include/comment_form.php Sun Jun 19 01:26:12 2005 @@ -1,5 +1,5 @@ addOptionArray(array(XOOPS_COMMENT_PENDING => _CM_PENDING, XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, XOOPS_COMMENT_HIDDEN => _CM_HIDDEN)); $cform->addElement($status_select); + $button_tray->addElement(new XoopsFormButton('', 'com_dodelete', _DELETE, 'submit')); } $html_checkbox = new XoopsFormCheckBox('', 'dohtml', $dohtml); $html_checkbox->addOption(1, _CM_DOHTML); $option_tray->addElement($html_checkbox); - $button_tray->addElement(new XoopsFormButton('', 'com_dodelete', _DELETE, 'submit')); } } $smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $dosmiley); From nobunobu ¡÷ users.sourceforge.jp Mon Jun 20 13:29:01 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Mon, 20 Jun 2005 13:29:01 +0900 Subject: [xoops-cvslog 194] CVS update: xoops2jp/html/modules/system/admin/comments Message-ID: <20050620042901.B64A22AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/comments/main.php diff -u xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.1 xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.2 --- xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.1 Sun Jun 19 01:03:51 2005 +++ xoops2jp/html/modules/system/admin/comments/main.php Mon Jun 20 13:29:01 2005 @@ -1,5 +1,5 @@ get($comment->getVar('com_modid')); $comment_config = $module->getInfo('comments'); - header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); + header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); exit(); } } From nobunobu ¡÷ users.sourceforge.jp Mon Jun 20 13:29:25 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Mon, 20 Jun 2005 13:29:25 +0900 Subject: [xoops-cvslog 195] CVS update: xoops2jp/html Message-ID: <20050620042925.475432AC00E@users.sourceforge.jp> Index: xoops2jp/html/imagemanager.php diff -u xoops2jp/html/imagemanager.php:1.2.6.5.2.1 xoops2jp/html/imagemanager.php:1.2.6.5.2.2 --- xoops2jp/html/imagemanager.php:1.2.6.5.2.1 Sun Jun 19 00:51:11 2005 +++ xoops2jp/html/imagemanager.php Mon Jun 20 13:29:25 2005 @@ -1,5 +1,5 @@ \ No newline at end of file From minahito ¡÷ users.sourceforge.jp Tue Jun 21 15:11:06 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Tue, 21 Jun 2005 15:11:06 +0900 Subject: [xoops-cvslog 196] CVS update: xoops2jp/html/modules/system/admin/tplsets Message-ID: <20050621061106.F054B2AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/tplsets/main.php diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.1 xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.2 --- xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.1 Sat Jun 11 11:50:14 2005 +++ xoops2jp/html/modules/system/admin/tplsets/main.php Tue Jun 21 15:11:06 2005 @@ -1,5 +1,5 @@ xoopsClone(); $newtpl->setVar('tpl_id', 0); - $newtpl->setVar('tpl_tplset', $tplset); + $newtpl->setVar('tpl_tplset', $_POST['tplset']); $newtpl->setVar('tpl_lastmodified', time()); $newtpl->setVar('tpl_lastimported', 0); if (!$tpltpl_handler->insert($newtpl)) { From onokazu ¡÷ users.sourceforge.jp Sat Jun 25 00:14:50 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 25 Jun 2005 00:14:50 +0900 Subject: [xoops-cvslog 197] CVS update: xoops2jp/html/modules/system/admin/tplsets Message-ID: <20050624151450.85FE72AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/tplsets/main.php diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.2 xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.3 --- xoops2jp/html/modules/system/admin/tplsets/main.php:1.2.6.9.2.2 Tue Jun 21 15:11:06 2005 +++ xoops2jp/html/modules/system/admin/tplsets/main.php Sat Jun 25 00:14:50 2005 @@ -1,5 +1,5 @@ '.$nfile.' '; - $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/'.$nfile; + $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/'.$nfile; if (file_exists($physical_file)) { echo '['._MD_IMPORT.']'; } else { @@ -227,7 +227,7 @@ } echo ''.$btemplates[$j]->getVar('tpl_file').'

    '.$btemplates[$j]->getVar('tpl_desc').''.formatTimestamp($last_modified, 'l').''; $filename = $btemplates[$j]->getVar('tpl_file'); - $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$filename; + $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/blocks/'.$filename; if ($tplset != 'default') { if (file_exists($physical_file)) { $mtime = filemtime($physical_file); @@ -257,7 +257,7 @@ foreach ($bnotinst_files as $nfile) { if ($nfile != 'index.html') { echo ''.$nfile.' '; - $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$nfile; + $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/blocks/'.$nfile; if (file_exists($physical_file)) { echo '['._MD_IMPORT.']'; } else { @@ -1083,7 +1083,7 @@ for ($i = 0; $i < $fcount; $i++) { $newtpl =& $tplfiles[$i]->xoopsClone(); $newtpl->setVar('tpl_id', 0); - $newtpl->setVar('tpl_tplset', $_POST['tplset']); + $newtpl->setVar('tpl_tplset', $tplset); $newtpl->setVar('tpl_lastmodified', time()); $newtpl->setVar('tpl_lastimported', 0); if (!$tpltpl_handler->insert($newtpl)) { @@ -1358,6 +1358,9 @@ xoops_cp_footer(); break; case 'importtpl_go': + if (!xoops_confirm_validate()) { + redirect_header('admin.php?fct=tplsets',3,'Ticket Error'); + } $tplset = $_POST['tplset']; $moddir = $_POST['moddir']; $id = !empty($_POST['id']) ? intval($_POST['id']) : 0; @@ -1374,10 +1377,10 @@ if (is_object($tplfile)) { switch ($tplfile->getVar('tpl_type')) { case 'module': - $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file'); + $filepath = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file'); break; case 'block': - $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file'); + $filepath = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file'); break; default: break; From onokazu ¡÷ users.sourceforge.jp Sat Jun 25 00:42:49 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 25 Jun 2005 00:42:49 +0900 Subject: [xoops-cvslog 198] CVS update: xoops2jp/html/include Message-ID: <20050624154249.52E042AC00F@users.sourceforge.jp> Index: xoops2jp/html/include/common.php diff -u xoops2jp/html/include/common.php:1.4.6.6 xoops2jp/html/include/common.php:1.4.6.6.2.1 --- xoops2jp/html/include/common.php:1.4.6.6 Mon May 30 21:49:40 2005 +++ xoops2jp/html/include/common.php Sat Jun 25 00:42:49 2005 @@ -1,5 +1,5 @@ assign(array('sitename' => htmlspecialchars($xoopsConfig['sitename']), 'xoops_themecss' => xoops_getcss(), 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/', 'lang_login' => _LOGIN, 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $xoopsConfig['closesite_text'])); + $xoopsTpl->assign(array('xoops_sitename' => htmlspecialchars($xoopsConfig['sitename']), 'xoops_themecss' => xoops_getcss(), 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/', 'lang_login' => _LOGIN, 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $xoopsConfig['closesite_text'])); $xoopsTpl->xoops_setCaching(1); $xoopsTpl->display('db:system_siteclosed.html'); exit(); From onokazu ¡÷ users.sourceforge.jp Sat Jun 25 20:31:21 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Sat, 25 Jun 2005 20:31:21 +0900 Subject: [xoops-cvslog 199] CVS update: xoops2jp/html/modules/xoopspartners Message-ID: <20050625113121.EBD5A2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopspartners/index.php diff -u xoops2jp/html/modules/xoopspartners/index.php:1.2.10.2 xoops2jp/html/modules/xoopspartners/index.php:1.2.10.3 --- xoops2jp/html/modules/xoopspartners/index.php:1.2.10.2 Sun Jun 19 01:03:51 2005 +++ xoops2jp/html/modules/xoopspartners/index.php Sat Jun 25 20:31:21 2005 @@ -1,5 +1,5 @@ assign("partner_join" ,""._MD_JOIN.""); @@ -48,7 +41,7 @@ $query = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("partners")." WHERE status=1"); list($numrows) = $xoopsDB->fetchrow($query); if( $xoopsModuleConfig['modlimit'] != 0 ) { - $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$init); + $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd'],$xoopsModuleConfig['modlimit'],$start); }else{ $partners = $part->getAllPartners("status = 1",true,$xoopsModuleConfig['modorder'],$xoopsModuleConfig['modorderd']); } From ryuji_amano ¡÷ users.sourceforge.jp Sun Jun 26 18:24:44 2005 From: ryuji_amano ¡÷ users.sourceforge.jp (Ryuji AMANO) Date: Sun, 26 Jun 2005 18:24:44 +0900 Subject: [xoops-cvslog 200] CVS update: xoops2jp/html/modules/news/language/japanese Message-ID: <20050626092444.0C56A2AC011@users.sourceforge.jp> Index: xoops2jp/html/modules/news/language/japanese/main.php diff -u xoops2jp/html/modules/news/language/japanese/main.php:1.1 xoops2jp/html/modules/news/language/japanese/main.php:1.1.10.1 --- xoops2jp/html/modules/news/language/japanese/main.php:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/news/language/japanese/main.php Sun Jun 26 18:24:43 2005 @@ -17,6 +17,8 @@ define("_NW_POST","Åê¹Æ¤¹¤ë"); define("_NW_GO","Á÷¿®"); define("_NW_THANKS","Åê¹Æ¤ò¼õÉÕ¤±¤Þ¤·¤¿¡£Åö¥µ¥¤¥È¥¹¥¿¥Ã¥Õ¤Ë¤è¤ë¾µÇ§¤ò·Ð¤¿¸å¤ËÀµ¼°·ÇºÜ¤È¤Ê¤ë¤³¤È¤ò¤´Î»¾µ¤¯¤À¤µ¤¤¡£"); //submission of news article +// Added 2.0.11jp +define("_NW_THANKS_AUTOAPPROVE", "Åê¹Æ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£"); define("_NW_NOTIFYSBJCT","NEWS for my site"); // Notification mail subject define("_NW_NOTIFYMSG","¿·µ¬¥Ë¥å¡¼¥¹¤ÎÅê¹Æ¤¬¤¢¤ê¤Þ¤·¤¿¡£"); // Notification mail message From minahito ¡÷ users.sourceforge.jp Mon Jun 27 23:43:30 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Mon, 27 Jun 2005 23:43:30 +0900 Subject: [xoops-cvslog 201] CVS update: xoops2jp/html/class Message-ID: <20050627144330.81B872AC017@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.2.6.1 xoops2jp/html/class/criteria.php:1.2.6.1.2.1 --- xoops2jp/html/class/criteria.php:1.2.6.1 Sat May 28 08:03:33 2005 +++ xoops2jp/html/class/criteria.php Mon Jun 27 23:43:30 2005 @@ -1,5 +1,5 @@ value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { + $value = "'".$this->value."'"; + } else { + if ( '' === ($value = trim($this->value)) ) { + return ''; + } + if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { + $value = "'$value'"; + } + } + $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; + if ( !empty($this->function) ) { + $clause = sprintf($this->function, $clause); + } + $clause .= " {$this->operator} $value"; + return $clause; + } +} ?> From minahito ¡÷ users.sourceforge.jp Mon Jun 27 23:45:31 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Mon, 27 Jun 2005 23:45:31 +0900 Subject: [xoops-cvslog 202] CVS update: xoops2jp/html/kernel Message-ID: <20050627144531.EEA512AC017@users.sourceforge.jp> Index: xoops2jp/html/kernel/member.php diff -u xoops2jp/html/kernel/member.php:1.2 xoops2jp/html/kernel/member.php:1.2.10.1 --- xoops2jp/html/kernel/member.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/kernel/member.php Mon Jun 27 23:45:31 2005 @@ -1,5 +1,5 @@ add(new Criteria('pass', md5($pwd))); $user =& $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { From minahito ¡÷ users.sourceforge.jp Tue Jun 28 00:27:39 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Tue, 28 Jun 2005 00:27:39 +0900 Subject: [xoops-cvslog 203] CVS update: xoops2jp/html/kernel Message-ID: <20050627152739.548162AC017@users.sourceforge.jp> Index: xoops2jp/html/kernel/member.php diff -u xoops2jp/html/kernel/member.php:1.2.10.1 xoops2jp/html/kernel/member.php:1.2.10.2 --- xoops2jp/html/kernel/member.php:1.2.10.1 Mon Jun 27 23:45:31 2005 +++ xoops2jp/html/kernel/member.php Tue Jun 28 00:27:39 2005 @@ -1,5 +1,5 @@ add(new Criteria('pass', md5($pwd))); + $criteria->add(new CriteriaString('pass', md5($pwd))); $user =& $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { return false; @@ -341,8 +341,8 @@ */ function &loginUserMd5($uname, $md5pwd) { - $criteria = new CriteriaCompo(new Criteria('uname', $uname)); - $criteria->add(new Criteria('pass', $md5pwd)); + $criteria = new CriteriaCompo(new CriteriaString('uname', $uname)); + $criteria->add(new CriteriaString('pass', $md5pwd)); $user =& $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { return false; From nobunobu ¡÷ users.sourceforge.jp Tue Jun 28 07:56:41 2005 From: nobunobu ¡÷ users.sourceforge.jp (NobuNobu) Date: Tue, 28 Jun 2005 07:56:41 +0900 Subject: [xoops-cvslog 204] CVS update: xoops2jp/html/modules/xoopsheadline/class Message-ID: <20050627225641.3A7892AC012@users.sourceforge.jp> Index: xoops2jp/html/modules/xoopsheadline/class/headlinerenderer.php diff -u xoops2jp/html/modules/xoopsheadline/class/headlinerenderer.php:1.2 xoops2jp/html/modules/xoopsheadline/class/headlinerenderer.php:1.2.10.1 --- xoops2jp/html/modules/xoopsheadline/class/headlinerenderer.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopsheadline/class/headlinerenderer.php Tue Jun 28 07:56:40 2005 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/system/admin/images/main.php diff -u xoops2jp/html/modules/system/admin/images/main.php:1.2.6.4 xoops2jp/html/modules/system/admin/images/main.php:1.2.6.4.2.1 --- xoops2jp/html/modules/system/admin/images/main.php:1.2.6.4 Mon May 16 20:15:26 2005 +++ xoops2jp/html/modules/system/admin/images/main.php Tue Jun 28 13:26:54 2005 @@ -1,5 +1,5 @@ insert($imagecategoryperm); unset($imagecategoryperm); } - if (!isset($writegroup)) { + if (!isset($_POST['writegroup'])) { $writegroup = array(); } else { $writegroup = $_POST['writegroup']; @@ -382,7 +382,7 @@ $criteria2->add(new Criteria('gperm_name', 'imgcat_read'), 'OR'); $criteria->add($criteria2); $imagecategoryperm_handler->deleteAll($criteria); - if (!isset($readgroup)) { + if (!isset($_POST['readgroup'])) { $readgroup = array(); } else { $readgroup = $_POST['readgroup']; @@ -399,7 +399,7 @@ $imagecategoryperm_handler->insert($imagecategoryperm); unset($imagecategoryperm); } - if (!isset($writegroup)) { + if (!isset($_POST['writegroup'])) { $writegroup = array(); } else { $writegroup = $_POST['writegroup']; From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:45:06 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:45:06 +0900 Subject: [xoops-cvslog 206] CVS update: xoops2jp/html/modules/newbb Message-ID: <20050628074506.D5AD62AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/delete.php diff -u xoops2jp/html/modules/newbb/delete.php:1.3 xoops2jp/html/modules/newbb/delete.php:1.4 --- xoops2jp/html/modules/newbb/delete.php:1.3 Sat Jun 11 11:32:46 2005 +++ xoops2jp/html/modules/newbb/delete.php Tue Jun 28 16:45:06 2005 @@ -1,5 +1,5 @@ Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.3 xoops2jp/html/class/criteria.php:1.4 --- xoops2jp/html/class/criteria.php:1.3 Sat Jun 11 11:32:38 2005 +++ xoops2jp/html/class/criteria.php Tue Jun 28 16:45:05 2005 @@ -1,381 +1,405 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // -// Modified by: Nathan Dial // -// Date: 20 March 2003 // -// Desc: added experimental LDAP filter generation code // -// also refactored to remove about 20 lines of redundant code. // -// ------------------------------------------------------------------------- // - -/** - * - * - * @package kernel - * @subpackage database - * - * @author Kazumi Ono - * @copyright copyright (c) 2000-2003 XOOPS.org - */ - -/** - * A criteria (grammar?) for a database query. - * - * Abstract base class should never be instantiated directly. - * - * @abstract - * - * @package kernel - * @subpackage database - * - * @author Kazumi Ono - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -class CriteriaElement -{ - /** - * Sort order - * @var string - */ - var $order = 'ASC'; - - /** - * @var string - */ - var $sort = ''; - - /** - * Number of records to retrieve - * @var int - */ - var $limit = 0; - - /** - * Offset of first record - * @var int - */ - var $start = 0; - - /** - * @var string - */ - var $groupby = ''; - - /** - * Constructor - **/ - function CriteriaElement() - { - - } - - /** - * Render the criteria element - */ - function render() - { - - } - - /**#@+ - * Accessor - */ - /** - * @param string $sort - */ - function setSort($sort) - { - $this->sort = $sort; - } - - /** - * @return string - */ - function getSort() - { - return $this->sort; - } - - /** - * @param string $order - */ - function setOrder($order) - { - if ('DESC' == strtoupper($order)) { - $this->order = 'DESC'; - } - } - - /** - * @return string - */ - function getOrder() - { - return $this->order; - } - - /** - * @param int $limit - */ - function setLimit($limit=0) - { - $this->limit = intval($limit); - } - - /** - * @return int - */ - function getLimit() - { - return $this->limit; - } - - /** - * @param int $start - */ - function setStart($start=0) - { - $this->start = intval($start); - } - - /** - * @return int - */ - function getStart() - { - return $this->start; - } - - /** - * @param string $group - */ - function setGroupby($group){ - $this->groupby = $group; - } - - /** - * @return string - */ - function getGroupby(){ - return ' GROUP BY '.$this->groupby; - } - /**#@-*/ -} - -/** - * Collection of multiple {@link CriteriaElement}s - * - * @package kernel - * @subpackage database - * - * @author Kazumi Ono - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -class CriteriaCompo extends CriteriaElement -{ - - /** - * The elements of the collection - * @var array Array of {@link CriteriaElement} objects - */ - var $criteriaElements = array(); - - /** - * Conditions - * @var array - */ - var $conditions = array(); - - /** - * Constructor - * - * @param object $ele - * @param string $condition - **/ - function CriteriaCompo($ele=null, $condition='AND') - { - if (isset($ele) && is_object($ele)) { - $this->add($ele, $condition); - } - } - - /** - * Add an element - * - * @param object &$criteriaElement - * @param string $condition - * - * @return object reference to this collection - **/ - function &add(&$criteriaElement, $condition='AND') - { - $this->criteriaElements[] =& $criteriaElement; - $this->conditions[] = $condition; - return $this; - } - - /** - * Make the criteria into a query string - * - * @return string - */ - function render() - { - $ret = ''; - $count = count($this->criteriaElements); - if ($count > 0) { - $ret = '('. $this->criteriaElements[0]->render(); - for ($i = 1; $i < $count; $i++) { - $ret .= ' '.$this->conditions[$i].' '.$this->criteriaElements[$i]->render(); - } - $ret .= ')'; - } - return $ret; - } - - /** - * Make the criteria into a SQL "WHERE" clause - * - * @return string - */ - function renderWhere() - { - $ret = $this->render(); - $ret = ($ret != '') ? 'WHERE ' . $ret : $ret; - return $ret; - } - - /** - * Generate an LDAP filter from criteria - * - * @return string - * @author Nathan Dial ndial ¡÷ trillion21.com - */ - function renderLdap(){ - $retval = ''; - $count = count($this->criteriaElements); - if ($count > 0) { - $retval = $this->criteriaElements[0]->renderLdap(); - for ($i = 1; $i < $count; $i++) { - $cond = $this->conditions[$i]; - if(strtoupper($cond) == 'AND'){ - $op = '&'; - } elseif (strtoupper($cond)=='OR'){ - $op = '|'; - } - $retval = "($op$retval" . $this->criteriaElements[$i]->renderLdap().")"; - } - } - return $retval; - } -} - - -/** - * A single criteria - * - * @package kernel - * @subpackage database - * - * @author Kazumi Ono - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -class Criteria extends CriteriaElement -{ - - /** - * @var string - */ - var $prefix; - var $function; - var $column; - var $operator; - var $value; - - /** - * Constructor - * - * @param string $column - * @param string $value - * @param string $operator - **/ - function Criteria($column, $value='', $operator='=', $prefix = '', $function = '') { - $this->prefix = $prefix; - $this->function = $function; - $this->column = $column; - $this->value = $value; - $this->operator = $operator; - } - - /** - * Make a sql condition string - * - * @return string - **/ - function render() { - if (is_numeric($this->value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { - $value = $this->value; - } else { - if ( '' === ($value = trim($this->value)) ) { - return ''; - } - if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { - $value = "'$value'"; - } - } - $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; - if ( !empty($this->function) ) { - $clause = sprintf($this->function, $clause); - } - $clause .= " {$this->operator} $value"; - return $clause; - } - - /** - * Generate an LDAP filter from criteria - * - * @return string - * @author Nathan Dial ndial ¡÷ trillion21.com - */ - function renderLdap(){ - $clause = "(" . $this->column . $this->operator . $this->value . ")"; - return $clause; - } - - /** - * Make a SQL "WHERE" clause - * - * @return string - */ - function renderWhere() { - $cond = $this->render(); - return empty($cond) ? '' : "WHERE $cond"; - } -} -?> + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // +// Modified by: Nathan Dial // +// Date: 20 March 2003 // +// Desc: added experimental LDAP filter generation code // +// also refactored to remove about 20 lines of redundant code. // +// ------------------------------------------------------------------------- // + +/** + * + * + * @package kernel + * @subpackage database + * + * @author Kazumi Ono + * @copyright copyright (c) 2000-2003 XOOPS.org + */ + +/** + * A criteria (grammar?) for a database query. + * + * Abstract base class should never be instantiated directly. + * + * @abstract + * + * @package kernel + * @subpackage database + * + * @author Kazumi Ono + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class CriteriaElement +{ + /** + * Sort order + * @var string + */ + var $order = 'ASC'; + + /** + * @var string + */ + var $sort = ''; + + /** + * Number of records to retrieve + * @var int + */ + var $limit = 0; + + /** + * Offset of first record + * @var int + */ + var $start = 0; + + /** + * @var string + */ + var $groupby = ''; + + /** + * Constructor + **/ + function CriteriaElement() + { + + } + + /** + * Render the criteria element + */ + function render() + { + + } + + /**#@+ + * Accessor + */ + /** + * @param string $sort + */ + function setSort($sort) + { + $this->sort = $sort; + } + + /** + * @return string + */ + function getSort() + { + return $this->sort; + } + + /** + * @param string $order + */ + function setOrder($order) + { + if ('DESC' == strtoupper($order)) { + $this->order = 'DESC'; + } + } + + /** + * @return string + */ + function getOrder() + { + return $this->order; + } + + /** + * @param int $limit + */ + function setLimit($limit=0) + { + $this->limit = intval($limit); + } + + /** + * @return int + */ + function getLimit() + { + return $this->limit; + } + + /** + * @param int $start + */ + function setStart($start=0) + { + $this->start = intval($start); + } + + /** + * @return int + */ + function getStart() + { + return $this->start; + } + + /** + * @param string $group + */ + function setGroupby($group){ + $this->groupby = $group; + } + + /** + * @return string + */ + function getGroupby(){ + return ' GROUP BY '.$this->groupby; + } + /**#@-*/ +} + +/** + * Collection of multiple {@link CriteriaElement}s + * + * @package kernel + * @subpackage database + * + * @author Kazumi Ono + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class CriteriaCompo extends CriteriaElement +{ + + /** + * The elements of the collection + * @var array Array of {@link CriteriaElement} objects + */ + var $criteriaElements = array(); + + /** + * Conditions + * @var array + */ + var $conditions = array(); + + /** + * Constructor + * + * @param object $ele + * @param string $condition + **/ + function CriteriaCompo($ele=null, $condition='AND') + { + if (isset($ele) && is_object($ele)) { + $this->add($ele, $condition); + } + } + + /** + * Add an element + * + * @param object &$criteriaElement + * @param string $condition + * + * @return object reference to this collection + **/ + function &add(&$criteriaElement, $condition='AND') + { + $this->criteriaElements[] =& $criteriaElement; + $this->conditions[] = $condition; + return $this; + } + + /** + * Make the criteria into a query string + * + * @return string + */ + function render() + { + $ret = ''; + $count = count($this->criteriaElements); + if ($count > 0) { + $ret = '('. $this->criteriaElements[0]->render(); + for ($i = 1; $i < $count; $i++) { + $ret .= ' '.$this->conditions[$i].' '.$this->criteriaElements[$i]->render(); + } + $ret .= ')'; + } + return $ret; + } + + /** + * Make the criteria into a SQL "WHERE" clause + * + * @return string + */ + function renderWhere() + { + $ret = $this->render(); + $ret = ($ret != '') ? 'WHERE ' . $ret : $ret; + return $ret; + } + + /** + * Generate an LDAP filter from criteria + * + * @return string + * @author Nathan Dial ndial ¡÷ trillion21.com + */ + function renderLdap(){ + $retval = ''; + $count = count($this->criteriaElements); + if ($count > 0) { + $retval = $this->criteriaElements[0]->renderLdap(); + for ($i = 1; $i < $count; $i++) { + $cond = $this->conditions[$i]; + if(strtoupper($cond) == 'AND'){ + $op = '&'; + } elseif (strtoupper($cond)=='OR'){ + $op = '|'; + } + $retval = "($op$retval" . $this->criteriaElements[$i]->renderLdap().")"; + } + } + return $retval; + } +} + + +/** + * A single criteria + * + * @package kernel + * @subpackage database + * + * @author Kazumi Ono + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class Criteria extends CriteriaElement +{ + + /** + * @var string + */ + var $prefix; + var $function; + var $column; + var $operator; + var $value; + + /** + * Constructor + * + * @param string $column + * @param string $value + * @param string $operator + **/ + function Criteria($column, $value='', $operator='=', $prefix = '', $function = '') { + $this->prefix = $prefix; + $this->function = $function; + $this->column = $column; + $this->value = $value; + $this->operator = $operator; + } + + /** + * Make a sql condition string + * + * @return string + **/ + function render() { + if (is_numeric($this->value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { + $value = $this->value; + } else { + if ( '' === ($value = trim($this->value)) ) { + return ''; + } + if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { + $value = "'$value'"; + } + } + $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; + if ( !empty($this->function) ) { + $clause = sprintf($this->function, $clause); + } + $clause .= " {$this->operator} $value"; + return $clause; + } + + /** + * Generate an LDAP filter from criteria + * + * @return string + * @author Nathan Dial ndial ¡÷ trillion21.com + */ + function renderLdap(){ + $clause = "(" . $this->column . $this->operator . $this->value . ")"; + return $clause; + } + + /** + * Make a SQL "WHERE" clause + * + * @return string + */ + function renderWhere() { + $cond = $this->render(); + return empty($cond) ? '' : "WHERE $cond"; + } +} + +/** + * @Deprecated + */ +class CriteriaString extends Criteria { + function render() { + if (is_numeric($this->value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { + $value = "'".$this->value."'"; + } else { + if ( '' === ($value = trim($this->value)) ) { + return ''; + } + if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { + $value = "'$value'"; + } + } + $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; + if ( !empty($this->function) ) { + $clause = sprintf($this->function, $clause); + } + $clause .= " {$this->operator} $value"; + return $clause; + } +} +?> From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:45:07 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:45:07 +0900 Subject: [xoops-cvslog 208] CVS update: xoops2jp/html/modules/news/include Message-ID: <20050628074507.287132AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/news/include/storyform.inc.php diff -u xoops2jp/html/modules/news/include/storyform.inc.php:1.3 xoops2jp/html/modules/news/include/storyform.inc.php:1.4 --- xoops2jp/html/modules/news/include/storyform.inc.php:1.3 Sat Jun 11 11:32:48 2005 +++ xoops2jp/html/modules/news/include/storyform.inc.php Tue Jun 28 16:45:06 2005 @@ -1,5 +1,5 @@ addElement(new XoopsFormDhtmlTextArea(_NW_THESCOOP, 'message', $message, 15, 60), true); $option_tray = new XoopsFormElementTray(_OPTIONS,'
    '); if ($xoopsUser) { - if ($xoopsConfig['anonpost'] == 1) { + if ($xoopsModuleConfig['anonpost'] == 1) { $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname); $noname_checkbox->addOption(1, _POSTANON); $option_tray->addElement($noname_checkbox); From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:45:06 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:45:06 +0900 Subject: [xoops-cvslog 209] CVS update: xoops2jp/html/kernel Message-ID: <20050628074506.8CD262AC01B@users.sourceforge.jp> Index: xoops2jp/html/kernel/member.php diff -u xoops2jp/html/kernel/member.php:1.2 xoops2jp/html/kernel/member.php:1.3 --- xoops2jp/html/kernel/member.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/kernel/member.php Tue Jun 28 16:45:06 2005 @@ -1,418 +1,418 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // - -if (!defined('XOOPS_ROOT_PATH')) { - exit(); -} -require_once XOOPS_ROOT_PATH.'/kernel/user.php'; -require_once XOOPS_ROOT_PATH.'/kernel/group.php'; - -/** -* XOOPS member handler class. -* This class provides simple interface (a facade class) for handling groups/users/ -* membership data. -* -* -* @author Kazumi Ono -* @copyright copyright (c) 2000-2003 XOOPS.org -* @package kernel -*/ - -class XoopsMemberHandler{ - - /**#@+ - * holds reference to group handler(DAO) class - * @access private - */ - var $_gHandler; - - /** - * holds reference to user handler(DAO) class - */ - var $_uHandler; - - /** - * holds reference to membership handler(DAO) class - */ - var $_mHandler; - - /** - * holds temporary user objects - */ - var $_members = array(); - /**#@-*/ - - /** - * constructor - * - */ - function XoopsMemberHandler(&$db) - { - $this->_gHandler = new XoopsGroupHandler($db); - $this->_uHandler = new XoopsUserHandler($db); - $this->_mHandler = new XoopsMembershipHandler($db); - } - - /** - * create a new group - * - * @return object XoopsGroup reference to the new group - */ - function &createGroup() - { - return $this->_gHandler->create(); - } - - /** - * create a new user - * - * @return object XoopsUser reference to the new user - */ - function &createUser() - { - return $this->_uHandler->create(); - } - - /** - * retrieve a group - * - * @param int $id ID for the group - * @return object XoopsGroup reference to the group - */ - function getGroup($id) - { - return $this->_gHandler->get($id); - } - - /** - * retrieve a user - * - * @param int $id ID for the user - * @return object XoopsUser reference to the user - */ - function &getUser($id) - { - if (!isset($this->_members[$id])) { - $this->_members[$id] =& $this->_uHandler->get($id); - } - return $this->_members[$id]; - } - - /** - * delete a group - * - * @param object $group reference to the group to delete - * @return bool FALSE if failed - */ - function deleteGroup(&$group) - { - $this->_gHandler->delete($group); - $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid'))); - return true; - } - - /** - * delete a user - * - * @param object $user reference to the user to delete - * @return bool FALSE if failed - */ - function deleteUser(&$user) - { - $this->_uHandler->delete($user); - $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid'))); - return true; - } - - /** - * insert a group into the database - * - * @param object $group reference to the group to insert - * @return bool TRUE if already in database and unchanged - * FALSE on failure - */ - function insertGroup(&$group) - { - return $this->_gHandler->insert($group); - } - - /** - * insert a user into the database - * - * @param object $user reference to the user to insert - * @return bool TRUE if already in database and unchanged - * FALSE on failure - */ - function insertUser(&$user, $force = false) - { - return $this->_uHandler->insert($user, $force); - } - - /** - * retrieve groups from the database - * - * @param object $criteria {@link CriteriaElement} - * @param bool $id_as_key use the group's ID as key for the array? - * @return array array of {@link XoopsGroup} objects - */ - function getGroups($criteria = null, $id_as_key = false) - { - return $this->_gHandler->getObjects($criteria, $id_as_key); - } - - /** - * retrieve users from the database - * - * @param object $criteria {@link CriteriaElement} - * @param bool $id_as_key use the group's ID as key for the array? - * @return array array of {@link XoopsUser} objects - */ - function getUsers($criteria = null, $id_as_key = false) - { - return $this->_uHandler->getObjects($criteria, $id_as_key); - } - - /** - * get a list of groupnames and their IDs - * - * @param object $criteria {@link CriteriaElement} object - * @return array associative array of group-IDs and names - */ - function &getGroupList($criteria = null) - { - $groups =& $this->_gHandler->getObjects($criteria, true); - $ret = array(); - foreach (array_keys($groups) as $i) { - $ret[$i] = $groups[$i]->getVar('name'); - } - return $ret; - } - - /** - * get a list of usernames and their IDs - * - * @param object $criteria {@link CriteriaElement} object - * @return array associative array of user-IDs and names - */ - function getUserList($criteria = null) - { - $users =& $this->_uHandler->getObjects($criteria, true); - $ret = array(); - foreach (array_keys($users) as $i) { - $ret[$i] = $users[$i]->getVar('uname'); - } - return $ret; - } - - /** - * add a user to a group - * - * @param int $group_id ID of the group - * @param int $user_id ID of the user - * @return object XoopsMembership - */ - function addUserToGroup($group_id, $user_id) - { - $mship =& $this->_mHandler->create(); - $mship->setVar('groupid', $group_id); - $mship->setVar('uid', $user_id); - return $this->_mHandler->insert($mship); - } - - /** - * remove a list of users from a group - * - * @param int $group_id ID of the group - * @param array $user_ids array of user-IDs - * @return bool success? - */ - function removeUsersFromGroup($group_id, $user_ids = array()) - { - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('groupid', $group_id)); - $criteria2 = new CriteriaCompo(); - foreach ($user_ids as $uid) { - $criteria2->add(new Criteria('uid', $uid), 'OR'); - } - $criteria->add($criteria2); - return $this->_mHandler->deleteAll($criteria); - } - - /** - * get a list of users belonging to a group - * - * @param int $group_id ID of the group - * @param bool $asobject return the users as objects? - * @param int $limit number of users to return - * @param int $start index of the first user to return - * @return array Array of {@link XoopsUser} objects (if $asobject is TRUE) - * or of associative arrays matching the record structure in the database. - */ - function getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0) - { - $user_ids =& $this->_mHandler->getUsersByGroup($group_id, $limit, $start); - if (!$asobject) { - return $user_ids; - } else { - $ret = array(); - foreach ($user_ids as $u_id) { - $user =& $this->getUser($u_id); - if (is_object($user)) { - $ret[] =& $user; - } - unset($user); - } - return $ret; - } - } - - /** - * get a list of groups that a user is member of - * - * @param int $user_id ID of the user - * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays? - * @return array array of objects or arrays - */ - function getGroupsByUser($user_id, $asobject = false) - { - $group_ids =& $this->_mHandler->getGroupsByUser($user_id); - if (!$asobject) { - return $group_ids; - } else { - foreach ($group_ids as $g_id) { - $ret[] =& $this->getGroup($g_id); - } - return $ret; - } - } - - /** - * log in a user - * - * @param string $uname username as entered in the login form - * @param string $pwd password entered in the login form - * @return object XoopsUser reference to the logged in user. FALSE if failed to log in - */ - function &loginUser($uname, $pwd) - { - $criteria = new CriteriaCompo(new Criteria('uname', $uname)); - $criteria->add(new Criteria('pass', md5($pwd))); - $user =& $this->_uHandler->getObjects($criteria, false); - if (!$user || count($user) != 1) { - return false; - } - return $user[0]; - } - - /** - * logs in a user with an nd5 encrypted password - * - * @param string $uname username - * @param string $md5pwd password encrypted with md5 - * @return object XoopsUser reference to the logged in user. FALSE if failed to log in - */ - function &loginUserMd5($uname, $md5pwd) - { - $criteria = new CriteriaCompo(new Criteria('uname', $uname)); - $criteria->add(new Criteria('pass', $md5pwd)); - $user =& $this->_uHandler->getObjects($criteria, false); - if (!$user || count($user) != 1) { - return false; - } - return $user[0]; - } - - /** - * count users matching certain conditions - * - * @param object $criteria {@link CriteriaElement} object - * @return int - */ - function getUserCount($criteria = null) - { - return $this->_uHandler->getCount($criteria); - } - - /** - * count users belonging to a group - * - * @param int $group_id ID of the group - * @return int - */ - function getUserCountByGroup($group_id) - { - return $this->_mHandler->getCount(new Criteria('groupid', $group_id)); - } - - /** - * updates a single field in a users record - * - * @param object $user reference to the {@link XoopsUser} object - * @param string $fieldName name of the field to update - * @param string $fieldValue updated value for the field - * @return bool TRUE if success or unchanged, FALSE on failure - */ - function updateUserByField(&$user, $fieldName, $fieldValue) - { - $user->setVar($fieldName, $fieldValue); - return $this->insertUser($user); - } - - /** - * updates a single field in a users record - * - * @param string $fieldName name of the field to update - * @param string $fieldValue updated value for the field - * @param object $criteria {@link CriteriaElement} object - * @return bool TRUE if success or unchanged, FALSE on failure - */ - function updateUsersByField($fieldName, $fieldValue, $criteria = null) - { - return $this->_uHandler->updateAll($fieldName, $fieldValue, $criteria); - } - - /** - * activate a user - * - * @param object $user reference to the {@link XoopsUser} object - * @return bool successful? - */ - function activateUser(&$user) - { - if ($user->getVar('level') != 0) { - return true; - } - $user->setVar('level', 1); - return $this->_uHandler->insert($user, true); - } - -} -?> + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} +require_once XOOPS_ROOT_PATH.'/kernel/user.php'; +require_once XOOPS_ROOT_PATH.'/kernel/group.php'; + +/** +* XOOPS member handler class. +* This class provides simple interface (a facade class) for handling groups/users/ +* membership data. +* +* +* @author Kazumi Ono +* @copyright copyright (c) 2000-2003 XOOPS.org +* @package kernel +*/ + +class XoopsMemberHandler{ + + /**#@+ + * holds reference to group handler(DAO) class + * @access private + */ + var $_gHandler; + + /** + * holds reference to user handler(DAO) class + */ + var $_uHandler; + + /** + * holds reference to membership handler(DAO) class + */ + var $_mHandler; + + /** + * holds temporary user objects + */ + var $_members = array(); + /**#@-*/ + + /** + * constructor + * + */ + function XoopsMemberHandler(&$db) + { + $this->_gHandler = new XoopsGroupHandler($db); + $this->_uHandler = new XoopsUserHandler($db); + $this->_mHandler = new XoopsMembershipHandler($db); + } + + /** + * create a new group + * + * @return object XoopsGroup reference to the new group + */ + function &createGroup() + { + return $this->_gHandler->create(); + } + + /** + * create a new user + * + * @return object XoopsUser reference to the new user + */ + function &createUser() + { + return $this->_uHandler->create(); + } + + /** + * retrieve a group + * + * @param int $id ID for the group + * @return object XoopsGroup reference to the group + */ + function getGroup($id) + { + return $this->_gHandler->get($id); + } + + /** + * retrieve a user + * + * @param int $id ID for the user + * @return object XoopsUser reference to the user + */ + function &getUser($id) + { + if (!isset($this->_members[$id])) { + $this->_members[$id] =& $this->_uHandler->get($id); + } + return $this->_members[$id]; + } + + /** + * delete a group + * + * @param object $group reference to the group to delete + * @return bool FALSE if failed + */ + function deleteGroup(&$group) + { + $this->_gHandler->delete($group); + $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid'))); + return true; + } + + /** + * delete a user + * + * @param object $user reference to the user to delete + * @return bool FALSE if failed + */ + function deleteUser(&$user) + { + $this->_uHandler->delete($user); + $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid'))); + return true; + } + + /** + * insert a group into the database + * + * @param object $group reference to the group to insert + * @return bool TRUE if already in database and unchanged + * FALSE on failure + */ + function insertGroup(&$group) + { + return $this->_gHandler->insert($group); + } + + /** + * insert a user into the database + * + * @param object $user reference to the user to insert + * @return bool TRUE if already in database and unchanged + * FALSE on failure + */ + function insertUser(&$user, $force = false) + { + return $this->_uHandler->insert($user, $force); + } + + /** + * retrieve groups from the database + * + * @param object $criteria {@link CriteriaElement} + * @param bool $id_as_key use the group's ID as key for the array? + * @return array array of {@link XoopsGroup} objects + */ + function getGroups($criteria = null, $id_as_key = false) + { + return $this->_gHandler->getObjects($criteria, $id_as_key); + } + + /** + * retrieve users from the database + * + * @param object $criteria {@link CriteriaElement} + * @param bool $id_as_key use the group's ID as key for the array? + * @return array array of {@link XoopsUser} objects + */ + function getUsers($criteria = null, $id_as_key = false) + { + return $this->_uHandler->getObjects($criteria, $id_as_key); + } + + /** + * get a list of groupnames and their IDs + * + * @param object $criteria {@link CriteriaElement} object + * @return array associative array of group-IDs and names + */ + function &getGroupList($criteria = null) + { + $groups =& $this->_gHandler->getObjects($criteria, true); + $ret = array(); + foreach (array_keys($groups) as $i) { + $ret[$i] = $groups[$i]->getVar('name'); + } + return $ret; + } + + /** + * get a list of usernames and their IDs + * + * @param object $criteria {@link CriteriaElement} object + * @return array associative array of user-IDs and names + */ + function getUserList($criteria = null) + { + $users =& $this->_uHandler->getObjects($criteria, true); + $ret = array(); + foreach (array_keys($users) as $i) { + $ret[$i] = $users[$i]->getVar('uname'); + } + return $ret; + } + + /** + * add a user to a group + * + * @param int $group_id ID of the group + * @param int $user_id ID of the user + * @return object XoopsMembership + */ + function addUserToGroup($group_id, $user_id) + { + $mship =& $this->_mHandler->create(); + $mship->setVar('groupid', $group_id); + $mship->setVar('uid', $user_id); + return $this->_mHandler->insert($mship); + } + + /** + * remove a list of users from a group + * + * @param int $group_id ID of the group + * @param array $user_ids array of user-IDs + * @return bool success? + */ + function removeUsersFromGroup($group_id, $user_ids = array()) + { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('groupid', $group_id)); + $criteria2 = new CriteriaCompo(); + foreach ($user_ids as $uid) { + $criteria2->add(new Criteria('uid', $uid), 'OR'); + } + $criteria->add($criteria2); + return $this->_mHandler->deleteAll($criteria); + } + + /** + * get a list of users belonging to a group + * + * @param int $group_id ID of the group + * @param bool $asobject return the users as objects? + * @param int $limit number of users to return + * @param int $start index of the first user to return + * @return array Array of {@link XoopsUser} objects (if $asobject is TRUE) + * or of associative arrays matching the record structure in the database. + */ + function getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0) + { + $user_ids =& $this->_mHandler->getUsersByGroup($group_id, $limit, $start); + if (!$asobject) { + return $user_ids; + } else { + $ret = array(); + foreach ($user_ids as $u_id) { + $user =& $this->getUser($u_id); + if (is_object($user)) { + $ret[] =& $user; + } + unset($user); + } + return $ret; + } + } + + /** + * get a list of groups that a user is member of + * + * @param int $user_id ID of the user + * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays? + * @return array array of objects or arrays + */ + function getGroupsByUser($user_id, $asobject = false) + { + $group_ids =& $this->_mHandler->getGroupsByUser($user_id); + if (!$asobject) { + return $group_ids; + } else { + foreach ($group_ids as $g_id) { + $ret[] =& $this->getGroup($g_id); + } + return $ret; + } + } + + /** + * log in a user + * + * @param string $uname username as entered in the login form + * @param string $pwd password entered in the login form + * @return object XoopsUser reference to the logged in user. FALSE if failed to log in + */ + function &loginUser($uname, $pwd) + { + $criteria = new CriteriaCompo(new CriteriaString('uname', $uname)); + $criteria->add(new CriteriaString('pass', md5($pwd))); + $user =& $this->_uHandler->getObjects($criteria, false); + if (!$user || count($user) != 1) { + return false; + } + return $user[0]; + } + + /** + * logs in a user with an nd5 encrypted password + * + * @param string $uname username + * @param string $md5pwd password encrypted with md5 + * @return object XoopsUser reference to the logged in user. FALSE if failed to log in + */ + function &loginUserMd5($uname, $md5pwd) + { + $criteria = new CriteriaCompo(new CriteriaString('uname', $uname)); + $criteria->add(new CriteriaString('pass', $md5pwd)); + $user =& $this->_uHandler->getObjects($criteria, false); + if (!$user || count($user) != 1) { + return false; + } + return $user[0]; + } + + /** + * count users matching certain conditions + * + * @param object $criteria {@link CriteriaElement} object + * @return int + */ + function getUserCount($criteria = null) + { + return $this->_uHandler->getCount($criteria); + } + + /** + * count users belonging to a group + * + * @param int $group_id ID of the group + * @return int + */ + function getUserCountByGroup($group_id) + { + return $this->_mHandler->getCount(new Criteria('groupid', $group_id)); + } + + /** + * updates a single field in a users record + * + * @param object $user reference to the {@link XoopsUser} object + * @param string $fieldName name of the field to update + * @param string $fieldValue updated value for the field + * @return bool TRUE if success or unchanged, FALSE on failure + */ + function updateUserByField(&$user, $fieldName, $fieldValue) + { + $user->setVar($fieldName, $fieldValue); + return $this->insertUser($user); + } + + /** + * updates a single field in a users record + * + * @param string $fieldName name of the field to update + * @param string $fieldValue updated value for the field + * @param object $criteria {@link CriteriaElement} object + * @return bool TRUE if success or unchanged, FALSE on failure + */ + function updateUsersByField($fieldName, $fieldValue, $criteria = null) + { + return $this->_uHandler->updateAll($fieldName, $fieldValue, $criteria); + } + + /** + * activate a user + * + * @param object $user reference to the {@link XoopsUser} object + * @return bool successful? + */ + function activateUser(&$user) + { + if ($user->getVar('level') != 0) { + return true; + } + $user->setVar('level', 1); + return $this->_uHandler->insert($user, true); + } + +} +?> From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:45:07 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:45:07 +0900 Subject: [xoops-cvslog 210] CVS update: xoops2jp/html/modules/news Message-ID: <20050628074507.6CA2C2AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/news/submit.php diff -u xoops2jp/html/modules/news/submit.php:1.3 xoops2jp/html/modules/news/submit.php:1.4 --- xoops2jp/html/modules/news/submit.php:1.3 Sat Jun 11 11:32:47 2005 +++ xoops2jp/html/modules/news/submit.php Tue Jun 28 16:45:07 2005 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { $nohtml_db = empty($_POST['nohtml']) ? 0 : 1; } + if (( $xoopsModuleConfig['anonpost'] == 1 ) && $noname) { + $uid = 0; + } } else { if ( $xoopsModuleConfig['anonpost'] == 1 ) { $uid = 0; From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:45:07 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:45:07 +0900 Subject: [xoops-cvslog 211] CVS update: xoops2jp/html/modules/sections/admin Message-ID: <20050628074507.AD45F2AC015@users.sourceforge.jp> Index: xoops2jp/html/modules/sections/admin/index.php diff -u xoops2jp/html/modules/sections/admin/index.php:1.3 xoops2jp/html/modules/sections/admin/index.php:1.4 --- xoops2jp/html/modules/sections/admin/index.php:1.3 Sat Jun 11 11:32:49 2005 +++ xoops2jp/html/modules/sections/admin/index.php Tue Jun 28 16:45:07 2005 @@ -1,5 +1,5 @@ query("select artid from ".$xoopsDB->prefix("seccont")." where secid=$secid"); $number = $xoopsDB->getRowsNum($result2); ?> -

    "; ?> +

    "; ?>


    Index: xoops2jp/html/modules/system/admin/users/main.php diff -u xoops2jp/html/modules/system/admin/users/main.php:1.3 xoops2jp/html/modules/system/admin/users/main.php:1.4 --- xoops2jp/html/modules/system/admin/users/main.php:1.3 Sat Jun 11 11:32:53 2005 +++ xoops2jp/html/modules/system/admin/users/main.php Tue Jun 28 16:45:07 2005 @@ -1,5 +1,5 @@ stripSlashesGPC(trim($_POST['username'])) : ''; $email = !empty($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : ''; - $password = !empty($_POST['password']) ? $myts->stripSlashesGPC(trim($_POST['password'])) : ''; + $password = !empty($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : ''; if ($username == '' || $email == '' || $password == '') { $adduser_errormsg = _AM_YMCACF; } else { @@ -257,14 +257,14 @@ $newuser->setVar("user_yim", $_POST['user_yim']); $newuser->setVar("user_msnm", $_POST['user_msnm']); if ($_POST['pass2'] != "") { - if ( $_POST['password'] != $_POST['pass2'] ) { + if ( $_POST['pass'] != $_POST['pass2'] ) { xoops_cp_header(); echo " "._AM_STNPDNM.""; xoops_cp_footer(); exit(); } - $newuser->setVar("pass", md5($_POST['password'])); + $newuser->setVar("pass", md5($_POST['pass'])); } $newuser->setVar("timezone_offset", $_POST['timezone_offset']); $newuser->setVar("uorder", $_POST['uorder']); From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:46:32 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:46:32 +0900 Subject: [xoops-cvslog 213] CVS update: xoops2jp/html/include Message-ID: <20050628074632.27C3C2AC01B@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.5 xoops2jp/html/include/version.php:1.6 --- xoops2jp/html/include/version.php:1.5 Sat Jun 11 11:32:40 2005 +++ xoops2jp/html/include/version.php Tue Jun 28 16:46:31 2005 @@ -1,4 +1,4 @@ \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Tue Jun 28 16:56:51 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Tue, 28 Jun 2005 16:56:51 +0900 Subject: [xoops-cvslog 214] CVS update: xoops2jp/docs Message-ID: <20050628075651.008852AC015@users.sourceforge.jp> Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.3 xoops2jp/docs/CHANGES.txt:1.4 --- xoops2jp/docs/CHANGES.txt:1.3 Sat Jun 11 11:32:36 2005 +++ xoops2jp/docs/CHANGES.txt Tue Jun 28 16:56:51 2005 @@ -1,6 +1,16 @@ -XOOPS v2 Changelog + XOOPS v2 Changelog ============================ +2005/ 6/28: Version 2.0.10.1 JP +=============================== +- Added security patch to prevent login spoofing +- Added several patches to fix some important bugs present in 2.0.10 JP + - Fixed bug not being able to add user from user admin page + - Fixed fatal error in admin page of sections module + - Fixed bug not being able to delete forum posts in newbb module + - Fixed typo: $xoopsConfig -> $xoopsModuleConfig in news module + + 2005/ 6/10: Version 2.0.10 JP =============================== - Added fix for better module version number handling From minahito ¡÷ users.sourceforge.jp Tue Jun 28 20:09:57 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Tue, 28 Jun 2005 20:09:57 +0900 Subject: [xoops-cvslog 215] CVS update: xoops2jp/html/class Message-ID: <20050628110957.BA77E2AC015@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.2.6.1.2.1 xoops2jp/html/class/criteria.php:1.2.6.1.2.2 --- xoops2jp/html/class/criteria.php:1.2.6.1.2.1 Mon Jun 27 23:43:30 2005 +++ xoops2jp/html/class/criteria.php Tue Jun 28 20:09:57 2005 @@ -1,5 +1,5 @@ value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { + if (in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { $value = $this->value; } else { if ( '' === ($value = trim($this->value)) ) { @@ -379,27 +379,4 @@ } } -/** - * @Deprecated - */ -class CriteriaString extends Criteria { - function render() { - if (is_numeric($this->value) || in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { - $value = "'".$this->value."'"; - } else { - if ( '' === ($value = trim($this->value)) ) { - return ''; - } - if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { - $value = "'$value'"; - } - } - $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; - if ( !empty($this->function) ) { - $clause = sprintf($this->function, $clause); - } - $clause .= " {$this->operator} $value"; - return $clause; - } -} ?> From minahito ¡÷ users.sourceforge.jp Tue Jun 28 20:11:20 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Tue, 28 Jun 2005 20:11:20 +0900 Subject: [xoops-cvslog 216] CVS update: xoops2jp/html/kernel Message-ID: <20050628111120.3755D2AC015@users.sourceforge.jp> Index: xoops2jp/html/kernel/member.php diff -u xoops2jp/html/kernel/member.php:1.2.10.2 xoops2jp/html/kernel/member.php:1.2.10.3 --- xoops2jp/html/kernel/member.php:1.2.10.2 Tue Jun 28 00:27:39 2005 +++ xoops2jp/html/kernel/member.php Tue Jun 28 20:11:19 2005 @@ -1,5 +1,5 @@ add(new CriteriaString('pass', md5($pwd))); + $criteria = new CriteriaCompo(new Criteria('uname', $uname)); + $criteria->add(new Criteria('pass', md5($pwd))); $user =& $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { return false; @@ -341,8 +341,8 @@ */ function &loginUserMd5($uname, $md5pwd) { - $criteria = new CriteriaCompo(new CriteriaString('uname', $uname)); - $criteria->add(new CriteriaString('pass', $md5pwd)); + $criteria = new CriteriaCompo(new Criteria('uname', $uname)); + $criteria->add(new Criteria('pass', $md5pwd)); $user =& $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { return false; From onokazu ¡÷ users.sourceforge.jp Wed Jun 29 14:49:46 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 29 Jun 2005 14:49:46 +0900 Subject: [xoops-cvslog 217] CVS update: xoops2jp/html/include Message-ID: <20050629054946.B2DEE2AC00E@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.4.6.4.2.2 xoops2jp/html/include/version.php:1.4.6.4.2.3 --- xoops2jp/html/include/version.php:1.4.6.4.2.2 Sat Jun 11 11:53:10 2005 +++ xoops2jp/html/include/version.php Wed Jun 29 14:49:46 2005 @@ -1,4 +1,4 @@ \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Wed Jun 29 15:14:00 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Wed, 29 Jun 2005 15:14:00 +0900 Subject: [xoops-cvslog 218] CVS update: xoops2jp/html/modules/news/language/english Message-ID: <20050629061400.75C332AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/news/language/english/main.php diff -u xoops2jp/html/modules/news/language/english/main.php:1.2 xoops2jp/html/modules/news/language/english/main.php:1.2.10.1 --- xoops2jp/html/modules/news/language/english/main.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/news/language/english/main.php Wed Jun 29 15:14:00 2005 @@ -1,6 +1,6 @@ Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.2.6.6.2.3 xoops2jp/docs/CHANGES.txt:1.2.6.6.2.4 --- xoops2jp/docs/CHANGES.txt:1.2.6.6.2.3 Wed Jun 15 23:33:10 2005 +++ xoops2jp/docs/CHANGES.txt Wed Jun 29 15:51:07 2005 @@ -1,6 +1,32 @@ XOOPS v2 Changelog ============================ +2005/ 6/29: Version 2.0.11 JP RC1 +=============================== +- Merged CriteriaString with the original Cirteria class +- Fixed bug in image admin section when register_globals off. +- Code cleanup in headlinerender.php +- Added missing language constant in the news module +- Fixed bug in xoopspartners admin section when register_globals off. +- Fixed smarty variable typo in common.php +- Fixed invalid template path in template set admin section +- Fixed comment delete button bug +- Changed & to & in some files +- Added missing parameter to redirect URL of newbb/mydownload modules +- Fixed invalid cache header in footer.php +- Fixed bug not being able to send mails when over 200 registered users + + +2005/ 6/28: Version 2.0.10.1 JP +=============================== +- Added security patch to prevent login spoofing +- Added several patches to fix some important bugs present in 2.0.10 JP + - Fixed bug not being able to add user from user admin page + - Fixed fatal error in admin page of sections module + - Fixed bug not being able to delete forum posts in newbb module + - Fixed typo: $xoopsConfig -> $xoopsModuleConfig in news module + + 2005/ 6/15: Version 2.0.11 JP Beta =============================== - Fixed parse error in the sections module From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 00:16:19 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 00:16:19 +0900 Subject: [xoops-cvslog 220] CVS update: xoops2jp/html/include Message-ID: <20050629151619.79D0B2AC00E@users.sourceforge.jp> Index: xoops2jp/html/include/comment_form.php diff -u xoops2jp/html/include/comment_form.php:1.2.6.2.2.1 xoops2jp/html/include/comment_form.php:1.2.6.2.2.2 --- xoops2jp/html/include/comment_form.php:1.2.6.2.2.1 Sun Jun 19 01:26:12 2005 +++ xoops2jp/html/include/comment_form.php Thu Jun 30 00:16:19 2005 @@ -1,5 +1,5 @@ addElement(new XoopsFormHidden($extra_param, $hidden_value)); + $cform->addElement(new XoopsFormHidden($extra_param, htmlspecialchars($hidden_value, ENT_QUOTES))); } } } From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 01:40:23 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 01:40:23 +0900 Subject: [xoops-cvslog 221] CVS update: xoops2jp/html/class Message-ID: <20050629164023.EE6F82AC00E@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.2.6.1.2.2 xoops2jp/html/class/criteria.php:1.2.6.1.2.3 --- xoops2jp/html/class/criteria.php:1.2.6.1.2.2 Tue Jun 28 20:09:57 2005 +++ xoops2jp/html/class/criteria.php Thu Jun 30 01:40:23 2005 @@ -1,5 +1,5 @@ quoteString($value); } } $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 01:40:24 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 01:40:24 +0900 Subject: [xoops-cvslog 222] CVS update: xoops2jp/html/include Message-ID: <20050629164024.3BB892AC014@users.sourceforge.jp> Index: xoops2jp/html/include/checklogin.php diff -u xoops2jp/html/include/checklogin.php:1.2.6.1 xoops2jp/html/include/checklogin.php:1.2.6.1.2.1 --- xoops2jp/html/include/checklogin.php:1.2.6.1 Thu Mar 31 00:49:04 2005 +++ xoops2jp/html/include/checklogin.php Thu Jun 30 01:40:23 2005 @@ -1,5 +1,5 @@ stripSlashesGPC(trim($_POST['uname'])); +$pass = !isset($_POST['pass']) ? '' : $myts->stripSlashesGPC(trim($_POST['pass'])); if ($uname == '' || $pass == '') { redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN); exit(); } $member_handler =& xoops_gethandler('member'); -$myts =& MyTextsanitizer::getInstance(); -$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass))); +$user =& $member_handler->loginUser($uname, $pass); if (false != $user) { if (0 == $user->getVar('level')) { redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 01:40:24 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 01:40:24 +0900 Subject: [xoops-cvslog 223] CVS update: xoops2jp/html/kernel Message-ID: <20050629164024.7EB232AC00E@users.sourceforge.jp> Index: xoops2jp/html/kernel/member.php diff -u xoops2jp/html/kernel/member.php:1.2.10.3 xoops2jp/html/kernel/member.php:1.2.10.4 --- xoops2jp/html/kernel/member.php:1.2.10.3 Tue Jun 28 20:11:19 2005 +++ xoops2jp/html/kernel/member.php Thu Jun 30 01:40:24 2005 @@ -1,5 +1,5 @@ _gHandler->delete($group); - $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid'))); - return true; + $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid'))); + return true; } /** * delete a user - * + * * @param object $user reference to the user to delete * @return bool FALSE if failed */ function deleteUser(&$user) { $this->_uHandler->delete($user); - $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid'))); - return true; + $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid'))); + return true; } /** * insert a group into the database - * + * * @param object $group reference to the group to insert * @return bool TRUE if already in database and unchanged * FALSE on failure @@ -166,7 +166,7 @@ /** * insert a user into the database - * + * * @param object $user reference to the user to insert * @return bool TRUE if already in database and unchanged * FALSE on failure @@ -178,10 +178,10 @@ /** * retrieve groups from the database - * + * * @param object $criteria {@link CriteriaElement} * @param bool $id_as_key use the group's ID as key for the array? - * @return array array of {@link XoopsGroup} objects + * @return array array of {@link XoopsGroup} objects */ function getGroups($criteria = null, $id_as_key = false) { @@ -190,8 +190,8 @@ /** * retrieve users from the database - * - * @param object $criteria {@link CriteriaElement} + * + * @param object $criteria {@link CriteriaElement} * @param bool $id_as_key use the group's ID as key for the array? * @return array array of {@link XoopsUser} objects */ @@ -202,7 +202,7 @@ /** * get a list of groupnames and their IDs - * + * * @param object $criteria {@link CriteriaElement} object * @return array associative array of group-IDs and names */ @@ -218,7 +218,7 @@ /** * get a list of usernames and their IDs - * + * * @param object $criteria {@link CriteriaElement} object * @return array associative array of user-IDs and names */ @@ -234,7 +234,7 @@ /** * add a user to a group - * + * * @param int $group_id ID of the group * @param int $user_id ID of the user * @return object XoopsMembership @@ -249,7 +249,7 @@ /** * remove a list of users from a group - * + * * @param int $group_id ID of the group * @param array $user_ids array of user-IDs * @return bool success? @@ -268,7 +268,7 @@ /** * get a list of users belonging to a group - * + * * @param int $group_id ID of the group * @param bool $asobject return the users as objects? * @param int $limit number of users to return @@ -285,10 +285,10 @@ $ret = array(); foreach ($user_ids as $u_id) { $user =& $this->getUser($u_id); - if (is_object($user)) { - $ret[] =& $user; - } - unset($user); + if (is_object($user)) { + $ret[] =& $user; + } + unset($user); } return $ret; } @@ -296,7 +296,7 @@ /** * get a list of groups that a user is member of - * + * * @param int $user_id ID of the user * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays? * @return array array of objects or arrays @@ -316,10 +316,10 @@ /** * log in a user - * + * * @param string $uname username as entered in the login form * @param string $pwd password entered in the login form - * @return object XoopsUser reference to the logged in user. FALSE if failed to log in + * @return object XoopsUser reference to the logged in user. FALSE if failed to log in */ function &loginUser($uname, $pwd) { @@ -334,10 +334,10 @@ /** * logs in a user with an nd5 encrypted password - * + * * @param string $uname username * @param string $md5pwd password encrypted with md5 - * @return object XoopsUser reference to the logged in user. FALSE if failed to log in + * @return object XoopsUser reference to the logged in user. FALSE if failed to log in */ function &loginUserMd5($uname, $md5pwd) { @@ -352,7 +352,7 @@ /** * count users matching certain conditions - * + * * @param object $criteria {@link CriteriaElement} object * @return int */ @@ -363,7 +363,7 @@ /** * count users belonging to a group - * + * * @param int $group_id ID of the group * @return int */ @@ -374,7 +374,7 @@ /** * updates a single field in a users record - * + * * @param object $user reference to the {@link XoopsUser} object * @param string $fieldName name of the field to update * @param string $fieldValue updated value for the field @@ -388,7 +388,7 @@ /** * updates a single field in a users record - * + * * @param string $fieldName name of the field to update * @param string $fieldValue updated value for the field * @param object $criteria {@link CriteriaElement} object @@ -401,7 +401,7 @@ /** * activate a user - * + * * @param object $user reference to the {@link XoopsUser} object * @return bool successful? */ From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 01:40:24 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 01:40:24 +0900 Subject: [xoops-cvslog 224] CVS update: xoops2jp/html Message-ID: <20050629164024.C58B62AC014@users.sourceforge.jp> Index: xoops2jp/html/lostpass.php diff -u xoops2jp/html/lostpass.php:1.2 xoops2jp/html/lostpass.php:1.2.10.1 --- xoops2jp/html/lostpass.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/lostpass.php Thu Jun 30 01:40:24 2005 @@ -1,5 +1,5 @@ stripSlashesGPC(trim($_GET['email'])) : ''; +$email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : $email; if ($email == '') { - redirect_header("user.php",2,_US_SORRYNOTFOUND); - exit(); + redirect_header("user.php",2,_US_SORRYNOTFOUND); + exit(); } - -$myts =& MyTextSanitizer::getInstance(); $member_handler =& xoops_gethandler('member'); -$getuser =& $member_handler->getUsers(new Criteria('email', $myts->addSlashes($email))); +$getuser =& $member_handler->getUsers(new Criteria('email', $email)); if (empty($getuser)) { - redirect_header("user.php",2,_US_SORRYNOTFOUND); - exit(); + redirect_header("user.php",2,_US_SORRYNOTFOUND); + exit(); } else { - $code = isset($_GET['code']) ? trim($_GET['code']) : ''; - $areyou = substr($getuser[0]->getVar("pass"), 0, 5); - if ($code != '' && $areyou == $code) { - $newpass = xoops_makepass(); - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setTemplate("lostpass2.tpl"); - $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); - $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); - $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); - $xoopsMailer->assign("NEWPWD", $newpass); - $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,XOOPS_URL)); - if ( !$xoopsMailer->send() ) { - echo $xoopsMailer->getErrors(); - } + $code = isset($_GET['code']) ? trim($_GET['code']) : ''; + $areyou = substr($getuser[0]->getVar("pass"), 0, 5); + if ($code != '' && $areyou == $code) { + $newpass = xoops_makepass(); + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplate("lostpass2.tpl"); + $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); + $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); + $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); + $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); + $xoopsMailer->assign("NEWPWD", $newpass); + $xoopsMailer->setToUsers($getuser[0]); + $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,XOOPS_URL)); + if ( !$xoopsMailer->send() ) { + echo $xoopsMailer->getErrors(); + } - // Next step: add the new password to the database - $sql = sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u", $xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid')); - if ( !$xoopsDB->queryF($sql) ) { - include "header.php"; - echo _US_MAILPWDNG; - include "footer.php"; - exit(); - } - redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false); - exit(); - // If no Code, send it - } else { - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setTemplate("lostpass1.tpl"); - $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); - $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); - $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); - $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou); - $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename'])); - include "header.php"; - if ( !$xoopsMailer->send() ) { - echo $xoopsMailer->getErrors(); - } - echo "

    "; - printf(_US_CONFMAIL,$getuser[0]->getVar("uname")); - echo "

    "; - include "footer.php"; - } + // Next step: add the new password to the database + $sql = sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u", $xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid')); + if ( !$xoopsDB->queryF($sql) ) { + include "header.php"; + echo _US_MAILPWDNG; + include "footer.php"; + exit(); + } + redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false); + exit(); + // If no Code, send it + } else { + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplate("lostpass1.tpl"); + $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); + $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); + $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); + $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); + $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou); + $xoopsMailer->setToUsers($getuser[0]); + $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename'])); + include "header.php"; + if ( !$xoopsMailer->send() ) { + echo $xoopsMailer->getErrors(); + } + echo "

    "; + printf(_US_CONFMAIL,$getuser[0]->getVar("uname")); + echo "

    "; + include "footer.php"; + } } ?> \ No newline at end of file Index: xoops2jp/html/xmlrpc.php diff -u xoops2jp/html/xmlrpc.php:1.2 xoops2jp/html/xmlrpc.php:1.2.10.1 --- xoops2jp/html/xmlrpc.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/xmlrpc.php Thu Jun 30 01:40:24 2005 @@ -30,42 +30,42 @@ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpctag.php'; include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xmlrpcparser.php'; $response = new XoopsXmlRpcResponse(); -$parser = new XoopsXmlRpcParser($GLOBALS['HTTP_RAW_POST_DATA']); +$parser = new XoopsXmlRpcParser(rawurldecode($GLOBALS['HTTP_RAW_POST_DATA'])); if (!$parser->parse()) { - $response->add(new XoopsXmlRpcFault(102)); + $response->add(new XoopsXmlRpcFault(102)); } else { - $module_handler =& xoops_gethandler('module'); - $module =& $module_handler->getByDirname('news'); - if (!is_object($module)) { - $response->add(new XoopsXmlRpcFault(110)); - } else { - $methods = explode('.', $parser->getMethodName()); - switch ($methods[0]) { - case 'blogger': - include_once XOOPS_ROOT_PATH.'/class/xml/rpc/bloggerapi.php'; - $rpc_api = new BloggerApi($parser->getParam(), $response, $module); - break; - case 'metaWeblog': - include_once XOOPS_ROOT_PATH.'/class/xml/rpc/metaweblogapi.php'; - $rpc_api = new MetaWeblogApi($parser->getParam(), $response, $module); - break; - case 'mt': - include_once XOOPS_ROOT_PATH.'/class/xml/rpc/movabletypeapi.php'; - $rpc_api = new MovableTypeApi($parser->getParam(), $response, $module); - break; - case 'xoops': - default: - include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php'; - $rpc_api = new XoopsApi($parser->getParam(), $response, $module); - break; - } - $method = $methods[1]; - if (!method_exists($rpc_api, $method)) { - $response->add(new XoopsXmlRpcFault(107)); - } else { - $rpc_api->$method(); - } - } + $module_handler =& xoops_gethandler('module'); + $module =& $module_handler->getByDirname('news'); + if (!is_object($module)) { + $response->add(new XoopsXmlRpcFault(110)); + } else { + $methods = explode('.', $parser->getMethodName()); + switch ($methods[0]) { + case 'blogger': + include_once XOOPS_ROOT_PATH.'/class/xml/rpc/bloggerapi.php'; + $rpc_api = new BloggerApi($parser->getParam(), $response, $module); + break; + case 'metaWeblog': + include_once XOOPS_ROOT_PATH.'/class/xml/rpc/metaweblogapi.php'; + $rpc_api = new MetaWeblogApi($parser->getParam(), $response, $module); + break; + case 'mt': + include_once XOOPS_ROOT_PATH.'/class/xml/rpc/movabletypeapi.php'; + $rpc_api = new MovableTypeApi($parser->getParam(), $response, $module); + break; + case 'xoops': + default: + include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php'; + $rpc_api = new XoopsApi($parser->getParam(), $response, $module); + break; + } + $method = $methods[1]; + if (!method_exists($rpc_api, $method)) { + $response->add(new XoopsXmlRpcFault(107)); + } else { + $rpc_api->$method(); + } + } } $payload =& $response->render(); //$fp = fopen(XOOPS_CACHE_PATH.'/xmllog.txt', 'w'); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 01:40:25 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 01:40:25 +0900 Subject: [xoops-cvslog 225] CVS update: xoops2jp/html/modules/system/admin/findusers Message-ID: <20050629164025.1CF732AC018@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/findusers/main.php diff -u xoops2jp/html/modules/system/admin/findusers/main.php:1.2.6.2.2.1 xoops2jp/html/modules/system/admin/findusers/main.php:1.2.6.2.2.2 --- xoops2jp/html/modules/system/admin/findusers/main.php:1.2.6.2.2.1 Sun Jun 12 20:16:55 2005 +++ xoops2jp/html/modules/system/admin/findusers/main.php Thu Jun 30 01:40:24 2005 @@ -1,5 +1,5 @@ add(new Criteria('uname', $myts->addSlashes(trim($_POST['user_uname'])).'%', 'LIKE')); + $criteria->add(new Criteria('uname', $myts->stripSlashesGPC(trim($_POST['user_uname'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('uname', '%'.$myts->addSlashes(trim($_POST['user_uname'])), 'LIKE')); + $criteria->add(new Criteria('uname', '%'.$myts->stripSlashesGPC(trim($_POST['user_uname'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('uname', $myts->addSlashes(trim($_POST['user_uname'])))); + $criteria->add(new Criteria('uname', $myts->stripSlashesGPC(trim($_POST['user_uname'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('uname', '%'.$myts->addSlashes(trim($_POST['user_uname'])).'%', 'LIKE')); + $criteria->add(new Criteria('uname', '%'.$myts->stripSlashesGPC(trim($_POST['user_uname'])).'%', 'LIKE')); break; } } @@ -171,16 +171,16 @@ $match = (!empty($_POST['user_name_match'])) ? intval($_POST['user_name_match']) : XOOPS_MATCH_START; switch ($match) { case XOOPS_MATCH_START: - $criteria->add(new Criteria('name', $myts->addSlashes(trim($_POST['user_name'])).'%', 'LIKE')); + $criteria->add(new Criteria('name', $myts->stripSlashesGPC(trim($_POST['user_name'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('name', '%'.$myts->addSlashes(trim($_POST['user_name'])), 'LIKE')); + $criteria->add(new Criteria('name', '%'.$myts->stripSlashesGPC(trim($_POST['user_name'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('name', $myts->addSlashes(trim($_POST['user_name'])))); + $criteria->add(new Criteria('name', $myts->stripSlashesGPC(trim($_POST['user_name'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('name', '%'.$myts->addSlashes(trim($_POST['user_name'])).'%', 'LIKE')); + $criteria->add(new Criteria('name', '%'.$myts->stripSlashesGPC(trim($_POST['user_name'])).'%', 'LIKE')); break; } } @@ -188,16 +188,16 @@ $match = (!empty($_POST['user_email_match'])) ? intval($_POST['user_email_match']) : XOOPS_MATCH_START; switch ($match) { case XOOPS_MATCH_START: - $criteria->add(new Criteria('email', $myts->addSlashes(trim($_POST['user_email'])).'%', 'LIKE')); + $criteria->add(new Criteria('email', $myts->stripSlashesGPC(trim($_POST['user_email'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('email', '%'.$myts->addSlashes(trim($_POST['user_email'])), 'LIKE')); + $criteria->add(new Criteria('email', '%'.$myts->stripSlashesGPC(trim($_POST['user_email'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('email', $myts->addSlashes(trim($_POST['user_email'])))); + $criteria->add(new Criteria('email', $myts->stripSlashesGPC(trim($_POST['user_email'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('email', '%'.$myts->addSlashes(trim($_POST['user_email'])).'%', 'LIKE')); + $criteria->add(new Criteria('email', '%'.$myts->stripSlashesGPC(trim($_POST['user_email'])).'%', 'LIKE')); break; } } @@ -209,16 +209,16 @@ $match = (!empty($_POST['user_icq_match'])) ? intval($_POST['user_icq_match']) : XOOPS_MATCH_START; switch ($match) { case XOOPS_MATCH_START: - $criteria->add(new Criteria('user_icq', $myts->addSlashes(trim($_POST['user_icq'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_icq', $myts->stripSlashesGPC(trim($_POST['user_icq'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('user_icq', '%'.$myts->addSlashes(trim($_POST['user_icq'])), 'LIKE')); + $criteria->add(new Criteria('user_icq', '%'.$myts->stripSlashesGPC(trim($_POST['user_icq'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('user_icq', '%'.$myts->addSlashes(trim($_POST['user_icq'])))); + $criteria->add(new Criteria('user_icq', '%'.$myts->stripSlashesGPC(trim($_POST['user_icq'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('user_icq', '%'.$myts->addSlashes(trim($_POST['user_icq'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_icq', '%'.$myts->stripSlashesGPC(trim($_POST['user_icq'])).'%', 'LIKE')); break; } } @@ -226,16 +226,16 @@ $match = (!empty($_POST['user_aim_match'])) ? intval($_POST['user_aim_match']) : XOOPS_MATCH_START; switch ($match) { case XOOPS_MATCH_START: - $criteria->add(new Criteria('user_aim', $myts->addSlashes(trim($_POST['user_aim'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_aim', $myts->stripSlashesGPC(trim($_POST['user_aim'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('user_aim', '%'.$myts->addSlashes(trim($_POST['user_aim'])), 'LIKE')); + $criteria->add(new Criteria('user_aim', '%'.$myts->stripSlashesGPC(trim($_POST['user_aim'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('user_aim', $myts->addSlashes(trim($_POST['user_aim'])))); + $criteria->add(new Criteria('user_aim', $myts->stripSlashesGPC(trim($_POST['user_aim'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('user_aim', '%'.$myts->addSlashes(trim($_POST['user_aim'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_aim', '%'.$myts->stripSlashesGPC(trim($_POST['user_aim'])).'%', 'LIKE')); break; } } @@ -243,16 +243,16 @@ $match = (!empty($_POST['user_yim_match'])) ? intval($_POST['user_yim_match']) : XOOPS_MATCH_START; switch ($match) { case XOOPS_MATCH_START: - $criteria->add(new Criteria('user_yim', $myts->addSlashes(trim($_POST['user_yim'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_yim', $myts->stripSlashesGPC(trim($_POST['user_yim'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('user_yim', '%'.$myts->addSlashes(trim($_POST['user_yim'])), 'LIKE')); + $criteria->add(new Criteria('user_yim', '%'.$myts->stripSlashesGPC(trim($_POST['user_yim'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('user_yim', $myts->addSlashes(trim($_POST['user_yim'])))); + $criteria->add(new Criteria('user_yim', $myts->stripSlashesGPC(trim($_POST['user_yim'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('user_yim', '%'.$myts->addSlashes(trim($_POST['user_yim'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_yim', '%'.$myts->stripSlashesGPC(trim($_POST['user_yim'])).'%', 'LIKE')); break; } } @@ -260,27 +260,27 @@ $match = (!empty($_POST['user_msnm_match'])) ? intval($_POST['user_msnm_match']) : XOOPS_MATCH_START; switch ($match) { case XOOPS_MATCH_START: - $criteria->add(new Criteria('user_msnm', $myts->addSlashes(trim($_POST['user_msnm'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_msnm', $myts->stripSlashesGPC(trim($_POST['user_msnm'])).'%', 'LIKE')); break; case XOOPS_MATCH_END: - $criteria->add(new Criteria('user_msnm', '%'.$myts->addSlashes(trim($_POST['user_msnm'])), 'LIKE')); + $criteria->add(new Criteria('user_msnm', '%'.$myts->stripSlashesGPC(trim($_POST['user_msnm'])), 'LIKE')); break; case XOOPS_MATCH_EQUAL: - $criteria->add(new Criteria('user_msnm', '%'.$myts->addSlashes(trim($_POST['user_msnm'])))); + $criteria->add(new Criteria('user_msnm', '%'.$myts->stripSlashesGPC(trim($_POST['user_msnm'])))); break; case XOOPS_MATCH_CONTAIN: - $criteria->add(new Criteria('user_msnm', '%'.$myts->addSlashes(trim($_POST['user_msnm'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_msnm', '%'.$myts->stripSlashesGPC(trim($_POST['user_msnm'])).'%', 'LIKE')); break; } } if ( !empty($_POST['user_from']) ) { - $criteria->add(new Criteria('user_from', '%'.$myts->addSlashes(trim($_POST['user_from'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_from', '%'.$myts->stripSlashesGPC(trim($_POST['user_from'])).'%', 'LIKE')); } if ( !empty($_POST['user_intrest']) ) { - $criteria->add(new Criteria('user_intrest', '%'.$myts->addSlashes(trim($_POST['user_intrest'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_intrest', '%'.$myts->stripSlashesGPC(trim($_POST['user_intrest'])).'%', 'LIKE')); } if ( !empty($_POST['user_occ']) ) { - $criteria->add(new Criteria('user_occ', '%'.$myts->addSlashes(trim($_POST['user_occ'])).'%', 'LIKE')); + $criteria->add(new Criteria('user_occ', '%'.$myts->stripSlashesGPC(trim($_POST['user_occ'])).'%', 'LIKE')); } if ( !empty($_POST['user_lastlog_more']) && is_numeric($_POST['user_lastlog_more']) ) { From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 01:40:25 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 01:40:25 +0900 Subject: [xoops-cvslog 226] CVS update: xoops2jp/html/modules/system/admin/users Message-ID: <20050629164025.615602AC00E@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/users/main.php diff -u xoops2jp/html/modules/system/admin/users/main.php:1.2.6.4.2.1 xoops2jp/html/modules/system/admin/users/main.php:1.2.6.4.2.2 --- xoops2jp/html/modules/system/admin/users/main.php:1.2.6.4.2.1 Sat Jun 11 11:57:08 2005 +++ xoops2jp/html/modules/system/admin/users/main.php Thu Jun 30 01:40:25 2005 @@ -1,5 +1,5 @@ getUser($uid); $myts =& MyTextSanitizer::getInstance(); - if ($edituser->getVar('uname') != $username && $member_handler->getUserCount(new Criteria('uname', addslashes($username))) > 0) { + if ($edituser->getVar('uname') != $username && $member_handler->getUserCount(new Criteria('uname', $username)) > 0) { xoops_cp_header(); echo 'User name '.htmlspecialchars($username).' already exists'; xoops_cp_footer(); @@ -235,7 +235,7 @@ } else { $member_handler =& xoops_gethandler('member'); // make sure the username doesnt exist yet - if ($member_handler->getUserCount(new Criteria('uname', addslashes($username))) > 0) { + if ($member_handler->getUserCount(new Criteria('uname', $username)) > 0) { $adduser_errormsg = 'User name '.$username.' already exists'; } else { $newuser =& $member_handler->createUser(); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 11:57:48 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 11:57:48 +0900 Subject: [xoops-cvslog 227] CVS update: xoops2jp/html/include Message-ID: <20050630025748.071212AC01D@users.sourceforge.jp> Index: xoops2jp/html/include/comment_post.php diff -u xoops2jp/html/include/comment_post.php:1.2.6.3 xoops2jp/html/include/comment_post.php:1.2.6.3.2.1 --- xoops2jp/html/include/comment_post.php:1.2.6.3 Mon Apr 25 13:04:51 2005 +++ xoops2jp/html/include/comment_post.php Thu Jun 30 11:57:47 2005 @@ -1,5 +1,5 @@ getVar('dirname')) { if (empty($com_id)) { exit(); @@ -56,7 +57,6 @@ $com_modid = $xoopsModule->getVar('mid'); $redirect_page = $comment_config['pageName'].'?'; if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { - $extra_params = ''; foreach ($comment_config['extraParams'] as $extra_param) { $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.$_POST[$extra_param].'&' : $extra_param.'=&'; } @@ -266,8 +266,8 @@ $comment->setVar('com_icon', $com_icon); $comment->setVar('com_modified', time()); $comment->setVar('com_modid', $com_modid); - if (isset($extra_params)) { - $comment->setVar('com_exparams', $extra_params); + if (!empty($extra_params)) { + $comment->setVar('com_exparams', str_replace('&', '&', $extra_params)); } if (false != $comment_handler->insert($comment)) { $newcid = $comment->getVar('com_id'); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 11:57:48 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 11:57:48 +0900 Subject: [xoops-cvslog 228] CVS update: xoops2jp/html/modules/system/admin/comments Message-ID: <20050630025748.451072AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/comments/main.php diff -u xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.2 xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.3 --- xoops2jp/html/modules/system/admin/comments/main.php:1.2.6.1.2.2 Mon Jun 20 13:29:01 2005 +++ xoops2jp/html/modules/system/admin/comments/main.php Thu Jun 30 11:57:48 2005 @@ -1,5 +1,5 @@ get($comment->getVar('com_modid')); $comment_config = $module->getInfo('comments'); - header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); + header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.$comment->getVar('com_exparams').'#comment'.$comment->getVar('com_id')); exit(); } } From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 11:57:48 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 11:57:48 +0900 Subject: [xoops-cvslog 229] CVS update: xoops2jp/html/modules/system/blocks Message-ID: <20050630025748.8730A2AC01D@users.sourceforge.jp> Index: xoops2jp/html/modules/system/blocks/system_blocks.php diff -u xoops2jp/html/modules/system/blocks/system_blocks.php:1.2.6.1 xoops2jp/html/modules/system/blocks/system_blocks.php:1.2.6.1.2.1 --- xoops2jp/html/modules/system/blocks/system_blocks.php:1.2.6.1 Tue Apr 26 18:51:36 2005 +++ xoops2jp/html/modules/system/blocks/system_blocks.php Thu Jun 30 11:57:48 2005 @@ -1,5 +1,5 @@ getInfo('comments'); } $com['id'] = $i; - $com['title'] = ''.$comments[$i]->getVar('com_title').''; + $com['title'] = ''.$comments[$i]->getVar('com_title').''; $com['icon'] = $comments[$i]->getVar('com_icon'); $com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif'; $com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'m'); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 12:09:20 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 12:09:20 +0900 Subject: [xoops-cvslog 229] CVS update: xoops2jp/html/include Message-ID: <20050630030920.8F63F2AC019@users.sourceforge.jp> Index: xoops2jp/html/include/comment_form.php diff -u xoops2jp/html/include/comment_form.php:1.2.6.2.2.2 xoops2jp/html/include/comment_form.php:1.2.6.2.2.3 --- xoops2jp/html/include/comment_form.php:1.2.6.2.2.2 Thu Jun 30 00:16:19 2005 +++ xoops2jp/html/include/comment_form.php Thu Jun 30 12:09:20 2005 @@ -1,5 +1,5 @@ getVar('dirname')) { $comment_config = $xoopsModule->getInfo('comments'); if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { + $myts =& MyTextSanitizer::getInstance(); foreach ($comment_config['extraParams'] as $extra_param) { // This routine is included from forms accessed via both GET and POST if (isset($_POST[$extra_param])) { - $hidden_value = $_POST[$extra_param]; + $hidden_value = $myts->stripSlashesGPC($_POST[$extra_param]); } elseif (isset($_GET[$extra_param])) { - $hidden_value = $_GET[$extra_param]; + $hidden_value = $myts->stripSlashesGPC($_GET[$extra_param]); } else { $hidden_value = ''; } Index: xoops2jp/html/include/comment_post.php diff -u xoops2jp/html/include/comment_post.php:1.2.6.3.2.1 xoops2jp/html/include/comment_post.php:1.2.6.3.2.2 --- xoops2jp/html/include/comment_post.php:1.2.6.3.2.1 Thu Jun 30 11:57:47 2005 +++ xoops2jp/html/include/comment_post.php Thu Jun 30 12:09:20 2005 @@ -1,5 +1,5 @@ getVar('mid'); $redirect_page = $comment_config['pageName'].'?'; if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { + $myts =& MyTextSanitizer::getInstance(); foreach ($comment_config['extraParams'] as $extra_param) { - $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.$_POST[$extra_param].'&' : $extra_param.'=&'; + $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.$myts->stripSlashesGPC($_POST[$extra_param]).'&' : $extra_param.'=&'; } $redirect_page .= $extra_params; } From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 14:07:51 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 14:07:51 +0900 Subject: [xoops-cvslog 230] CVS update: xoops2jp/html/class/xml/rpc Message-ID: <20050630050751.6C20F2AC019@users.sourceforge.jp> Index: xoops2jp/html/class/xml/rpc/xmlrpcapi.php diff -u xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.3 xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.4 --- xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.3 Sat Jun 11 11:32:39 2005 +++ xoops2jp/html/class/xml/rpc/xmlrpcapi.php Thu Jun 30 14:07:51 2005 @@ -1,5 +1,5 @@ user =& $member_handler->loginUser($username, $password); + $this->user =& $member_handler->loginUser(addSlashes($username), addSlashes($password)); if (!is_object($this->user)) { unset($this->user); return false; From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 14:07:51 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 14:07:51 +0900 Subject: [xoops-cvslog 231] CVS update: xoops2jp/html/modules/system/admin/comments Message-ID: <20050630050751.F26522AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/comments/main.php diff -u xoops2jp/html/modules/system/admin/comments/main.php:1.3 xoops2jp/html/modules/system/admin/comments/main.php:1.4 --- xoops2jp/html/modules/system/admin/comments/main.php:1.3 Sat Jun 11 11:32:51 2005 +++ xoops2jp/html/modules/system/admin/comments/main.php Thu Jun 30 14:07:51 2005 @@ -1,5 +1,5 @@ get($comment->getVar('com_modid')); $comment_config = $module->getInfo('comments'); - header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.str_replace('&', '&', $comment->getVar('com_exparams')).'#comment'.$comment->getVar('com_id')); + header('Location: '.XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$comment_config['pageName'].'?'.$comment_config['itemName'].'='.$comment->getVar('com_itemid').'&com_id='.$comment->getVar('com_id').'&com_rootid='.$comment->getVar('com_rootid').'&com_mode=thread&'.$comment->getVar('com_exparams').'#comment'.$comment->getVar('com_id')); exit(); } } From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 14:07:51 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 14:07:51 +0900 Subject: [xoops-cvslog 232] CVS update: xoops2jp/html/include Message-ID: <20050630050751.B49ED2AC01F@users.sourceforge.jp> Index: xoops2jp/html/include/comment_form.php diff -u xoops2jp/html/include/comment_form.php:1.3 xoops2jp/html/include/comment_form.php:1.4 --- xoops2jp/html/include/comment_form.php:1.3 Sat Jun 11 11:32:40 2005 +++ xoops2jp/html/include/comment_form.php Thu Jun 30 14:07:51 2005 @@ -1,5 +1,5 @@ addOptionArray(array(XOOPS_COMMENT_PENDING => _CM_PENDING, XOOPS_COMMENT_ACTIVE => _CM_ACTIVE, XOOPS_COMMENT_HIDDEN => _CM_HIDDEN)); $cform->addElement($status_select); + $button_tray->addElement(new XoopsFormButton('', 'com_dodelete', _DELETE, 'submit')); } $html_checkbox = new XoopsFormCheckBox('', 'dohtml', $dohtml); $html_checkbox->addOption(1, _CM_DOHTML); $option_tray->addElement($html_checkbox); - $button_tray->addElement(new XoopsFormButton('', 'com_dodelete', _DELETE, 'submit')); } } $smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $dosmiley); @@ -105,16 +105,17 @@ if ('system' != $xoopsModule->getVar('dirname')) { $comment_config = $xoopsModule->getInfo('comments'); if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { + $myts =& MyTextSanitizer::getInstance(); foreach ($comment_config['extraParams'] as $extra_param) { // This routine is included from forms accessed via both GET and POST if (isset($_POST[$extra_param])) { - $hidden_value = $_POST[$extra_param]; + $hidden_value = $myts->stripSlashesGPC($_POST[$extra_param]); } elseif (isset($_GET[$extra_param])) { - $hidden_value = $_GET[$extra_param]; + $hidden_value = $myts->stripSlashesGPC($_GET[$extra_param]); } else { $hidden_value = ''; } - $cform->addElement(new XoopsFormHidden($extra_param, $hidden_value)); + $cform->addElement(new XoopsFormHidden($extra_param, htmlspecialchars($hidden_value, ENT_QUOTES))); } } } Index: xoops2jp/html/include/comment_post.php diff -u xoops2jp/html/include/comment_post.php:1.3 xoops2jp/html/include/comment_post.php:1.4 --- xoops2jp/html/include/comment_post.php:1.3 Sat Jun 11 11:32:40 2005 +++ xoops2jp/html/include/comment_post.php Thu Jun 30 14:07:51 2005 @@ -1,5 +1,5 @@ getVar('dirname')) { if (empty($com_id)) { exit(); @@ -56,9 +57,9 @@ $com_modid = $xoopsModule->getVar('mid'); $redirect_page = $comment_config['pageName'].'?'; if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { - $extra_params = ''; + $myts =& MyTextSanitizer::getInstance(); foreach ($comment_config['extraParams'] as $extra_param) { - $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.$_POST[$extra_param].'&' : $extra_param.'=&'; + $extra_params .= isset($_POST[$extra_param]) ? $extra_param.'='.$myts->stripSlashesGPC($_POST[$extra_param]).'&' : $extra_param.'=&'; } $redirect_page .= $extra_params; } @@ -266,8 +267,8 @@ $comment->setVar('com_icon', $com_icon); $comment->setVar('com_modified', time()); $comment->setVar('com_modid', $com_modid); - if (isset($extra_params)) { - $comment->setVar('com_exparams', $extra_params); + if (!empty($extra_params)) { + $comment->setVar('com_exparams', str_replace('&', '&', $extra_params)); } if (false != $comment_handler->insert($comment)) { $newcid = $comment->getVar('com_id'); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 14:07:52 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 14:07:52 +0900 Subject: [xoops-cvslog 233] CVS update: xoops2jp/html/modules/system/blocks Message-ID: <20050630050752.3B5482AC024@users.sourceforge.jp> Index: xoops2jp/html/modules/system/blocks/system_blocks.php diff -u xoops2jp/html/modules/system/blocks/system_blocks.php:1.3 xoops2jp/html/modules/system/blocks/system_blocks.php:1.4 --- xoops2jp/html/modules/system/blocks/system_blocks.php:1.3 Sat Jun 11 11:32:54 2005 +++ xoops2jp/html/modules/system/blocks/system_blocks.php Thu Jun 30 14:07:52 2005 @@ -1,5 +1,5 @@ getInfo('comments'); } $com['id'] = $i; - $com['title'] = ''.$comments[$i]->getVar('com_title').''; + $com['title'] = ''.$comments[$i]->getVar('com_title').''; $com['icon'] = $comments[$i]->getVar('com_icon'); $com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif'; $com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'m'); From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 14:43:16 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 14:43:16 +0900 Subject: [xoops-cvslog 234] CVS update: xoops2jp/html/include Message-ID: <20050630054316.182012AC019@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.6 xoops2jp/html/include/version.php:1.7 --- xoops2jp/html/include/version.php:1.6 Tue Jun 28 16:46:31 2005 +++ xoops2jp/html/include/version.php Thu Jun 30 14:43:15 2005 @@ -1,4 +1,4 @@ \ No newline at end of file From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 14:55:55 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 14:55:55 +0900 Subject: [xoops-cvslog 235] CVS update: xoops2jp/docs Message-ID: <20050630055555.753682AC019@users.sourceforge.jp> Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.4 xoops2jp/docs/CHANGES.txt:1.5 --- xoops2jp/docs/CHANGES.txt:1.4 Tue Jun 28 16:56:51 2005 +++ xoops2jp/docs/CHANGES.txt Thu Jun 30 14:55:55 2005 @@ -1,6 +1,12 @@ XOOPS v2 Changelog ============================ +2005/ 6/30: Version 2.0.10.2 JP +=============================== +- Added security patch to prevent SQL injection in xmlrpcapi.php +- Added security patch for XSS vulnerability in comment post + + 2005/ 6/28: Version 2.0.10.1 JP =============================== - Added security patch to prevent login spoofing From onokazu ¡÷ users.sourceforge.jp Thu Jun 30 17:14:49 2005 From: onokazu ¡÷ users.sourceforge.jp (onokazu) Date: Thu, 30 Jun 2005 17:14:49 +0900 Subject: [xoops-cvslog 236] CVS update: xoops2jp/html/class Message-ID: <20050630081449.C71242AC019@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.2.6.1.2.3 xoops2jp/html/class/criteria.php:1.2.6.1.2.4 --- xoops2jp/html/class/criteria.php:1.2.6.1.2.3 Thu Jun 30 01:40:23 2005 +++ xoops2jp/html/class/criteria.php Thu Jun 30 17:14:49 2005 @@ -1,5 +1,5 @@ operator), array('IN', 'NOT IN'))) { $value = $this->value; } else { - if ( '' === ($value = trim($this->value)) ) { - return ''; - } if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { $db =& XoopsDatabaseFactory::getDatabaseConnection(); $value = $db->quoteString($value); From minahito ¡÷ users.sourceforge.jp Thu Jun 30 19:00:57 2005 From: minahito ¡÷ users.sourceforge.jp (Minahito) Date: Thu, 30 Jun 2005 19:00:57 +0900 Subject: [xoops-cvslog 237] CVS update: xoops2jp/html/include Message-ID: <20050630100057.8CE5C2AC019@users.sourceforge.jp> Index: xoops2jp/html/include/comment_post.php diff -u xoops2jp/html/include/comment_post.php:1.2.6.3.2.3 xoops2jp/html/include/comment_post.php:1.2.6.3.2.4 --- xoops2jp/html/include/comment_post.php:1.2.6.3.2.3 Thu Jun 30 18:46:55 2005 +++ xoops2jp/html/include/comment_post.php Thu Jun 30 19:00:57 2005 @@ -1,5 +1,5 @@ Index: xoops2jp/html/include/comment_post.php diff -u xoops2jp/html/include/comment_post.php:1.2.6.3.2.4 xoops2jp/html/include/comment_post.php:1.2.6.3.2.5 --- xoops2jp/html/include/comment_post.php:1.2.6.3.2.4 Thu Jun 30 19:00:57 2005 +++ xoops2jp/html/include/comment_post.php Thu Jun 30 19:23:35 2005 @@ -1,5 +1,5 @@ 0) ? 1 : 0; $doimage = (isset($_POST['doimage']) && intval($_POST['doimage']) > 0) ? 1 : 0; $com_icon = isset($_POST['com_icon']) ? trim($_POST['com_icon']) : ''; + $noname = isset($_POST['noname']) ? intval($_POST['noname']) : 0; } else { exit(); } @@ -123,7 +124,6 @@ } } $p_comment =& $myts->previewTarea($_POST['com_text'], $dohtml, $dosmiley, $doxcode, $doimage, $dobr); - $noname = isset($_POST['noname']) ? intval($_POST['noname']) : 0; $com_text = $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['com_text'])); if ($xoopsModule->getVar('dirname') != 'system') { include XOOPS_ROOT_PATH.'/header.php'; @@ -221,7 +221,6 @@ break; } } - $noname = isset($_POST['noname']) ? intval($_POST['noname']) : ''; if (!empty($xoopsModuleConfig['com_anonpost']) && !empty($noname)) { $uid = 0; } else {