You can subscribe to this list here.
| 2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
| 2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
| 2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
| 2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
| 2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <luc...@us...> - 2014-02-07 21:20:26
|
Revision: 12292
http://sourceforge.net/p/xoops/svn/12292
Author: luciorota
Date: 2014-02-07 21:20:20 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
standardize and templatize module: still in progress
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/sendletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/cron.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/task.inc.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/index.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/admin.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/letter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/print.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/protocol.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/sendletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/subscription.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_subscription_list_subscriptions.html
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/xoops_version.php
Added Paths:
-----------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/request.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/session.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xnewsletter.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/constants.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/common.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/templates/xnewsletter_print.html
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/sendletter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/sendletter.php 2014-02-07 20:41:47 UTC (rev 12291)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/admin/sendletter.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -39,9 +39,9 @@
$xn_send_in_packages_time = 0;
}
-$result = Create_Tasklist($op, $letter_id, $xn_send_in_packages, $xn_send_in_packages_time);
+$result = xNewsletter_createTasks($op, $letter_id, $xn_send_in_packages, $xn_send_in_packages_time);
-$result_exec = Execute_Tasks($xn_send_in_packages, $letter_id);
+$result_exec = xNewsletter_executeTasks($xn_send_in_packages, $letter_id);
redirect_header("letter.php", 3, $result_exec);
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/request.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/request.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/request.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -0,0 +1,998 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * xNewsletterRequest class
+ *
+ * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
+ * @license GNU/GPL, see LICENSE.php
+ * Joomla! is free software. This version may have been modified pursuant
+ * to the GNU General Public License, and as distributed it includes or
+ * is derivative of works licensed under the GNU General Public License or
+ * other free or open source software licenses.
+ * See COPYRIGHT.php for copyright notices and details.
+ * @package xNewsletter
+ * @since 1.3
+ * @author trabis <lus...@gm...>
+ * @version svn:$id$
+ */
+
+/**
+ * Set the available masks for cleaning variables
+ */
+define('XNEWSLETTER_REQUEST_NOTRIM', 1);
+define('XNEWSLETTER_REQUEST_ALLOWRAW', 2);
+define('XNEWSLETTER_REQUEST_ALLOWHTML', 4);
+
+/**
+ * xNewsletterRequest Class
+ * This class serves to provide a common interface to access
+ * request variables. This includes $_POST, $_GET, and naturally $_REQUEST. Variables
+ * can be passed through an input filter to avoid injection or returned raw.
+ */
+class xNewsletterRequest
+{
+
+ /**
+ * Gets the request method
+ *
+ * @return string
+ */
+ static function getMethod()
+ {
+ $method = strtoupper($_SERVER['REQUEST_METHOD']);
+
+ return $method;
+ }
+
+ /**
+ * Fetches and returns a given variable.
+ * The default behaviour is fetching variables depending on the
+ * current request method: GET and HEAD will result in returning
+ * an entry from $_GET, POST and PUT will result in returning an
+ * entry from $_POST.
+ * You can force the source by setting the $hash parameter:
+ * post $_POST
+ * get $_GET
+ * files $_FILES
+ * cookie $_COOKIE
+ * env $_ENV
+ * server $_SERVER
+ * method via current $_SERVER['REQUEST_METHOD']
+ * default $_REQUEST
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ * @param string $type Return type for the variable, for valid values see {@link JFilterInput::clean()}
+ * @param int $mask Filter mask for the variable
+ *
+ * @return mixed Requested variable
+ */
+ static function getVar($name, $default = null, $hash = 'default', $type = 'none', $mask = 0)
+ {
+ // Ensure hash and type are uppercase
+ $hash = strtoupper($hash);
+ if ($hash === 'METHOD') {
+ $hash = strtoupper($_SERVER['REQUEST_METHOD']);
+ }
+ $type = strtoupper($type);
+ // Get the input hash
+ switch ($hash) {
+ case 'GET' :
+ $input = & $_GET;
+ break;
+ case 'POST' :
+ $input = & $_POST;
+ break;
+ case 'FILES' :
+ $input = & $_FILES;
+ break;
+ case 'COOKIE' :
+ $input = & $_COOKIE;
+ break;
+ case 'ENV' :
+ $input = & $_ENV;
+ break;
+ case 'SERVER' :
+ $input = & $_SERVER;
+ break;
+ default:
+ $input = & $_REQUEST;
+ $hash = 'REQUEST';
+ break;
+ }
+ if (isset($input[$name]) && $input[$name] !== null) {
+ // Get the variable from the input hash and clean it
+ $var = xNewsletterRequest::_cleanVar($input[$name], $mask, $type);
+ // Handle magic quotes compatability
+ if (get_magic_quotes_gpc() && ($var != $default) && ($hash != 'FILES')) {
+ $var = xNewsletterRequest::_stripSlashesRecursive($var);
+ }
+ } elseif ($default !== null) {
+ // Clean the default value
+ $var = xNewsletterRequest::_cleanVar($default, $mask, $type);
+ } else {
+ $var = $default;
+ }
+
+ return $var;
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The integer
+ * filter will allow only digits to be returned. This is currently
+ * only a proxy function for getVar().
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param int $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return integer Requested variable
+ */
+ static function getInt($name, $default = 0, $hash = 'default')
+ {
+ return xNewsletterRequest::getVar($name, $default, $hash, 'int');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The float
+ * filter only allows digits and periods. This is currently
+ * only a proxy function for getVar().
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param float $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return float Requested variable
+ */
+ static function getFloat($name, $default = 0.0, $hash = 'default')
+ {
+ return xNewsletterRequest::getVar($name, $default, $hash, 'float');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The bool
+ * filter will only return true/false bool values. This is
+ * currently only a proxy function for getVar().
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param bool $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return bool Requested variable
+ */
+ static function getBool($name, $default = false, $hash = 'default')
+ {
+ return xNewsletterRequest::getVar($name, $default, $hash, 'bool');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The word
+ * filter only allows the characters [A-Za-z_]. This is currently
+ * only a proxy function for getVar().
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return string Requested variable
+ */
+ static function getWord($name, $default = '', $hash = 'default')
+ {
+ return xNewsletterRequest::getVar($name, $default, $hash, 'word');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The cmd
+ * filter only allows the characters [A-Za-z0-9.-_]. This is
+ * currently only a proxy function for getVar().
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ *
+ * @return string Requested variable
+ */
+ static function getCmd($name, $default = '', $hash = 'default')
+ {
+ return xNewsletterRequest::getVar($name, $default, $hash, 'cmd');
+ }
+
+ /**
+ * Fetches and returns a given filtered variable. The string
+ * filter deletes 'bad' HTML code, if not overridden by the mask.
+ * This is currently only a proxy function for getVar().
+ * See getVar() for more in-depth documentation on the parameters.
+ *
+ * @static
+ *
+ * @param string $name Variable name
+ * @param string $default Default value if the variable does not exist
+ * @param string $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
+ * @param int $mask Filter mask for the variable
+ *
+ * @return string Requested variable
+ */
+ static function getString($name, $default = '', $hash = 'default', $mask = 0)
+ {
+ // Cast to string, in case JREQUEST_ALLOWRAW was specified for mask
+ return (string)xNewsletterRequest::getVar($name, $default, $hash, 'string', $mask);
+ }
+
+ static function getArray($name, $default = array(), $hash = 'default')
+ {
+ return xNewsletterRequest::getVar($name, $default, $hash, 'array');
+ }
+
+ static function getText($name, $default = '', $hash = 'default')
+ {
+ return (string)xNewsletterRequest::getVar($name, $default, $hash, 'string', PUBLISHER_REQUEST_ALLOWRAW);
+ }
+
+ /**
+ * Set a variabe in on of the request variables
+ *
+ * @access public
+ *
+ * @param string $name Name
+ * @param string $value Value
+ * @param string $hash Hash
+ * @param boolean $overwrite Boolean
+ *
+ * @return string Previous value
+ */
+ static function setVar($name, $value = null, $hash = 'method', $overwrite = true)
+ {
+ //If overwrite is true, makes sure the variable hasn't been set yet
+ if (!$overwrite && array_key_exists($name, $_REQUEST)) {
+ return $_REQUEST[$name];
+ }
+ // Get the request hash value
+ $hash = strtoupper($hash);
+ if ($hash === 'METHOD') {
+ $hash = strtoupper($_SERVER['REQUEST_METHOD']);
+ }
+ $previous = array_key_exists($name, $_REQUEST) ? $_REQUEST[$name] : null;
+ switch ($hash) {
+ case 'GET' :
+ $_GET[$name] = $value;
+ $_REQUEST[$name] = $value;
+ break;
+ case 'POST' :
+ $_POST[$name] = $value;
+ $_REQUEST[$name] = $value;
+ break;
+ case 'COOKIE' :
+ $_COOKIE[$name] = $value;
+ $_REQUEST[$name] = $value;
+ break;
+ case 'FILES' :
+ $_FILES[$name] = $value;
+ break;
+ case 'ENV' :
+ $_ENV['name'] = $value;
+ break;
+ case 'SERVER' :
+ $_SERVER['name'] = $value;
+ break;
+ }
+
+ return $previous;
+ }
+
+ /**
+ * Fetches and returns a request array.
+ * The default behaviour is fetching variables depending on the
+ * current request method: GET and HEAD will result in returning
+ * $_GET, POST and PUT will result in returning $_POST.
+ * You can force the source by setting the $hash parameter:
+ * post $_POST
+ * get $_GET
+ * files $_FILES
+ * cookie $_COOKIE
+ * env $_ENV
+ * server $_SERVER
+ * method via current $_SERVER['REQUEST_METHOD']
+ * default $_REQUEST
+ *
+ * @static
+ *
+ * @param string $hash to get (POST, GET, FILES, METHOD)
+ * @param int $mask Filter mask for the variable
+ *
+ * @return mixed Request hash
+ */
+ static function get($hash = 'default', $mask = 0)
+ {
+ $hash = strtoupper($hash);
+ if ($hash === 'METHOD') {
+ $hash = strtoupper($_SERVER['REQUEST_METHOD']);
+ }
+ switch ($hash) {
+ case 'GET' :
+ $input = $_GET;
+ break;
+ case 'POST' :
+ $input = $_POST;
+ break;
+ case 'FILES' :
+ $input = $_FILES;
+ break;
+ case 'COOKIE' :
+ $input = $_COOKIE;
+ break;
+ case 'ENV' :
+ $input = & $_ENV;
+ break;
+ case 'SERVER' :
+ $input = & $_SERVER;
+ break;
+ default:
+ $input = $_REQUEST;
+ break;
+ }
+ $result = xNewsletterRequest::_cleanVar($input, $mask);
+ // Handle magic quotes compatability
+ if (get_magic_quotes_gpc() && ($hash != 'FILES')) {
+ $result = xNewsletterRequest::_stripSlashesRecursive($result);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Sets a request variable
+ *
+ * @param array $array An associative array of key-value pairs
+ * @param string $hash The request variable to set (POST, GET, FILES, METHOD)
+ * @param boolean $overwrite If true and an existing key is found, the value is overwritten, otherwise it is ingored
+ */
+ static function set($array, $hash = 'default', $overwrite = true)
+ {
+ foreach ($array as $key => $value) {
+ xNewsletterRequest::setVar($key, $value, $hash, $overwrite);
+ }
+ }
+
+ /**
+ * Cleans the request from script injection.
+ *
+ * @static
+ * @return void
+ */
+ static function clean()
+ {
+ xNewsletterRequest::_cleanArray($_FILES);
+ xNewsletterRequest::_cleanArray($_ENV);
+ xNewsletterRequest::_cleanArray($_GET);
+ xNewsletterRequest::_cleanArray($_POST);
+ xNewsletterRequest::_cleanArray($_COOKIE);
+ xNewsletterRequest::_cleanArray($_SERVER);
+ if (isset($_SESSION)) {
+ xNewsletterRequest::_cleanArray($_SESSION);
+ }
+ $REQUEST = $_REQUEST;
+ $GET = $_GET;
+ $POST = $_POST;
+ $COOKIE = $_COOKIE;
+ $FILES = $_FILES;
+ $ENV = $_ENV;
+ $SERVER = $_SERVER;
+ if (isset ($_SESSION)) {
+ $SESSION = $_SESSION;
+ }
+ foreach ($GLOBALS as $key => $value) {
+ if ($key != 'GLOBALS') {
+ unset($GLOBALS[$key]);
+ }
+ }
+ $_REQUEST = $REQUEST;
+ $_GET = $GET;
+ $_POST = $POST;
+ $_COOKIE = $COOKIE;
+ $_FILES = $FILES;
+ $_ENV = $ENV;
+ $_SERVER = $SERVER;
+ if (isset($SESSION)) {
+ $_SESSION = $SESSION;
+ }
+ }
+
+ /**
+ * Adds an array to the GLOBALS array and checks that the GLOBALS variable is not being attacked
+ *
+ * @access protected
+ *
+ * @param array $array Array to clean
+ * @param boolean $globalise True if the array is to be added to the GLOBALS
+ */
+ static function _cleanArray(&$array, $globalise = false)
+ {
+ static $banned = array('_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals');
+ foreach ($array as $key => $value) {
+ // PHP GLOBALS injection bug
+ $failed = in_array(strtolower($key), $banned);
+ // PHP Zend_Hash_Del_Key_Or_Index bug
+ $failed |= is_numeric($key);
+ if ($failed) {
+ exit('Illegal variable <strong>' . implode('</strong> or <strong>', $banned) . '</strong> passed to script.');
+ }
+ if ($globalise) {
+ $GLOBALS[$key] = $value;
+ }
+ }
+ }
+
+ /**
+ * Clean up an input variable.
+ *
+ * @param mixed $var The input variable.
+ * @param int $mask Filter bit mask. 1=no trim: If this flag is cleared and the
+ * input is a string, the string will have leading and trailing whitespace
+ * trimmed. 2=allow_raw: If set, no more filtering is performed, higher bits
+ * are ignored. 4=allow_html: HTML is allowed, but passed through a safe
+ * HTML filter first. If set, no more filtering is performed. If no bits
+ * other than the 1 bit is set, a strict filter is applied.
+ * @param string $type The variable type {@see JFilterInput::clean()}.
+ *
+ * @return string
+ */
+ static function _cleanVar($var, $mask = 0, $type = null)
+ {
+ // Static input filters for specific settings
+ static $noHtmlFilter = null;
+ static $safeHtmlFilter = null;
+ // If the no trim flag is not set, trim the variable
+ if (!($mask & 1) && is_string($var)) {
+ $var = trim($var);
+ }
+ // Now we handle input filtering
+ if ($mask & 2) {
+ // If the allow raw flag is set, do not modify the variable
+ } elseif ($mask & 4) {
+ // If the allow html flag is set, apply a safe html filter to the variable
+ if (is_null($safeHtmlFilter)) {
+ $safeHtmlFilter = xNewsletterFilterInput::getInstance(null, null, 1, 1);
+ }
+ $var = $safeHtmlFilter->clean($var, $type);
+ } else {
+ // Since no allow flags were set, we will apply the most strict filter to the variable
+ if (is_null($noHtmlFilter)) {
+ $noHtmlFilter = xNewsletterFilterInput::getInstance( /* $tags, $attr, $tag_method, $attr_method, $xss_auto */);
+ }
+ $var = $noHtmlFilter->clean($var, $type);
+ }
+
+ return $var;
+ }
+
+ /**
+ * Strips slashes recursively on an array
+ *
+ * @access protected
+ *
+ * @param array $value Array of (nested arrays of) strings
+ *
+ * @return array|string The input array with stripshlashes applied to it
+ */
+ protected function _stripSlashesRecursive($value)
+ {
+ $value = is_array($value) ? array_map(array('xNewsletterRequest', '_stripSlashesRecursive'), $value) : stripslashes($value);
+
+ return $value;
+ }
+}
+
+/**
+ * xNewsletterInput is a class for filtering input from any data source
+ * Forked from the php input filter library by: Daniel Morris <da...@ro...>
+ * Original Contributors: Gianpaolo Racca, Ghislain Picard, Marco Wandschneider, Chris Tobin and Andrew Eddie.
+ *
+ * @author Louis Landry <lou...@jo...>
+ */
+class xNewsletterFilterInput
+{
+ var $tagsArray; // default = empty array
+ var $attrArray; // default = empty array
+ var $tagsMethod; // default = 0
+ var $attrMethod; // default = 0
+ var $xssAuto; // default = 1
+ var $tagBlacklist
+ = array(
+ 'applet',
+ 'body',
+ 'bgsound',
+ 'base',
+ 'basefont',
+ 'embed',
+ 'frame',
+ 'frameset',
+ 'head',
+ 'html',
+ 'id',
+ 'iframe',
+ 'ilayer',
+ 'layer',
+ 'link',
+ 'meta',
+ 'name',
+ 'object',
+ 'script',
+ 'style',
+ 'title',
+ 'xml'
+ );
+ var $attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc'); // also will strip ALL event handlers
+ /**
+ * Constructor for inputFilter class. Only first parameter is required.
+ *
+ * @access protected
+ *
+ * @param array $tagsArray list of user-defined tags
+ * @param array $attrArray list of user-defined attributes
+ * @param int $tagsMethod WhiteList method = 0, BlackList method = 1
+ * @param int $attrMethod WhiteList method = 0, BlackList method = 1
+ * @param int $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
+ */
+ public function __construct($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1)
+ {
+ // Make sure user defined arrays are in lowercase
+ $tagsArray = array_map('strtolower', (array)$tagsArray);
+ $attrArray = array_map('strtolower', (array)$attrArray);
+ // Assign member variables
+ $this->tagsArray = $tagsArray;
+ $this->attrArray = $attrArray;
+ $this->tagsMethod = $tagsMethod;
+ $this->attrMethod = $attrMethod;
+ $this->xssAuto = $xssAuto;
+ }
+
+ /**
+ * Returns a reference to an input filter object, only creating it if it doesn't already exist.
+ * This method must be invoked as:
+ * <pre> $filter = & xNewsletterFilterInput::getInstance();</pre>
+ *
+ * @static
+ *
+ * @param array $tagsArray list of user-defined tags
+ * @param array $attrArray list of user-defined attributes
+ * @param int $tagsMethod WhiteList method = 0, BlackList method = 1
+ * @param int $attrMethod WhiteList method = 0, BlackList method = 1
+ * @param int $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
+ *
+ * @return object The xNewsletterFilterInput object.
+ * @since 1.5
+ */
+ public static function & getInstance($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1)
+ {
+ static $instances;
+ $sig = md5(serialize(array($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto)));
+ if (!isset ($instances)) {
+ $instances = array();
+ }
+ if (empty ($instances[$sig])) {
+ $instances[$sig] = new xNewsletterFilterInput($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto);
+ }
+
+ return $instances[$sig];
+ }
+
+ /**
+ * Method to be called by another php script. Processes for XSS and
+ * specified bad code.
+ *
+ * @access public
+ *
+ * @param mixed $source Input string/array-of-string to be 'cleaned'
+ * @param string $type Return type for the variable (INT, FLOAT, BOOLEAN, WORD, ALNUM, CMD, BASE64, STRING, ARRAY, PATH, NONE)
+ *
+ * @return mixed 'Cleaned' version of input parameter
+ * @static
+ */
+ public function clean($source, $type = 'string')
+ {
+ // Handle the type constraint
+ switch (strtoupper($type)) {
+ case 'INT' :
+ case 'INTEGER' :
+ // Only use the first integer value
+ preg_match('/-?[0-9]+/', (string)$source, $matches);
+ $result = @ (int)$matches[0];
+ break;
+ case 'FLOAT' :
+ case 'DOUBLE' :
+ // Only use the first floating point value
+ preg_match('/-?[0-9]+(\.[0-9]+)?/', (string)$source, $matches);
+ $result = @ (float)$matches[0];
+ break;
+ case 'BOOL' :
+ case 'BOOLEAN' :
+ $result = (bool)$source;
+ break;
+ case 'WORD' :
+ $result = (string)preg_replace('/[^A-Z_]/i', '', $source);
+ break;
+ case 'ALNUM' :
+ $result = (string)preg_replace('/[^A-Z0-9]/i', '', $source);
+ break;
+ case 'CMD' :
+ $result = (string)preg_replace('/[^A-Z0-9_\.-]/i', '', $source);
+ $result = ltrim($result, '.');
+ break;
+ case 'BASE64' :
+ $result = (string)preg_replace('/[^A-Z0-9\/+=]/i', '', $source);
+ break;
+ case 'STRING' :
+ // Check for static usage and assign $filter the proper variable
+ if (isset($this) && is_a($this, 'xNewsletterFilterInput')) {
+ $filter =& $this;
+ } else {
+ $filter = xNewsletterFilterInput::getInstance();
+ }
+ $result = (string)$filter->_remove($filter->_decode((string)$source));
+ break;
+ case 'ARRAY' :
+ $result = (is_array($source)) ? (array)$source : array();
+ break;
+ case 'PATH' :
+ $pattern = '/^[A-Za-z0-9_-]+[A-Za-z0-9_\.-]*([\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/';
+ preg_match($pattern, (string)$source, $matches);
+ $result = @ (string)$matches[0];
+ break;
+ case 'USERNAME' :
+ $result = (string)preg_replace('/[\x00-\x1F\x7F<>"\'%&]/', '', $source);
+ break;
+ default :
+ // Check for static usage and assign $filter the proper variable
+ if (is_object($this) && get_class($this) == 'xNewsletterFilterInput') {
+ $filter =& $this;
+ } else {
+ $filter = xNewsletterFilterInput::getInstance();
+ }
+ // Are we dealing with an array?
+ if (is_array($source)) {
+ foreach ($source as $key => $value) {
+ // filter element for XSS and other 'bad' code etc.
+ if (is_string($value)) {
+ $source[$key] = $filter->_remove($filter->_decode($value));
+ }
+ }
+ $result = $source;
+ } else {
+ // Or a string?
+ if (is_string($source) && !empty ($source)) {
+ // filter source for XSS and other 'bad' code etc.
+ $result = $filter->_remove($filter->_decode($source));
+ } else {
+ // Not an array or string.. return the passed parameter
+ $result = $source;
+ }
+ }
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ * Function to determine if contents of an attribute is safe
+ *
+ * @static
+ *
+ * @param array $attrSubSet A 2 element array for attributes name,value
+ *
+ * @return boolean True if bad code is detected
+ */
+ public function checkAttribute($attrSubSet)
+ {
+ $attrSubSet[0] = strtolower($attrSubSet[0]);
+ $attrSubSet[1] = strtolower($attrSubSet[1]);
+
+ return (((strpos($attrSubSet[1], 'expression') !== false) && ($attrSubSet[0]) == 'style') || (strpos($attrSubSet[1], 'javascript:') !== false)
+ || (strpos($attrSubSet[1], 'behaviour:') !== false)
+ || (strpos($attrSubSet[1], 'vbscript:') !== false)
+ || (strpos($attrSubSet[1], 'mocha:') !== false)
+ || (strpos($attrSubSet[1], 'livescript:') !== false));
+ }
+
+ /**
+ * Internal method to iteratively remove all unwanted tags and attributes
+ *
+ * @access protected
+ *
+ * @param string $source Input string to be 'cleaned'
+ *
+ * @return string 'Cleaned' version of input parameter
+ */
+ protected function _remove($source)
+ {
+ $loopCounter = 0;
+ // Iteration provides nested tag protection
+ while ($source != $this->_cleanTags($source)) {
+ $source = $this->_cleanTags($source);
+ $loopCounter++;
+ }
+
+ return $source;
+ }
+
+ /**
+ * Internal method to strip a string of certain tags
+ *
+ * @access protected
+ *
+ * @param string $source Input string to be 'cleaned'
+ *
+ * @return string 'Cleaned' version of input parameter
+ */
+ protected function _cleanTags($source)
+ {
+ /*
+ * In the beginning we don't really have a tag, so everything is
+ * postTag
+ */
+ $preTag = null;
+ $postTag = $source;
+ // Is there a tag? If so it will certainly start with a '<'
+ $tagOpen_start = strpos($source, '<');
+ while ($tagOpen_start !== false) {
+ // Get some information about the tag we are processing
+ $preTag .= substr($postTag, 0, $tagOpen_start);
+ $postTag = substr($postTag, $tagOpen_start);
+ $fromTagOpen = substr($postTag, 1);
+ $tagOpen_end = strpos($fromTagOpen, '>');
+ // Let's catch any non-terminated tags and skip over them
+ if ($tagOpen_end === false) {
+ $postTag = substr($postTag, $tagOpen_start + 1);
+ $tagOpen_start = strpos($postTag, '<');
+ continue;
+ }
+ // Do we have a nested tag?
+ $tagOpen_nested = strpos($fromTagOpen, '<');
+ if (($tagOpen_nested !== false) && ($tagOpen_nested < $tagOpen_end)) {
+ $preTag .= substr($postTag, 0, ($tagOpen_nested + 1));
+ $postTag = substr($postTag, ($tagOpen_nested + 1));
+ $tagOpen_start = strpos($postTag, '<');
+ continue;
+ }
+ // Lets get some information about our tag and setup attribute pairs
+ $currentTag = substr($fromTagOpen, 0, $tagOpen_end);
+ $tagLength = strlen($currentTag);
+ $tagLeft = $currentTag;
+ $attrSet = array();
+ $currentSpace = strpos($tagLeft, ' ');
+ // Are we an open tag or a close tag?
+ if (substr($currentTag, 0, 1) == '/') {
+ // Close Tag
+ $isCloseTag = true;
+ list ($tagName) = explode(' ', $currentTag);
+ $tagName = substr($tagName, 1);
+ } else {
+ // Open Tag
+ $isCloseTag = false;
+ list ($tagName) = explode(' ', $currentTag);
+ }
+ /*
+ * Exclude all "non-regular" tagnames
+ * OR no tagname
+ * OR remove if xssauto is on and tag is blacklisted
+ */
+ if ((!preg_match("/^[a-z][a-z0-9]*$/i", $tagName)) || (!$tagName)
+ || ((in_array(strtolower($tagName), $this->tagBlacklist))
+ && ($this->xssAuto))
+ ) {
+ $postTag = substr($postTag, ($tagLength + 2));
+ $tagOpen_start = strpos($postTag, '<');
+ // Strip tag
+ continue;
+ }
+ /*
+ * Time to grab any attributes from the tag... need this section in
+ * case attributes have spaces in the values.
+ */
+ while ($currentSpace !== false) {
+ $attr = '';
+ $fromSpace = substr($tagLeft, ($currentSpace + 1));
+ $nextSpace = strpos($fromSpace, ' ');
+ $openQuotes = strpos($fromSpace, '"');
+ $closeQuotes = strpos(substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1;
+ // Do we have an attribute to process? [check for equal sign]
+ if (strpos($fromSpace, '=') !== false) {
+ /*
+ * If the attribute value is wrapped in quotes we need to
+ * grab the substring from the closing quote, otherwise grab
+ * till the next space
+ */
+ if (($openQuotes !== false) && (strpos(substr($fromSpace, ($openQuotes + 1)), '"') !== false)) {
+ $attr = substr($fromSpace, 0, ($closeQuotes + 1));
+ } else {
+ $attr = substr($fromSpace, 0, $nextSpace);
+ }
+ } else {
+ /*
+ * No more equal signs so add any extra text in the tag into
+ * the attribute array [eg. checked]
+ */
+ if ($fromSpace != '/') {
+ $attr = substr($fromSpace, 0, $nextSpace);
+ }
+ }
+ // Last Attribute Pair
+ if (!$attr && $fromSpace != '/') {
+ $attr = $fromSpace;
+ }
+ // Add attribute pair to the attribute array
+ $attrSet[] = $attr;
+ // Move search point and continue iteration
+ $tagLeft = substr($fromSpace, strlen($attr));
+ $currentSpace = strpos($tagLeft, ' ');
+ }
+ // Is our tag in the user input array?
+ $tagFound = in_array(strtolower($tagName), $this->tagsArray);
+ // If the tag is allowed lets append it to the output string
+ if ((!$tagFound && $this->tagsMethod) || ($tagFound && !$this->tagsMethod)) {
+ // Reconstruct tag with allowed attributes
+ if (!$isCloseTag) {
+ // Open or Single tag
+ $attrSet = $this->_cleanAttributes($attrSet);
+ $preTag .= '<' . $tagName;
+ for ($i = 0; $i < count($attrSet); $i++) {
+ $preTag .= ' ' . $attrSet[$i];
+ }
+ // Reformat single tags to XHTML
+ if (strpos($fromTagOpen, '</' . $tagName)) {
+ $preTag .= '>';
+ } else {
+ $preTag .= ' />';
+ }
+ } else {
+ // Closing Tag
+ $preTag .= '</' . $tagName . '>';
+ }
+ }
+ // Find next tag's start and continue iteration
+ $postTag = substr($postTag, ($tagLength + 2));
+ $tagOpen_start = strpos($postTag, '<');
+ }
+ // Append any code after the end of tags and return
+ if ($postTag != '<') {
+ $preTag .= $postTag;
+ }
+
+ return $preTag;
+ }
+
+ /**
+ * Internal method to strip a tag of certain attributes
+ *
+ * @access protected
+ *
+ * @param array $attrSet Array of attribute pairs to filter
+ *
+ * @return array Filtered array of attribute pairs
+ */
+ protected function _cleanAttributes($attrSet)
+ {
+ // Initialize variables
+ $newSet = array();
+ // Iterate through attribute pairs
+ for ($i = 0; $i < count($attrSet); $i++) {
+ // Skip blank spaces
+ if (!$attrSet[$i]) {
+ continue;
+ }
+ // Split into name/value pairs
+ $attrSubSet = explode('=', trim($attrSet[$i]), 2);
+ list ($attrSubSet[0]) = explode(' ', $attrSubSet[0]);
+ /*
+ * Remove all "non-regular" attribute names
+ * AND blacklisted attributes
+ */
+ if ((!preg_match('/[a-z]*$/i', $attrSubSet[0]))
+ || (($this->xssAuto)
+ && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist))
+ || (substr($attrSubSet[0], 0, 2) == 'on')))
+ ) {
+ continue;
+ }
+ // XSS attribute value filtering
+ if ($attrSubSet[1]) {
+ // strips unicode, hex, etc
+ $attrSubSet[1] = str_replace('&#', '', $attrSubSet[1]);
+ // strip normal newline within attr value
+ $attrSubSet[1] = preg_replace('/[\n\r]/', '', $attrSubSet[1]);
+ // strip double quotes
+ $attrSubSet[1] = str_replace('"', '', $attrSubSet[1]);
+ // convert single quotes from either side to doubles (Single quotes shouldn't be used to pad attr value)
+ if ((substr($attrSubSet[1], 0, 1) == "'") && (substr($attrSubSet[1], (strlen($attrSubSet[1]) - 1), 1) == "'")) {
+ $attrSubSet[1] = substr($attrSubSet[1], 1, (strlen($attrSubSet[1]) - 2));
+ }
+ // strip slashes
+ $attrSubSet[1] = stripslashes($attrSubSet[1]);
+ }
+ // Autostrip script tags
+ if (xNewsletterFilterInput::checkAttribute($attrSubSet)) {
+ continue;
+ }
+ // Is our attribute in the user input array?
+ $attrFound = in_array(strtolower($attrSubSet[0]), $this->attrArray);
+ // If the tag is allowed lets keep it
+ if ((!$attrFound && $this->attrMethod) || ($attrFound && !$this->attrMethod)) {
+ // Does the attribute have a value?
+ if ($attrSubSet[1]) {
+ $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"';
+ } elseif ($attrSubSet[1] == "0") {
+ /*
+ * Special Case
+ * Is the value 0?
+ */
+ $newSet[] = $attrSubSet[0] . '="0"';
+ } else {
+ $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[0] . '"';
+ }
+ }
+ }
+
+ return $newSet;
+ }
+
+ /**
+ * Try to convert to plaintext
+ *
+ * @access protected
+ *
+ * @param string $source
+ *
+ * @return string Plaintext string
+ */
+ protected function _decode($source)
+ {
+ // entity decode
+ $trans_tbl = get_html_translation_table(HTML_ENTITIES);
+ foreach ($trans_tbl as $k => $v) {
+ $ttr[$v] = utf8_encode($k);
+ }
+ $source = strtr($source, $ttr);
+ // convert decimal
+ //$source = preg_replace('/&#(\d+);/me', "chr(\\1)", $source); // decimal notation
+ //TODO swich to this once we have PHP 5.3 as minimum
+// $source = preg_replace_callback('/&#(\d+);/m', function($m) {return chr($m[1]);}, $source); // decimal notation
+ $source = preg_replace_callback('/&#(\d+);/m', create_function('$matches', "return chr(\$matches[1]);"), $source); // decimal notation
+ // convert hex
+ //$source = preg_replace('/&#x([a-f0-9]+);/mei', "chr(0x\\1)", $source); // hex notation
+ //TODO swich to this once we have PHP 5.3 as minimum
+// $source = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m) {return chr(hexdec($m[1]));}, $source); // hex notation
+ $source = preg_replace_callback(
+ '/&#x([a-f0-9]+);/mi',
+ create_function('$matches', "return chr('0x'.\$matches[1]);"),
+ $source
+ ); // hex notation
+
+ return $source;
+ }
+}
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/session.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/session.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/session.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -0,0 +1,103 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * xNewsletterSession class
+ *
+ * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package xNewsletter
+ * @since 1.3
+ * @author trabis <lus...@gm...>
+ * @author Harry Fuecks (PHP Anthology Volume II)
+ * @version svn:$id$
+ */
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+
+class xNewsletterSession
+{
+ /**
+ * Session constructor<br />
+ * Starts the session with session_start()
+ * <strong>Note:</strong> that if the session has already started,
+ * session_start() does nothing
+ */
+ protected function __construct()
+ {
+ @session_start();
+ }
+
+ /**
+ * Sets a session variable
+ *
+ * @param string $name name of variable
+ * @param mixed $value value of variable
+ *
+ * @return void
+ * @access public
+ */
+ public function set($name, $value)
+ {
+ $_SESSION[$name] = $value;
+ }
+
+ /**
+ * Fetches a session variable
+ *
+ * @param string $name name of variable
+ *
+ * @return mixed value of session variable
+ * @access public
+ */
+ public function get($name)
+ {
+ if (isset($_SESSION[$name])) {
+ return $_SESSION[$name];
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Deletes a session variable
+ *
+ * @param string $name name of variable
+ *
+ * @return void
+ * @access public
+ */
+ public function del($name)
+ {
+ unset($_SESSION[$name]);
+ }
+
+ /**
+ * Destroys the whole session
+ *
+ * @return void
+ * @access public
+ */
+ public function destroy()
+ {
+ $_SESSION = array();
+ session_destroy();
+ }
+
+ public static function &getInstance()
+ {
+ static $_sess;
+ if (!isset($_sess)) {
+ $_sess = new xNewsletterSession();
+ }
+ return $_sess;
+ }
+}
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xnewsletter.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xnewsletter.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/class/xnewsletter.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -0,0 +1,127 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * xNewsletterxNewsletter class
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package xNewsletter
+ * @since 1.3
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+class xNewsletterxNewsletter
+{
+ var $dirname;
+ var $module;
+ var $handler;
+ var $config;
+ var $debug;
+ var $debugArray = array();
+
+ protected function __construct($debug)
+ {
+ $this->debug = $debug;
+ $this->dirname = basename(dirname(dirname(__FILE__)));
+ }
+
+ static function &getInstance($debug = false)
+ {
+ static $instance = false;
+ if (!$instance) {
+ $instance = new self($debug);
+ }
+//error_log("istance: [" . print_r($istance,true) . "]");
+//phpinfo();
+//debug_print_backtrace ();
+ return $instance;
+ }
+
+ function &getModule()
+ {
+ if ($this->module == null) {
+ $this->initModule();
+ }
+ return $this->module;
+ }
+
+ function getConfig($name = null)
+ {
+ if ($this->config == null) {
+ $this->initConfig();
+ }
+ if (!$name) {
+ $this->addLog("Getting all config");
+ return $this->config;
+ }
+ if (!isset($this->config[$name])) {
+ $this->addLog("ERROR :: CONFIG '{$name}' does not exist");
+ return null;
+ }
+ $this->addLog("Getting config '{$name}' : " . print_r($this->config[$name], true));
+ return $this->config[$name];
+ }
+
+ function setConfig($name = null, $value = null)
+ {
+ if ($this->config == null) {
+ $this->initConfig();
+ }
+ $this->config[$name] = $value;
+ $this->addLog("Setting config '{$name}' : " . $this->config[$name]);
+ return $this->config[$name];
+ }
+
+ function &getHandler($name)
+ {
+ if (!isset($this->handler[$name . '_handler'])) {
+ $this->initHandler($name);
+ }
+ $this->addLog("Getting handler '{$name}'");
+ return $this->handler[$name . '_handler'];
+ }
+
+ function initModule()
+ {
+ global $xoopsModule;
+ if (isset($xoopsModule) && is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $this->dirname) {
+ $this->module = $xoopsModule;
+ } else {
+ $hModule = xoops_gethandler('module');
+ $this->module = $hModule->getByDirname($this->dirname);
+ }
+ $this->addLog('INIT MODULE');
+ }
+
+ function initConfig()
+ {
+ $this->addLog('INIT CONFIG');
+ $hModConfig = xoops_gethandler('config');
+ $this->config = $hModConfig->getConfigsByCat(0, $this->getModule()->getVar('mid'));
+ }
+
+ function initHandler($name)
+ {
+ $this->addLog('INIT ' . $name . ' HANDLER');
+ $this->handler[$name . '_handler'] = xoops_getModuleHandler($name, $this->dirname);
+ }
+
+ function addLog($log)
+ {
+ if ($this->debug) {
+ if (is_object($GLOBALS['xoopsLogger'])) {
+ $GLOBALS['xoopsLogger']->addExtra($this->module->name(), $log);
+ }
+ }
+ }
+}
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/cron.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/cron.php 2014-02-07 20:41:47 UTC (rev 12291)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/cron.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -37,28 +37,28 @@
require_once XOOPS_ROOT_PATH . "/modules/xNewsletter/header.php";
require_once XOOPS_ROOT_PATH . "/modules/xNewsletter/include/task.inc.php";
-$modhandler =& xoops_gethandler('module');
-$xoopsModule =& $modhandler->getByDirname("xNewsletter");
-$config_handler =& xoops_gethandler("config");
-$xoopsModuleConfig =& $config_handler->getConfigsByCat(0,$xoopsModule->mid());
-$xn_send_in_packages = $xoopsModuleConfig['xn_send_in_packages'];
-
-$result_exec = Execute_Tasks($xn_send_in_packages, 0);
+$module_handler = xoops_gethandler('module');
+$config_handler = xoops_gethandler('config');
+$xoopsModule = $module_handler->getByDirname('xNewsletter');
+$xoopsModuleConfig = $config_handler->getConfigsByCat(0,$xoopsModule->mid());
+
+$result_exec = xNewsletter_executeTasks($xoopsModuleConfig['xn_send_in_packages'], 0);
+
if ($result_exec != '') {
//you can enable the block for creating protocol for cron
- $obj_protocol =& $protocolHandler->create();
- $obj_protocol->setVar("protocol_letter_id", "0");
- $obj_protocol->setVar("protocol_subscriber_id", "0");
- $obj_protocol->setVar("protocol_status", "Cron: ".$result_exec);
- $obj_protocol->setVar("protocol_success", "1");
- $obj_protocol->setVar("protocol_submitter", "0");
- $obj_protocol->setVar("protocol_created", time());
+ $protocolObj = $protocolHandler->create();
+ $protocolObj->setVar("protocol_letter_id", "0");
+ $protocolObj->setVar("protocol_subscriber_id", "0");
+ $protocolObj->setVar("protocol_status", "Cron: ".$result_exec);
+ $protocolObj->setVar("protocol_success", "1");
+ $protocolObj->setVar("protocol_submitter", "0");
+ $protocolObj->setVar("protocol_created", time());
- if ($protocolHandler->insert($obj_protocol)) {
+ if ($protocolHandler->insert($protocolObj)) {
//create protocol is ok
} else {
- echo $obj_protocol->getHtmlErrors();
+ echo $protocolObj->getHtmlErrors();
}
}
echo "<br/>result cron:" . $result_exec;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php 2014-02-07 20:41:47 UTC (rev 12291)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/header.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -28,19 +28,24 @@
include '../../mainfile.php';
+global $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
+
include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
-include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/include/config.php";
+include_once XOOPS_ROOT_PATH . "/modules/{$xoopsModule->getVar('dirname')}/include/config.php";
include_once XNEWSLETTER_PATH . "/include/functions.php";
+// Get Xoops instances
+$gperm_handler = xoops_gethandler('groupperm');
+$member_handler = xoops_gethandler('member');
+$config_handler = xoops_gethandler("config");
+
xoops_load('XoopsUserUtility');
$myts = & MyTextSanitizer::getInstance();
$style = XNEWSLETTER_URL . "/css/style.css";
-global $xoopsConfig, $xoopsModule, $xoopsModuleConfig;
if (empty($xoopsModuleConfig)) {
- $config_handler =& xoops_gethandler("config");
- $xoopsModuleConfig =& $config_handler->getConfigsByCat(0,$xoopsModule->mid());
+ $xoopsModuleConfig = $config_handler->getConfigsByCat(0, $xoopsModule->mid());
}
// Get the module instances
@@ -53,9 +58,6 @@
$protocolHandler =& xoops_getModuleHandler('xNewsletter_protocol', XNEWSLETTER_DIRNAME);
$mailinglistHandler =& xoops_getModuleHandler('xNewsletter_mailinglist', XNEWSLETTER_DIRNAME);
-// Get Xoops instances
-$gperm_handler =& xoops_gethandler('groupperm');
-$member_handler =& xoops_gethandler('member');
xoops_loadLanguage('modinfo', XNEWSLETTER_DIRNAME);
xoops_loadLanguage('main', XNEWSLETTER_DIRNAME);
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/common.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -0,0 +1,62 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * xNewsletter module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package xNewsletter
+ * @since 1.3
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+// This must contain the name of the folder in which reside xNewsletter
+define("XNEWSLETTER_DIRNAME", basename(dirname(dirname(__FILE__))));
+define("XNEWSLETTER_URL", XOOPS_URL . '/modules/' . XNEWSLETTER_DIRNAME);
+define("XNEWSLETTER_IMAGES_URL", XNEWSLETTER_URL . '/images');
+define("XNEWSLETTER_ADMIN_URL", XNEWSLETTER_URL . '/admin');
+define("XNEWSLETTER_ROOT_PATH", XOOPS_ROOT_PATH . '/modules/' . XNEWSLETTER_DIRNAME);
+
+xoops_loadLanguage('common', XNEWSLETTER_DIRNAME);
+
+//include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+//include_once XOOPS_ROOT_PATH . '/class/tree.php';
+//include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+
+//include_once XNEWSLETTER_ROOT_PATH . '/include/functions.php';
+include_once XNEWSLETTER_ROOT_PATH . '/include/constants.php';
+include_once XNEWSLETTER_ROOT_PATH . '/class/session.php'; // xNewsletterSession class
+include_once XNEWSLETTER_ROOT_PATH . '/class/xnewsletter.php'; // xNewsletterxNewsletter class
+include_once XNEWSLETTER_ROOT_PATH . '/class/request.php'; // xNewsletterRequest class
+
+xoops_load('XoopsUserUtility');
+// MyTextSanitizer object
+$myts = MyTextSanitizer::getInstance();
+
+$debug = false;
+$xnewsletter = xNewsletterxNewsletter::getInstance($debug);
+
+//This is needed or it will not work in blocks.
+global $xnewsletter_isAdmin;
+
+// Load only if module is installed
+if (is_object($xnewsletter->getModule())) {
+ // Find if the user is admin of the module
+ $xnewsletter_isAdmin = xnewsletter_userIsAdmin();
+}
+
+// Load Xoops handlers
+$module_handler = xoops_gethandler('module');
+$member_handler = xoops_gethandler('member');
+$notification_handler = &xoops_gethandler('notification');
+$gperm_handler = xoops_gethandler('groupperm');
Added: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/constants.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/constants.php (rev 0)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/constants.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -0,0 +1,45 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * xNewsletter module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package xNewsletter
+ * @since 1.3
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+// constants for account
+define("_AM_ACCOUNTS_TYPE_VAL_PHP_MAIL", "1");
+define("_AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL", "2");
+define("_AM_ACCOUNTS_TYPE_VAL_POP3", "3");
+define("_AM_ACCOUNTS_TYPE_VAL_SMTP", "4");
+define("_AM_ACCOUNTS_TYPE_VAL_GMAIL", "5");
+
+define("_AM_ACCOUNTS_TYPE_INBOX","INBOX");
+define("_AM_ACCOUNTS_TYPE_HARDBOX","INBOX.hard");
+define("_AM_ACCOUNTS_TYPE_SOFTBOX","INBOX.soft");
+
+// constants for actions letter
+define("_AM_XNEWSLETTER_LETTER_ACTION_VAL_NO", "0");
+define("_AM_XNEWSLETTER_LETTER_ACTION_VAL_PREVIEW", "1");
+define("_AM_XNEWSLETTER_LETTER_ACTION_VAL_SEND", "2");
+define("_AM_XNEWSLETTER_LETTER_ACTION_VAL_SENDTEST", "3");
+
+// constants for bounced mail handler
+define("_AM_XNEWSLETTER_BOUNCETYPE_HARD","hard");
+define("_AM_XNEWSLETTER_BOUNCETYPE_SOFT","soft");
+define("_AM_XNEWSLETTER_BMH_MEASURE_VAL_ALL", -1);
+define("_AM_XNEWSLETTER_BMH_MEASURE_VAL_PENDING", 0);
+define("_AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING", 1);
+define("_AM_XNEWSLETTER_BMH_MEASURE_VAL_QUIT", 2);
+define("_AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE", 3);
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php 2014-02-07 20:41:47 UTC (rev 12291)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/include/functions.php 2014-02-07 21:20:20 UTC (rev 12292)
@@ -53,8 +53,31 @@
}
}
+/**
+ * Checks if a user is admin of Wfdownloads
+ *
+ * @return boolean
+ */
+function xNewsletter_userIsAdmin()
+{
+ global $xoopsUser;
+ $xnewsletter = xNewsletterxNewsletter::getInstance();
+ static $xnewsletter_isAdmin;
+ if (isset($xnewsletter_isAdmin)) {
+ return $xnewsletter_isAdmin;
+ }
+
+ if (!$xoopsUser) {
+ $xnewsletter_isAdmin = false;
+ } else {
+ $xnewsletter_isAdmin = $xoopsUser->isAdmin($xnewsletter->getModule()->getVar('mid'));
+ }
+
+ return $xnewsletter_isAdmin;
+}
+
function xNewsletter_checkEmail($email, $antispam = false) {
include_once XOOPS_ROOT_PATH . '/include/functions.php';
return checkEmail($email, $antispam);
@@ -277,14 +300,14 @@
-function UserAllowedCreateCat($cat_id = 0) {
+function xNewsletter_userAllowedCreateCat($cat_id = 0) {
//check the rights of current user
//if a cat is defined, than only check for this cat, otherwise check whether there is minimum one cat with right create
global $xoopsUser, $catHandler;
$allowedit = 0;
- $curren...
[truncated message content] |
|
From: <luc...@us...> - 2014-02-07 20:41:52
|
Revision: 12291
http://sourceforge.net/p/xoops/svn/12291
Author: luciorota
Date: 2014-02-07 20:41:47 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
fixed error when importing fields with quote
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/csv.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -41,8 +41,9 @@
-function xnewsletter_plugin_getdata_csv( $cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist, $file, $delimiter, $header ) {
+function xnewsletter_plugin_getdata_csv($cat_id, $action_after_read, $limitCheck, $skipCatsubscrExist, $file, $delimiter, $header) {
global $xoopsDB;
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
require_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -62,32 +63,46 @@
$lastname = isset($lineArray[3]) ? $lineArray[3] : "";
if ($email != "") {
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
- if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
+ if ($skipCatsubscrExist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert = $xoopsDB->queryF($sql);
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
}
}
$i++;
if ($j == 100000) break; //maximum number of processing to avoid cache overflow
- if ($limitcheck > 0 && $j == $limitcheck) $import_status = 0;
+ if ($limitCheck > 0 && $j == $limitCheck) $import_status = 0;
}
- fclose($handle);
+ fclose($handle);
}
return $j;
}
-function xnewsletter_plugin_getform_csv( $cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist, $action=false) {
+function xnewsletter_plugin_getform_csv( $cat_id, $action_after_read, $limitCheck, $skipCatsubscrExist, $action = false) {
if ($action === false) {
$action = $_SERVER["REQUEST_URI"];
}
@@ -108,8 +123,8 @@
$form->addElement(new XoopsFormHidden("plugin", "csv"));
$form->addElement(new XoopsFormHidden("cat_id", $cat_id));
$form->addElement(new XoopsFormHidden("action_after_read", $action_after_read));
- $form->addElement(new XoopsFormHidden("limitcheck", $limitcheck));
- $form->addElement(new XoopsFormHidden("skipcatsubscrexist", $skipcatsubscrexist));
+ $form->addElement(new XoopsFormHidden("limitcheck", $limitCheck));
+ $form->addElement(new XoopsFormHidden("skipcatsubscrexist", $skipCatsubscrExist));
$form->addElement(new XoopsFormHidden("op", "searchdata"));
$form->addElement(new XoopsFormButton("", "submit", _AM_XNEWSLETTER_IMPORT_CONTINUE, "submit"));
return $form;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/evennews.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -43,6 +43,7 @@
function xnewsletter_plugin_getdata_evennews( $cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist ) {
global $xoopsDB;
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
require_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -51,7 +52,8 @@
$i = 0;
$j = 0;
- $sql = "SELECT `user_email`, `user_name`, `user_nick` FROM {$xoopsDB->prefix("evennews_members")}";
+ $sql = "SELECT `user_email`, `user_name`, `user_nick`";
+ $sql .= " FROM {$xoopsDB->prefix("evennews_members")}";
$sql .= " WHERE (`user_email` is not null and not(`user_email`=''))";
$result_users = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
while ($lineArray = mysql_fetch_array($result_users)) {
@@ -61,16 +63,30 @@
$firstname = $lineArray[1];
$lastname = $lineArray[2];
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql.= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert = mysql_query($sql);
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
$i++;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/rmbulletin.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -43,6 +43,7 @@
function xnewsletter_plugin_getdata_rmbulletin( $cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist ) {
global $xoopsDB;
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
require_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -51,7 +52,8 @@
$i = 0;
$j = 0;
- $sql = "SELECT `email` FROM ".$xoopsDB->prefix("rmb_users");
+ $sql = "SELECT `email`";
+ $sql .= " FROM ".$xoopsDB->prefix("rmb_users");
$result_users = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
while ($lineArray = mysql_fetch_array($result_users)) {
$i++;
@@ -60,16 +62,30 @@
$firstname = "";
$lastname = "";
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert=mysql_query($sql);
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
$i++;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/smartpartner.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -43,7 +43,8 @@
function xnewsletter_plugin_getdata_smartpartner( $cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist ) {
global $xoopsDB;
-
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
+
require_once XNEWSLETTER_PATH . "/include/functions.php";
$table_import = $xoopsDB->prefix('mod_xnewsletter_import');
@@ -51,7 +52,9 @@
$i = 0;
$j = 0;
- $sql = "SELECT `contact_email`, `contact_name` FROM " . $xoopsDB->prefix("smartpartner_partner") . " WHERE (`contact_email` is not null and not(`contact_email`=''))";
+ $sql = "SELECT `contact_email`, `contact_name`";
+ $sql .= " FROM " . $xoopsDB->prefix("smartpartner_partner");
+ $sql .= " WHERE (`contact_email` is not null and not(`contact_email`=''))";
$result_users = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
while ($lineArray = mysql_fetch_array($result_users)) {
$i++;
@@ -60,16 +63,30 @@
$firstname = "";
$lastname = $lineArray[1];
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert=mysql_query($sql);
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
$i++;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/subscribers.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -43,6 +43,7 @@
function xnewsletter_plugin_getdata_subscribers( $cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist ) {
global $xoopsDB;
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
require_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -51,7 +52,9 @@
$i = 0;
$j = 0;
- $sql = "SELECT `user_email`, `user_name` FROM " . $xoopsDB->prefix("subscribers_user") . " WHERE (`user_email` is not null and not(`user_email`=''))";
+ $sql = "SELECT `user_email`, `user_name`";
+ $sql .= " FROM " . $xoopsDB->prefix("subscribers_user");
+ $sql .= " WHERE (`user_email` is not null and not(`user_email`=''))";
$result_users = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
while ($lineArray = mysql_fetch_array($result_users)) {
$i++;
@@ -60,16 +63,30 @@
$firstname = "";
$lastname = $lineArray[1];
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert=mysql_query($sql);
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
$i++;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/weblinks.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -43,6 +43,7 @@
function xnewsletter_plugin_getdata_weblinks($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist) {
global $xoopsDB;
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
require_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -51,7 +52,8 @@
$i = 0;
$j = 0;
- $sql = "SELECT `mail`, `name` FROM " . $xoopsDB->prefix("weblinks_link");
+ $sql = "SELECT `mail`, `name`";
+ $sql .= " FROM " . $xoopsDB->prefix("weblinks_link");
$result_users = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
while ($lineArray = mysql_fetch_array($result_users)) {
$i++;
@@ -60,16 +62,30 @@
$firstname = "";
$lastname = $lineArray[1];
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert = mysql_query($sql);
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
$i++;
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php 2014-02-07 11:05:17 UTC (rev 12290)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/plugins/xoopsuser.php 2014-02-07 20:41:47 UTC (rev 12291)
@@ -42,8 +42,9 @@
-function xnewsletter_plugin_getdata_xoopsuser($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist,$arr_groups) {
+function xnewsletter_plugin_getdata_xoopsuser($cat_id, $action_after_read, $limitcheck, $skipCatsubscrExist, $arr_groups) {
global $xoopsDB;
+ $importHandler =& xoops_getModuleHandler('xNewsletter_import', 'xNewsletter');
require_once XNEWSLETTER_PATH . "/include/functions.php";
@@ -52,17 +53,10 @@
$i = 0;
$j = 0;
- $groups = '';
$sql = "SELECT `email`, `name`,`uname` FROM {$xoopsDB->prefix("groups_users_link")}";
$sql .= " INNER JOIN {$xoopsDB->prefix("users")} ON {$xoopsDB->prefix("groups_users_link")}.uid = {$xoopsDB->prefix("users")}.uid";
- $sql .= " WHERE ({$xoopsDB->prefix("groups_users_link")}.groupid IN (";
- foreach($arr_groups as $key => $groupid) {
- if (!$groups=='')
- $groups .= ",";
- $groups .= $groupid;
- }
- $sql .= $groups;
- $sql .= ")) GROUP BY `email`, `name`, `uname`";
+ $sql .= " WHERE ({$xoopsDB->prefix("groups_users_link")}.groupid IN (" . implode(',', $arr_groups) . "))";
+ $sql .= " GROUP BY `email`, `name`, `uname`";
$result_users = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
while ($lineArray = mysql_fetch_array($result_users)) {
@@ -72,28 +66,42 @@
$firstname = "";
$lastname = ($lineArray[1]=='') ? $lineArray[2] : $lineArray[1];
- $subscr_id = xnewsletter_plugin_checkemail($email);
- $catsubscr_id = xnewsletter_plugin_checkemail_cat($subscr_id, $cat_id);
+ $subscr_id = xNewsletter_pluginCheckEmail($email);
+ $catsubscr_id = xNewsletter_pluginCheckCatSubscr($subscr_id, $cat_id);
- if ($skipcatsubscrexist == 1 && $catsubscr_id > 0) {
+ if ($skipCatsubscrExist == 1 && $catsubscr_id > 0) {
//skip existing subscriptions
} else {
$currcatid = $catsubscr_id > 0 ? 0 : $cat_id;
- $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
- $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
- $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
+ $importObj = $importHandler->create();
+ $importObj->setVar('import_email', $email);
+ $importObj->setVar('import_sex', $sex);
+ $importObj->setVar('import_firstname', $firstname);
+ $importObj->setVar('import_lastname', $lastname);
+ $importObj->setVar('import_cat_id', $currcatid);
+ $importObj->setVar('import_subscr_id', $subscr_id);
+ $importObj->setVar('import_catsubscr_id', $catsubscr_id);
+ $importObj->setVar('import_status', $import_status);
+ if (!$importHandler->insert($importObj)) {
+ echo $importObj->getHtmlErrors();
+ exit();
+ }
+ unset($importObj);
+// $sql = "INSERT INTO {$table_import} (import_email, import_sex, import_firstname, import_lastname, import_cat_id, import_subscr_id, import_catsubscr_id, import_status)";
+// $sql .= " VALUES ('$email', '$sex', '$firstname', '$lastname', $currcatid, $subscr_id, $catsubscr_id, $import_status)";
+// $result_insert = $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
$j++;
}
$i++;
if ($j == 100000) break; //maximum number of processing to avoid cache overflow
- if ($limitcheck > 0 && $j == $limitcheck) $import_status = 0;
+ if ($limitCheck > 0 && $j == $limitCheck) $import_status = 0;
}
return $j;
}
-function xnewsletter_plugin_getform_xoopsuser($cat_id, $action_after_read, $limitcheck, $skipcatsubscrexist) {
+function xnewsletter_plugin_getform_xoopsuser($cat_id, $action_after_read, $limitCheck, $skipCatsubscrExist) {
global $xoopsDB, $xoopsModuleConfig;
$member_handler = &xoops_gethandler('member');
@@ -125,8 +133,8 @@
$form->addElement(new XoopsFormHidden("plugin", "xoopsuser"));
$form->addElement(new XoopsFormHidden("cat_id", $cat_id));
$form->addElement(new XoopsFormHidden("action_after_read", $action_after_read));
- $form->addElement(new XoopsFormHidden("limitcheck", $limitcheck));
- $form->addElement(new XoopsFormHidden("skipcatsubscrexist", $skipcatsubscrexist));
+ $form->addElement(new XoopsFormHidden("limitcheck", $limitCheck));
+ $form->addElement(new XoopsFormHidden("skipcatsubscrexist", $skipCatsubscrExist));
$form->addElement(new XoopsFormHidden("op", "searchdata"));
$form->addElement(new XoopsFormButton("", "submit", _AM_XNEWSLETTER_IMPORT_CONTINUE, "submit"));
return $form;
|
|
From: <be...@us...> - 2014-02-07 11:05:25
|
Revision: 12290
http://sourceforge.net/p/xoops/svn/12290
Author: beckmi
Date: 2014-02-07 11:05:17 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
Changes from Voltan (see changelog)
Modified Paths:
--------------
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/attributes.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/categories.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/dashboard.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/delivery.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/discounts.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/files.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/gateways.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lists.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/location.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lowstock.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/maintain.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/manufacturers.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/newsletter.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/orders.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/packing.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/payment.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/products.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/property.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/texts.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/vat.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/vendors.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/exports/csv.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/exports/dbase.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/exports/export.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/functions.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/gateway.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/paypal/gateway.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/paypal/language/english/main.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/paypal/language/french/main.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/pec24/gateway.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/pec24/language/english/main.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/pec24/language/persian/main.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/gateways/pec24/nusoap.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/index.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/menu.php
XoopsModules/oledrion/branches/voltan/oledrion/admin/productsselector.php
XoopsModules/oledrion/branches/voltan/oledrion/ajax.php
XoopsModules/oledrion/branches/voltan/oledrion/all-lists.php
XoopsModules/oledrion/branches/voltan/oledrion/all-products.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_ajax_search.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_best_sales.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_block_tag.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_cart.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_categories.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_categoy_lists.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_mostviewed_lists.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_my_lists.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_new.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_promotion.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_random.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_random_lists.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_rated.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_recent_lists.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_recentlysold.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_recommended.php
XoopsModules/oledrion/branches/voltan/oledrion/blocks/oledrion_top.php
XoopsModules/oledrion/branches/voltan/oledrion/caddy.php
XoopsModules/oledrion/branches/voltan/oledrion/cancel-payment.php
XoopsModules/oledrion/branches/voltan/oledrion/categories-map.php
XoopsModules/oledrion/branches/voltan/oledrion/category.php
XoopsModules/oledrion/branches/voltan/oledrion/cgv.php
XoopsModules/oledrion/branches/voltan/oledrion/checkout.php
XoopsModules/oledrion/branches/voltan/oledrion/class/.directory
XoopsModules/oledrion/branches/voltan/oledrion/class/PersistableObjectHandler.php
XoopsModules/oledrion/branches/voltan/oledrion/class/classheader.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_attributes.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_caddy.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_caddy_attributes.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_cat.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_commands.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_currency.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_delivery.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_delivery_payment.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_discounts.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_files.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_gateways.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_gateways_options.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_handlers.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_lists.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_location.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_location_delivery.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_manufacturer.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_packing.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_parameters.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_payment.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_payment_log.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_persistent_cart.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_plugins.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_products.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_products_list.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_productsmanu.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_reductions.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_related.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_shelf.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_shelf_parameters.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_utils.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_vat.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_vendors.php
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_votedata.php
XoopsModules/oledrion/branches/voltan/oledrion/class/registryfile.php
XoopsModules/oledrion/branches/voltan/oledrion/class/tree.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/Canvas.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/Dimension.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/Exception.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/FileMapperFactory.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/Image.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/OpFactory.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/PaletteImage.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/TrueColorImage.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/WideImage.inc.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/fonts/Font_GDF.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/fonts/Font_TTF.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/mappers/ImageFileMapper_GD.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/mappers/ImageFileMapper_GD2.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/mappers/ImageFileMapper_GIF.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/mappers/ImageFileMapper_JPEG.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/mappers/ImageFileMapper_PNG.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/ApplyConvolution.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/ApplyFilter.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/ApplyMask.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/AsGrayscale.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/CopyChannelsPalette.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/CopyChannelsTrueColor.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/CorrectGamma.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Crop.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Flip.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/GetMask.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Merge.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Mirror.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Resize.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Rotate.class.php
XoopsModules/oledrion/branches/voltan/oledrion/class/wideimage/operations/Unsharp.class.php
XoopsModules/oledrion/branches/voltan/oledrion/comment_delete.php
XoopsModules/oledrion/branches/voltan/oledrion/comment_edit.php
XoopsModules/oledrion/branches/voltan/oledrion/comment_fast.php
XoopsModules/oledrion/branches/voltan/oledrion/comment_new.php
XoopsModules/oledrion/branches/voltan/oledrion/comment_post.php
XoopsModules/oledrion/branches/voltan/oledrion/comment_reply.php
XoopsModules/oledrion/branches/voltan/oledrion/config.php
XoopsModules/oledrion/branches/voltan/oledrion/css/autocomplete.css
XoopsModules/oledrion/branches/voltan/oledrion/css/oledrion.css
XoopsModules/oledrion/branches/voltan/oledrion/css/print.css
XoopsModules/oledrion/branches/voltan/oledrion/css/rateit.css
XoopsModules/oledrion/branches/voltan/oledrion/docs/changelog.txt
XoopsModules/oledrion/branches/voltan/oledrion/download.php
XoopsModules/oledrion/branches/voltan/oledrion/extra/clone.php
XoopsModules/oledrion/branches/voltan/oledrion/extra/modules/rss/plugins/rssfit.oledrion.php
XoopsModules/oledrion/branches/voltan/oledrion/extra/modules/sitemap/plugins/oledrion.php
XoopsModules/oledrion/branches/voltan/oledrion/gateway-notify.php
XoopsModules/oledrion/branches/voltan/oledrion/header.php
XoopsModules/oledrion/branches/voltan/oledrion/images/addtocart.png
XoopsModules/oledrion/branches/voltan/oledrion/images/cartadd.png
XoopsModules/oledrion/branches/voltan/oledrion/include/comment_functions.php
XoopsModules/oledrion/branches/voltan/oledrion/include/common.php
XoopsModules/oledrion/branches/voltan/oledrion/include/functions.php
XoopsModules/oledrion/branches/voltan/oledrion/include/functions_install.php
XoopsModules/oledrion/branches/voltan/oledrion/include/functions_update.php
XoopsModules/oledrion/branches/voltan/oledrion/include/notification.inc.php
XoopsModules/oledrion/branches/voltan/oledrion/include/plugin.tag.php
XoopsModules/oledrion/branches/voltan/oledrion/include/product_search_form.php
XoopsModules/oledrion/branches/voltan/oledrion/include/search.inc.php
XoopsModules/oledrion/branches/voltan/oledrion/index.php
XoopsModules/oledrion/branches/voltan/oledrion/invoice.php
XoopsModules/oledrion/branches/voltan/oledrion/js/tableWidget.js
XoopsModules/oledrion/branches/voltan/oledrion/language/english/admin.php
XoopsModules/oledrion/branches/voltan/oledrion/language/english/blocks.php
XoopsModules/oledrion/branches/voltan/oledrion/language/english/main.php
XoopsModules/oledrion/branches/voltan/oledrion/language/english/modinfo.php
XoopsModules/oledrion/branches/voltan/oledrion/language/english/newsletter.php
XoopsModules/oledrion/branches/voltan/oledrion/language/persian/admin.php
XoopsModules/oledrion/branches/voltan/oledrion/language/persian/blocks.php
XoopsModules/oledrion/branches/voltan/oledrion/language/persian/main.php
XoopsModules/oledrion/branches/voltan/oledrion/language/persian/modinfo.php
XoopsModules/oledrion/branches/voltan/oledrion/language/persian/newsletter.php
XoopsModules/oledrion/branches/voltan/oledrion/list.php
XoopsModules/oledrion/branches/voltan/oledrion/list.tag.php
XoopsModules/oledrion/branches/voltan/oledrion/manufacturer.php
XoopsModules/oledrion/branches/voltan/oledrion/my-lists.php
XoopsModules/oledrion/branches/voltan/oledrion/notification_update.php
XoopsModules/oledrion/branches/voltan/oledrion/paypal-notify.php
XoopsModules/oledrion/branches/voltan/oledrion/plugins/actions/newelements/plugins.php
XoopsModules/oledrion/branches/voltan/oledrion/plugins/models/oledrion_action.php
XoopsModules/oledrion/branches/voltan/oledrion/plugins/models/oledrion_filter.php
XoopsModules/oledrion/branches/voltan/oledrion/product.php
XoopsModules/oledrion/branches/voltan/oledrion/rate-product.php
XoopsModules/oledrion/branches/voltan/oledrion/recommended.php
XoopsModules/oledrion/branches/voltan/oledrion/rss.php
XoopsModules/oledrion/branches/voltan/oledrion/search.php
XoopsModules/oledrion/branches/voltan/oledrion/sql/mysql.sql
XoopsModules/oledrion/branches/voltan/oledrion/templates/oledrion_bill.html
XoopsModules/oledrion/branches/voltan/oledrion/templates/oledrion_caddy.html
XoopsModules/oledrion/branches/voltan/oledrion/templates/oledrion_product.html
XoopsModules/oledrion/branches/voltan/oledrion/thankyou.php
XoopsModules/oledrion/branches/voltan/oledrion/view.tag.php
XoopsModules/oledrion/branches/voltan/oledrion/whoswho.php
XoopsModules/oledrion/branches/voltan/oledrion/xoops_version.php
Added Paths:
-----------
XoopsModules/oledrion/branches/voltan/oledrion/.directory
XoopsModules/oledrion/branches/voltan/oledrion/class/oledrion_sms.php
XoopsModules/oledrion/branches/voltan/oledrion/class/sms/
XoopsModules/oledrion/branches/voltan/oledrion/class/sms/example/
XoopsModules/oledrion/branches/voltan/oledrion/class/sms/example/option.php
XoopsModules/oledrion/branches/voltan/oledrion/class/sms/example/sms.php
XoopsModules/oledrion/branches/voltan/oledrion/class/sms.zip
XoopsModules/oledrion/branches/voltan/oledrion/docs/todo.txt
XoopsModules/oledrion/branches/voltan/oledrion/images/delivery.png
XoopsModules/oledrion/branches/voltan/oledrion/images/icons/16/
XoopsModules/oledrion/branches/voltan/oledrion/images/icons/16/factory.png
XoopsModules/oledrion/branches/voltan/oledrion/images/icons/32/
XoopsModules/oledrion/branches/voltan/oledrion/images/icons/32/factory.png
XoopsModules/oledrion/branches/voltan/oledrion/images/icons/32/money_delete.png
XoopsModules/oledrion/branches/voltan/oledrion/images/icons/32/package.png
XoopsModules/oledrion/branches/voltan/oledrion/images/package.png
XoopsModules/oledrion/branches/voltan/oledrion/images/submit.png
XoopsModules/oledrion/branches/voltan/oledrion/images/track.png
XoopsModules/oledrion/branches/voltan/oledrion/include/directorychecker.php
XoopsModules/oledrion/branches/voltan/oledrion/templates/oledrion_bill_print.html
XoopsModules/oledrion/branches/voltan/oledrion/templates/oledrion_product_print.html
XoopsModules/oledrion/branches/voltan/oledrion/templates/oledrion_user.html
XoopsModules/oledrion/branches/voltan/oledrion/user.php
Removed Paths:
-------------
XoopsModules/oledrion/branches/voltan/oledrion/js/validate/lib/jquery.js
Added: XoopsModules/oledrion/branches/voltan/oledrion/.directory
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/.directory (rev 0)
+++ XoopsModules/oledrion/branches/voltan/oledrion/.directory 2014-02-07 11:05:17 UTC (rev 12290)
@@ -0,0 +1,4 @@
+[Dolphin]
+Timestamp=2013,11,21,10,10,32
+Version=3
+ViewMode=2
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/attributes.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/attributes.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/attributes.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -554,4 +554,3 @@
exit;
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/categories.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/categories.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/categories.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -275,4 +275,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/dashboard.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/dashboard.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/dashboard.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -27,19 +27,63 @@
case 'default': // Affichage du dashboard
// ****************************************************************************************************************
xoops_cp_header();
+
+ include_once dirname(dirname(dirname(__FILE__))) . '/include/directorychecker.php';
+
oledrion_utils::htitle(_MI_OLEDRION_ADMENU10, 4);
$indexAdmin = new ModuleAdmin();
- $indexAdmin->addConfigBoxLine(OLEDRION_UPLOAD_PATH, 'folder');
- $indexAdmin->addConfigBoxLine(array(OLEDRION_UPLOAD_PATH, '777'), 'chmod');
- $indexAdmin->addConfigBoxLine(OLEDRION_ATTACHED_FILES_PATH, 'folder');
- $indexAdmin->addConfigBoxLine(array(OLEDRION_ATTACHED_FILES_PATH, '777'), 'chmod');
- $indexAdmin->addConfigBoxLine(OLEDRION_PICTURES_PATH, 'folder');
- $indexAdmin->addConfigBoxLine(array(OLEDRION_PICTURES_PATH, '777'), 'chmod');
- $indexAdmin->addConfigBoxLine(OLEDRION_CSV_PATH, 'folder');
- $indexAdmin->addConfigBoxLine(array(OLEDRION_CSV_PATH, '777'), 'chmod');
- $indexAdmin->addConfigBoxLine(OLEDRION_CACHE_PATH, 'folder');
- $indexAdmin->addConfigBoxLine(array(OLEDRION_CACHE_PATH, '777'), 'chmod');
+ //$indexAdmin->addConfigBoxLine(OLEDRION_UPLOAD_PATH, 'folder');
+ //$indexAdmin->addConfigBoxLine(array(OLEDRION_UPLOAD_PATH, '777'), 'chmod');
+ //$indexAdmin->addConfigBoxLine(OLEDRION_ATTACHED_FILES_PATH, 'folder');
+ //$indexAdmin->addConfigBoxLine(array(OLEDRION_ATTACHED_FILES_PATH, '777'), 'chmod');
+ //$indexAdmin->addConfigBoxLine(OLEDRION_PICTURES_PATH, 'folder');
+ //$indexAdmin->addConfigBoxLine(array(OLEDRION_PICTURES_PATH, '777'), 'chmod');
+ //$indexAdmin->addConfigBoxLine(OLEDRION_CSV_PATH, 'folder');
+ //$indexAdmin->addConfigBoxLine(array(OLEDRION_CSV_PATH, '777'), 'chmod');
+ //$indexAdmin->addConfigBoxLine(OLEDRION_CACHE_PATH, 'folder');
+ //$indexAdmin->addConfigBoxLine(array(OLEDRION_CACHE_PATH, '777'), 'chmod');
+ $categories = $h_oledrion_cat->getCategoriesCount();
+ if($categories == 0) {
+ $link = OLEDRION_ADMIN_URL . 'index.php?op=maintain&action=import';
+ $link = sprintf('<a href="%s">%s</a>', $link, _AM_OLEDRION_IMPORT_DATA_TITLE);
+ $text = sprintf(_AM_OLEDRION_IMPORT_DATA_TEXT, $link);
+ $indexAdmin->addInfoBox(_AM_OLEDRION_IMPORT_DATA);
+ $indexAdmin->addInfoBoxLine(_AM_OLEDRION_IMPORT_DATA, $text);
+ }
+
+
+//------ check directories ---------------
+
+$indexAdmin->addConfigBoxLine('');
+$redirectFile = $_SERVER['PHP_SELF'];
+
+$languageConstants = array(_AM_OLEDRION_AVAILABLE,_AM_OLEDRION_NOTAVAILABLE, _AM_OLEDRION_CREATETHEDIR, _AM_OLEDRION_NOTWRITABLE, _AM_OLEDRION_SETMPERM, _AM_OLEDRION_DIRCREATED,_AM_OLEDRION_DIRNOTCREATED,_AM_OLEDRION_PERMSET,_AM_OLEDRION_PERMNOTSET);
+
+//$path = $xoopsModuleConfig['uploaddir'] . '/';
+$indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus(OLEDRION_UPLOAD_PATH,0777,$languageConstants,$redirectFile));
+
+//$path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['screenshots'] . '/';
+$indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus(OLEDRION_ATTACHED_FILES_PATH,0777,$languageConstants,$redirectFile));
+
+//$path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['catimage'] . '/';
+$indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus(OLEDRION_PICTURES_PATH,0777,$languageConstants,$redirectFile));
+
+
+//$path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['mainimagedir'] . '/';
+$indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus(OLEDRION_CSV_PATH,0777,$languageConstants,$redirectFile));
+
+//$path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['catimage'] . '/';
+$indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus(OLEDRION_CACHE_PATH,0777,$languageConstants,$redirectFile));
+
+
+//$path = XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['mainimagedir'] . '/';
+$indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus(OLEDRION_TEXT_PATH,0777,$languageConstants,$redirectFile));
+
+//echo $indexAdmin->addNavigation('index.php');
+//echo $indexAdmin->renderIndex();
+//echo wfd_serverstats();
+//---------------------------
echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
@@ -170,4 +214,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/delivery.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/delivery.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/delivery.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -21,41 +21,30 @@
/**
* Check is admin
*/
-if (!defined("OLEDRION_ADMIN")) {
- exit();
-}
+if (!defined("OLEDRION_ADMIN")) exit();
switch ($action) {
case 'default':
xoops_cp_header();
- $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
+ $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
$delivery = array();
- $form = "<form method='post' action='$baseurl' name='frmadddelivery' id='frmadddelivery'><input type='hidden' name='op' id='op' value='delivery' /><input type='hidden' name='action' id='action' value='add' /><input type='submit' name='btngo' id='btngo' value='"
- . _AM_OLEDRION_ADD_ITEM . "' /></form>";
+ $form = "<form method='post' action='$baseurl' name='frmadddelivery' id='frmadddelivery'><input type='hidden' name='op' id='op' value='delivery' /><input type='hidden' name='action' id='action' value='add' /><input type='submit' name='btngo' id='btngo' value='" . _AM_OLEDRION_ADD_ITEM . "' /></form>";
echo $form;
oledrion_utils::htitle(_MI_OLEDRION_ADMENU20, 4);
- $delivery = $h_oledrion_delivery->getAllDelivery(
- new oledrion_parameters(array('start' => $start, 'limit' => $limit))
- );
+ $delivery = $h_oledrion_delivery->getAllDelivery(new oledrion_parameters(array('start' => $start, 'limit' => $limit)));
$class = '';
echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
- echo "<tr><th align='center'>" . _AM_OLEDRION_ID . "</th><th align='center'>" . _AM_OLEDRION_DELIVERY_TITLE
- . "</th><th align='center'>" . _OLEDRION_ONLINE . "</th><th align='center'>" . _AM_OLEDRION_ACTION
- . "</th></tr>";
+ echo "<tr><th align='center'>" . _AM_OLEDRION_ID . "</th><th align='center'>" . _AM_OLEDRION_DELIVERY_TITLE . "</th><th align='center'>" . _OLEDRION_ONLINE . "</th><th align='center'>" . _AM_OLEDRION_ACTION . "</th></tr>";
foreach ($delivery as $item) {
- $id = $item->getVar('delivery_id');
- $class = ($class == 'even') ? 'odd' : 'even';
- $actions = array();
- $actions[] = "<a href='$baseurl?op=delivery&action=edit&id=" . $id . "' title='" . _OLEDRION_EDIT . "'>"
- . $icones['edit'] . '</a>';
- $actions[] = "<a href='$baseurl?op=delivery&action=delete&id=" . $id . "' title='" . _OLEDRION_DELETE . "'"
- . $conf_msg . ">" . $icones['delete'] . '</a>';
- $online = $item->getVar('delivery_online') == 1 ? _YES : _NO;
+ $id = $item->getVar('delivery_id');
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $actions = array();
+ $actions[] = "<a href='$baseurl?op=delivery&action=edit&id=" . $id . "' title='" . _OLEDRION_EDIT . "'>" . $icones['edit'] . '</a>';
+ $actions[] = "<a href='$baseurl?op=delivery&action=delete&id=" . $id . "' title='" . _OLEDRION_DELETE . "'" . $conf_msg . ">" . $icones['delete'] . '</a>';
+ $online = $item->getVar('delivery_online') == 1 ? _YES : _NO;
echo "<tr class='" . $class . "'>\n";
- echo "<td align='center'>" . $id . "</td><td align='center'>" . $item->getVar('delivery_title')
- . "</td><td align='center'>" . $online . "</td><td align='center'>" . implode(' ', $actions)
- . "</td>\n";
+ echo "<td align='center'>" . $id . "</td><td align='center'>" . $item->getVar('delivery_title') . "</td><td align='center'>" . $online . "</td><td align='center'>" . implode(' ', $actions) . "</td>\n";
echo "<tr>\n";
}
$class = ($class == 'even') ? 'odd' : 'even';
@@ -71,7 +60,7 @@
xoops_cp_header();
if ($action == 'edit') {
$title = _AM_OLEDRION_DELIVERY_EDIT;
- $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if (empty($id)) {
oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5);
}
@@ -81,23 +70,19 @@
if (!is_object($item)) {
oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl, 5);
}
- $edit = true;
+ $edit = true;
$label_submit = _AM_OLEDRION_MODIFY;
} else {
- $title = _AM_OLEDRION_DELIVERY_ADD;
- $item = $h_oledrion_delivery->create(true);
+ $title = _AM_OLEDRION_DELIVERY_ADD;
+ $item = $h_oledrion_delivery->create(true);
$label_submit = _AM_OLEDRION_ADD;
- $edit = false;
+ $edit = false;
}
$sform = new XoopsThemeForm($title, 'frmadddelivery', $baseurl);
$sform->addElement(new XoopsFormHidden('op', 'delivery'));
$sform->addElement(new XoopsFormHidden('action', 'save'));
$sform->addElement(new XoopsFormHidden('delivery_id', $item->getVar('delivery_id')));
- $sform->addElement(
- new XoopsFormText(_AM_OLEDRION_DELIVERY_TITLE, 'delivery_title', 50, 150, $item->getVar(
- 'delivery_title', 'e'
- )), true
- );
+ $sform->addElement(new XoopsFormText(_AM_OLEDRION_DELIVERY_TITLE, 'delivery_title', 50, 150, $item->getVar('delivery_title', 'e')), true);
// Add payment options ************************************************************
$payments = $deliveryPayments = $payments_d = $deliveryPayments_d = array();
@@ -128,31 +113,21 @@
if ($action == 'edit' && $item->pictureExists()) {
$pictureTray = new XoopsFormElementTray(_AM_OLEDRION_CURRENT_PICTURE, '<br />');
- $pictureTray->addElement(
- new XoopsFormLabel('', "<img src='" . $item->getPictureUrl() . "' alt='' border='0' />")
- );
+ $pictureTray->addElement(new XoopsFormLabel('', "<img src='" . $item->getPictureUrl() . "' alt='' border='0' />"));
$deleteCheckbox = new XoopsFormCheckBox('', 'delpicture');
$deleteCheckbox->addOption(1, _DELETE);
$pictureTray->addElement($deleteCheckbox);
$sform->addElement($pictureTray);
unset($pictureTray, $deleteCheckbox);
}
- $sform->addElement(
- new XoopsFormFile(_AM_OLEDRION_PICTURE, 'attachedfile', oledrion_utils::getModuleOption('maxuploadsize')),
- false
- );
- $editor = oledrion_utils::getWysiwygForm(
- _AM_OLEDRION_DESCRIPTION, 'delivery_description', $item->getVar('delivery_description', 'e'), 15, 60,
- 'description_hidden'
- );
+ $sform->addElement(new XoopsFormFile(_AM_OLEDRION_PICTURE, 'attachedfile', oledrion_utils::getModuleOption('maxuploadsize')), false);
+ $editor = oledrion_utils::getWysiwygForm(_AM_OLEDRION_DESCRIPTION, 'delivery_description', $item->getVar('delivery_description', 'e'), 15, 60, 'description_hidden');
if ($editor) {
$sform->addElement($editor, false);
}
- $sform->addElement(
- new XoopsFormRadioYN(_OLEDRION_ONLINE_HLP, 'delivery_online', $item->getVar('delivery_online')), true
- );
+ $sform->addElement(new XoopsFormRadioYN(_OLEDRION_ONLINE_HLP, 'delivery_online', $item->getVar('delivery_online')), true);
$button_tray = new XoopsFormElementTray('', '');
- $submit_btn = new XoopsFormButton('', 'post', $label_submit, 'submit');
+ $submit_btn = new XoopsFormButton('', 'post', $label_submit, 'submit');
$button_tray->addElement($submit_btn);
$sform->addElement($button_tray);
$sform = oledrion_utils::formMarkRequiredFields($sform);
@@ -179,15 +154,10 @@
$item->deletePicture();
}
$destname = '';
- $res1 = oledrion_utils::uploadFile(0, OLEDRION_PICTURES_PATH);
+ $res1 = oledrion_utils::uploadFile(0, OLEDRION_PICTURES_PATH);
if ($res1) {
if (oledrion_utils::getModuleOption('resize_others')) { // Eventuellement on redimensionne l'image
- oledrion_utils::resizePicture(
- OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $destname,
- OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $destname,
- oledrion_utils::getModuleOption('images_width'), oledrion_utils::getModuleOption('images_height'),
- true
- );
+ oledrion_utils::resizePicture(OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $destname, OLEDRION_PICTURES_PATH . DIRECTORY_SEPARATOR . $destname, oledrion_utils::getModuleOption('images_width'), oledrion_utils::getModuleOption('images_height'), true);
}
$item->setVar('delivery_image', basename($destname));
} else {
@@ -267,4 +237,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/discounts.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/discounts.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/discounts.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -281,8 +281,8 @@
} else {
oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
}
+ break;
-
// ****************************************************************************************************************
case 'saveedit': // Enregistrement d'une réduction après modification ou ajout
// ****************************************************************************************************************
@@ -339,4 +339,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/files.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/files.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/files.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -191,4 +191,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/gateways.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/gateways.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/gateways.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -207,4 +207,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lists.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lists.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lists.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -95,4 +95,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/location.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/location.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/location.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -85,9 +85,9 @@
// Get delivery methods
$deliveres = $h_oledrion_delivery->getLocationDelivery(new oledrion_parameters(array('limit' => $limit, 'location' => $id)));
if (empty($deliveres)) {
- oledrion_utils::redirect(_AM_OLEDRION_LOCATION_DELIVERYADD, $baseurl, 5);
+ oledrion_utils::redirect(_AM_OLEDRION_LOCATION_DELIVERYADD, $baseurl, 5);
}
-
+
$sform = new XoopsThemeForm($title, 'frmaddlocation', $baseurl);
$sform->addElement(new XoopsFormHidden('op', 'location'));
$sform->addElement(new XoopsFormHidden('action', 'save'));
@@ -102,7 +102,7 @@
$product_type->addOption('parent', _AM_OLEDRION_LOCATION_PARENT);
$sform->addElement($product_type, true);
$sform->addElement(new XoopsFormRadioYN(_OLEDRION_ONLINE_HLP, 'location_online', $item->getVar('location_online')), true);
-
+
$delivery_options = new XoopsFormElementTray(_AM_OLEDRION_LOCATION_DELIVERY, '<br />');
foreach ($deliveres as $delivery) {
if (isset($delivery['ld_id']) && is_array($delivery['ld_id'])) {
@@ -162,9 +162,9 @@
$item->setVars($post);
if($post['location_type'] == 'parent') {
$item->setVar('location_pid', 0);
- }
+ }
$res = $h_oledrion_location->insert($item);
-
+
$location_id = $item->getVar('location_id');
// Save payments for each delivery type
if ($edit) {
@@ -184,7 +184,7 @@
}
}
- if ($res) {
+ if ($res) {
oledrion_utils::updateCache();
oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
} else {
@@ -238,4 +238,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lowstock.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lowstock.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/lowstock.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -86,4 +86,3 @@
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/maintain.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/maintain.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/maintain.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -7,7 +7,7 @@
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.
-*/
+ */
/**
* oledrion
@@ -21,30 +21,78 @@
/**
* Check is admin
*/
-if (!defined("OLEDRION_ADMIN")) exit();
+if (!defined("OLEDRION_ADMIN"))
+ exit();
switch ($action) {
- case 'default':
- xoops_cp_header();
- xoops_confirm(array('op' => 'maintain', 'action' => 'confirm'), 'index.php', _AM_OLEDRION_CONF_MAINTAIN);
- break;
-
- case 'confirm':
- xoops_cp_header();
- require '../../xoops_version.php';
- $tables = array();
- foreach ($modversion['tables'] as $table) {
- $tables[] = $xoopsDB->prefix($table);
- }
- if (count($tables) > 0) {
- $list = implode(',', $tables);
- $xoopsDB->queryF('CHECK TABLE ' . $list);
- $xoopsDB->queryF('ANALYZE TABLE ' . $list);
- $xoopsDB->queryF('OPTIMIZE TABLE ' . $list);
- }
- oledrion_utils::updateCache();
- $h_oledrion_products->forceCacheClean();
- oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl, 2);
- break;
+ case 'default' :
+ xoops_cp_header();
+ xoops_confirm(array('op' => 'maintain', 'action' => 'confirm'), 'index.php', _AM_OLEDRION_CONF_MAINTAIN);
+ break;
+
+ case 'confirm' :
+ xoops_cp_header();
+ require OLEDRION_PATH . 'xoops_version.php';
+ $tables = array();
+ foreach ($modversion['tables'] as $table) {
+ $tables[] = $xoopsDB -> prefix($table);
+ }
+ if (count($tables) > 0) {
+ $list = implode(',', $tables);
+ $xoopsDB -> queryF('CHECK TABLE ' . $list);
+ $xoopsDB -> queryF('ANALYZE TABLE ' . $list);
+ $xoopsDB -> queryF('OPTIMIZE TABLE ' . $list);
+ }
+ oledrion_utils::updateCache();
+ $h_oledrion_products -> forceCacheClean();
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl, 2);
+ break;
+
+ case 'import' :
+ xoops_cp_header();
+ $categories = $h_oledrion_cat -> getCategoriesCount();
+ if ($categories == 0) {
+ xoops_confirm(array('op' => 'maintain', 'action' => 'doimport'), 'index.php', _AM_OLEDRION_IMPORT_CONF);
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl, 2);
+ }
+ break;
+
+ case 'doimport' :
+ xoops_cp_header();
+ $categories = $h_oledrion_cat -> getCategoriesCount();
+ if ($categories == 0) {
+
+ $cat_array = array('cat_cid' => 1, 'cat_pid' => 0, 'cat_title' => 'Test category');
+ $cat = $h_oledrion_cat -> create();
+ $cat -> setVars($cat_array);
+ $res = $h_oledrion_cat -> insert($cat);
+
+ $manufacturer_array = array('manu_id' => 1, 'manu_name' => 'Test manufacturer');
+ $manufacturer = $h_oledrion_manufacturer -> create(true);
+ $manufacturer -> setVars($manufacturer_array);
+ $res = $h_oledrion_manufacturer -> insert($manufacturer);
+
+ $product_array = array('product_id' => 1, 'product_cid' => 1, 'product_title' => 'Test product', 'product_vendor_id' => 1, 'product_submitter' => 1, 'product_online' => 1, 'product_submitted' => time(), 'product_price' => '100', 'product_summary' => 'Test test test test test test test test test test test test test test test test test', 'product_vat_id' => 1, 'product_stock' => 100);
+ $product = $h_oledrion_products -> create(true);
+ $product -> setVars($product_array);
+ $res = $h_oledrion_products -> insert($product);
+
+ $productsmanu_array = array('pm_id' => 1, 'pm_id' => 1, 'pm_manu_id' => 1);
+ $productsmanu = $h_oledrion_productsmanu -> create(true);
+ $productsmanu -> setVars($productsmanu_array);
+ $res = $h_oledrion_products -> insert($productsmanu);
+
+ $vat_array = array('vat_id' => 1, 'vat_rate' => '0.00', 'vat_country' => 'us');
+ $vat = $h_oledrion_vat -> create(true);
+ $vat -> setVars($vat_array);
+ $res = $h_oledrion_vat -> insert($vat);
+
+ $vendor_array = array('vendor_id' => 1, 'vendor_name' => 'Test vendor');
+ $vendor = $h_oledrion_vendors -> create(true);
+ $vendor -> setVars($vendor_array);
+ $res = $h_oledrion_vendors -> insert($vendor);
+ }
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl, 2);
+ break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/manufacturers.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/manufacturers.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/manufacturers.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -216,4 +216,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/newsletter.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/newsletter.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/newsletter.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -128,4 +128,3 @@
include_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/orders.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/orders.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/orders.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -39,7 +39,7 @@
}
$_SESSION['filter3'] = $filter3;
$selected = array('', '', '', '', '', '');
- $conditions = array(OLEDRION_STATE_NOINFORMATION, OLEDRION_STATE_VALIDATED, OLEDRION_STATE_PENDING, OLEDRION_STATE_FAILED, OLEDRION_STATE_CANCELED, OLEDRION_STATE_FRAUD);
+ $conditions = array(OLEDRION_STATE_NOINFORMATION, OLEDRION_STATE_VALIDATED, OLEDRION_STATE_PENDING, OLEDRION_STATE_FAILED, OLEDRION_STATE_CANCELED, OLEDRION_STATE_FRAUD, OLEDRION_STATE_PACKED, OLEDRION_STATE_SUBMITED, OLEDRION_STATE_DELIVERYED);
$selected[$filter3] = " selected='selected'";
$criteria = new CriteriaCompo();
@@ -56,8 +56,21 @@
$orders = $h_oledrion_commands->getObjects($criteria);
$class = '';
echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
- $form = "<form method='post' name='frmfilter' id='frmfilter' action='$baseurl'><b>" . _AM_OLEDRION_LIMIT_TO . "</b> <select name='filter3' id='filter3'><option value='0'" . $selected[0] . ">" . _OLEDRION_CMD_STATE1 . "</option><option value='1'" . $selected[1] . ">" . _OLEDRION_CMD_STATE2 . "</option><option value='2'" . $selected[2] . ">" . _OLEDRION_CMD_STATE3 . "</option><option value='3'" . $selected[3] . ">" . _OLEDRION_CMD_STATE4 . "</option><option value='4'" . $selected[4] . ">" . _OLEDRION_CMD_STATE5 . "</option><option value='5'" . $selected[5] . ">" . _OLEDRION_CMD_STATE6 . "</option></select> <input type='hidden' name='op' id='op' value='orders' /><input type='submit' name='btnfilter' id='btnfilter' value='" . _AM_OLEDRION_FILTER . "' /></form>";
+ $form = "<form method='post' name='frmfilter' id='frmfilter' action='$baseurl'><b>" . _AM_OLEDRION_LIMIT_TO . "</b> <select name='filter3' id='filter3'>
+ <option value='0'" . $selected[0] . ">" . _OLEDRION_CMD_STATE1 . "</option>
+ <option value='1'" . $selected[1] . ">" . _OLEDRION_CMD_STATE2 . "</option>
+ <option value='2'" . $selected[2] . ">" . _OLEDRION_CMD_STATE3 . "</option>
+ <option value='3'" . $selected[3] . ">" . _OLEDRION_CMD_STATE4 . "</option>
+ <option value='4'" . $selected[4] . ">" . _OLEDRION_CMD_STATE5 . "</option>
+ <option value='5'" . $selected[5] . ">" . _OLEDRION_CMD_STATE6 . "</option>
+ <option value='6'" . $selected[6] . ">" . _OLEDRION_CMD_STATE7 . "</option>
+ <option value='7'" . $selected[7] . ">" . _OLEDRION_CMD_STATE8 . "</option>
+ <option value='8'" . $selected[8] . ">" . _OLEDRION_CMD_STATE9 . "</option>
+ </select> <input type='hidden' name='op' id='op' value='orders' /><input type='submit' name='btnfilter' id='btnfilter' value='" . _AM_OLEDRION_FILTER . "' /></form>";
$confValidateOrder = oledrion_utils::javascriptLinkConfirm(_AM_OLEDRION_CONF_VALIDATE);
+ $confPackOrder = oledrion_utils::javascriptLinkConfirm(_AM_OLEDRION_CONF_Pack);
+ $confSubmitOrder = oledrion_utils::javascriptLinkConfirm(_AM_OLEDRION_CONF_SUBMIT);
+ $confDeliveryOrder = oledrion_utils::javascriptLinkConfirm(_AM_OLEDRION_CONF_DELIVERY);
echo "<tr><td colspan='2' align='left'>";
if (isset($pagenav) && is_object($pagenav)) {
echo $pagenav->renderNav();
@@ -83,6 +96,10 @@
$actions[] = "<a target='_blank' href='$baseurl?op=orders&action=print&id=" . $id . "' title='" . _OLEDRION_PRINT_VERSION . "'>" . $icones['print'] . '</a>';
$actions[] = "<a href='$baseurl?op=orders&action=delete&id=" . $id . "' title='" . _OLEDRION_DELETE . "'" . $conf_msg . ">" . $icones['delete'] . '</a>';
$actions[] = "<a href='$baseurl?op=orders&action=validate&id=" . $id . "' " . $confValidateOrder . " title='" . _OLEDRION_VALIDATE_COMMAND . "'>" . $icones['ok'] . '</a>';
+ $actions[] = "<a href='$baseurl?op=orders&action=pack&id=" . $id . "' " . $confPackOrder . " title='" . _OLEDRION_PACK . "'>" . $icones['package'] . '</a>';
+ $actions[] = "<a href='$baseurl?op=orders&action=submit&id=" . $id . "' " . $confSubmitOrder . " title='" . _OLEDRION_SUBMIT . "'>" . $icones['submit'] . '</a>';
+ $actions[] = "<a href='$baseurl?op=orders&action=delivery&id=" . $id . "' " . $confDeliveryOrder . " title='" . _OLEDRION_DELIVERY . "'>" . $icones['delivery'] . '</a>';
+ $actions[] = "<a href='$baseurl?op=orders&action=track&id=" . $id . "' title='" . _OLEDRION_TRACK . "'>" . $icones['track'] . '</a>';
echo "<tr class='" . $class . "'>\n";
echo "<td align='center'>" . $id . "</td><td align='center'>" . $date . "</td><td align='center'>" . $item->getVar('cmd_lastname') . ' ' . $item->getVar('cmd_firstname') . "</td><td align='center'>" . $oledrion_Currency->amountForDisplay($item->getVar('cmd_total', 'n')) . ' / ' . $oledrion_Currency->amountForDisplay($item->getVar('cmd_shipping')) . "</td><td align='center'>" . implode(' ', $actions) . "</td>\n";
echo "<tr>\n";
@@ -147,6 +164,13 @@
if (is_object($item)) {
$res = $h_oledrion_commands->validateOrder($item);
if ($res) {
+ // Send sms
+ if (oledrion_utils::getModuleOption('sms_validate')) {
+ $information['to'] = ltrim($item -> getVar('cmd_mobile'), 0);
+ $information['text'] = oledrion_utils::getModuleOption('sms_validate_text');
+ $sms = oledrion_sms::sendSms($information);
+ }
+ //
oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
} else {
oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $opRedirect, 5);
@@ -157,6 +181,93 @@
break;
// ****************************************************************************************************************
+ case 'pack': // Validation d'une commande
+ // ****************************************************************************************************************
+ xoops_cp_header();
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ if (empty($id)) {
+ oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5);
+ }
+ $opRedirect = 'orders';
+ $item = $h_oledrion_commands->get($id);
+ if (is_object($item)) {
+ $res = $h_oledrion_commands->packOrder($item);
+ if ($res) {
+ // Send sms
+ if (oledrion_utils::getModuleOption('sms_validate')) {
+ $information['to'] = ltrim($item -> getVar('cmd_mobile'), 0);
+ $information['text'] = oledrion_utils::getModuleOption('sms_pack_text');
+ $sms = oledrion_sms::sendSms($information);
+ }
+ //
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ break;
+
+ // ****************************************************************************************************************
+ case 'submit': // Validation d'une commande
+ // ****************************************************************************************************************
+ xoops_cp_header();
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ if (empty($id)) {
+ oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5);
+ }
+ $opRedirect = 'orders';
+ $item = $h_oledrion_commands->get($id);
+ if (is_object($item)) {
+ $res = $h_oledrion_commands->submitOrder($item);
+ if ($res) {
+ // Send sms
+ if (oledrion_utils::getModuleOption('sms_validate')) {
+ $information['to'] = ltrim($item -> getVar('cmd_mobile'), 0);
+ $information['text'] = oledrion_utils::getModuleOption('sms_submit_text');
+ $sms = oledrion_sms::sendSms($information);
+ }
+ //
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ break;
+
+ // ****************************************************************************************************************
+ case 'delivery': // Validation d'une commande
+ // ****************************************************************************************************************
+ xoops_cp_header();
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ if (empty($id)) {
+ oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5);
+ }
+ $opRedirect = 'orders';
+ $item = $h_oledrion_commands->get($id);
+ if (is_object($item)) {
+ $res = $h_oledrion_commands->deliveryOrder($item);
+ if ($res) {
+ // Send sms
+ if (oledrion_utils::getModuleOption('sms_validate')) {
+ $information['to'] = ltrim($item -> getVar('cmd_mobile'), 0);
+ $information['text'] = oledrion_utils::getModuleOption('sms_delivery_text');
+ $sms = oledrion_sms::sendSms($information);
+ }
+ //
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ break;
+
+ // ****************************************************************************************************************
case 'export': // Export des commandes au format CSV
// ****************************************************************************************************************
xoops_cp_header();
@@ -174,7 +285,6 @@
$result = $export->export();
if ($result === true) {
echo "<a href='" . $export->getDownloadUrl() . "'>" . _AM_OLEDRION_EXPORT_READY . '</a>';
- //echo "<a href='$baseurl?op=orders&action=deleteexport&file=".$export->getDownloadPath()."'>".
}
}
} else {
@@ -182,7 +292,60 @@
}
include_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
break;
+
// ****************************************************************************************************************
+ case 'track': // track
+ // ****************************************************************************************************************
+ xoops_cp_header();
+ oledrion_utils::htitle(_MI_OLEDRION_ADMENU5, 4);
+ $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
+ if (empty($id)) {
+ oledrion_utils::redirect(_AM_OLEDRION_ERROR_1, $baseurl, 5);
+ }
+ $item = $h_oledrion_commands->get($id);
+
+ $sform = new XoopsThemeForm(_OLEDRION_TRACK, 'frmproduct', $baseurl);
+ $sform->setExtra('enctype="multipart/form-data"');
+ $sform->addElement(new XoopsFormHidden('op', 'orders'));
+ $sform->addElement(new XoopsFormHidden('action', 'savetrack'));
+ $sform->addElement(new XoopsFormHidden('cmd_id', $item->getVar('cmd_id')));
+ $sform->addElement(new XoopsFormText(_OLEDRION_TRACK, 'cmd_track', 50, 255, $item->getVar('cmd_track', 'e')), true);
+ $button_tray = new XoopsFormElementTray('', '');
+ $submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');
+ $button_tray->addElement($submit_btn);
+ $sform->addElement($button_tray);
+ $sform = oledrion_utils::formMarkRequiredFields($sform);
+ $sform->display();
+
+ include_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
+ break;
+
+ // ****************************************************************************************************************
+ case 'savetrack': // save track
+ // ****************************************************************************************************************
+ xoops_cp_header();
+ $id = isset($_POST['cmd_id']) ? intval($_POST['cmd_id']) : 0;
+ $item = $h_oledrion_commands->get($id);
+ $opRedirect = 'orders';
+ if (!is_object($item)) {
+ oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl, 5);
+ }
+ $item->setVar('cmd_track', $_POST['cmd_track']);
+ $res = $h_oledrion_commands->insert($item);
+ if ($res) {
+ // Send sms
+ if (oledrion_utils::getModuleOption('sms_track')) {
+ $information['to'] = ltrim($item -> getVar('cmd_mobile'), 0);
+ $information['text'] = oledrion_utils::getModuleOption('sms_track_text');
+ $sms = oledrion_sms::sendSms($information);
+ }
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=' . $opRedirect, 2);
+ } else {
+ oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $opRedirect, 5);
+ }
+ break;
+
+ // ****************************************************************************************************************
case 'print': // Print invoice
// ****************************************************************************************************************
xoops_cp_header();
@@ -271,4 +434,3 @@
xoops_cp_footer();
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/packing.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/packing.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/packing.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -192,4 +192,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/payment.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/payment.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/payment.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -212,4 +212,3 @@
}
break;
}
-?>
\ No newline at end of file
Modified: XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/products.php
===================================================================
--- XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/products.php 2014-02-07 10:33:00 UTC (rev 12289)
+++ XoopsModules/oledrion/branches/voltan/oledrion/admin/actions/products.php 2014-02-07 11:05:17 UTC (rev 12290)
@@ -163,6 +163,13 @@
}
$actions = array();
+
+
+ $actions[] = "<a href='$baseurl?op=products&action=related&id=" . $id . "' title='" . _OLEDRION_RELATED_PRODUCTS . "'>" . $icones['details'] . '</a>';
+
+
+
+
$actions[] = "<a href='$baseurl?op=products&action=edit&id=" . $id . "' title='" . _OLEDRION_EDIT . "'>" . $icones['edit'] . '</a>';
$actions[] = "<a href='$baseurl?op=products&action=copy&id=" . $id . "' title='" . _OLEDRION_DUPLICATE_PRODUCT . "'>" . $icones['copy'] . '</a>';
$actions[] = "<a href='$baseurl?op=products&action=confdelete&id=" . $id . "' title='" . _OLEDRION_DELETE . "'>" . $icones['delete'] . '</a>';
@@ -336,7 +343,9 @@
$downloadUrl->setDescription(_AM_OLEDRION_DOWNLOAD_EXAMPLE . ' ' . XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . 'image.png');
$sform->addElement($downloadUrl, false);
- $sform->addElement(new XoopsFormText(_AM_OLEDRION_URL_HLP, 'product_url', 50, 255, $item->getVar('product_url', 'e')), false);
+ $sform->addElement(new XoopsFormText(_AM...
[truncated message content] |
|
From: <txm...@us...> - 2014-02-07 10:33:07
|
Revision: 12289
http://sourceforge.net/p/xoops/svn/12289
Author: txmodxoops
Date: 2014-02-07 10:33:00 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
A new version that reduces the code, and then is transferred to all, in classes to class/files in order to inherit and can easily add or edit in a personalized way this module
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/includes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/css_styles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/docs_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/headerfiles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/include_search.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql_file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/xoopsversion_file.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/structure.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_class_helper.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_class_module.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_class_request.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_functions_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_notification.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_languages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_structure.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates_admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates_admin_help.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/admin.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/css/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/install.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/lang_diff.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/license.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/docs/readme.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/arrow.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/off.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/on.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/16/toggle.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/32/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/32/addmodule.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/32/addtable.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/32/builder.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/32/dashboard.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/32/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/arrow.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/blank.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/loading.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/off.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/icons/on.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/loading.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/VeraBd.ttf
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/green.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/red.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/logos/xoops2.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/module_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/tdmcreate_slogo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/txmodxoops_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/Car_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/My Module_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/Test1Logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/Test1_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/empty.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/modules/xcvLogo.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/tables/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/tables/blank.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/uploads/tables/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/images/xoops2.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/jq.init.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/include/update.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/js/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/help/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/help/help.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/help/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/update language 1.0 to 1.1.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/update language 1.1 to 1.15.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/update language 1.1 to 1.37.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/update language 1.15 to 1.37.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/update language 1.37 to 1.38.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/categories.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/models.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/admin/types.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/blocks/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/blocks/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/blocks/models.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/blocks/types.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/categories.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/car.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/categories.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/helper.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/models.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/request.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/class/types.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/css/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/css/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/css/style.css
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/changelog.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/credits.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/install.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/lang_diff.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/license.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/docs/readme.txt
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/header.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/car_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/16/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/16/arrow.gif
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/16/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/16/off.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/16/on.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/32/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/32/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/icons/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/images/txmodxoops_logo.png
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/notification.inc.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/include/search.inc.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/index.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/help/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/help/help.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/help/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/main.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/language/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/models.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/sql/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/sql/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/admin/car_admin_about.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/admin/car_admin_help.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/blocks/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/blocks/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/blocks/models_block.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/blocks/types_block.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/car_categories.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/car_footer.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/car_header.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/car_index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/car_models.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/car_types.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/templates/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/types.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/car/xoops_version.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/modules/test1/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/xoops_version.php
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,24 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include 'header.php';
+echo $adminMenu->addNavigation('about.php');
+echo $adminMenu->renderabout('6KJ7RW5DR3VTJ', false);
+include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,242 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include 'header.php';
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+
+if (isset($_REQUEST['mod_name'])) {
+ $modules =& $modulesHandler->get($_REQUEST['mod_name']);
+} else {
+ $modules =& $modulesHandler;
+}
+
+$mod_name = strtolower($modules->getVar('mod_name'));
+$mod_author_website_name = $modules->getVar('mod_author_website_name');
+$mod_author_website_url = $modules->getVar('mod_author_website_url');
+$mod_user = $modules->getVar('mod_user');
+$mod_notifications = $modules->getVar('mod_notifications');
+$mod_permissions = $modules->getVar('mod_permissions');
+
+if (isset($_REQUEST['table_name'])) {
+ $tables =& $tablesHandler->get($_REQUEST['table_name']);
+} else {
+ $tables =& $tablesHandler;
+}
+
+//Name of tables
+$criteria = new CriteriaCompo();
+if (isset($_REQUEST['mod_name'])) {
+ $criteria->add(new Criteria('table_mid', $_REQUEST['mod_name']));
+} else {
+ $criteria->add(new Criteria('table_mid'));
+}
+
+$nb_tables = $tablesHandler->getCount($criteria);
+$tables_arr = $tablesHandler->getAll($criteria);
+
+echo $adminMenu->addNavigation('building.php');
+switch ($op) {
+ case 'build':
+ // Effacer repertoire of nouveau module s'il existe
+ TDMCreate_clearDir($modPath.'/modules/'.strtolower($mod_name));
+ // Debut
+ TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_SUCCESS, _AM_TDMCREATE_BUILDING_FAILED);
+ /************************************************/
+ /*Structure*/
+ /************************************************/
+ //Creation of the structure of folders and files
+ const_structure($modules);
+ //Creation of changelog.txt
+ const_changelog($modules);
+
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('mod_tdmcreate_tables') . " WHERE table_name = 'mod_".strtolower($mod_name)."_categories'");
+ list( $category ) = $xoopsDB->fetchRow($result);
+
+ foreach (array_keys($tables_arr) as $i)
+ {
+ // Variables
+ $table_name = $tables_arr[$i]->getVar('table_name');
+ $table_fieldname = $tables_arr[$i]->getVar('table_fieldname');
+ $table_category = $tables_arr[$i]->getVar('table_category');
+ $table_fields = $tables_arr[$i]->getVar('table_fields');
+ $table_parameters = $tables_arr[$i]->getVar('table_parameters');
+ $table_image = $tables_arr[$i]->getVar('table_image');
+ $table_blocks = $tables_arr[$i]->getVar('table_blocks');
+ $table_admin = $tables_arr[$i]->getVar('table_admin');
+ $table_user = $tables_arr[$i]->getVar('table_user');
+ $table_search = $tables_arr[$i]->getVar('table_search');
+ $table_comments = $tables_arr[$i]->getVar('table_comments');
+ $table_notifications = $tables_arr[$i]->getVar('table_notifications');
+ $table_permissions = $tables_arr[$i]->getVar('table_permissions');
+ $table_waiting = $tables_arr[$i]->getVar('table_waiting');
+
+ // Fabrication
+ // Copy of images tables
+ $table_image1 = $modPath . '/images/uploads/tables/' . $table_image;
+ if (file_exists($table_image1)) {
+ copy($table_image1, $modPath . '/modules/' . strtolower($mod_name) . '/images/icons/32/' . $table_image);
+ }
+ // Creation of classes
+ if ( $table_admin == 1 || $table_user == 1) {
+ const_class($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_permissions);
+ }
+ // Creation of pages admin
+ if ( $table_admin == 1 ) {
+ const_admin_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ }
+ // Creation of pages and templates user
+ if ( $table_user == 1 && $table_name != null ) {
+ const_user_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ const_templates_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+ // Creation of search
+ if ( $table_search == 1 ) {
+ const_include_search($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_image);
+ }
+ // Creation of admin permissions.php
+ if ( $table_permissions == 1) {
+ const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
+ }
+ // Creation of notifications
+ if ( $table_notifications == 1 ) {
+ const_include_notifications($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+ // Creation of the file mysql.sql
+ const_sql($modules, $table_name, $table_fieldname, $category, $table_fields);
+
+ // Creation of blocks
+ if ( $table_blocks == 1 ) {
+ const_blocks($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ //Creation of template per blocks
+ const_blocks_templates($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+ }
+ $table_name = isset($table_name) ? $table_name : null;
+ $table_comments = isset($table_comments) ? $table_comments : null;
+ $table_waiting = isset($table_waiting) ? $table_waiting : null;
+ $table_parameters = isset($table_parameters) ? $table_parameters : null;
+ $table_user = isset($table_user) ? $table_user : null;
+ $table_admin = isset($table_admin) ? $table_admin : null;
+ $table_fields = isset($table_fields) ? $table_fields : null;
+ $table_blocks = isset($table_blocks) ? $table_blocks : null;
+ $table_image = isset($table_image) ? $table_image : null;
+ $table_permissions = isset($table_permissions) ? $table_permissions : null;
+ $table_notifications = isset($table_notifications) ? $table_notifications : null;
+ //Creation of architecture of more fields and data
+ //const_architecture(null, null, $table_admin, $table_blocks, $table_admin, $table_blocks );
+ // Creation of comments
+ if ( $table_comments == 1 ) {
+ const_include_comments($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+
+ if ( $table_waiting == 1 ) {
+ // Creation of Waiting Plugin
+ const_waiting($modules, $tables_arr);
+ }
+ // Creation of class helper, module & request
+ if ( $table_name != '' ) {
+ const_class_helper($modules);
+ const_class_module($modules);
+ const_class_request($modules);
+ }
+ // Creation of xoopsversion.php
+ const_xoopsversion($modules, $table_name, $table_fields, $table_parameters, $table_image, $tables_arr);
+ // Creation of template index
+ const_templates_index($modules);
+ // Creation of template header
+ const_templates_header($modules, $tables_arr);
+ // Creation of template footer
+ const_templates_footer($modules, $table_comments, $table_notifications);
+
+ if ( $table_admin == 1 ) {
+ // Creation of template admin about
+ const_templates_admin_about($modules);
+ // Creation of template admin help
+ const_templates_admin_help($modules);
+ }
+ // Include
+ ///////////////////////////////////////////////////////////////////////
+ // Configs
+ const_include_common($modules, $mod_author_website_name, $mod_author_website_url);
+ // Functions
+ const_include_functions($modules);
+ //Creation of file install per l'uploads
+ const_include_install($modules, $tables_arr);
+ // Language
+ ///////////////////////////////////////////////////////////////////////
+ if ( $mod_user == 1 ) {
+ //Creation of language main.php
+ const_main_language($modules, $tables_arr);
+ }
+ // Creation of language modinfo.php
+ const_modinfo_language($modules, $table_name, $table_image, $tables_arr, $mod_notifications);
+ if ( $table_admin == 1 ) {
+ // Creation of language admin.php
+ const_admin_language($modules, $tables_arr, $mod_permissions);
+ }
+ if ( $table_blocks == 1 ) {
+ // Creation of language blocks.php
+ const_blocks_language($modules, $tables_arr);
+ }
+ // Creation of language help/help.html
+ const_help_language($modules);
+ ///////////////////////////////////////////////////////////////////////
+ //Creation of style.css
+ const_css_style($modules);
+ /************************************************/
+ /*Admin*/
+ /************************************************/
+ // Creation of admin header.php
+ const_admin_header($modules, $table_name, $tables_arr);
+ // Creation of admin index.php
+ const_admin_index($modules, $tables_arr);
+ // Creation of admin footer.php
+ const_admin_footer($modules);
+ // Creation of admin menu.php
+ const_admin_menu($modules, $tables_arr, $mod_permissions);
+ // Creation of admin about.php
+ const_admin_about($modules);
+ /************************************************/
+ /*User*/
+ /************************************************/
+ if ( $mod_user == 1 ) {
+ const_user_header($modules);
+ const_user_index($modules);
+ }
+ TDMCreate_CloseTable();
+ break;
+
+ case 'default':
+ default:
+ include_once(XOOPS_ROOT_PATH . '/class/xoopsformloader.php');
+ $action = $_SERVER['REQUEST_URI'];
+
+ $form = new XoopsThemeForm(_AM_TDMCREATE_ADMIN_CONST, 'buildform', $action, 'post', true);
+
+ $mod_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'mod_name', 'mod_name');
+ $mod_select->addOptionArray($modulesHandler->getList());
+ $form->addElement($mod_select, true);
+
+ $form->addElement(new XoopsFormHidden('op', 'build'));
+ $form->addElement(new XoopsFormButton(_REQUIRED.' <span class="red bold">*</span>', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+ break;
+}
+include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,26 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: footer.php 12207 2013-10-23 02:46:52Z beckmi $
+ */
+echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . $xoopsModule->getVar('name') . "</strong> is maintained by the
+ <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
+xoops_cp_footer();
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/header.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,54 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: header.php 12207 2013-10-23 02:46:52Z beckmi $
+ */
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
+include_once('../include/functions.php');
+include_once 'includes.php';
+//
+$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
+//
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+// Get class handler
+$modulesHandler =& xoops_getModuleHandler('modules', $thisDirname);
+$tablesHandler =& xoops_getModuleHandler('tables', $thisDirname);
+//
+$myts =& MyTextSanitizer::getInstance();
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+//
+$GLOBALS['xoopsTpl']->assign('pathIcon16', $pathIcon16);
+$GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
+//Load languages
+xoops_loadLanguage('admin', $thisDirname);
+xoops_loadLanguage('modinfo', $thisDirname);
+xoops_loadLanguage('main', $thisDirname);
+// Locad admin menu class
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+$adminMenu = new ModuleAdmin();
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/includes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/includes.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/includes.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,65 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: includes.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include '../../../include/cp_header.php';
+include_once("../include/functions.php");
+
+$modPath = XOOPS_ROOT_PATH.'/modules/TDMCreate';
+$cPath = $modPath.'/const';
+
+include_once $cPath.'/const_structure.php';
+include_once $cPath.'/const_xoopsversion.php';
+include_once $cPath.'/const_changelog.php';
+include_once $cPath.'/const_include_search.php';
+include_once $cPath.'/const_include_comments.php';
+include_once $cPath.'/const_include_notifications.php';
+include_once $cPath.'/const_include_common.php';
+include_once $cPath.'/const_include_functions.php';
+include_once $cPath.'/const_include_install.php';
+include_once $cPath.'/const_waiting.php';
+include_once $cPath.'/const_css_style.php';
+include_once $cPath.'/const_sql.php';
+include_once $cPath.'/const_blocks.php';
+include_once $cPath.'/const_blocks_templates.php';
+include_once $cPath.'/const_class.php';
+include_once $cPath.'/const_class_helper.php';
+include_once $cPath.'/const_class_request.php';
+include_once $cPath.'/const_class_module.php';
+include_once $cPath.'/const_admin_header.php';
+include_once $cPath.'/const_admin_footer.php';
+include_once $cPath.'/const_admin_menu.php';
+include_once $cPath.'/const_admin_index.php';
+include_once $cPath.'/const_admin_pages.php';
+include_once $cPath.'/const_admin_about.php';
+include_once $cPath.'/const_admin_permissions.php';
+include_once $cPath.'/const_admin_language.php';
+include_once $cPath.'/const_modinfo_language.php';
+include_once $cPath.'/const_help_language.php';
+include_once $cPath.'/const_blocks_language.php';
+include_once $cPath.'/const_main_language.php';
+include_once $cPath.'/const_user_header.php';
+include_once $cPath.'/const_user_index.php';
+include_once $cPath.'/const_user_pages.php';
+include_once $cPath.'/const_templates_header.php';
+include_once $cPath.'/const_templates_index.php';
+include_once $cPath.'/const_templates_pages.php';
+include_once $cPath.'/const_templates_footer.php';
+include_once $cPath.'/const_templates_admin_about.php';
+include_once $cPath.'/const_templates_admin_help.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.html 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,32 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: index.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include 'header.php';
+ $criteria = new CriteriaCompo();
+ $count_modules = $modulesHandler->getCount($criteria);
+ $count_tables = $tablesHandler->getCount($criteria);
+
+$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ;
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMMODULES. '</label>', $count_modules, 'Green') ;
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMTABLES. '</label>', $count_tables, 'Orange');
+
+ echo $adminMenu->addNavigation('index.php');
+ echo $adminMenu->renderIndex();
+include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/menu.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,46 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: menu.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+$module_handler =& xoops_gethandler('module');
+$xoopsModule =& XoopsModule::getByDirname('TDMCreate');
+$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
+$pathIcon32 = $moduleInfo->getInfo('icons32');
+$adminmenu = array();
+$i = 1;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_INDEX;
+$adminmenu[$i]["link"] = 'admin/index.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_MODULES;
+$adminmenu[$i]["link"] = 'admin/modules.php';
+$adminmenu[$i]["icon"] = 'images/icons/32/addmodule.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_TABLES;
+$adminmenu[$i]["link"] = 'admin/tables.php';
+$adminmenu[$i]["icon"] = 'images/icons/32/addtable.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_CONST;
+$adminmenu[$i]["link"] = 'admin/building.php';
+$adminmenu[$i]["icon"] = 'images/icons/32/builder.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_ABOUT;
+$adminmenu[$i]["link"] = 'admin/about.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
+unset($i);
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,186 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: modules.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include_once 'header.php';
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'list', 'string' );
+echo $adminMenu->addNavigation('modules.php');
+switch ($op)
+{
+ case 'save':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+
+ if (isset($_REQUEST['mod_id'])) {
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ } else {
+ $obj =& $modulesHandler->create();
+ }
+ //Image 'gif|jpeg|pjpeg|png' 500000
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploaddir = XOOPS_ROOT_PATH . '/modules/'.$xoopsModule->dirname().'/images/uploads/modules/';
+ $uploader = new XoopsMediaUploader($uploaddir, xoops_getModuleOption('mimetypes', $thisDirname),
+ xoops_getModuleOption('maxsize', $thisDirname), null, null);
+
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']) ;
+ $img_name = $obj->getVar('mod_name').'_slogo.'.$extension;
+ $uploader->setTargetFileName($img_name);
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header('javascript:history.go(-1)', 3, $errors);
+ } else {
+ $obj->setVar('mod_image', $uploader->getSavedFileName());
+ }
+ } else {
+ $obj->setVar('mod_image', $_POST['mod_image']);
+ }
+
+ $obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name'])); //remove all spaces from the new name
+ $obj->setVar('mod_version', $_POST['mod_version']);
+ $obj->setVar('mod_since', $_POST['mod_since']);
+ $obj->setVar('mod_min_php', $_POST['mod_min_php']);
+ $obj->setVar('mod_min_xoops', $_POST['mod_min_xoops']);
+ $obj->setVar('mod_min_admin', $_POST['mod_min_admin']);
+ $obj->setVar('mod_min_mysql', $_POST['mod_min_mysql']);
+ $obj->setVar('mod_description', $_POST['mod_description']);
+ $obj->setVar('mod_author', $_POST['mod_author']);
+ $obj->setVar('mod_author_mail', $_POST['mod_author_mail']);
+ $obj->setVar('mod_author_website_url', $_POST['mod_author_website_url']);
+ $obj->setVar('mod_author_website_name', $_POST['mod_author_website_name']);
+ $obj->setVar('mod_credits', $_POST['mod_credits']);
+ $obj->setVar('mod_license', $_POST['mod_license']);
+ $obj->setVar('mod_release_info', $_POST['mod_release_info']);
+ $obj->setVar('mod_release_file', $_POST['mod_release_file']);
+ $obj->setVar('mod_manual', $_POST['mod_manual']);
+ $obj->setVar('mod_manual_file', $_POST['mod_manual_file']);
+ $obj->setVar('mod_demo_site_url', $_POST['mod_demo_site_url']);
+ $obj->setVar('mod_demo_site_name', $_POST['mod_demo_site_name']);
+ $obj->setVar('mod_support_url', $_POST['mod_support_url']);
+ $obj->setVar('mod_support_name', $_POST['mod_support_name']);
+ $obj->setVar('mod_website_url', $_POST['mod_website_url']);
+ $obj->setVar('mod_website_name', $_POST['mod_website_name']);
+ $obj->setVar('mod_release', $_POST['mod_release']);
+ $obj->setVar('mod_status', $_POST['mod_status']);
+ $obj->setVar('mod_admin', $_REQUEST['mod_admin']);
+ $obj->setVar('mod_user', $_REQUEST['mod_user']);
+ $obj->setVar('mod_search', $_REQUEST['mod_search']);
+ $obj->setVar('mod_comments', $_REQUEST['mod_comments']);
+ $obj->setVar('mod_notifications', $_REQUEST['mod_notifications']);
+ $obj->setVar('mod_permissions', $_REQUEST['mod_permissions']);
+ $obj->setVar('mod_install', $_REQUEST['mod_install']);
+ $obj->setVar('mod_donations', $_POST['mod_donations']);
+ $obj->setVar('mod_subversion', $_POST['mod_subversion']);
+
+ if ($modulesHandler->insert($obj)) {
+ redirect_header('modules.php?op=list', 2, _AM_TDMCREATE_FORMOK);
+ }
+ break;
+
+ case 'new':
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
+ echo $adminMenu->renderButton();
+
+ $obj =& $modulesHandler->create();
+ $form = $obj->getForm();
+ break;
+ case 'edit':
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $form = $obj->getForm();
+ break;
+ case 'delete':
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
+ {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($modulesHandler->delete($obj)) {
+ $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE mod_id = ".$_REQUEST['mod_id']);
+ redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
+ }
+ break;
+ case 'list':
+ default:
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
+ echo $adminMenu->renderButton();
+
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('mod_id');
+ $criteria->setOrder('ASC');
+ $mod_arr = $modulesHandler->getall($criteria);
+ $numrows_modules = $modulesHandler->getCount();
+
+ if ( $numrows_modules > 0 )
+ {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '</tr>';
+ $class = 'odd';
+ foreach (array_keys($mod_arr) as $i)
+ {
+ $mod_id = $mod_arr[$i]->getVar('mod_id');
+ $mod_name = $mod_arr[$i]->getVar('mod_name');
+ $mod_image = $mod_arr[$i]->getVar('mod_image');
+ //$mod_blocks = $mod_arr[$i]->getVar('mod_blocks');
+ $mod_admin = $mod_arr[$i]->getVar('mod_admin');
+ $mod_user = $mod_arr[$i]->getVar('mod_user');
+ $admin = ($mod_admin == 1) ? _YES : _NO;
+ $user = ($mod_user == 1) ? _YES : _NO;
+ echo '<tr class="odd center">';
+ echo '<td><b>'.$i.'</b></td>';
+ $nbsps = ' ';
+ echo '<td class="left">'.$nbsps.'<img src="../images/icons/16/arrow.gif" alt="Arrow" />'.$nbsps.'<b>'.$mod_name.'</b></td>';
+ echo '<td><img src="../images/uploads/modules/'.$mod_image.'" height="30px" /></td>';
+ echo '<td>'.$admin.'</td>';
+ echo '<td>'.$user.'</td>';
+ echo '<td>';
+ echo '<a href="modules.php?op=edit&mod_id='.$mod_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._EDIT.'" title="'._EDIT.'" /></a> <a href="modules.php?op=delete&mod_id='.$mod_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._DELETE.'" title="'._DELETE.'" /></a>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table><br><br>';
+ } else {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '</tr></table><br><br>';
+ }
+ break;
+}
+include_once 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-02-07 10:33:00 UTC (rev 12289)
@@ -0,0 +1,483 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: tables.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include_once 'header.php';
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+$table_id = TDMCreate_CleanVars( $_REQUEST, 'table_id', 0 );
+echo $adminMenu->addNavigation('tables.php');
+switch ($op) {
+ case 'save_table':
+ if (isset($_REQUEST['table_id'])) {
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ } else {
+ $obj =& $tablesHandler->create();
+ }
+
+ //Module Name
+ $modules =& $modulesHandler->get($_REQUEST['table_mid']);
+ $mod_name = $modules->getVar('mod_name');
+
+ $obj->setVar('table_mid', $_REQUEST['table_mid']);
+
+ if ( $_REQUEST['select'] == 1 )
+ {
+ $obj->setVar('table_name', 'categories');
+ $obj->setVar('table_category', 1);
+ $obj->setVar('table_fieldname', 'cat');
+ $obj->setVar('table_blocks', 0);
+ $obj->setVar('table_admin', 1);
+ $obj->setVar('table_user', 1);
+ $obj->setVar('table_status', 0);
+ $obj->setVar('table_waiting', 0);
+ $obj->setVar('table_online', 0);
+ $obj->setVar('table_search', 0);
+ $obj->setVar('table_comments', 0);
+ $obj->setVar('table_notifications', 0);
+ $obj->setVar('table_permissions', 0);
+ $obj->setVar('table_nbfields', 7);
+
+ $table_fields =...
[truncated message content] |
|
From: <be...@us...> - 2014-02-05 10:01:49
|
Revision: 12288
http://sourceforge.net/p/xoops/svn/12288
Author: beckmi
Date: 2014-02-05 10:01:46 +0000 (Wed, 05 Feb 2014)
Log Message:
-----------
Updating required PHP and XOOPS versions, module versions (cesag/mamba)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/xoops_version.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/xoops_version.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/include/version.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/xoops_version.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/xoops_version.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/xoops_version.php 2014-02-04 21:19:00 UTC (rev 12287)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/xoops_version.php 2014-02-05 10:01:46 UTC (rev 12288)
@@ -26,7 +26,7 @@
$modversion = array();
$modversion['name'] = _PM_MI_NAME;
-$modversion['version'] = 1.09;
+$modversion['version'] = 1.10;
$modversion['description'] = _PM_MI_DESC;
$modversion['author'] = "Jan Pedersen, Taiwen Jiang";
$modversion['credits'] = "The XOOPS Project, Wanikoo";
@@ -40,12 +40,12 @@
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2012/07/30';
+$modversion['release_date'] = '2014/02/05';
$modversion["module_website_url"] = "http://www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "RC";
-$modversion['min_php'] = '5.2';
-$modversion['min_xoops'] = "2.5.5";
+$modversion["module_status"] = "Beta 1";
+$modversion['min_php'] = '5.3.7';
+$modversion['min_xoops'] = "2.5.7";
$modversion['min_admin'] = '1.1';
$modversion['min_db'] = array(
'mysql' => '5.0.7',
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/xoops_version.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/xoops_version.php 2014-02-04 21:19:00 UTC (rev 12287)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/xoops_version.php 2014-02-05 10:01:46 UTC (rev 12288)
@@ -25,7 +25,7 @@
*/
$modversion = array();
$modversion['name'] = _PROFILE_MI_NAME;
-$modversion['version'] = 1.85;
+$modversion['version'] = 1.86;
$modversion['description'] = _PROFILE_MI_DESC;
$modversion['author'] = "Jan Pedersen, Taiwen Jiang, alfred, Wishcraft";
$modversion['credits'] = "Ackbarr, mboyden, marco, mamba, trabis, etc.";
@@ -39,12 +39,12 @@
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2012/07/30';
+$modversion['release_date'] = '2014/02/05';
$modversion["module_website_url"] = "http://www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "Final";
-$modversion['min_php'] = '5.2';
-$modversion['min_xoops'] = "2.5.5";
+$modversion["module_status"] = "Beta 1";
+$modversion['min_php'] = '5.3.7';
+$modversion['min_xoops'] = "2.5.7";
$modversion['min_admin'] = '1.1';
$modversion['min_db'] = array(
'mysql' => '5.0.7',
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/include/version.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/include/version.txt 2014-02-04 21:19:00 UTC (rev 12287)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/include/version.txt 2014-02-05 10:01:46 UTC (rev 12288)
@@ -1 +1 @@
-3.51
\ No newline at end of file
+3.52
\ No newline at end of file
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/xoops_version.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/xoops_version.php 2014-02-04 21:19:00 UTC (rev 12287)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/xoops_version.php 2014-02-05 10:01:46 UTC (rev 12288)
@@ -34,12 +34,12 @@
$modversion['icons32'] = 'Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2011/10/08';
+$modversion['release_date'] = '2014/02/05';
$modversion["module_website_url"] = "http://www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "Final";
-$modversion['min_php']='5.2';
-$modversion['min_xoops']="2.5";
+$modversion["module_status"] = "Beta 1";
+$modversion['min_php']='5.3.7';
+$modversion['min_xoops']="2.5.7";
// start hack by Mage
// Admin menu
// Set to 1 if you want to display menu generated by system module
|
|
From: <luc...@us...> - 2014-02-04 21:19:02
|
Revision: 12287
http://sourceforge.net/p/xoops/svn/12287
Author: luciorota
Date: 2014-02-04 21:19:00 +0000 (Tue, 04 Feb 2014)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-02-04 21:19:00 UTC (rev 12287)
@@ -105,8 +105,8 @@
if (in_array($key, $notAllowedKeys)) {
continue;
}
- $caption = (constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) : $key);
- $description = (constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") : '');
+ $caption = (defined("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) : $key);
+ $description = (defined("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") : '');
$editContent = '';
// Extra jobs for some keys
switch ($key) {
@@ -300,11 +300,11 @@
$hidden = new XoopsFormHidden('op', 'modification.change');
$button_tray->addElement($hidden);
if (!$modification->isNew()) {
- $button_approve = new XoopsFormButton('', '', _AM_WFDOWNLOADS_BAPPROVE, 'submit');
- $button_approve->setExtra('onclick="this.form.elements.op.value=\'modification.change\'"');
+ $button_approve = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ $button_approve->setExtra('onclick="this.form.elements.op.value=\'modification.save\'"');
$button_tray->addElement($button_approve);
}
- $button_ignore = new XoopsFormButton('', '', _AM_WFDOWNLOADS_BIGNORE, 'submit');
+ $button_ignore = new XoopsFormButton('', '', _AM_WFDOWNLOADS_MOD_IGNORE, 'submit');
$button_ignore->setExtra('onclick="this.form.elements.op.value=\'modification.ignore\'"');
$button_tray->addElement($button_ignore);
$button_reset = new XoopsFormButton('', '', _RESET, 'reset');
@@ -319,10 +319,48 @@
exit();
break;
+ case "modification.save" :
+ $requestid = WfdownloadsRequest::getInt('requestid', 0);
+
+ $modification = $wfdownloads->getHandler('modification')->get($requestid);
+ $download = $wfdownloads->getHandler('download')->get($modification->getVar('lid'));
+
+ if ($modification->getVar('version') == $download->getVar('version')) {
+ $raiseModifyEvents = false;
+ } else {
+ $raiseModifyEvents = true;
+ }
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+ // SAVE MODIFIED FIELDS
+
+ // DELETE MODIFICATIONREQUEST
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+ if ($raiseModifyEvents) {
+ // Trigger the three events related to modified files (one for the file, category, and global event categories respectively)
+ $tags = array();
+ $tags['FILE_NAME'] = $download->getVar('title');
+ $tags['FILE_URL'] = WFDOWNLOADS_URL . '/singlefile.php?cid=' . $cid . '&lid=' . $lid;
+ $category = $wfdownloads->getHandler('category')->get($cid);
+ $tags['FILE_VERSION'] = $download->getVar('version');
+ $tags['CATEGORY_NAME'] = $category->getVar('title');
+ $tags['CATEGORY_URL'] = WFDOWNLOADS_URL . '/viewcat.php?cid=' . $cid;
+
+ $notification_handler->triggerEvent('global', 0, 'filemodified', $tags);
+ $notification_handler->triggerEvent('category', $cid, 'filemodified', $tags);
+ $notification_handler->triggerEvent('file', $lid, 'filemodified', $tags);
+ }
+
+ redirect_header(WFDOWNLOADS_URL . '/admin/index.php', 1, _AM_WFDOWNLOADS_MOD_REQUPDATED);
+ break;
+
case "modification.change" :
/* Added by Lankford on 2007/3/21 */
// Get a pointer to the download record and the modification record, then compare their 'versions' to see if they are different. If they are, then raise filemodify events.
- $requestid = WfdownloadsRequest::getInt('requestid', 0, 'POST');
+ $requestid = WfdownloadsRequest::getInt('requestid', 0, 'GET');
$modification = $wfdownloads->getHandler('modification')->get($requestid);
$download = $wfdownloads->getHandler('download')->get($modification->getVar('lid'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-02-04 21:19:00 UTC (rev 12287)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2014-01-07)</u></b>
+<b><u>=> Version 3.23 Beta (2014-02-04)</u></b>
- update jQuery Thickbox plugin to 3.1 (luciorota)
- fixed: jQuery bug in templates (luciorota)
- standardization of English language files (cesag)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-02-04 21:19:00 UTC (rev 12287)
@@ -299,7 +299,7 @@
define('_AM_WFDOWNLOADS_MOD_ORIGINAL', "Original download details");
define('_AM_WFDOWNLOADS_MOD_REQDELETED', "Modification request removed from the database");
define('_AM_WFDOWNLOADS_MOD_REQUPDATED', "Selected download Modified and database updated successfully");
-define('_AM_WFDOWNLOADS_MOD_VIEW', "View modification");
+define('_AM_WFDOWNLOADS_MOD_VIEW', "View and edit modification request");
define('_AM_WFDOWNLOADS_MOD_FILENAME', "Local file name");
define('_AM_WFDOWNLOADS_MOD_FILETYPE', "Local file type");
define('_AM_WFDOWNLOADS_MOD_STATUS', "Status");
@@ -625,7 +625,7 @@
// admin/categories.php
define('_AM_WFDOWNLOADS_FCATEGORY_ID', "ID");
// admin/reportsmodifications.php
-define('_AM_WFDOWNLOADS_MOD_IGNORE', "Ignore and delete modification");
+define('_AM_WFDOWNLOADS_MOD_IGNORE', "Ignore and delete modification request");
define('_AM_WFDOWNLOADS_MOD_VIEWDESC', "<b>View & Compare</b> download and modification.");
define('_AM_WFDOWNLOADS_MOD_IGNOREDESC', "<b>Ignore & Delete</b> modification.");
define('_AM_WFDOWNLOADS_MOD_REALLYIGNOREDTHIS', "Are you sure to ignore and delete this modification?");
@@ -636,3 +636,6 @@
define('_AM_WFDOWNLOADS_MOD_DOIMAGE', "Allow XOOPS Images");
define('_AM_WFDOWNLOADS_MOD_DOBR', "Convert line breaks");
define('_AM_WFDOWNLOADS_MOD_FORMULIZE_IDREQ', "Formulize Form ID");
+// 3.23
+define('_AM_WFDOWNLOADS_MOD_APPROVE', "Approve and delete modification request");
+define('_AM_WFDOWNLOADS_MOD_SAVE', "Save");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html 2014-02-04 21:19:00 UTC (rev 12287)
@@ -45,15 +45,24 @@
<td class='even'><{$mirror_waiting.submitter_uname}></td>
<td class='even'><{$mirror_waiting.formatted_date}></td>
<td class='even' align='center'>
- <a href='?op=mirror.approve&mirror_id=<{$mirror_waiting.mirror_id}>'><img src="<{xoModuleIcons16 1.png}>"
- title="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"
- alt="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"/></a>
- <a href='?op=mirror.edit&mirror_id=<{$mirror_waiting.mirror_id}>'><img src="<{xoModuleIcons16 edit.png}>"
- title="<{$smarty.const._EDIT}>"
- alt="<{$smarty.const._EDIT}>"/></a>
- <a href='?op=mirror.delete&mirror_id=<{$mirror_waiting.mirror_id}>'><img src="<{xoModuleIcons16 delete.png}>"
- title="<{$smarty.const._DELETE}>"
- alt="<{$smarty.const._DELETE}>"/></a>
+ <a href='?op=mirror.approve&mirror_id=<{$mirror_waiting.mirror_id}>'>
+ <img
+ src="<{xoModuleIcons16 1.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"/>
+ </a>
+ <a href='?op=mirror.edit&mirror_id=<{$mirror_waiting.mirror_id}>'>
+ <img
+ src="<{xoModuleIcons16 edit.png}>"
+ title="<{$smarty.const._EDIT}>"
+ alt="<{$smarty.const._EDIT}>"/>
+ </a>
+ <a href='?op=mirror.delete&mirror_id=<{$mirror_waiting.mirror_id}>'>
+ <img
+ src="<{xoModuleIcons16 delete.png}>"
+ title="<{$smarty.const._DELETE}>"
+ alt="<{$smarty.const._DELETE}>"/>
+ </a>
</td>
</tr>
<{/foreach}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html 2014-02-04 21:19:00 UTC (rev 12287)
@@ -138,13 +138,23 @@
<td><{$modification.submitter_uname}></td>
<td><{$modification.formatted_date}></td>
<td align='center'>
+ <a href='?op=modification.change&requestid=<{$modification.requestid}>'>
+ <img
+ src="<{xoModuleIcons16 1.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_MOD_APPROVE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_APPROVE}>"/>
+ </a>
<a href='?op=modification.show&requestid=<{$modification.requestid}>'>
- <img src="<{xoModuleIcons16 view.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"
- alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"/>
+ <img
+ src="<{xoModuleIcons16 view.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"/>
</a>
<a href='?op=modification.ignore&requestid=<{$modification.requestid}>'>
- <img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"
- alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"/>
+ <img
+ src="<{xoModuleIcons16 delete.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"/>
</a>
</td>
</tr>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-02-04 21:19:00 UTC (rev 12287)
@@ -42,9 +42,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2014-01-07';
-$modversion['release_date'] = '2014/01/07';
-$modversion['releasedate'] = '2014-01-07';
+$modversion['date'] = '2014-02-04';
+$modversion['release_date'] = '2014/02/04';
+$modversion['releasedate'] = '2014-02-04';
$modversion['status'] = 'BETA 2';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|
|
From: <be...@us...> - 2014-01-31 16:55:32
|
Revision: 12286
http://sourceforge.net/p/xoops/svn/12286
Author: beckmi
Date: 2014-01-31 16:55:27 +0000 (Fri, 31 Jan 2014)
Log Message:
-----------
Block Template adjustment (Bleekk)
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
Modified: XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/blocks/items_spot.php 2014-01-30 11:31:16 UTC (rev 12285)
+++ XoopsModules/publisher/trunk/publisher/blocks/items_spot.php 2014-01-31 16:55:27 UTC (rev 12286)
@@ -24,6 +24,7 @@
function publisher_items_spot_show($options)
{
+ global $xoTheme;
$publisher = PublisherPublisher::getInstance();
$opt_display_last = $options[0];
$opt_items_count = $options[1];
@@ -101,7 +102,7 @@
$block['display_type'] = $opt_display_type;
$block["publisher_url"] = PUBLISHER_URL;
-
+ $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . PUBLISHER_DIRNAME . '/css/publisher.css');
return $block;
}
|
|
From: <be...@us...> - 2014-01-30 12:25:31
|
Revision: 12282
http://sourceforge.net/p/xoops/svn/12282
Author: beckmi
Date: 2014-01-30 10:14:26 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
Added "title" to buttons
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mms/mms.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mp3/mp3.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/rtsp/rtsp.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wiki/wiki.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wmp/wmp.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/youtube/youtube.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -24,7 +24,11 @@
function encode($textarea_id)
{
$config = parent::loadConfig(dirname(__FILE__));
- $code = "<img src='{$this->image_path}/swf.gif' alt='" . _XOOPS_FORM_ALTFLASH . "' onclick='xoopsCodeFlash(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERFLASHURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\", \"" . $config['detect_dimension'] . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/swf.gif' alt='" . _XOOPS_FORM_ALTFLASH . "' title='" . _XOOPS_FORM_ALTFLASH . "' '" . "' onclick='xoopsCodeFlash(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTERFLASHURL, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\", \"" . $config['detect_dimension']
+ . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOF
function xoopsCodeFlash(id, enterFlashPhrase, enterFlashHeightPhrase, enterFlashWidthPhrase, enableDimensionDetect)
{
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mms/mms.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mms/mms.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mms/mms.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -24,7 +24,10 @@
function encode($textarea_id)
{
$config = parent::loadConfig(dirname(__FILE__));
- $code = "<img src='{$this->image_path}/mmssrc.gif' alt='" . _XOOPS_FORM_ALTMMS . "' onclick='xoopsCodeMms(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/mmssrc.gif' alt='" . _XOOPS_FORM_ALTMMS . "' title='" . _XOOPS_FORM_ALTMMS . "' '" . "' onclick='xoopsCodeMms(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeMms(id,enterMmsPhrase, enterMmsHeightPhrase, enterMmsWidthPhrase)
{
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mp3/mp3.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mp3/mp3.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/mp3/mp3.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -23,7 +23,8 @@
{
function encode($textarea_id)
{
- $code = "<img src='{$this->image_path}/mp3.gif' alt='" . _XOOPS_FORM_ALTMP3 . "' onclick='xoopsCodeMp3(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERMP3URL, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/mp3.gif' alt='" . _XOOPS_FORM_ALTMP3 . "' title='" . _XOOPS_FORM_ALTMP3 . "' '" . "' onclick='xoopsCodeMp3(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTERMP3URL, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOF
function xoopsCodeMp3(id, enterMp3Phrase)
{
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/rtsp/rtsp.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/rtsp/rtsp.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/rtsp/rtsp.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -24,7 +24,10 @@
function encode($textarea_id)
{
$config = parent::loadConfig(dirname(__FILE__));
- $code = "<img src='{$this->image_path}/rtspimg.gif' alt='" . _XOOPS_FORM_ALTRTSP . "' onclick='xoopsCodeRtsp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERRTSPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/rtspimg.gif' alt='" . _XOOPS_FORM_ALTRTSP . "' title='" . _XOOPS_FORM_ALTRTSP . "' '" . "' onclick='xoopsCodeRtsp(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTERRTSPURL, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeRtsp(id,enterRtspPhrase, enterRtspHeightPhrase, enterRtspWidthPhrase)
{
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wiki/wiki.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wiki/wiki.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wiki/wiki.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -27,7 +27,9 @@
function encode($textarea_id)
{
$config = parent::loadConfig(dirname(__FILE__));
- $code = "<img src='{$this->image_path}/wiki.gif' alt='" . _XOOPS_FORM_ALTWIKI . "' onclick='xoopsCodeWiki(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIKITERM, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/wiki.gif' alt='" . _XOOPS_FORM_ALTWIKI
+ . "' title='" . _XOOPS_FORM_ALTWIKI . "' '"
+ . "' onclick='xoopsCodeWiki(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIKITERM, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeWiki(id, enterWikiPhrase)
{
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wmp/wmp.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wmp/wmp.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/wmp/wmp.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -24,7 +24,10 @@
function encode($textarea_id)
{
$config = parent::loadConfig(dirname(__FILE__));
- $code = "<img src='{$this->image_path}/wmp.gif' alt='" . _XOOPS_FORM_ALTWMP . "' onclick='xoopsCodeWmp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/wmp.gif' alt='" . _XOOPS_FORM_ALTWMP . "' title='" . _XOOPS_FORM_ALTWMP . "' '" . "' onclick='xoopsCodeWmp(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeWmp(id, enterWmpPhrase, enterWmpHeightPhrase, enterWmpWidthPhrase)
{
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/youtube/youtube.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/youtube/youtube.php 2014-01-30 10:13:27 UTC (rev 12281)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/youtube/youtube.php 2014-01-30 10:14:26 UTC (rev 12282)
@@ -23,7 +23,10 @@
function encode($textarea_id)
{
$config = parent::loadConfig( dirname(__FILE__) );
- $code = "<img src='{$this->image_path}/youtube.gif' alt='" . _XOOPS_FORM_ALTYOUTUBE . "' onclick='xoopsCodeYoutube(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERYOUTUBEURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $code = "<img src='{$this->image_path}/youtube.gif' alt='" . _XOOPS_FORM_ALTYOUTUBE . "' title='" . _XOOPS_FORM_ALTYOUTUBE . "' '" . "' onclick='xoopsCodeYoutube(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTERYOUTUBEURL, ENT_QUOTES) . "\",\""
+ . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES)
+ . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeYoutube(id, enterFlashPhrase, enterFlashHeightPhrase, enterFlashWidthPhrase)
{
|
|
From: <be...@us...> - 2014-01-30 11:31:26
|
Revision: 12285
http://sourceforge.net/p/xoops/svn/12285
Author: beckmi
Date: 2014-01-30 11:31:16 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
Fixed bug with $_POST table (Montuy337513 alias black_beard), changed icons (Mamba)
Modified Paths:
--------------
XoopsModules/contact/trunk/contact/admin/menu.php
XoopsModules/contact/trunk/contact/docs/changelog.txt
XoopsModules/contact/trunk/contact/index.php
Modified: XoopsModules/contact/trunk/contact/admin/menu.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/menu.php 2014-01-30 11:19:28 UTC (rev 12284)
+++ XoopsModules/contact/trunk/contact/admin/menu.php 2014-01-30 11:31:16 UTC (rev 12285)
@@ -43,12 +43,12 @@
$adminmenu[$i]["title"] = _MI_CONTACT_MENU_LOGS;
$adminmenu[$i]["link"] = "admin/log.php";
$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_LOGS_DESC;
-$adminmenu[$i]["icon"] = $pathIcon32 . '/exec.png';
+$adminmenu[$i]["icon"] = $pathIcon32 . '/identity.png';
$i++;
$adminmenu[$i]["title"] = _MI_CONTACT_MENU_TOOLS;
$adminmenu[$i]["link"] = "admin/tools.php";
$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_TOOLS_DESC;
-$adminmenu[$i]["icon"] = $pathIcon32 . '/exec.png';
+$adminmenu[$i]["icon"] = $pathIcon32 . '/delete.png';
$i++;
$adminmenu[$i]["title"] = _MI_CONTACT_MENU_ABOUT;
$adminmenu[$i]["link"] = "admin/about.php";
Modified: XoopsModules/contact/trunk/contact/docs/changelog.txt
===================================================================
--- XoopsModules/contact/trunk/contact/docs/changelog.txt 2014-01-30 11:19:28 UTC (rev 12284)
+++ XoopsModules/contact/trunk/contact/docs/changelog.txt 2014-01-30 11:31:16 UTC (rev 12285)
@@ -7,6 +7,7 @@
- making Captcha optional for Anonymous/Registered users (mamba)
- Fixed an error when sending anonymous (mamba)
- Fixed an error when sending Captcha (Montuy337513 alias black_beard)
+- Fixed bug with $_POST table (Montuy337513 alias black_beard)
Version 1.80 from 2012-1-19
=================================
Modified: XoopsModules/contact/trunk/contact/index.php
===================================================================
--- XoopsModules/contact/trunk/contact/index.php 2014-01-30 11:19:28 UTC (rev 12284)
+++ XoopsModules/contact/trunk/contact/index.php 2014-01-30 11:31:16 UTC (rev 12285)
@@ -1,100 +1,100 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-/**
- * Contact module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Kazumi Ono (aka Onokazu)
- * @author Trabis <lus...@gm...>
- * @author Hossein Azizabadi (AKA Voltan)
- * @version $Id$
- */
-
-include 'header.php';
-$xoopsOption['template_main'] = 'contact_index.html';
-
-include XOOPS_ROOT_PATH . "/header.php";
-
-global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger;
-
-$op = $contact_handler->Contact_CleanVars($_POST, 'op', 'form', 'string');
-$department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string');
-
-switch ($op) {
- case 'form':
- default:
- $obj = $contact_handler->create();
- $form = $obj->Contact_ContactForm($department);
- $xoopsTpl->assign('form', $form->render());
- $xoopsTpl->assign('breadcrumb', '<a href="' . XOOPS_URL . '">' . _YOURHOME . '</a> » ' . $xoopsModule->name());
- $xoopsTpl->assign('info', xoops_getModuleOption('contact_info', 'contact'));
- break;
-
- case 'save':
-
-// if (empty($_POST['submit']) | !$GLOBALS['xoopsSecurity']->check()) { //mb
- if (empty($_POST['submit']) ) {
- redirect_header(XOOPS_URL, 3, _MD_CONTACT_MES_ERROR);
- exit();
- } else {
- // check captcha
- if ((!$xoopsUser && $xoopsModuleConfig['captchaAnonymous'])
- || ($xoopsUser && !$xoopsUserIsAdmin && $xoopsModuleConfig['captchaRegistered'])
- ) {
- // Verify entered code
- xoops_load('XoopsCaptcha');
- if (class_exists('XoopsFormCaptcha')) {
- $xoopsCaptcha = XoopsCaptcha::getInstance();
- if (!$xoopsCaptcha->verify()) {
- // $err[] = $xoopsCaptcha->getMessage();
- redirect_header("javascript:history.go(-1)", 1, $xoopsCaptcha->getMessage());
- exit();
- }
- }
- }
-
- // check email
- if (!$contact_handler->Contact_CleanVars($_POST, 'contact_mail', '', 'mail')) {
- redirect_header("javascript:history.go(-1)", 1, _MD_CONTACT_MES_NOVALIDEMAIL);
- exit();
- }
-
- // Info Processing
- $contact = $contact_handler->Contact_InfoProcessing($_POST);
-
- // insert in DB
- if ($saveinfo = true) {
- $obj = $contact_handler->create();
- $obj->setVars($contact);
- if (!$contact_handler->insert($obj)) {
- redirect_header("index.php", 3, _MD_CONTACT_MES_NOTSAVE);
- exit();
- }
- }
-
- // send mail can send message
- if ($sendmail = true) {
- $message = $contact_handler->Contact_SendMail($contact);
- } elseif ($saveinfo = true) {
- $message = _MD_CONTACT_MES_SAVEINDB;
- } else {
- $message = _MD_CONTACT_MES_SENDERROR;
- }
- redirect_header(XOOPS_URL, 3, $message);
- exit();
- }
-
- break;
-}
-
-include XOOPS_ROOT_PATH . "/footer.php";
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/**
+ * Contact module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Kazumi Ono (aka Onokazu)
+ * @author Trabis <lus...@gm...>
+ * @author Hossein Azizabadi (AKA Voltan)
+ * @version $Id$
+ */
+include 'header.php';
+$xoopsOption['template_main'] = 'contact_index.html';
+//unset($_SESSION);
+include XOOPS_ROOT_PATH . "/header.php";
+
+global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger;
+
+$op = $contact_handler->Contact_CleanVars($_POST, 'op', 'form', 'string');
+$department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string');
+switch ($op) {
+ case 'save':
+
+// if (empty($_POST['submit']) | !$GLOBALS['xoopsSecurity']->check()) { //mb
+ if (empty($_POST['submit']) ) {
+ redirect_header(XOOPS_URL, 3, _MD_CONTACT_MES_ERROR);
+ exit();
+ } else {
+ // check captcha
+
+ if ((!$xoopsUser && $xoopsModuleConfig['captchaAnonymous'])
+ || ($xoopsUser && !$xoopsUserIsAdmin && $xoopsModuleConfig['captchaRegistered'])
+ ) {
+ // Verify entered code
+
+ xoops_load('XoopsCaptcha');
+ if (class_exists('XoopsFormCaptcha')) {
+ $xoopsCaptcha = XoopsCaptcha::getInstance();
+ if (!$xoopsCaptcha->verify()) {
+ $err[] = $xoopsCaptcha->getMessage();
+ redirect_header("index.php", 1, $xoopsCaptcha->getMessage());
+
+ exit();
+ }
+ }
+ }
+
+ // check email
+ if (!$contact_handler->Contact_CleanVars($_POST, 'contact_mail', '', 'mail')) {
+ redirect_header("index.php", 1, _MD_CONTACT_MES_NOVALIDEMAIL);
+ exit();
+ }
+
+ // Info Processing
+ $contact = $contact_handler->Contact_InfoProcessing($_POST);
+
+ // insert in DB
+ if ($saveinfo = true) {
+ $obj = $contact_handler->create();
+ $obj->setVars($contact);
+ if (!$contact_handler->insert($obj)) {
+ redirect_header("index.php", 3, _MD_CONTACT_MES_NOTSAVE);
+ exit();
+ }
+ }
+
+ // send mail can send message
+ if ($sendmail = true) {
+ $message = $contact_handler->Contact_SendMail($contact);
+ } elseif ($saveinfo = true) {
+ $message = _MD_CONTACT_MES_SAVEINDB;
+ } else {
+ $message = _MD_CONTACT_MES_SENDERROR;
+ }
+ redirect_header(XOOPS_URL, 3, $message);
+ exit();
+ }
+
+ break;
+ case 'form';
+ default:
+ $obj = $contact_handler->create();
+ $form = $obj->Contact_ContactForm($department);
+ $xoopsTpl->assign('form', $form->render());
+ $xoopsTpl->assign('breadcrumb', '<a href="' . XOOPS_URL . '">' . _YOURHOME . '</a> » ' . $xoopsModule->name());
+ $xoopsTpl->assign('info', xoops_getModuleOption('contact_info', 'contact'));
+ break;
+}
+
+include XOOPS_ROOT_PATH . "/footer.php";
|
|
From: <be...@us...> - 2014-01-30 11:19:35
|
Revision: 12284
http://sourceforge.net/p/xoops/svn/12284
Author: beckmi
Date: 2014-01-30 11:19:28 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
fix to correctly load the CSS file into the header (Bleekk, Alfred)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-01-30 11:11:43 UTC (rev 12283)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2014-01-30 11:19:28 UTC (rev 12284)
@@ -372,7 +372,8 @@
{
$ret['label'] = $label;
$line = "";
- switch ($type) {
+ switch ($type)
+ {
default:
case "default":
$line .= sprintf($text, "<span style='color : " . $color . "; font-weight : bold;'>" . $value . "</span>");
|
|
From: <be...@us...> - 2014-01-30 11:11:56
|
Revision: 12283
http://sourceforge.net/p/xoops/svn/12283
Author: beckmi
Date: 2014-01-30 11:11:43 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
Deactivating SoundCloud as default in the configuration (the user will need to activate it)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php 2014-01-30 10:14:26 UTC (rev 12282)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php 2014-01-30 11:11:43 UTC (rev 12283)
@@ -31,7 +31,7 @@
"wiki" => is_dir(XOOPS_ROOT_PATH . '/modules/mediawiki/'),
"mms" => 0,
"rtsp" => 0,
- "soundcloud" => 1,
+ "soundcloud" => 0,
"ul" => 1,
"li" => 1),
|
|
From: <be...@us...> - 2014-01-30 10:13:31
|
Revision: 12281
http://sourceforge.net/p/xoops/svn/12281
Author: beckmi
Date: 2014-01-30 10:13:27 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
fix for cancel button in javascript (currently it still entered the text, even if canceled),
added title, replaced hard-coded text
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php 2014-01-30 08:35:15 UTC (rev 12280)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php 2014-01-30 10:13:27 UTC (rev 12281)
@@ -5,10 +5,11 @@
public function encode($textarea_id)
{
$config = parent::loadConfig( dirname(__FILE__) );
- $code = "<img src='{$this->image_path}/soundcloud.png' alt='SoundCloud' "
- . "onclick='xoopsCodeSoundCloud(\"{$textarea_id}\",\""
- . htmlspecialchars('Enter SoundCloud Profile URL', ENT_QUOTES)
- . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+
+ $code = "<img src='{$this->image_path}/soundcloud.png' alt='" . _XOOPS_FORM_ALT_SOUNDCLOUD
+ . "' title='" . _XOOPS_FORM_ALT_SOUNDCLOUD . "' '"
+ . "' onclick='xoopsCodeSoundCloud(\"{$textarea_id}\",\""
+ . htmlspecialchars(_XOOPS_FORM_ENTER_SOUNDCLOUD_URL, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> ";
$javascript = <<<EOH
function xoopsCodeSoundCloud(id, enterSoundCloud)
{
@@ -20,7 +21,9 @@
}
var domobj = xoopsGetElementById(id);
+ if (text.length > 0) {
xoopsInsertText(domobj, "[soundcloud]"+text+"[/soundcloud]");
+ }
domobj.focus();
}
EOH;
|
|
From: <be...@us...> - 2014-01-30 08:35:19
|
Revision: 12280
http://sourceforge.net/p/xoops/svn/12280
Author: beckmi
Date: 2014-01-30 08:35:15 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
adding missing soundcloud icon
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/images/form/soundcloud.png
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/images/form/soundcloud.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/images/form/soundcloud.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/images/form/soundcloud.png 2014-01-30 02:53:06 UTC (rev 12279)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/images/form/soundcloud.png 2014-01-30 08:35:15 UTC (rev 12280)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/images/form/soundcloud.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
|
|
From: <rgr...@us...> - 2014-01-30 02:53:08
|
Revision: 12279
http://sourceforge.net/p/xoops/svn/12279
Author: rgriffith
Date: 2014-01-30 02:53:06 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
Add [soundcloud] BB code as supplied by iHackCode
See: http://xoops.org/modules/newbb/viewtopic.php?post_id=356724#forumpost356724
Usage: [soundcode]https://soundcloud.com/(user)/(track)[/soundcode]
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/index.html
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php 2014-01-26 11:40:49 UTC (rev 12278)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/config.php 2014-01-30 02:53:06 UTC (rev 12279)
@@ -31,6 +31,7 @@
"wiki" => is_dir(XOOPS_ROOT_PATH . '/modules/mediawiki/'),
"mms" => 0,
"rtsp" => 0,
+ "soundcloud" => 1,
"ul" => 1,
"li" => 1),
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/index.html
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/index.html (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/index.html 2014-01-30 02:53:06 UTC (rev 12279)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/soundcloud/soundcloud.php 2014-01-30 02:53:06 UTC (rev 12279)
@@ -0,0 +1,63 @@
+<?php
+
+class MytsSoundcloud extends MyTextSanitizerExtension
+{
+ public function encode($textarea_id)
+ {
+ $config = parent::loadConfig( dirname(__FILE__) );
+ $code = "<img src='{$this->image_path}/soundcloud.png' alt='SoundCloud' "
+ . "onclick='xoopsCodeSoundCloud(\"{$textarea_id}\",\""
+ . htmlspecialchars('Enter SoundCloud Profile URL', ENT_QUOTES)
+ . "\");' onmouseover='style.cursor=\"hand\"'/> ";
+ $javascript = <<<EOH
+ function xoopsCodeSoundCloud(id, enterSoundCloud)
+ {
+ var selection = xoopsGetSelect(id);
+ if (selection.length > 0) {
+ var text = selection;
+ } else {
+ var text = prompt(enterSoundCloud, "");
+ }
+
+ var domobj = xoopsGetElementById(id);
+ xoopsInsertText(domobj, "[soundcloud]"+text+"[/soundcloud]");
+ domobj.focus();
+ }
+EOH;
+
+ return array($code, $javascript);
+ }
+
+ public function load(&$ts)
+ {
+ $ts->callbackPatterns[] = "/\[soundcloud\](http[s]?:\/\/[^\"'<>]*)(.*)\[\/soundcloud\]/sU";
+ $ts->callbacks[] = __CLASS__ . "::myCallback";
+
+ }
+
+ public static function myCallback($match)
+ {
+ $url = $match[1] . $match[2];
+ $config = parent::loadConfig(dirname(__FILE__));
+ if (!preg_match("/^http[s]?:\/\/(www\.)?soundcloud\.com\/(.*)/i", $url, $matches)) {
+ trigger_error("Not matched: {$url}", E_USER_WARNING);
+
+ return "";
+ }
+
+ $code = '<object height="81" width="100%"><param name="movie" '
+ . 'value="http://player.soundcloud.com/player.swf?url='.$url.'&g=bb">'
+ . '</param><param name="allowscriptaccess" value="always"></param>'
+ . '<embed allowscriptaccess="always" height="81" '
+ . 'src="http://player.soundcloud.com/player.swf?url=' . $url
+ . '&g=bb" type="application/x-shockwave-flash" width="100%"></embed></object>'
+ . '<a href="'.$url.'">'.$url.'</a>';
+
+ return $code;
+ }
+
+// public static function decode($url1, $url2)
+// {
+// }
+
+}
|
|
From: <be...@us...> - 2014-01-26 11:40:53
|
Revision: 12278
http://sourceforge.net/p/xoops/svn/12278
Author: beckmi
Date: 2014-01-26 11:40:49 +0000 (Sun, 26 Jan 2014)
Log Message:
-----------
Fixing MySQL tables installation errors
Modified Paths:
--------------
XoopsModules/pedigree/trunk/pedigree/sql/mysql.sql
Modified: XoopsModules/pedigree/trunk/pedigree/sql/mysql.sql
===================================================================
--- XoopsModules/pedigree/trunk/pedigree/sql/mysql.sql 2014-01-26 01:21:57 UTC (rev 12277)
+++ XoopsModules/pedigree/trunk/pedigree/sql/mysql.sql 2014-01-26 11:40:49 UTC (rev 12278)
@@ -1,21 +1,6 @@
--- phpMyAdmin SQL Dump
--- version 2.8.2.4
--- http://www.phpmyadmin.net
---
--- Host: localhost
--- Generatie Tijd: 03 Feb 2008 om 10:42
--- Server versie: 5.0.24
--- PHP Versie: 5.1.6
---
--- Database: `pedigree_candb`
---
+# Table structure for table `mod_pedigree_owner`
--- --------------------------------------------------------
---
--- Tabel structuur voor tabel `xovdk_owner`
---
-
CREATE TABLE `mod_pedigree_owner` (
`ID` int(11) NOT NULL auto_increment,
`firstname` varchar(30) NOT NULL default '',
@@ -32,12 +17,12 @@
KEY `lastname` (`lastname`(5))
) ENGINE=MyISAM AUTO_INCREMENT=1 COMMENT='owner information tree';
--- --------------------------------------------------------
+# --------------------------------------------------------
---
--- Tabel structuur voor tabel `xovdk_pedigree`
---
+# Table structure for table `mod_pedigree_tree`
+
+
CREATE TABLE `mod_pedigree_tree` (
`ID` mediumint(7) unsigned NOT NULL auto_increment,
`NAAM` text NOT NULL,
@@ -54,12 +39,12 @@
KEY `father` (`father`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
--- --------------------------------------------------------
+# --------------------------------------------------------
---
--- Tabel structuur voor tabel `xovdk_pedigree_config`
---
+# Table structure for table `mod_pedigree_fields`
+
+
CREATE TABLE `mod_pedigree_fields` (
`ID` tinyint(2) NOT NULL auto_increment,
`isActive` tinyint(1) NOT NULL default '0',
@@ -82,12 +67,12 @@
UNIQUE KEY `ID` (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
--- --------------------------------------------------------
+# --------------------------------------------------------
---
--- Tabel structuur voor tabel `xovdk_pedigree_temp`
---
+# Table structure for table `mod_pedigree_temp`
+
+
CREATE TABLE `mod_pedigree_temp` (
`ID` int(11) NOT NULL default '0',
`NAAM` text NOT NULL,
@@ -104,12 +89,12 @@
KEY `father` (`father`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='temporary pedigree table to create detailed extracts';
--- --------------------------------------------------------
+# --------------------------------------------------------
---
--- Tabel structuur voor tabel `xovdk_pedigree_trash`
---
+# Table structure for table `mod_pedigree_trash`
+
+
CREATE TABLE `mod_pedigree_trash` (
`ID` int(11) NOT NULL auto_increment,
`NAAM` text NOT NULL,
|
|
From: <be...@us...> - 2014-01-26 01:22:04
|
Revision: 12277
http://sourceforge.net/p/xoops/svn/12277
Author: beckmi
Date: 2014-01-26 01:21:57 +0000 (Sun, 26 Jan 2014)
Log Message:
-----------
Work in progress - toward 1.31 Alpha 3
Modified Paths:
--------------
XoopsModules/pedigree/trunk/pedigree/add_breeder.php
XoopsModules/pedigree/trunk/pedigree/add_dog.php
XoopsModules/pedigree/trunk/pedigree/add_litter.php
XoopsModules/pedigree/trunk/pedigree/admin/about.php
XoopsModules/pedigree/trunk/pedigree/admin/admin_footer.php
XoopsModules/pedigree/trunk/pedigree/admin/admin_header.php
XoopsModules/pedigree/trunk/pedigree/admin/colors.php
XoopsModules/pedigree/trunk/pedigree/admin/config.php
XoopsModules/pedigree/trunk/pedigree/admin/index.php
XoopsModules/pedigree/trunk/pedigree/admin/main.php
XoopsModules/pedigree/trunk/pedigree/admin/menu.php
XoopsModules/pedigree/trunk/pedigree/admin/permissions.php
XoopsModules/pedigree/trunk/pedigree/admin/savecolors.php
XoopsModules/pedigree/trunk/pedigree/admin/tools.php
XoopsModules/pedigree/trunk/pedigree/advanced.php
XoopsModules/pedigree/trunk/pedigree/blocks/menu_block.php
XoopsModules/pedigree/trunk/pedigree/book.php
XoopsModules/pedigree/trunk/pedigree/breeder.php
XoopsModules/pedigree/trunk/pedigree/class/fields.php
XoopsModules/pedigree/trunk/pedigree/class/owner.php
XoopsModules/pedigree/trunk/pedigree/class/temp.php
XoopsModules/pedigree/trunk/pedigree/class/trash.php
XoopsModules/pedigree/trunk/pedigree/class/tree.php
XoopsModules/pedigree/trunk/pedigree/coi.php
XoopsModules/pedigree/trunk/pedigree/comment_delete.php
XoopsModules/pedigree/trunk/pedigree/comment_edit.php
XoopsModules/pedigree/trunk/pedigree/comment_new.php
XoopsModules/pedigree/trunk/pedigree/comment_post.php
XoopsModules/pedigree/trunk/pedigree/comment_reply.php
XoopsModules/pedigree/trunk/pedigree/convert.php
XoopsModules/pedigree/trunk/pedigree/delete.php
XoopsModules/pedigree/trunk/pedigree/deletebreeder.php
XoopsModules/pedigree/trunk/pedigree/deletebreederpage.php
XoopsModules/pedigree/trunk/pedigree/deletepage.php
XoopsModules/pedigree/trunk/pedigree/docs/changelog.txt
XoopsModules/pedigree/trunk/pedigree/dog.php
XoopsModules/pedigree/trunk/pedigree/edit.php
XoopsModules/pedigree/trunk/pedigree/extra/smartclone/plugins/pedigree.php
XoopsModules/pedigree/trunk/pedigree/imagemanager.php
XoopsModules/pedigree/trunk/pedigree/images/numbers.png
XoopsModules/pedigree/trunk/pedigree/include/checkoutwizard.php
XoopsModules/pedigree/trunk/pedigree/include/class_eq_pie.php
XoopsModules/pedigree/trunk/pedigree/include/class_field.php
XoopsModules/pedigree/trunk/pedigree/include/color.php
XoopsModules/pedigree/trunk/pedigree/include/config.php
XoopsModules/pedigree/trunk/pedigree/include/css.php
XoopsModules/pedigree/trunk/pedigree/include/functions.php
XoopsModules/pedigree/trunk/pedigree/include/install_function.php
XoopsModules/pedigree/trunk/pedigree/include/notification.inc.php
XoopsModules/pedigree/trunk/pedigree/include/search.inc.php
XoopsModules/pedigree/trunk/pedigree/include/update_function.php
XoopsModules/pedigree/trunk/pedigree/include/waiting.plugin.php
XoopsModules/pedigree/trunk/pedigree/include/wizard.php
XoopsModules/pedigree/trunk/pedigree/index.php
XoopsModules/pedigree/trunk/pedigree/language/english/admin.php
XoopsModules/pedigree/trunk/pedigree/language/english/main.php
XoopsModules/pedigree/trunk/pedigree/language/english/modinfo.php
XoopsModules/pedigree/trunk/pedigree/latest.php
XoopsModules/pedigree/trunk/pedigree/members.php
XoopsModules/pedigree/trunk/pedigree/menu_block.php
XoopsModules/pedigree/trunk/pedigree/mpedigree.php
XoopsModules/pedigree/trunk/pedigree/notification_update.php
XoopsModules/pedigree/trunk/pedigree/owner.php
XoopsModules/pedigree/trunk/pedigree/pedigree.php
XoopsModules/pedigree/trunk/pedigree/pedigree2.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/index.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/source/index.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/fonts/readme.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/readme.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/index.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpThumb.config.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpThumb.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpthumb.class.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpthumb.filters.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpthumb.functions.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpthumb.ico.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/phpthumb.unsharp.php
XoopsModules/pedigree/trunk/pedigree/print.php
XoopsModules/pedigree/trunk/pedigree/result.php
XoopsModules/pedigree/trunk/pedigree/seldog.php
XoopsModules/pedigree/trunk/pedigree/sql/mysql.sql
XoopsModules/pedigree/trunk/pedigree/templates/pedigree_dog.html
XoopsModules/pedigree/trunk/pedigree/templates/pedigree_header.html
XoopsModules/pedigree/trunk/pedigree/templates/pedigree_owner.html
XoopsModules/pedigree/trunk/pedigree/tools.php
XoopsModules/pedigree/trunk/pedigree/topstud.php
XoopsModules/pedigree/trunk/pedigree/update.php
XoopsModules/pedigree/trunk/pedigree/updateowner.php
XoopsModules/pedigree/trunk/pedigree/updatepage.php
XoopsModules/pedigree/trunk/pedigree/userqueries/animals with a picture.php
XoopsModules/pedigree/trunk/pedigree/userqueries/remove escaped slash.php
XoopsModules/pedigree/trunk/pedigree/virtual.php
XoopsModules/pedigree/trunk/pedigree/welcome.php
XoopsModules/pedigree/trunk/pedigree/xoops_version.php
Added Paths:
-----------
XoopsModules/pedigree/Base
XoopsModules/pedigree/trunk/pedigree/admin/owner.php
XoopsModules/pedigree/trunk/pedigree/admin/pedigree.php
XoopsModules/pedigree/trunk/pedigree/admin/pedigree_config.php
XoopsModules/pedigree/trunk/pedigree/admin/pedigree_temp.php
XoopsModules/pedigree/trunk/pedigree/admin/pedigree_trash.php
XoopsModules/pedigree/trunk/pedigree/class/breadcrumb.php
XoopsModules/pedigree/trunk/pedigree/class/pedigree.php
XoopsModules/pedigree/trunk/pedigree/extra/smartclone/plugins/XOOPS2.5_mod_Pedigree_1.31_Alpha1_xoops.zip
XoopsModules/pedigree/trunk/pedigree/footer.php
XoopsModules/pedigree/trunk/pedigree/header.php
XoopsModules/pedigree/trunk/pedigree/include/common.php
XoopsModules/pedigree/trunk/pedigree/phpthumb/README.md
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/6/
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/6/67/
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/6/67/67c/
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/6/67/67c/67c4/
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/phpThumbCacheIMcommandlineBase.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/phpThumbCacheIMversion.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/cache/phpThumbCacheStats.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/composer.json
XoopsModules/pedigree/trunk/pedigree/phpthumb/docs/
XoopsModules/pedigree/trunk/pedigree/phpthumb/docs/phpthumb.changelog.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/docs/phpthumb.faq.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/docs/phpthumb.license.commercial.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/docs/phpthumb.license.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/docs/phpthumb.readme.txt
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/1024-none.tiff
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/alpha.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/animaple.gif
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/big.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/bunnies.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/computer.wmf
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/disk.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/frame1.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/frame2.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/lilies.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/loco.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/lrock011.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/mask04.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/mask05.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/mask06.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/monkey.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/phpThumb.com.pdf
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/pineapple.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/small.jpg
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/watermark.png
XoopsModules/pedigree/trunk/pedigree/phpthumb/images/winnt.bmp
XoopsModules/pedigree/trunk/pedigree/templates/js/
XoopsModules/pedigree/trunk/pedigree/templates/js/jquery.magnific-popup.js
XoopsModules/pedigree/trunk/pedigree/templates/js/jquery.magnific-popup.min.js
XoopsModules/pedigree/trunk/pedigree/templates/js/magnific-popup.css
XoopsModules/pedigree/trunk/pedigree/templates/pedigree_common_breadcrumb.html
XoopsModules/pedigree/trunk/pedigree/templates/pedigree_common_letterschoice.html
XoopsModules/pedigree/trunk/pedigree/templates/pedigree_footer.html
Removed Paths:
-------------
XoopsModules/pedigree/trunk/pedigree/admin/eigenaar.php
XoopsModules/pedigree/trunk/pedigree/admin/stamboom.php
XoopsModules/pedigree/trunk/pedigree/admin/stamboom_config.php
XoopsModules/pedigree/trunk/pedigree/admin/stamboom_temp.php
XoopsModules/pedigree/trunk/pedigree/admin/stamboom_trash.php
Added: XoopsModules/pedigree/Base
===================================================================
--- XoopsModules/pedigree/Base (rev 0)
+++ XoopsModules/pedigree/Base 2014-01-26 01:21:57 UTC (rev 12277)
@@ -0,0 +1,31 @@
+---------------------------------------
+1.31 Alpha 2 2013-05-10
+---------------------------------------
+
+
+---------------------------------------
+1.31 Alpha 1 2013-04-12
+---------------------------------------
+
+- renamed to Pedigree (Mamba)
+- fixed several PHP 5.4 related bugs (Mamba)
+- standardized names of language variables (Mamba)
+- added cloning with SmartClone (Mamba)
+- sub-menus names will come from language files (mamba)
+
+
+---------------------------------------
+1.30 Beta 1 2013-03-03
+---------------------------------------
+
+- Converted to XOOPS 2.5.5 Admin GUI (Mamba)
+- Added classes for tables
+- renamed tables to follow XOOPS new standard "mod_module_table"
+- updated for PHP 5.4
+- added menu items to main menu
+- fixed two wrong handlers (flipse/mamba)
+
+---------------------------------------
+1.29 Final ??????
+---------------------------------------
+released by James Cotton
\ No newline at end of file
Modified: XoopsModules/pedigree/trunk/pedigree/add_breeder.php
===================================================================
--- XoopsModules/pedigree/trunk/pedigree/add_breeder.php 2014-01-25 02:53:45 UTC (rev 12276)
+++ XoopsModules/pedigree/trunk/pedigree/add_breeder.php 2014-01-26 01:21:57 UTC (rev 12277)
@@ -1,87 +1,79 @@
-<?php
-// -------------------------------------------------------------------------
-
-require_once "../../mainfile.php";
-if ( file_exists(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/".$xoopsConfig['language']."/main.php") )
- require_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/".$xoopsConfig['language']."/main.php";
-else
- include_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/english/main.php";
-// Include any common code for this module.
-require_once(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/include/functions.php");
-
-$xoopsOption['template_main'] = "pedigree_adddog.html";
-
-include XOOPS_ROOT_PATH.'/header.php';
-$xoopsTpl->assign('page_title', "Pedigree database - Add owner/breeder");
-
-//check for access
-$xoopsModule =& XoopsModule::getByDirname("pedigree");
-if (empty($xoopsUser))
-{
- redirect_header("index.php", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
-}
-
-$f = isset($_GET['f']) ? $_GET['f'] : '';
-if ($f == "check") { check(); }
-
-function check()
-{
- global $xoopsTpl, $xoopsUser, $xoopsDB, $xoopsModuleConfig;
- //check for access
- $xoopsModule =& XoopsModule::getByDirname("pedigree");
- if (empty($xoopsUser))
- {
- redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
- }
- $achternaam = $_POST['achternaam'];
- $voornaam = $_POST['voornaam'];
- $email = $_POST['email'];
- $website= $_POST['website'];
- $user = $_POST['user'];
- //insert into eigenaar
- $query = "INSERT INTO ".$xoopsDB->prefix("mod_pedigree_owner")." VALUES ('','".$voornaam."','".$achternaam."','','','','','','".$email."','".$website."','".$user."')";
- $xoopsDB->query($query);
- redirect_header("index.php", 1, "The data has been stored.");
-}
-
-
- global $xoopsTpl, $xoopsUser, $xoopsDB;
- //check for access
- $xoopsModule =& XoopsModule::getByDirname("pedigree");
- if (empty($xoopsUser))
- {
- redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
- }
- //create form
- include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
- $form = new XoopsThemeForm(_MA_PEDIGREE_ADD_OWNER, 'breedername', 'add_breeder.php?f=check', 'POST');
- $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
- $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid")));
- //lastname
- $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_LNAME."</b>", 'achternaam', $size=50, $maxsize=255, $value=''));
-
- //firstname
- $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_FNAME."</b>", 'voornaam', $size=50, $maxsize=255, $value=''));
-
- //email
- $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_EMAIL."</b>", 'email', $size=50, $maxsize=255, $value=''));
-
- //website
- $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_WEB."</b>", 'website', $size=50, $maxsize=255, $value=''));
- $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_OWN_WEB_EX));
-
-
- //submit button
- $form->addElement(new XoopsFormButton('', 'button_id', _MA_PEDIGREE_ADD_OWNER, 'submit'));
-
- //add data (form) to smarty template
- $xoopsTpl->assign("form", $form->render());
-
-
-//footer
-include XOOPS_ROOT_PATH."/footer.php";
-
-?>
\ No newline at end of file
+<?php
+// -------------------------------------------------------------------------
+
+require_once '../../mainfile.php';
+if ( file_exists(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/".$xoopsConfig['language']."/main.php") )
+ require_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/".$xoopsConfig['language']."/main.php";
+else
+ include_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/english/main.php";
+// Include any common code for this module.
+require_once(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/include/functions.php");
+
+$xoopsOption['template_main'] = "pedigree_adddog.html";
+
+include XOOPS_ROOT_PATH.'/header.php';
+$xoopsTpl->assign('page_title', "Pedigree database - Add owner/breeder");
+
+//check for access
+$xoopsModule =& XoopsModule::getByDirname("pedigree");
+if (empty($xoopsUser)) {
+ redirect_header("index.php", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+}
+
+$f = isset($_GET['f']) ? $_GET['f'] : '';
+if ($f == "check") { check(); }
+
+function check()
+{
+ global $xoopsTpl, $xoopsUser, $xoopsDB, $xoopsModuleConfig;
+ //check for access
+ $xoopsModule =& XoopsModule::getByDirname("pedigree");
+ if (empty($xoopsUser)) {
+ redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+ }
+ $achternaam = $_POST['achternaam'];
+ $voornaam = $_POST['voornaam'];
+ $email = $_POST['email'];
+ $website= $_POST['website'];
+ $user = $_POST['user'];
+ //insert into owner
+ $query = "INSERT INTO ".$xoopsDB->prefix("mod_pedigree_owner")." VALUES ('','".$voornaam."','".$achternaam."','','','','','','".$email."','".$website."','".$user."')";
+ $xoopsDB->query($query);
+ redirect_header("index.php", 1, "The data has been stored.");
+}
+
+ global $xoopsTpl, $xoopsUser, $xoopsDB;
+ //check for access
+ $xoopsModule =& XoopsModule::getByDirname("pedigree");
+ if (empty($xoopsUser)) {
+ redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+ }
+ //create form
+ include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm(_MA_PEDIGREE_ADD_OWNER, 'breedername', 'add_breeder.php?f=check', 'POST');
+ $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
+ $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid")));
+ //lastname
+ $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_LNAME."</b>", 'achternaam', $size=50, $maxsize=255, $value=''));
+
+ //firstname
+ $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_FNAME."</b>", 'voornaam', $size=50, $maxsize=255, $value=''));
+
+ //email
+ $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_EMAIL."</b>", 'email', $size=50, $maxsize=255, $value=''));
+
+ //website
+ $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_OWN_WEB."</b>", 'website', $size=50, $maxsize=255, $value=''));
+ $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FLD_OWN_WEB_EX));
+
+ //submit button
+ $form->addElement(new XoopsFormButton('', 'button_id', _MA_PEDIGREE_ADD_OWNER, 'submit'));
+
+ //add data (form) to smarty template
+ $xoopsTpl->assign("form", $form->render());
+
+//footer
+include XOOPS_ROOT_PATH."/footer.php";
Modified: XoopsModules/pedigree/trunk/pedigree/add_dog.php
===================================================================
--- XoopsModules/pedigree/trunk/pedigree/add_dog.php 2014-01-25 02:53:45 UTC (rev 12276)
+++ XoopsModules/pedigree/trunk/pedigree/add_dog.php 2014-01-26 01:21:57 UTC (rev 12277)
@@ -1,11 +1,11 @@
<?php
-// -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
-require_once "../../mainfile.php";
+require_once '../../mainfile.php';
if ( file_exists(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/".$xoopsConfig['language']."/main.php") )
require_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/".$xoopsConfig['language']."/main.php";
-else
- include_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/english/main.php";
+else
+ include_once XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/language/english/main.php";
// Include any common code for this module.
require_once(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/include/functions.php");
require_once(XOOPS_ROOT_PATH ."/modules/" . $xoopsModule->dirname() . "/include/class_field.php");
@@ -17,15 +17,13 @@
//check for access
$xoopsModule =& XoopsModule::getByDirname("pedigree");
-if (empty($xoopsUser))
-{
- redirect_header("index.php", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
+if (empty($xoopsUser)) {
+ redirect_header("index.php", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
}
//create function variable from url
-if (isset($_GET['f'])) { $f = $_GET['f']; }
-else { $f = ""; adddog(); }
+if (isset($_GET['f'])) { $f = $_GET['f']; } else { $f = ""; adddog(); }
if ($f == "checkname") { checkname(); }
if ($f == "sire") { sire(); }
if ($f == "dam") { dam(); }
@@ -33,358 +31,309 @@
function adddog()
{
- global $xoopsTpl, $xoopsUser, $xoopsDB;
-
- //get module configuration
- $module_handler =& xoops_gethandler('module');
- $module =& $module_handler->getByDirname("pedigree");
- $config_handler =& xoops_gethandler('config');
- $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+ global $xoopsTpl, $xoopsUser, $xoopsDB;
- //check for access
- if (empty($xoopsUser))
- {
- redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
- }
- if ($xoopsUser->getVar("uid") == 0)
- {
- redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
- }
- //create form
- include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
- $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array( '[animalType]' => $moduleConfig['animalType'] )), 'dogname', 'add_dog.php?f=checkname', 'POST');
- $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
- //create random value
- $random = (rand()%10000);
- $form->addElement(new XoopsFormHidden('random', $random));
- //find userid
- $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid")));
-
- //name
- $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_NAME."</b>", 'NAAM', $size=50, $maxsize=255, $value=''));
- $string = strtr(_MA_PEDIGREE_FLD_NAME_EX, array( '[animalType]' => $moduleConfig['animalType'] ));
- $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, $string ));
-
- //submit button
- $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_DATA, array( '[animalType]' => $moduleConfig['animalType'] )), 'submit'));
-
- //add data (form) to smarty template
- $xoopsTpl->assign("form", $form->render());
+ //get module configuration
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname("pedigree");
+ $config_handler =& xoops_gethandler('config');
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+
+ //check for access
+ if (empty($xoopsUser)) {
+ redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+ }
+ if ($xoopsUser->getVar("uid") == 0) {
+ redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+ }
+ //create form
+ include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array( '[animalType]' => $moduleConfig['animalType'] )), 'dogname', 'add_dog.php?f=checkname', 'POST');
+ $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
+ //create random value
+ $random = (rand()%10000);
+ $form->addElement(new XoopsFormHidden('random', $random));
+ //find userid
+ $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid")));
+
+ //name
+ $form->addElement(new XoopsFormText("<b>"._MA_PEDIGREE_FLD_NAME."</b>", 'NAAM', $size=50, $maxsize=255, $value=''));
+ $string = strtr(_MA_PEDIGREE_FLD_NAME_EX, array( '[animalType]' => $moduleConfig['animalType'] ));
+ $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, $string ));
+
+ //submit button
+ $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_DATA, array( '[animalType]' => $moduleConfig['animalType'] )), 'submit'));
+
+ //add data (form) to smarty template
+ $xoopsTpl->assign("form", $form->render());
}
function checkname()
{
- //configure global variables
- global $xoopsTpl, $xoopsDB, $xoopsUser;
-
-
- //get module configuration
- $module_handler =& xoops_gethandler('module');
- $module =& $module_handler->getByDirname("pedigree");
- $config_handler =& xoops_gethandler('config');
- $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
-
-
- $name = $_POST['NAAM'];
- //query
- $queryString = "SELECT * from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE NAAM LIKE'%".$name."%' ORDER BY NAAM";
- $result = $xoopsDB->query($queryString);
- $numresults = $xoopsDB -> getRowsNum( $result );
- if ($numresults >= 1 && !(isset($_GET['r'])))
- {
- //create form
- include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
- $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array( '[animalType]' => $moduleConfig['animalType'] )), 'dogname', 'add_dog.php?f=checkname&r=1', 'POST');
- //other elements
- $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
- $form->addElement(new XoopsFormHidden('NAAM', $_POST['NAAM']));
- $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid")));
- while ($row = $xoopsDB->fetchArray($result))
- {
- //name
- $form->addElement(new XoopsFormLabel("<b>"._MA_PEDIGREE_FLD_NAME."</b>", "<a href=\"dog.php?id=".$row['ID']."\">".stripslashes($row['NAAM'])."</a>"));
- }
- $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_ADD_KNOWN, array( '[animalTypes]' => $moduleConfig['animalTypes'] ))));
- //submit button
- $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_KNOWNOK, array( '[animalType]' => $moduleConfig['animalType'] )), 'submit'));
- //add data (form) to smarty template
- $xoopsTpl->assign("form", $form->render());
- }
- else
- {
- //create form
- include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
- $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array( '[animalType]' => $moduleConfig['animalType'] )), 'dogname', 'add_dog.php?f=sire', 'POST');
- //added to handle upload
- $form->setExtra( "enctype='multipart/form-data'" );
- $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
- //create random value
- $random = (rand()%10000);
- $form->addElement(new XoopsFormHidden('random', $random));
- $form->addElement(new XoopsFormHidden('NAAM', htmlspecialchars($_POST['NAAM'], ENT_QUOTES)));
- //find userid from previous form
- $form->addElement(new XoopsFormHidden('user', $_POST['user']));
-
- //name
- $form->addElement(new XoopsFormLabel("<b>"._MA_PEDIGREE_FLD_NAME."</b>", stripslashes($_POST['NAAM'])));
- //gender
- $gender_radio = new XoopsFormRadio( "<b>"._MA_PEDIGREE_FLD_GEND."</b>", 'roft', $value = '0' );
- $gender_radio -> addOptionArray( array( '0'=>strtr(_MA_PEDIGREE_FLD_MALE, array( '[male]' => $moduleConfig['male'] )), '1'=>strtr(_MA_PEDIGREE_FLD_FEMA, array( '[female]' => $moduleConfig['female'] ))));
- $form->addElement( $gender_radio );
- if ($moduleConfig['ownerbreeder'] == '1')
- {
- //breeder
- $breeder_select = new XoopsFormSelect("<b>"._MA_PEDIGREE_FLD_BREE."</b>", $name="id_fokker", $value='0', $size=1, $multiple=false);
- $queryfok = "SELECT ID, lastname, firstname from ".$xoopsDB->prefix("mod_pedigree_owner")." ORDER BY lastname";
- $resfok = $xoopsDB->query($queryfok);
- $breeder_select -> addOption( '0', $name =_MA_PEDIGREE_UNKNOWN, $disabled=false );
- while ($rowfok = $xoopsDB->fetchArray($resfok))
- {
- $breeder_select -> addOption( $rowfok['ID'], $name=$rowfok['lastname'].", ".$rowfok['firstname'], $disabled=false );
- }
- $form->addElement ( $breeder_select);
- $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_FLD_BREE_EX, array( '[animalType]' => $moduleConfig['animalType'] ))));
-
- //owner
- $owner_select = new XoopsFormSelect("<b>"._MA_PEDIGREE_FLD_OWNE."</b>", $name="id_eigenaar", $value='0', $size=1, $multiple=false);
- $queryfok = "SELECT ID, lastname, firstname from ".$xoopsDB->prefix("mod_pedigree_owner")." ORDER BY lastname";
- $resfok = $xoopsDB->query($queryfok);
- $owner_select -> addOption( '0', $name =_MA_PEDIGREE_UNKNOWN, $disabled=false );
- while ($rowfok = $xoopsDB->fetchArray($resfok))
- {
- $owner_select -> addOption( $rowfok['ID'], $name=$rowfok['lastname'].", ".$rowfok['firstname'], $disabled=false );
- }
- $form->addElement ( $owner_select);
- $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_FLD_OWNE_EX, array( '[animalType]' => $moduleConfig['animalType'] ))));
- }
- //picture
- $max_imgsize = 1024000;
- $img_box = new XoopsFormFile("Image", "photo", $max_imgsize);
- $img_box->setExtra( "size ='50'") ;
- $form->addElement($img_box);
-
- //create animal object
- $animal = new Animal( );
- //test to find out how many user fields there are..
- $fields = $animal->numoffields();
-
- for ($i = 0; $i < count($fields) ; $i++)
- {
- $userfield = new Field( $fields[$i], $animal->getconfig() );
- $fieldType = $userfield->getSetting( "FieldType" );
- $fieldobject = new $fieldType( $userfield, $animal );
- if ($userfield->active() && !$userfield->isLocked())
- {
- $newentry = $fieldobject->newField();
- $form->addElement( $newentry );
- }
- unset($newentry);
- }
-
-
- //submit button
- $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_SIRE, array( '[father]' => $moduleConfig['father'] )), 'submit'));
-
- //add data (form) to smarty template
- $xoopsTpl->assign("form", $form->render());
- }
+ //configure global variables
+ global $xoopsTpl, $xoopsDB, $xoopsUser;
+
+ //get module configuration
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname("pedigree");
+ $config_handler =& xoops_gethandler('config');
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+
+ $name = $_POST['NAAM'];
+ //query
+ $queryString = "SELECT * from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE NAAM LIKE'%".$name."%' ORDER BY NAAM";
+ $result = $xoopsDB->query($queryString);
+ $numresults = $xoopsDB -> getRowsNum( $result );
+ if ($numresults >= 1 && !(isset($_GET['r']))) {
+ //create form
+ include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array( '[animalType]' => $moduleConfig['animalType'] )), 'dogname', 'add_dog.php?f=checkname&r=1', 'POST');
+ //other elements
+ $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
+ $form->addElement(new XoopsFormHidden('NAAM', $_POST['NAAM']));
+ $form->addElement(new XoopsFormHidden('user', $xoopsUser->getVar("uid")));
+ while ($row = $xoopsDB->fetchArray($result)) {
+ //name
+ $form->addElement(new XoopsFormLabel("<b>"._MA_PEDIGREE_FLD_NAME."</b>", "<a href=\"dog.php?id=".$row['ID']."\">".stripslashes($row['NAAM'])."</a>"));
+ }
+ $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_ADD_KNOWN, array( '[animalTypes]' => $moduleConfig['animalTypes'] ))));
+ //submit button
+ $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_KNOWNOK, array( '[animalType]' => $moduleConfig['animalType'] )), 'submit'));
+ //add data (form) to smarty template
+ $xoopsTpl->assign("form", $form->render());
+ } else {
+ //create form
+ include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $form = new XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_DOG, array( '[animalType]' => $moduleConfig['animalType'] )), 'dogname', 'add_dog.php?f=sire', 'POST');
+ //added to handle upload
+ $form->setExtra( "enctype='multipart/form-data'" );
+ $form->addElement(new XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
+ //create random value
+ $random = (rand()%10000);
+ $form->addElement(new XoopsFormHidden('random', $random));
+ $form->addElement(new XoopsFormHidden('NAAM', htmlspecialchars($_POST['NAAM'], ENT_QUOTES)));
+ //find userid from previous form
+ $form->addElement(new XoopsFormHidden('user', $_POST['user']));
+
+ //name
+ $form->addElement(new XoopsFormLabel("<b>"._MA_PEDIGREE_FLD_NAME."</b>", stripslashes($_POST['NAAM'])));
+ //gender
+ $gender_radio = new XoopsFormRadio( "<b>"._MA_PEDIGREE_FLD_GEND."</b>", 'roft', $value = '0' );
+ $gender_radio -> addOptionArray( array( '0'=>strtr(_MA_PEDIGREE_FLD_MALE, array( '[male]' => $moduleConfig['male'] )), '1'=>strtr(_MA_PEDIGREE_FLD_FEMA, array( '[female]' => $moduleConfig['female'] ))));
+ $form->addElement( $gender_radio );
+ if ($moduleConfig['ownerbreeder'] == '1') {
+ //breeder
+ $breeder_select = new XoopsFormSelect("<b>"._MA_PEDIGREE_FLD_BREE."</b>", $name="id_breeder", $value='0', $size=1, $multiple=false);
+ $queryfok = "SELECT ID, lastname, firstname from ".$xoopsDB->prefix("mod_pedigree_owner")." ORDER BY lastname";
+ $resfok = $xoopsDB->query($queryfok);
+ $breeder_select -> addOption( '0', $name =_MA_PEDIGREE_UNKNOWN, $disabled=false );
+ while ($rowfok = $xoopsDB->fetchArray($resfok)) {
+ $breeder_select -> addOption( $rowfok['ID'], $name=$rowfok['lastname'].", ".$rowfok['firstname'], $disabled=false );
+ }
+ $form->addElement ( $breeder_select);
+ $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_FLD_BREE_EX, array( '[animalType]' => $moduleConfig['animalType'] ))));
+
+ //owner
+ $owner_select = new XoopsFormSelect("<b>"._MA_PEDIGREE_FLD_OWNE."</b>", $name="id_owner", $value='0', $size=1, $multiple=false);
+ $queryfok = "SELECT ID, lastname, firstname from ".$xoopsDB->prefix("mod_pedigree_owner")." ORDER BY lastname";
+ $resfok = $xoopsDB->query($queryfok);
+ $owner_select -> addOption( '0', $name =_MA_PEDIGREE_UNKNOWN, $disabled=false );
+ while ($rowfok = $xoopsDB->fetchArray($resfok)) {
+ $owner_select -> addOption( $rowfok['ID'], $name=$rowfok['lastname'].", ".$rowfok['firstname'], $disabled=false );
+ }
+ $form->addElement ( $owner_select);
+ $form->addElement(new XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, strtr(_MA_PEDIGREE_FLD_OWNE_EX, array( '[animalType]' => $moduleConfig['animalType'] ))));
+ }
+ //picture
+ $max_imgsize = 1024000;
+ $img_box = new XoopsFormFile("Image", "photo", $max_imgsize);
+ $img_box->setExtra( "size ='50'") ;
+ $form->addElement($img_box);
+
+ //create animal object
+ $animal = new Animal( );
+ //test to find out how many user fields there are..
+ $fields = $animal->numoffields();
+
+ for ($i = 0; $i < count($fields) ; $i++) {
+ $userfield = new Field( $fields[$i], $animal->getconfig() );
+ $fieldType = $userfield->getSetting( "FieldType" );
+ $fieldobject = new $fieldType( $userfield, $animal );
+ if ($userfield->active() && !$userfield->isLocked()) {
+ $newentry = $fieldobject->newField();
+ $form->addElement( $newentry );
+ }
+ unset($newentry);
+ }
+
+ //submit button
+ $form->addElement(new XoopsFormButton('', 'button_id', strtr(_MA_PEDIGREE_ADD_SIRE, array( '[father]' => $moduleConfig['father'] )), 'submit'));
+
+ //add data (form) to smarty template
+ $xoopsTpl->assign("form", $form->render());
+ }
}
function sire()
{
- global $xoopsTpl, $xoopsUser, $xoopsDB;
-
- //get module configuration
- $module_handler =& xoops_gethandler('module');
- $module =& $module_handler->getByDirname("pedigree");
- $config_handler =& xoops_gethandler('config');
- $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+ global $xoopsTpl, $xoopsUser, $xoopsDB;
+
+ //get module configuration
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname("pedigree");
+ $config_handler =& xoops_gethandler('config');
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
$empty = array () ; // an empty array
- //check for access
- if (empty($xoopsUser))
- {
- redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
- }
- $user = isset($_POST['user']) ? $_POST['user'] : null;
- if (empty($random)) { $random = isset($_POST['random']) ? $_POST['random'] : null; }
- if (isset($_GET['random'])) { $random = $_GET['random']; }
- if (empty($st)) { $st=0; }
- if (isset($_GET['st'])) { $st=$_GET['st']; }
- $name = isset($_POST['NAAM']) ? $_POST['NAAM'] : null;
- $roft = isset($_POST['roft']) ? $_POST['roft'] : null;
+ //check for access
+ if (empty($xoopsUser)) {
+ redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+ }
+ $user = isset($_POST['user']) ? $_POST['user'] : null;
+ if (empty($random)) { $random = isset($_POST['random']) ? $_POST['random'] : null; }
+ if (isset($_GET['random'])) { $random = $_GET['random']; }
+ if (empty($st)) { $st=0; }
+ if (isset($_GET['st'])) { $st=$_GET['st']; }
+ $name = isset($_POST['NAAM']) ? $_POST['NAAM'] : null;
+ $roft = isset($_POST['roft']) ? $_POST['roft'] : null;
- $id_eigenaar = isset($_POST['id_eigenaar']) ? $_POST['id_eigenaar'] : null;
- $id_fokker = isset($_POST['id_fokker']) ? $_POST['id_fokker'] : null;
+ $id_owner = isset($_POST['id_owner']) ? $_POST['id_owner'] : null;
+ $id_breeder = isset($_POST['id_breeder']) ? $_POST['id_breeder'] : null;
- $picturefield = isset($_FILES['photo']) ? $_FILES['photo']['name'] : null; // $_FILES['photo']['name'];
- if( empty( $picturefield ) || $picturefield == "" )
- {
- $foto = "";
- }
- else
- {
- $foto = uploadedpict( 0 );
- }
- $numpicturefield = 1;
-
- //make the redirect
- if (!isset($_GET['r']))
- {
- if ($_POST['NAAM'] == "")
- {
- redirect_header("add_dog.php", 1, _MA_PEDIGREE_ADD_NAMEPLZ);
- }
- //create animal object
- $animal = new Animal( );
- //test to find out how many user fields there are..
- $fields = $animal->numoffields();
- sort($fields); //sort by ID not by order
- $usersql = "";
- for ($i = 0; $i < count($fields); $i++)
- {
- $userfield = new Field( $fields[$i], $animal->getconfig() );
- $fieldType = $userfield->getSetting( "FieldType" );
- $fieldobject = new $fieldType( $userfield, $animal );
- if ($userfield->active())
- {
- //check if _FILES variable exists for user picturefield
- $currentfield = 'user'.$fields[$i];
- $picturefield = $_FILES[$currentfield]['name'];
- if($fieldType == "Picture" && ( !empty( $picturefield ) || $picturefield != "" ))
- {
- $userpicture = uploadedpict( $numpicturefield );
- $usersql .= ",'".$userpicture."'";
- $numpicturefield ++;
- }
- elseif($userfield->isLocked())
- {
- //userfield is locked, substitute default value
- $usersql .= ",'".$userfield->DefaultValue."'";
- }
- else
- {
- //echo $fieldType.":".$i.":".$fields[$i]."<br />";
- $usersql .= ",'".unhtmlentities($_POST['user'.$fields[$i]])."'";
- }
- }
- else
- {
- $usersql .=",''";
- }
- //echo $fields[$i]."<br/>";
-
- }
-
- //insert into stamboom_temp
- $query = "INSERT INTO ".$xoopsDB->prefix("mod_pedigree_temp")." VALUES ('".$random."','".unhtmlentities($name)."','".$id_eigenaar."','".$id_fokker."','".$user."','".$roft."','','','".$foto."', ''".$usersql.")";
- //echo $query; die();
- $xoopsDB->query($query);
- redirect_header("add_dog.php?f=sire&random=".$random."&st=".$st."&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREPLZ, array( '[father]' => $moduleConfig['father'] )));
- }
- //find letter on which to start else set to 'a'
- if (isset($_GET['l'])) { $l=$_GET['l']; }
- else { $l="a"; }
- //assign sire to template
- $xoopsTpl->assign("sire", "1");
- //create list of males dog to select from
- $perp = $moduleConfig['perpage'];
- //count total number of dogs
- $numdog = "SELECT count(ID) from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE roft='0' and NAAM LIKE '".$l."%'";
- $numres = $xoopsDB->query($numdog);
- //total number of dogs the query will find
- list($numresults) = $xoopsDB->fetchRow($numres);
- //total number of pages
- $numpages = (floor($numresults/$perp))+1;
- if (($numpages * $perp) == ($numresults + $perp))
- { $numpages = $numpages - 1; }
- //find current page
- $cpage = (floor($st/$perp))+1;
- //create alphabet
- $pages ="";
- for($i=65; $i<=90; $i++)
- {
- if ($l == chr($i))
- {
- $pages .= "<b><a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=".chr($i)."\">".chr($i)."</a></b> ";
- }
- else
- {
- $pages .= "<a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=".chr($i)."\">".chr($i)."</a> ";
- }
- }
- $pages .="- ";
- $pages .= "<a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=Å\">Å</a> ";
- $pages .= "<a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=Ö\">Ö</a> ";
- //create linebreak
- $pages .= "<br />";
- //create previous button
- if ($numpages > 1)
- {
- if ($cpage > 1)
- {
- $pages .= "<a href=\"add_dog.php?f=sire&r=1&l=".$l."&random=".$random."&st=".($st-$perp)."\">"._MA_PEDIGREE_PREVIOUS."</a>  ";
- }
- }
- //create numbers
- for ($x=1; $x<($numpages+1); $x++)
- {
- //create line break after 20 number
- if (($x % 20) == 0)
- { $pages .= "<br />"; }
- if ($x != $cpage)
- { $pages .= "<a href=\"add_dog.php?f=sire&r=1&l=".$l."&random=".$random."&st=".($perp*($x-1))."\">".$x."</a> "; }
- else
- { $pages .= $x."  "; }
- }
- //create next button
- if ($numpages > 1)
- {
- if ($cpage < ($numpages))
- {
- $pages .= "<a href=\"add_dog.php?f=sire&r=1&l=".$l."&random=".$random."&st=".($st+$perp)."\">"._MA_PEDIGREE_NEXT."</a>  ";
- }
- }
-
- //query
- $queryString = "SELECT * from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE roft = '0' and NAAM like '".$l."%'ORDER BY NAAM LIMIT ".$st.", ".$perp;
- $result = $xoopsDB->query($queryString);
-
-
+ $picturefield = isset($_FILES['photo']) ? $_FILES['photo']['name'] : null; // $_FILES['photo']['name'];
+ if ( empty( $picturefield ) || $picturefield == "" ) {
+ $foto = "";
+ } else {
+ $foto = uploadedpict( 0 );
+ }
+ $numpicturefield = 1;
+
+ //make the redirect
+ if (!isset($_GET['r'])) {
+ if ($_POST['NAAM'] == "") {
+ redirect_header("add_dog.php", 1, _MA_PEDIGREE_ADD_NAMEPLZ);
+ }
+ //create animal object
+ $animal = new Animal( );
+ //test to find out how many user fields there are..
+ $fields = $animal->numoffields();
+ sort($fields); //sort by ID not by order
+ $usersql = "";
+ for ($i = 0; $i < count($fields); $i++) {
+ $userfield = new Field( $fields[$i], $animal->getconfig() );
+ $fieldType = $userfield->getSetting( "FieldType" );
+ $fieldobject = new $fieldType( $userfield, $animal );
+ if ($userfield->active()) {
+ //check if _FILES variable exists for user picturefield
+ $currentfield = 'user'.$fields[$i];
+ $picturefield = $_FILES[$currentfield]['name'];
+ if ($fieldType == "Picture" && ( !empty( $picturefield ) || $picturefield != "" )) {
+ $userpicture = uploadedpict( $numpicturefield );
+ $usersql .= ",'".$userpicture."'";
+ $numpicturefield ++;
+ } elseif ($userfield->isLocked()) {
+ //userfield is locked, substitute default value
+ $usersql .= ",'".$userfield->DefaultValue."'";
+ } else {
+ //echo $fieldType.":".$i.":".$fields[$i]."<br />";
+ $usersql .= ",'".unhtmlentities($_POST['user'.$fields[$i]])."'";
+ }
+ } else {
+ $usersql .=",''";
+ }
+ //echo $fields[$i]."<br/>";
+
+ }
+
+ //insert into pedigree_temp
+ $query = "INSERT INTO ".$xoopsDB->prefix("mod_pedigree_temp")." VALUES ('".$random."','".unhtmlentities($name)."','".$id_owner."','".$id_breeder."','".$user."','".$roft."','','','".$foto."', ''".$usersql.")";
+ //echo $query; die();
+ $xoopsDB->query($query);
+ redirect_header("add_dog.php?f=sire&random=".$random."&st=".$st."&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREPLZ, array( '[father]' => $moduleConfig['father'] )));
+ }
+ //find letter on which to start else set to 'a'
+ if (isset($_GET['l'])) { $l=$_GET['l']; } else { $l="a"; }
+ //assign sire to template
+ $xoopsTpl->assign("sire", "1");
+ //create list of males dog to select from
+ $perp = $moduleConfig['perpage'];
+ //count total number of dogs
+ $numdog = "SELECT count(ID) from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE roft='0' and NAAM LIKE '".$l."%'";
+ $numres = $xoopsDB->query($numdog);
+ //total number of dogs the query will find
+ list($numresults) = $xoopsDB->fetchRow($numres);
+ //total number of pages
+ $numpages = (floor($numresults/$perp))+1;
+ if (($numpages * $perp) == ($numresults + $perp)) { $numpages = $numpages - 1; }
+ //find current page
+ $cpage = (floor($st/$perp))+1;
+ //create alphabet
+ $pages ="";
+ for ($i=65; $i<=90; $i++) {
+ if ($l == chr($i)) {
+ $pages .= "<b><a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=".chr($i)."\">".chr($i)."</a></b> ";
+ } else {
+ $pages .= "<a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=".chr($i)."\">".chr($i)."</a> ";
+ }
+ }
+ $pages .="- ";
+ $pages .= "<a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=Å\">Å</a> ";
+ $pages .= "<a href=\"add_dog.php?f=sire&r=1&random=".$random."&l=Ö\">Ö</a> ";
+ //create linebreak
+ $pages .= "<br />";
+ //create previous button
+ if ($numpages > 1) {
+ if ($cpage > 1) {
+ $pages .= "<a href=\"add_dog.php?f=sire&r=1&l=".$l."&random=".$random."&st=".($st-$perp)."\">"._MA_PEDIGREE_PREVIOUS."</a>  ";
+ }
+ }
+ //create numbers
+ for ($x=1; $x<($numpages+1); $x++) {
+ //create line break after 20 number
+ if (($x % 20) == 0) { $pages .= "<br />"; }
+ if ($x != $cpage) { $pages .= "<a href=\"add_dog.php?f=sire&r=1&l=".$l."&random=".$random."&st=".($perp*($x-1))."\">".$x."</a> "; } else { $pages .= $x."  "; }
+ }
+ //create next button
+ if ($numpages > 1) {
+ if ($cpage < ($numpages)) {
+ $pages .= "<a href=\"add_dog.php?f=sire&r=1&l=".$l."&random=".$random."&st=".($st+$perp)."\">"._MA_PEDIGREE_NEXT."</a>  ";
+ }
+ }
+
+ //query
+ $queryString = "SELECT * from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE roft = '0' and NAAM like '".$l."%'ORDER BY NAAM LIMIT ".$st.", ".$perp;
+ $result = $xoopsDB->query($queryString);
+
$animal = new Animal( );
//test to find out how many user fields there are...
$fields = $animal->numoffields();
$numofcolumns = 1;
$columns[] = array ('columnname' => "Name");
-for ($i = 0; $i < count($fields); $i++)
-{
- $userfield = new Field( $fields[$i], $animal->getconfig() );
- $fieldType = $userfield->getSetting( "FieldType" );
- $fieldobject = new $fieldType( $userfield, $animal );
- //create empty string
- $lookupvalues = "";
- if ($userfield->active() && $userfield->inlist())
- {
- if ($userfield->haslookup())
- {
- $lookupvalues = $userfield->lookup($fields[$i]);
- //debug information
- //print_r($lookupvalues);
- }
- $columns[] = array ('columnname' => $fieldobject->fieldname, 'columnnumber' => $userfield->getID(), 'lookupval' => $lookupvalues);
- $numofcolumns++;
- unset($lookupvalues);
- }
+for ($i = 0; $i < count($fields); $i++) {
+ $userfield = new Field( $fields[$i], $animal->getconfig() );
+ $fieldType = $userfield->getSetting( "FieldType" );
+ $fieldobject = new $fieldType( $userfield, $animal );
+ //create empty string
+ $lookupvalues = "";
+ if ($userfield->active() && $userfield->inlist()) {
+ if ($userfield->haslookup()) {
+ $lookupvalues = $userfield->lookup($fields[$i]);
+ //debug information
+ //print_r($lookupvalues);
+ }
+ $columns[] = array ('columnname' => $fieldobject->fieldname, 'columnnumber' => $userfield->getID(), 'lookupval' => $lookupvalues);
+ $numofcolumns++;
+ unset($lookupvalues);
+ }
}
-
- for ($i = 1; $i < ($numofcolumns); $i++)
- {
- $empty[] = array ('value' => "");
- }
+
+ for ($i = 1; $i < ($numofcolumns); $i++) {
+ $empty[] = array ('value' => "");
+ }
$dogs [] = array('id' => "0",
'name' => "",
'gender' => "",
@@ -393,281 +342,233 @@
'number' => "",
'usercolumns' => $empty
);
-
-
- while ($row = $xoopsDB->fetchArray($result))
- {
- //create picture information
- if ($row['foto'] != '')
- { $camera = " <img src=\"images/camera.png\">"; }
- else { $camera = ""; }
- $name = stripslashes($row['NAAM']).$camera;
- //empty array
- unset($columnvalue);
- //fill array
- for ($i = 1; $i < ($numofcolumns); $i++)
- {
- $x = $columns[$i]['columnnumber'];
- if (is_array($columns[$i]['lookupval']))
- {
- foreach ($columns[$i]['lookupval'] as $key => $keyvalue)
- {
- if($key == $row['user'.$x])
- {
- $value = $keyvalue['value'];
- }
- }
- //debug information
- ///echo $columns[$i]['columnname']."is an array !";
- }
- //format value - cant use object because of query count
- elseif (substr($row['user'.$x], 0, 7) == 'http://')
- {
- $value = "<a href=\"".$row['user'.$x]."\">".$row['user'.$x]."</a>";
- }
- else { $value = $row['user'.$x]; }
- $columnvalue[] = array ('value' => $value);
- }
- $dogs[] = array ('id' => $row['ID'], 'name' => $name, 'gender' => '<img src="images/male.gif">', 'link' => "<a href=\"add_dog.php?f=dam&random=".$random."&selsire=".$row['ID']."\">".$name."</a>",'colour' => "", 'number' => "", 'usercolumns' => $columnvalue);
- }
-
- //add data to smarty template
- //assign dog
- $xoopsTpl->assign("dogs", $dogs);
- $xoopsTpl->assign("columns", $columns);
- $xoopsTpl->assign("numofcolumns", $numofcolumns);
- $xoopsTpl->assign("tsarray", sorttable($numofcolumns));
- //assign links
- $xoopsTpl->assign("nummatch", strtr(_MA_PEDIGREE_ADD_SELSIRE, array( '[father]' => $moduleConfig['father'] )));
- $xoopsTpl->assign("pages", $pages);
-
-
+
+ while ($row = $xoopsDB->fetchArray($result)) {
+ //create picture information
+ if ($row['foto'] != '') { $camera = " <img src=\"images/camera.png\">"; } else { $camera = ""; }
+ $name = stripslashes($row['NAAM']).$camera;
+ //empty array
+ unset($columnvalue);
+ //fill array
+ for ($i = 1; $i < ($numofcolumns); $i++) {
+ $x = $columns[$i]['columnnumber'];
+ if (is_array($columns[$i]['lookupval'])) {
+ foreach ($columns[$i]['lookupval'] as $key => $keyvalue) {
+ if ($key == $row['user'.$x]) {
+ $value = $keyvalue['value'];
+ }
+ }
+ //debug information
+ ///echo $columns[$i]['columnname']."is an array !";
+ }
+ //format value - cant use object because of query count
+ elseif (substr($row['user'.$x], 0, 7) == 'http://') {
+ $value = "<a href=\"".$row['user'.$x]."\">".$row['user'.$x]."</a>";
+ } else { $value = $row['user'.$x]; }
+ $columnvalue[] = array ('value' => $value);
+ }
+ $dogs[] = array ('id' => $row['ID'], 'name' => $name, 'gender' => '<img src="images/male.gif">', 'link' => "<a href=\"add_dog.php?f=dam&random=".$random."&selsire=".$row['ID']."\">".$name."</a>",'colour' => "", 'number' => "", 'usercolumns' => $columnvalue);
+ }
+
+ //add data to smarty template
+ //assign dog
+ $xoopsTpl->assign("dogs", $dogs);
+ $xoopsTpl->assign("columns", $columns);
+ $xoopsTpl->assign("numofcolumns", $numofcolumns);
+ $xoopsTpl->assign("tsarray", sorttable($numofcolumns));
+ //assign links
+ $xoopsTpl->assign("nummatch", strtr(_MA_PEDIGREE_ADD_SELSIRE, array( '[father]' => $moduleConfig['father'] )));
+ $xoopsTpl->assign("pages", $pages);
+
}
function dam()
{
- global $xoopsTpl, $xoopsUser, $xoopsDB;
-
- //get module configuration
- $module_handler =& xoops_gethandler('module');
- $module =& $module_handler->getByDirname("pedigree");
- $config_handler =& xoops_gethandler('config');
- $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+ global $xoopsTpl, $xoopsUser, $xoopsDB;
+
+ //get module configuration
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname("pedigree");
+ $config_handler =& xoops_gethandler('config');
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
$empty = array () ; // an empty array
- //check for access
- $xoopsModule =& XoopsModule::getByDirname("pedigree");
- if (empty($xoopsUser))
- {
- redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
- exit();
- }
- if (empty($random)) { $random = isset($_POST['random']) ? $_POST['random'] : null; }
- if (isset($_GET['random'])) { $random = $_GET['random']; }
- if (empty($st)) { $st=0; }
- if (isset($_GET['st'])) { $st=$_GET['st']; }
- //find letter on which to start else set to 'a'
- if (isset($_GET['l'])) { $l=$_GET['l']; }
- else { $l="a"; }
- //make the redirect
- if (!isset($_GET['r']))
- {
- //insert into stamboom_temp
- $query = "UPDATE ".$xoopsDB->prefix("mod_pedigree_temp")." SET vader =".$_GET['selsire']." WHERE ID=".$random;
- $xoopsDB->queryf($query);
- redirect_header("add_dog.php?f=dam&random=".$random."&st=".$st."&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREOK, array( '[mother]' => $moduleConfig['mother'] )));
- }
-
- $xoopsTpl->assign("sire", "1");
- //create list of males dog to select from
- $perp = $moduleConfig['perpage'];
- //count total number of dogs
- $numdog = "SELECT count(ID) from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE roft='1' and NAAM LIKE '".$l."%'";
- $numres = $xoopsDB->query($numdog);
- list($numresults) = $xoopsDB->fetchRow($numres);
- $numpages = (floor($numresults/$perp))+1;
- if (($numpages * $perp) == ($numresults + $perp))
- { $numpages = $numpages - 1; }
- $cpage = (floor($st/$perp))+1;
- //create alphabet
- $pages ="";
- for($i=65; $i<=90; $i++)
- {
- if ($l == chr($i))
- {
- $pages .= "<b><a href=\"add_dog.php?f=dam&r=1&random=".$random."&l=".chr($i)."\">".chr($i)."</a></b> ";
- }
- else
- {
- $pages .= "<a href=\"add_dog.php?f=dam&r=1&random=".$random."&l=".chr($i)."\">".chr($i)."</a> ";
- }
- }
- $pages .="- ";
- $pages .= "<a href=\"add_dog.php?f=dam&r=1&random=".$random."&l=Å\">Å</a> ";
- $pages .= "<a href=\"add_dog.php?f=dam&r=1&random=".$random."&l=Ö\">Ö</a> ";
- $pages .= "<br />";
- //create previous button
- if ($numpages > 1)
- {
- if ($cpage > 1) { $pages .= "<a href=\"add_dog.php?f=dam&r=1&l=".$l."&random=".$random."&st=".($st-$perp)."\">"._MA_PEDIGREE_PREVIOUS."</a>  "; }
- }
- //create numbers
- for ($x=1; $x<($numpages+1); $x++)
- {
- //create line break after 20 number
- if (($x % 20) == 0) { $pages .= "<br />"; }
- if ($x != $cpage)
- { $pages .= "<a href=\"add_dog.php?f=dam&r=1&l=".$l."&random=".$random."&st=".($perp*($x-1))."\">".$x."</a> "; }
- else
- { $pages .= $x."  "; }
- }
- //create next button
- if ($numpages > 1)
- {
- if ($cpage < ($numpages)) { $pages .= "<a href=\"add_dog.php?f=dam&l=".$l."&r=1&random=".$random."&st=".($st+$perp)."\">"._MA_PEDIGREE_NEXT."</a> "; }
- }
-
- //query
- $queryString = "SELECT * from ".$xoopsDB->prefix("mod_pedigree_tree")." WHERE roft = '1' and NAAM LIKE '".$l."%' ORDER BY NAAM LIMIT ".$st.", ".$perp;
- $result = $xoopsDB->query($queryString);
-
- $animal = new Animal( );
- //test to find out how many user fields there are...
- $fields = $animal->numoffields();
- $numofcolumns = 1;
- $columns[] = array ('columnname' => "Name");
- for ($i = 0; $i < count($fields); $i++)
- {
- $userfield = new Field( $fields[$i], $animal->getconfig() );
- $fieldType = $userfield->getSetting( "FieldType" );
- $fieldobject = new $fieldType( $userfield, $animal );
- //create empty string
- $lookupvalues = "";
- if ($userfield->active() && $userfield->inlist())
- {
- if ($userfield->haslookup())
- {
- $lookupvalues = $userfield->lookup($fields[$i]);
- //debug information
- //print_r($lookupvalues);
- }
- $columns[] = array ('columnname' => $fieldobject->fieldname, 'columnnumber' => $userfield->getID(), 'lookupval' => $lookupvalues);
- $numofcolumns++;
- unset($lookupvalues);
- }
- }
-
- for ($i = 1; $i < ($numofcolumns); $i++)
- {
- $empty[] = array ('value' => "");
- }
- $dogs [] = array ('id' => "0", 'name' => "", 'gender' => "", 'link' => "<a href=\"add_dog.php?f=check&random=".$random."&seldam=0\">".strtr(_MA_PEDIGREE_ADD_DAMUNKNOWN, array( '[mother]' => $moduleConfig['mother'] ))."</a>", 'colour' => "", 'number' => "", 'usercolumns' => $empty);
+ //check for access
+ $xoopsModule =& XoopsModule::getByDirname("pedigree");
+ if (empty($xoopsUser)) {
+ redirect_header("javascript:history.go(-1)", 3, _NOPERM."<br />"._MA_PEDIGREE_REGIST);
+ exit();
+ }
+ if (empty($random)) { $random = isset($_POST['random']) ? $_POST['random'] : null; }
+ if (isset($_GET['random'])) { $random = $_GET['random']; }
+ if (empty($st)) { $st=0; }
+ if (isset($_GET['st'])) { $st=$_GET['st']; }
+ //find letter on which to start else set to 'a'
+ if (isset($_GET['l'])) { $l=$_GET['l']; } else { $l="a"; }
+ //make the redirect
+ if (!isset($_GET['r'])) {
+ //insert into pedigree_temp
+ $query = "UPDATE ".$xoopsDB->prefix("mod_pedigree_temp")." SET father =".$_GET['selsire']." WHERE ID=".$random;
+ $xoopsDB->queryf($query);
+ redirect_header("add_dog.php?f=dam&random=".$random."&st=".$st."&r=1&l=a", 1, strtr(_MA_PEDIGREE_ADD_SIREOK, array( '[mother]' => $moduleConfig['mother'] )));
+ }
- while ($row = $xoopsDB->fetchArray($result))
- {
- //create picture information
- if ($row['foto'] != '')
- { $camera = " <img src=\"images/camera.png\">"; }
- else { $camera = ""; }
- $name = stripslashes($row['NAAM']).$camera;
- //empty array
- unset($columnvalue);
- //fill array
- for ($i = 1; $i < ($numofcolumns); $i++)
- {
- $x = $columns[$i]['columnnumber'];
- if (is_array($columns[$i]['lookupval']))
- {
- foreach ($columns[$i]['lookupval'] as $key => $keyvalue)
- {
- if($key == $row['user'.$x])
- {
- $value = $keyvalue['value'];
- }
- }
- //debug information
- ///echo $columns[$i]['columnname']."is an array !";
- }
- //format value - cant use object because of query count
- elseif (substr($row['user'.$x], 0, 7) == 'http://')
- {
- $value = "<a href=\"".$row['user'.$x]."\">".$row['user'.$x]."</a>";
- }
- else { $value = $row['user'.$x]; }
- $columnvalue[] = array ('value' => $value);
- }
- $dogs[] = array ('id' => $row['ID'], 'name' => $name, 'gender' => '<img src="images/female.gif">', 'link' => "<a href=\"add_dog.php?f=check&random=".$random."&seldam=".$row['ID']."\">".$name."</a>",'colour' => "", 'number' => "", 'usercolumns' => $columnvalue);
- }
-
-
- //add data to smarty template
- //assign dog
- $xoopsTpl->assign("dogs", $dogs);
- $xoopsTpl->assign("columns", $columns);
- $xoopsTpl->assign("numofcolumns", $numofcolumns);
- $xoopsTpl->assign("tsarray", sorttable($numofcolumns));
- $xoopsTpl->assign("nummatch", strtr(_MA_PEDIGREE_ADD_SELDAM, array( '[mother]' => $moduleConfig['mother'] )));
- $xoopsTpl->assign("pages", $pages);
+ $xoopsTpl->assign("sire", "1");
+ //create list of males dog to select from
+ $perp = $moduleCo...
[truncated message content] |
|
From: <rgr...@us...> - 2014-01-25 02:53:48
|
Revision: 12276
http://sourceforge.net/p/xoops/svn/12276
Author: rgriffith
Date: 2014-01-25 02:53:45 +0000 (Sat, 25 Jan 2014)
Log Message:
-----------
More for #1268 - refine query to select most recently logged in users, adjust caching
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php 2014-01-23 21:02:28 UTC (rev 12275)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php 2014-01-25 02:53:45 UTC (rev 12276)
@@ -32,59 +32,80 @@
/**
* Constructor
*
- * @param string $caption
- * @param string $name
- * @param mixed $value Pre-selected value (or array of them).
- * For an item with massive members, such as "Registered Users", "$value" should be used to store selected temporary users only instead of all members of that item
- * @param bool $include_anon Include user "anonymous"?
- * @param int $size Number or rows. "1" makes a drop-down-list.
- * @param bool $multiple Allow multiple selections?
+ * @param string $caption form element caption
+ * @param string $name form element name
+ * @param bool $include_anon Include user "anonymous"?
+ * @param mixed $value Pre-selected value (or array of them).
+ * For an item with massive members, such as "Registered Users", "$value"
+ * should be used to store selected temporary users only instead of all
+ * members of that item
+ * @param int $size Number or rows. "1" makes a drop-down-list.
+ * @param bool $multiple Allow multiple selections?
*/
- function XoopsFormSelectUser($caption, $name, $include_anon = false, $value = null, $size = 1, $multiple = false)
+ public function XoopsFormSelectUser($caption, $name, $include_anon = false, $value = null, $size = 1, $multiple = false)
{
/**
- * @var array|null - cache potentially expensive result for this session.
- * Some modules use multiple copies of this element on a single page, and for
- * sites with large user bases, that can be quite expensive when $value is null.
- * @todo this should be replaced with a filter or autocomplete interface .
+ * @var mixed array|false - cache any result for this session.
+ * Some modules use multiple copies of this element on a single page, so this call will
+ * be made multiple times. This is only used when $value is null.
+ * @todo this should be replaced with better interface, with autocomplete style search
+ * and user specific MRU cache
*/
- static $querycache = null;
+ static $querycache = false;
+
/**
- * @var int|null - cache record count from member_handler
+ * @var int - limit to this many rows
*/
- static $countcache = null;
+ $limit = 200;
- $limit = 100;
+ /**
+ * @var string - cache time to live - will be interpreted by strtotime()
+ */
+ $cachettl = '+5 minutes';
+
+ /**
+ * @var string - cache key
+ */
+ $cachekey = 'formselectuser';
+
$select_element = new XoopsFormSelect('', $name, $value, $size, $multiple);
if ($include_anon) {
$select_element->addOption(0, $GLOBALS['xoopsConfig']['anonymous']);
}
$member_handler =& xoops_gethandler('member');
- if ($countcache===null) {
- $countcache = $member_handler->getUserCount();
- }
- $user_count = $countcache;
$value = is_array($value) ? $value : (empty($value) ? array() : array($value));
- if ($user_count > $limit && count($value) > 0) {
- $criteria = new CriteriaCompo(new Criteria('uid', '(' . implode(',', $value) . ')', 'IN'));
- $use_cache = false;
+ if (count($value) > 0) {
+ // simple case - we have a set of uids in $values
+ $criteria = new Criteria('uid', '(' . implode(',', $value) . ')', 'IN');
+ $criteria->setSort('uname');
+ $criteria->setOrder('ASC');
+ $users = $member_handler->getUserList($criteria);
} else {
- $use_cache = true;
- $criteria = new CriteriaCompo();
- $criteria->setLimit($limit);
- }
- $criteria->setSort('uname');
- $criteria->setOrder('ASC');
- if ($use_cache && !empty($querycache)) {
+ // open ended case - no selection criteria
+ // we will always cache this version to reduce expense
+ if (empty($querycache)) {
+ XoopsLoad::load('XoopsCache');
+ $querycache = XoopsCache::read($cachekey);
+ if ($querycache===false) {
+ $criteria = new CriteriaCompo();
+ if ($limit <= $member_handler->getUserCount()) {
+ // if we have more than $limit users, we will select who to show based on last_login
+ $criteria->setLimit($limit);
+ $criteria->setSort('last_login');
+ $criteria->setOrder('DESC');
+ } else {
+ $criteria->setSort('uname');
+ $criteria->setOrder('ASC');
+ }
+ $querycache = $member_handler->getUserList($criteria);
+ asort($querycache);
+ XoopsCache::write($cachekey, $querycache, $cachettl); // won't do anything different if write fails
+ }
+ }
$users = $querycache;
- } else {
- $users = $member_handler->getUserList($criteria);
- if ($use_cache) {
- $querycache = $users;
- }
}
$select_element->addOptionArray($users);
- if ($user_count <= $limit) {
+ if ($limit>count($users)) {
$this->XoopsFormElementTray($caption, "", $name);
$this->addElement($select_element);
|
|
From: <luc...@us...> - 2014-01-23 21:02:32
|
Revision: 12275
http://sourceforge.net/p/xoops/svn/12275
Author: luciorota
Date: 2014-01-23 21:02:28 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
english corrections
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/admin.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php
XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/admin.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/admin.php 2014-01-23 17:53:45 UTC (rev 12274)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/admin.php 2014-01-23 21:02:28 UTC (rev 12275)
@@ -34,7 +34,7 @@
define('_AM_XNEWSLETTER_FORMIMAGE_PATH',"File presents in %s");
define('_AM_XNEWSLETTER_FORMACTION',"Action");
define('_AM_XNEWSLETTER_ERROR_NO_VALID_ID',"Error: no valid id!");
-define('_AM_XNEWSLETTER_OK',"Succesful");
+define('_AM_XNEWSLETTER_OK',"Successful");
define('_AM_XNEWSLETTER_FAILED',"failed");
define('_AM_XNEWSLETTER_SAVE',"Save");
define('_AM_XNEWSLETTER_DETAILS',"Show details");
@@ -50,7 +50,7 @@
define('_AM_ACCOUNTS_TYPE_NAME',"My account name");
define('_AM_ACCOUNTS_TYPE_YOURNAME',"John Doe");
define('_AM_ACCOUNTS_TYPE_YOUREMAIL',"na...@yo...");
-define('_AM_ACCOUNTS_TYPE_USERNAME',"username");
+define('_AM_ACCOUNTS_TYPE_USERNAME',"user name");
define('_AM_ACCOUNTS_TYPE_PWD',"password");
define('_AM_ACCOUNTS_TYPE_POP3_SERVER_IN',"pop3.yourdomain.com");
define('_AM_ACCOUNTS_TYPE_POP3_PORT_IN',"110");
@@ -100,7 +100,7 @@
define('_AM_XNEWSLETTER_THEREARE_LETTER',"There are <span class='bold'>%s</span> Newsletter in the Database");
define('_AM_XNEWSLETTER_THEREARE_PROTOCOL',"There are <span class='bold'>%s</span> Protocol in the Database");
define('_AM_XNEWSLETTER_THEREARE_ATTACHMENT',"There are <span class='bold'>%s</span> Attachment in the Database");
-define('_AM_XNEWSLETTER_THEREARE_MAILINGLIST',"There are <span class='bold'>%s</span> Mailinglist in the Database");
+define('_AM_XNEWSLETTER_THEREARE_MAILINGLIST',"There are <span class='bold'>%s</span> Mailing list in the Database");
define('_AM_XNEWSLETTER_THEREARE_BMH',"There are <span class='bold'>%s</span> Bounce Mails in the Database");
define('_AM_XNEWSLETTER_THEREARE_TASK',"There are <span class='bold'>%s</span> Task in the Database");
//Buttons
@@ -126,9 +126,9 @@
define('_AM_XNEWSLETTER_NEWATTACHMENT',"Add New Attachment");
define('_AM_XNEWSLETTER_ATTACHMENTLIST',"List Attachment");
define('_AM_XNEWSLETTER_ATTACHMENTWAIT',"Pending Attachment");
-define('_AM_XNEWSLETTER_NEWMAILINGLIST',"Add New Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLISTLIST',"List Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLISTWAIT',"Pending Mailinglist");
+define('_AM_XNEWSLETTER_NEWMAILINGLIST',"Add New Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLISTLIST',"List Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLISTWAIT',"Pending Mailing list");
define('_AM_XNEWSLETTER_RUNBMH',"Run Bounced email handler");
define('_AM_XNEWSLETTER_BMHLIST',"List Bounced email handlers");
define('_AM_XNEWSLETTER_BMHWAIT',"Pending Bounced email handlers");
@@ -140,18 +140,18 @@
define('_AM_XNEWSLETTER_ACCOUNTS_NAME',"Name");
define('_AM_XNEWSLETTER_ACCOUNTS_YOURNAME',"Your name");
define('_AM_XNEWSLETTER_ACCOUNTS_YOURMAIL',"Your mail");
-define('_AM_XNEWSLETTER_ACCOUNTS_USERNAME',"Username");
+define('_AM_XNEWSLETTER_ACCOUNTS_USERNAME',"User name");
define('_AM_XNEWSLETTER_ACCOUNTS_PASSWORD',"Password");
define('_AM_XNEWSLETTER_ACCOUNTS_INCOMING',"Incoming");
define('_AM_XNEWSLETTER_ACCOUNTS_SERVER_IN',"Server incoming");
define('_AM_XNEWSLETTER_ACCOUNTS_PORT_IN',"Port in");
-define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN',"Securetype in");
+define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN',"Secure type in");
define('_AM_XNEWSLETTER_ACCOUNTS_OUTGOING',"Outgoing");
define('_AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT',"Server outgoing");
define('_AM_XNEWSLETTER_ACCOUNTS_PORT_OUT',"Port out");
-define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT',"Securetype out");
+define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT',"Secure type out");
define('_AM_XNEWSLETTER_ACCOUNTS_DEFAULT',"Default account");
-define('_AM_XNEWSLETTER_ACCOUNTS_BOUNCE_INFO',"Addtional info for Bounced emails handling");
+define('_AM_XNEWSLETTER_ACCOUNTS_BOUNCE_INFO',"Additional info for Bounced emails handling");
define('_AM_XNEWSLETTER_ACCOUNTS_USE_BMH',"Use Bounced emails handling");
define('_AM_XNEWSLETTER_ACCOUNTS_INBOX',"Mailbox to check for Bounced emails");
define('_AM_XNEWSLETTER_ACCOUNTS_HARDBOX',"Use this mailbox as 'hard box'");
@@ -172,8 +172,8 @@
define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS',"Open folders ");
define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH',"Bounced email handler ");
define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_INBOX',"Mailbox");
-define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX',"Hardbox");
-define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX',"Softbox");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX',"Hard box");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX',"Soft box");
define('_AM_XNEWSLETTER_CAT_ADD',"Add a category");
define('_AM_XNEWSLETTER_CAT_EDIT',"Edit a category");
define('_AM_XNEWSLETTER_CAT_DELETE',"Delete a category");
@@ -258,14 +258,14 @@
define('_AM_XNEWSLETTER_PROTOCOL_LAST_STATUS',"Last status");
define('_AM_XNEWSLETTER_PROTOCOL_MISC',"Misc protocol items");
define('_AM_XNEWSLETTER_PROTOCOL_NO_SUBSCREMAIL',"No email of recipient found");
-define('_AM_XNEWSLETTER_MAILINGLIST_ADD',"Add a Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLIST_EDIT',"Edit a Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLIST_DELETE',"Delete a Mailinglist");
+define('_AM_XNEWSLETTER_MAILINGLIST_ADD',"Add a Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLIST_EDIT',"Edit a Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLIST_DELETE',"Delete a Mailing list");
define('_AM_XNEWSLETTER_MAILINGLIST_ID',"Id");
define('_AM_XNEWSLETTER_MAILINGLIST_NAME',"Name");
define('_AM_XNEWSLETTER_MAILINGLIST_EMAIL',"Email");
define('_AM_XNEWSLETTER_MAILINGLIST_EMAIL_DESC',"Email, where subscription code should be sending to");
-define('_AM_XNEWSLETTER_MAILINGLIST_LISTNAME',"Listname");
+define('_AM_XNEWSLETTER_MAILINGLIST_LISTNAME', "List name");
define('_AM_XNEWSLETTER_MAILINGLIST_SUBSCRIBE',"Subscribe code");
define('_AM_XNEWSLETTER_MAILINGLIST_SUBSCRIBE_DESC',"{email} will be replaced by the email of the subscriber");
define('_AM_XNEWSLETTER_MAILINGLIST_UNSUBSCRIBE',"Unsubscribe code");
@@ -358,7 +358,7 @@
define('_AM_XNEWSLETTER_TASK_LETTER_ID',"Letter");
define('_AM_XNEWSLETTER_TASK_SUBSCR_ID',"Subscriber");
define('_AM_XNEWSLETTER_TASK_STATUS',"Status");
-define('_AM_XNEWSLETTER_TASK_STARTTIME',"Starttime");
+define('_AM_XNEWSLETTER_TASK_STARTTIME',"Start time");
define('_AM_XNEWSLETTER_TASK_SUBMITTER',"Submitter");
define('_AM_XNEWSLETTER_TASK_CREATED',"Created");
define('_AM_XNEWSLETTER_TASK_ERROR_CREATE',"Error creating item in task list");
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php 2014-01-23 17:53:45 UTC (rev 12274)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/main.php 2014-01-23 21:02:28 UTC (rev 12275)
@@ -28,7 +28,7 @@
// Main
define('_MA_XNEWSLETTER_INDEX',"Home");
define('_MA_XNEWSLETTER_TITLE',"xNewsletter");
-define('_MA_XNEWSLETTER_DESC',"Newsletter module for xoops");
+define('_MA_XNEWSLETTER_DESC',"Newsletter module for Xoops");
define('_MA_XNEWSLETTER_WELCOME',"<h2>Welcome in our newsletter system</h2>We hope, we can keep you up to date with our newsletters. Feel free to subscribe to one or more of our newsletters. If you do not want a newsletter any more, than you can easily unsubscribe here. You also can unsubscribe in a simple way via a link in each of our newsletters.");
define('_MA_XNEWSLETTER_ACCOUNTS',"Accounts");
define('_MA_XNEWSLETTER_CAT',"Category");
@@ -46,7 +46,7 @@
define('_MA_XNEWSLETTER_SUBSCRIPTION_EXIST_NONE',"No subscriptions existing");
define('_MA_XNEWSLETTER_REGISTRATION_EXIST',"Existing registrations of this email");
define('_MA_XNEWSLETTER_REGISTRATION_NONE',"Your email isn't registered till now. For subscriptions we need further information. Please fill in registration form.<br />We want to inform you, that your ip-address will be saved for the purpose of transparency.");
-define('_MA_XNEWSLETTER_REGISTRATION_ADD',"If you want, you can add more than one person to one email, and later on you can make different suscriptions");
+define('_MA_XNEWSLETTER_REGISTRATION_ADD',"If you want, you can add more than one person to one email, and later on you can make different subscriptions");
define('_MA_XNEWSLETTER_SUBSCRIPTION_ADD',"Add a new subscription");
define('_MA_XNEWSLETTER_SUBSCRIPTION_EDIT',"Edit subscriptions");
define('_MA_XNEWSLETTER_SUBSCRIPTION_DELETE',"Delete subscriptions");
@@ -71,8 +71,8 @@
define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_NO_CHANGE',"No changes in selection newsletter '%nl'");
define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_DAT_QUITED_REMOVED',"Date quit from newsletter '%nl' successful removed");
define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_SENT_INFO',"Information mail sent to '%e'");
-define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED',"<span style='color:red'>Attention: quited by the webmaster!</span>");
-define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED_DETAIL',"<span style='color:red'>Attention: This subscription has been quited by the webmaster at %q as a result of bounced emails! If you want to reactivate the subscription, please let this newsletter checked.</span>");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED',"<span style='color:red'>Attention: deactivated by the webmaster!</span>");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED_DETAIL',"<span style='color:red'>Attention: This subscription has been deactivated by the webmaster at %q as a result of bounced emails! If you want to reactivate the subscription, please let this newsletter checked.</span>");
define('_MA_XNEWSLETTER_UNSUBSCRIPTION_OK',"The email '%e' have been successfully unsubscribed from newsletter '%n'");
define('_MA_XNEWSLETTER_UNSUBSCRIPTION_ERROR',"Error while unsubscribe '%e' from newsletter '%n'");
define('_MA_XNEWSLETTER_SUBSCRIPTION_UPDATE_OK',"Your Newsletter has changed");
Modified: XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php
===================================================================
--- XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php 2014-01-23 17:53:45 UTC (rev 12274)
+++ XoopsModules/xnewsletter/branches/luciorota/xNewsletter/language/english/modinfo.php 2014-01-23 21:02:28 UTC (rev 12275)
@@ -27,7 +27,7 @@
*/
// Admin
define('_MI_XNEWSLETTER_NAME',"xNewsletter");
-define('_MI_XNEWSLETTER_DESC',"Newsletter module for xoops");
+define('_MI_XNEWSLETTER_DESC',"Newsletter module for Xoops");
//Menu
define('_MI_XNEWSLETTER_ADMENU1',"Dashboard");
define('_MI_XNEWSLETTER_ADMENU2',"Accounts");
@@ -37,7 +37,7 @@
define('_MI_XNEWSLETTER_ADMENU6',"Newsletters");
define('_MI_XNEWSLETTER_ADMENU7',"Attachments");
define('_MI_XNEWSLETTER_ADMENU8',"Protocols");
-define('_MI_XNEWSLETTER_ADMENU9',"Mailinglists");
+define('_MI_XNEWSLETTER_ADMENU9',"Mailing lists");
define('_MI_XNEWSLETTER_ADMENU10',"Bounced email handler");
define('_MI_XNEWSLETTER_ADMENU11',"Maintenance");
define('_MI_XNEWSLETTER_ADMENU12',"Import");
@@ -57,7 +57,7 @@
define('_MI_XNEWSLETTER_EDITOR',"Editor");
define('_MI_XNEWSLETTER_KEYWORDS',"Keywords");
define('_MI_XNEWSLETTER_KEYWORDS_DESC',"Insert here the keywords (separate by comma)");
-define('_MI_XNEWSLETTER_ADMINPERPAGE',"Number of list entries in admin pages");
+define('_MI_XNEWSLETTER_ADMINPERPAGE',"Number of list entries in administration pages");
define('_MI_XNEWSLETTER_ADMINPERPAGE_DESC',"Specifies how many items you want to display per page in the list.");
define('_MI_XNEWSLETTER_ADVERTISE',"Code of advertise");
define('_MI_XNEWSLETTER_ADVERTISE_DESC',"Insert here the code of advertisement");
@@ -65,7 +65,7 @@
define('_MI_XNEWSLETTER_SOCIALACTIVE_DESC',"If you want to see the buttons of social networks, click on Yes");
define('_MI_XNEWSLETTER_SOCIALCODE',"Code of social networks");
define('_MI_XNEWSLETTER_SOCIALCODE_DESC',"Insert here the code of social networks");
-define('_MI_XNEWSLETTER_ATTACHMENT_MAXSIZE',"Max file size");
+define('_MI_XNEWSLETTER_ATTACHMENT_MAXSIZE',"Maximum file size");
define('_MI_XNEWSLETTER_ATTACHMENT_MAXSIZE_DESC',"Maximum file size for attachments");
define('_MI_XNEWSLETTER_ATTACHMENT_MIMETYPES',"Mime-types");
define('_MI_XNEWSLETTER_ATTACHMENT_MIMETYPES_DESC',"Allowed mime-types for attachments");
@@ -80,15 +80,16 @@
define('_MI_XNEWSLETTER_USE_SALUTATION',"Use field salutation");
define('_MI_XNEWSLETTER_USE_SALUTATION_DESC',"Please decide, whether you want use salutations like 'Mr.', 'Mrs.',...");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES',"Send e-mails in packages");
-define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC',"Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediatly. You can use this option only, if you can start cronjobs with external programs.");
+define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC',"Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediately. You can use this option only, if you can start cronjobs with external programs.");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME',"Time period for sending e-mails in packages");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME_DESC',"Time period in minutes, when the next package should be sent. Only used, if 'Send e-mails in packages' is bigger than 0.");
define('_MI_XNEWSLETTER_UPGRADEFAILED',"Error while updating module");
// version 1.2
define('_MI_XNEWSLETTER_SUBSCRINFO_BLOCK',"Info Newsletter");
define('_MI_XNEWSLETTER_SUBSCRINFO_TEXT_BLOCK',"If you want to be informed in time, then subscribe to our newsletter");
+// version 1.3
define('_MI_XNEWSLETTER_WELCOME_MESSAGE',"Welcome message");
define('_MI_XNEWSLETTER_WELCOME_MESSAGE_DESC',"Html format");
define('_MI_XNEWSLETTER_WELCOME',"<h2>Welcome in our newsletter system</h2>We hope, we can keep you up to date with our newsletters. Feel free to subscribe to one or more of our newsletters. If you do not want a newsletter any more, than you can easily unsubscribe here. You also can unsubscribe in a simple way via a link in each of our newsletters.");
-define('_MI_XNEWSLETTER_DATEFORMAT', "Timestamp");
-define('_MI_XNEWSLETTER_DATEFORMATDSC', "Default Timestamp for module front end. <br />More info here: <a href='http://www.php.net/manual/en/function.date.php'>http://www.php.net/manual/en/function.date.php</a>");
+define('_MI_XNEWSLETTER_DATEFORMAT',"Timestamp");
+define('_MI_XNEWSLETTER_DATEFORMATDSC',"Default Timestamp for module front end. <br />More info here: <a href='http://www.php.net/manual/en/function.date.php'>http://www.php.net/manual/en/function.date.php</a>");
|
|
From: <rgr...@us...> - 2014-01-23 17:53:50
|
Revision: 12274
http://sourceforge.net/p/xoops/svn/12274
Author: rgriffith
Date: 2014-01-23 17:53:45 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
Update prototype js library for installer to most recent (1.7.1, Aug 2012.)
Previous 1.6.0.3 version from 2008 does not technically support Chrome or IE8, so an update seems in order.
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/js/prototype.js
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/js/prototype-1.6.0.3.js
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php 2014-01-23 17:39:00 UTC (rev 12273)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php 2014-01-23 17:53:45 UTC (rev 12274)
@@ -47,7 +47,7 @@
}
?>
- <script type="text/javascript" src="./js/prototype-1.6.0.3.js"></script>
+ <script type="text/javascript" src="./js/prototype.js"></script>
<script type="text/javascript" src="./js/xo-installer.js"></script>
</head>
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/js/prototype-1.6.0.3.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/js/prototype-1.6.0.3.js 2014-01-23 17:39:00 UTC (rev 12273)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/js/prototype-1.6.0.3.js 2014-01-23 17:53:45 UTC (rev 12274)
@@ -1,4320 +0,0 @@
-/* Prototype JavaScript framework, version 1.6.0.3
- * (c) 2005-2008 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-
-var Prototype = {
- Version: '1.6.0.3',
-
- Browser: {
- IE: !!(window.attachEvent &&
- navigator.userAgent.indexOf('Opera') === -1),
- Opera: navigator.userAgent.indexOf('Opera') > -1,
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
- navigator.userAgent.indexOf('KHTML') === -1,
- MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
- },
-
- BrowserFeatures: {
- XPath: !!document.evaluate,
- SelectorsAPI: !!document.querySelector,
- ElementExtensions: !!window.HTMLElement,
- SpecificElementExtensions:
- document.createElement('div')['__proto__'] &&
- document.createElement('div')['__proto__'] !==
- document.createElement('form')['__proto__']
- },
-
- ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
- JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
-
- emptyFunction: function() { },
- K: function(x) { return x }
-};
-
-if (Prototype.Browser.MobileSafari)
- Prototype.BrowserFeatures.SpecificElementExtensions = false;
-
-
-/* Based on Alex Arnell's inheritance implementation. */
-var Class = {
- create: function() {
- var parent = null, properties = $A(arguments);
- if (Object.isFunction(properties[0]))
- parent = properties.shift();
-
- function klass() {
- this.initialize.apply(this, arguments);
- }
-
- Object.extend(klass, Class.Methods);
- klass.superclass = parent;
- klass.subclasses = [];
-
- if (parent) {
- var subclass = function() { };
- subclass.prototype = parent.prototype;
- klass.prototype = new subclass;
- parent.subclasses.push(klass);
- }
-
- for (var i = 0; i < properties.length; i++)
- klass.addMethods(properties[i]);
-
- if (!klass.prototype.initialize)
- klass.prototype.initialize = Prototype.emptyFunction;
-
- klass.prototype.constructor = klass;
-
- return klass;
- }
-};
-
-Class.Methods = {
- addMethods: function(source) {
- var ancestor = this.superclass && this.superclass.prototype;
- var properties = Object.keys(source);
-
- if (!Object.keys({ toString: true }).length)
- properties.push("toString", "valueOf");
-
- for (var i = 0, length = properties.length; i < length; i++) {
- var property = properties[i], value = source[property];
- if (ancestor && Object.isFunction(value) &&
- value.argumentNames().first() == "$super") {
- var method = value;
- value = (function(m) {
- return function() { return ancestor[m].apply(this, arguments) };
- })(property).wrap(method);
-
- value.valueOf = method.valueOf.bind(method);
- value.toString = method.toString.bind(method);
- }
- this.prototype[property] = value;
- }
-
- return this;
- }
-};
-
-var Abstract = { };
-
-Object.extend = function(destination, source) {
- for (var property in source)
- destination[property] = source[property];
- return destination;
-};
-
-Object.extend(Object, {
- inspect: function(object) {
- try {
- if (Object.isUndefined(object)) return 'undefined';
- if (object === null) return 'null';
- return object.inspect ? object.inspect() : String(object);
- } catch (e) {
- if (e instanceof RangeError) return '...';
- throw e;
- }
- },
-
- toJSON: function(object) {
- var type = typeof object;
- switch (type) {
- case 'undefined':
- case 'function':
- case 'unknown': return;
- case 'boolean': return object.toString();
- }
-
- if (object === null) return 'null';
- if (object.toJSON) return object.toJSON();
- if (Object.isElement(object)) return;
-
- var results = [];
- for (var property in object) {
- var value = Object.toJSON(object[property]);
- if (!Object.isUndefined(value))
- results.push(property.toJSON() + ': ' + value);
- }
-
- return '{' + results.join(', ') + '}';
- },
-
- toQueryString: function(object) {
- return $H(object).toQueryString();
- },
-
- toHTML: function(object) {
- return object && object.toHTML ? object.toHTML() : String.interpret(object);
- },
-
- keys: function(object) {
- var keys = [];
- for (var property in object)
- keys.push(property);
- return keys;
- },
-
- values: function(object) {
- var values = [];
- for (var property in object)
- values.push(object[property]);
- return values;
- },
-
- clone: function(object) {
- return Object.extend({ }, object);
- },
-
- isElement: function(object) {
- return !!(object && object.nodeType == 1);
- },
-
- isArray: function(object) {
- return object != null && typeof object == "object" &&
- 'splice' in object && 'join' in object;
- },
-
- isHash: function(object) {
- return object instanceof Hash;
- },
-
- isFunction: function(object) {
- return typeof object == "function";
- },
-
- isString: function(object) {
- return typeof object == "string";
- },
-
- isNumber: function(object) {
- return typeof object == "number";
- },
-
- isUndefined: function(object) {
- return typeof object == "undefined";
- }
-});
-
-Object.extend(Function.prototype, {
- argumentNames: function() {
- var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
- .replace(/\s+/g, '').split(',');
- return names.length == 1 && !names[0] ? [] : names;
- },
-
- bind: function() {
- if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
- var __method = this, args = $A(arguments), object = args.shift();
- return function() {
- return __method.apply(object, args.concat($A(arguments)));
- }
- },
-
- bindAsEventListener: function() {
- var __method = this, args = $A(arguments), object = args.shift();
- return function(event) {
- return __method.apply(object, [event || window.event].concat(args));
- }
- },
-
- curry: function() {
- if (!arguments.length) return this;
- var __method = this, args = $A(arguments);
- return function() {
- return __method.apply(this, args.concat($A(arguments)));
- }
- },
-
- delay: function() {
- var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
- return window.setTimeout(function() {
- return __method.apply(__method, args);
- }, timeout);
- },
-
- defer: function() {
- var args = [0.01].concat($A(arguments));
- return this.delay.apply(this, args);
- },
-
- wrap: function(wrapper) {
- var __method = this;
- return function() {
- return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
- }
- },
-
- methodize: function() {
- if (this._methodized) return this._methodized;
- var __method = this;
- return this._methodized = function() {
- return __method.apply(null, [this].concat($A(arguments)));
- };
- }
-});
-
-Date.prototype.toJSON = function() {
- return '"' + this.getUTCFullYear() + '-' +
- (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
- this.getUTCDate().toPaddedString(2) + 'T' +
- this.getUTCHours().toPaddedString(2) + ':' +
- this.getUTCMinutes().toPaddedString(2) + ':' +
- this.getUTCSeconds().toPaddedString(2) + 'Z"';
-};
-
-var Try = {
- these: function() {
- var returnValue;
-
- for (var i = 0, length = arguments.length; i < length; i++) {
- var lambda = arguments[i];
- try {
- returnValue = lambda();
- break;
- } catch (e) { }
- }
-
- return returnValue;
- }
-};
-
-RegExp.prototype.match = RegExp.prototype.test;
-
-RegExp.escape = function(str) {
- return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-};
-
-/*--------------------------------------------------------------------------*/
-
-var PeriodicalExecuter = Class.create({
- initialize: function(callback, frequency) {
- this.callback = callback;
- this.frequency = frequency;
- this.currentlyExecuting = false;
-
- this.registerCallback();
- },
-
- registerCallback: function() {
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- execute: function() {
- this.callback(this);
- },
-
- stop: function() {
- if (!this.timer) return;
- clearInterval(this.timer);
- this.timer = null;
- },
-
- onTimerEvent: function() {
- if (!this.currentlyExecuting) {
- try {
- this.currentlyExecuting = true;
- this.execute();
- } finally {
- this.currentlyExecuting = false;
- }
- }
- }
-});
-Object.extend(String, {
- interpret: function(value) {
- return value == null ? '' : String(value);
- },
- specialChar: {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '\\': '\\\\'
- }
-});
-
-Object.extend(String.prototype, {
- gsub: function(pattern, replacement) {
- var result = '', source = this, match;
- replacement = arguments.callee.prepareReplacement(replacement);
-
- while (source.length > 0) {
- if (match = source.match(pattern)) {
- result += source.slice(0, match.index);
- result += String.interpret(replacement(match));
- source = source.slice(match.index + match[0].length);
- } else {
- result += source, source = '';
- }
- }
- return result;
- },
-
- sub: function(pattern, replacement, count) {
- replacement = this.gsub.prepareReplacement(replacement);
- count = Object.isUndefined(count) ? 1 : count;
-
- return this.gsub(pattern, function(match) {
- if (--count < 0) return match[0];
- return replacement(match);
- });
- },
-
- scan: function(pattern, iterator) {
- this.gsub(pattern, iterator);
- return String(this);
- },
-
- truncate: function(length, truncation) {
- length = length || 30;
- truncation = Object.isUndefined(truncation) ? '...' : truncation;
- return this.length > length ?
- this.slice(0, length - truncation.length) + truncation : String(this);
- },
-
- strip: function() {
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
- },
-
- stripTags: function() {
- return this.replace(/<\/?[^>]+>/gi, '');
- },
-
- stripScripts: function() {
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
- },
-
- extractScripts: function() {
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
- var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
- return (this.match(matchAll) || []).map(function(scriptTag) {
- return (scriptTag.match(matchOne) || ['', ''])[1];
- });
- },
-
- evalScripts: function() {
- return this.extractScripts().map(function(script) { return eval(script) });
- },
-
- escapeHTML: function() {
- var self = arguments.callee;
- self.text.data = this;
- return self.div.innerHTML;
- },
-
- unescapeHTML: function() {
- var div = new Element('div');
- div.innerHTML = this.stripTags();
- return div.childNodes[0] ? (div.childNodes.length > 1 ?
- $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
- div.childNodes[0].nodeValue) : '';
- },
-
- toQueryParams: function(separator) {
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
- if (!match) return { };
-
- return match[1].split(separator || '&').inject({ }, function(hash, pair) {
- if ((pair = pair.split('='))[0]) {
- var key = decodeURIComponent(pair.shift());
- var value = pair.length > 1 ? pair.join('=') : pair[0];
- if (value != undefined) value = decodeURIComponent(value);
-
- if (key in hash) {
- if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
- hash[key].push(value);
- }
- else hash[key] = value;
- }
- return hash;
- });
- },
-
- toArray: function() {
- return this.split('');
- },
-
- succ: function() {
- return this.slice(0, this.length - 1) +
- String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
- },
-
- times: function(count) {
- return count < 1 ? '' : new Array(count + 1).join(this);
- },
-
- camelize: function() {
- var parts = this.split('-'), len = parts.length;
- if (len == 1) return parts[0];
-
- var camelized = this.charAt(0) == '-'
- ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
- : parts[0];
-
- for (var i = 1; i < len; i++)
- camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
-
- return camelized;
- },
-
- capitalize: function() {
- return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
- },
-
- underscore: function() {
- return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
- },
-
- dasherize: function() {
- return this.gsub(/_/,'-');
- },
-
- inspect: function(useDoubleQuotes) {
- var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
- var character = String.specialChar[match[0]];
- return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
- });
- if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
- return "'" + escapedString.replace(/'/g, '\\\'') + "'";
- },
-
- toJSON: function() {
- return this.inspect(true);
- },
-
- unfilterJSON: function(filter) {
- return this.sub(filter || Prototype.JSONFilter, '#{1}');
- },
-
- isJSON: function() {
- var str = this;
- if (str.blank()) return false;
- str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
- return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
- },
-
- evalJSON: function(sanitize) {
- var json = this.unfilterJSON();
- try {
- if (!sanitize || json.isJSON()) return eval('(' + json + ')');
- } catch (e) { }
- throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
- },
-
- include: function(pattern) {
- return this.indexOf(pattern) > -1;
- },
-
- startsWith: function(pattern) {
- return this.indexOf(pattern) === 0;
- },
-
- endsWith: function(pattern) {
- var d = this.length - pattern.length;
- return d >= 0 && this.lastIndexOf(pattern) === d;
- },
-
- empty: function() {
- return this == '';
- },
-
- blank: function() {
- return /^\s*$/.test(this);
- },
-
- interpolate: function(object, pattern) {
- return new Template(this, pattern).evaluate(object);
- }
-});
-
-if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
- escapeHTML: function() {
- return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
- },
- unescapeHTML: function() {
- return this.stripTags().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
- }
-});
-
-String.prototype.gsub.prepareReplacement = function(replacement) {
- if (Object.isFunction(replacement)) return replacement;
- var template = new Template(replacement);
- return function(match) { return template.evaluate(match) };
-};
-
-String.prototype.parseQuery = String.prototype.toQueryParams;
-
-Object.extend(String.prototype.escapeHTML, {
- div: document.createElement('div'),
- text: document.createTextNode('')
-});
-
-String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
-
-var Template = Class.create({
- initialize: function(template, pattern) {
- this.template = template.toString();
- this.pattern = pattern || Template.Pattern;
- },
-
- evaluate: function(object) {
- if (Object.isFunction(object.toTemplateReplacements))
- object = object.toTemplateReplacements();
-
- return this.template.gsub(this.pattern, function(match) {
- if (object == null) return '';
-
- var before = match[1] || '';
- if (before == '\\') return match[2];
-
- var ctx = object, expr = match[3];
- var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
- match = pattern.exec(expr);
- if (match == null) return before;
-
- while (match != null) {
- var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
- ctx = ctx[comp];
- if (null == ctx || '' == match[3]) break;
- expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
- match = pattern.exec(expr);
- }
-
- return before + String.interpret(ctx);
- });
- }
-});
-Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-
-var $break = { };
-
-var Enumerable = {
- each: function(iterator, context) {
- var index = 0;
- try {
- this._each(function(value) {
- iterator.call(context, value, index++);
- });
- } catch (e) {
- if (e != $break) throw e;
- }
- return this;
- },
-
- eachSlice: function(number, iterator, context) {
- var index = -number, slices = [], array = this.toArray();
- if (number < 1) return array;
- while ((index += number) < array.length)
- slices.push(array.slice(index, index+number));
- return slices.collect(iterator, context);
- },
-
- all: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result = true;
- this.each(function(value, index) {
- result = result && !!iterator.call(context, value, index);
- if (!result) throw $break;
- });
- return result;
- },
-
- any: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result = false;
- this.each(function(value, index) {
- if (result = !!iterator.call(context, value, index))
- throw $break;
- });
- return result;
- },
-
- collect: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var results = [];
- this.each(function(value, index) {
- results.push(iterator.call(context, value, index));
- });
- return results;
- },
-
- detect: function(iterator, context) {
- var result;
- this.each(function(value, index) {
- if (iterator.call(context, value, index)) {
- result = value;
- throw $break;
- }
- });
- return result;
- },
-
- findAll: function(iterator, context) {
- var results = [];
- this.each(function(value, index) {
- if (iterator.call(context, value, index))
- results.push(value);
- });
- return results;
- },
-
- grep: function(filter, iterator, context) {
- iterator = iterator || Prototype.K;
- var results = [];
-
- if (Object.isString(filter))
- filter = new RegExp(filter);
-
- this.each(function(value, index) {
- if (filter.match(value))
- results.push(iterator.call(context, value, index));
- });
- return results;
- },
-
- include: function(object) {
- if (Object.isFunction(this.indexOf))
- if (this.indexOf(object) != -1) return true;
-
- var found = false;
- this.each(function(value) {
- if (value == object) {
- found = true;
- throw $break;
- }
- });
- return found;
- },
-
- inGroupsOf: function(number, fillWith) {
- fillWith = Object.isUndefined(fillWith) ? null : fillWith;
- return this.eachSlice(number, function(slice) {
- while(slice.length < number) slice.push(fillWith);
- return slice;
- });
- },
-
- inject: function(memo, iterator, context) {
- this.each(function(value, index) {
- memo = iterator.call(context, memo, value, index);
- });
- return memo;
- },
-
- invoke: function(method) {
- var args = $A(arguments).slice(1);
- return this.map(function(value) {
- return value[method].apply(value, args);
- });
- },
-
- max: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result;
- this.each(function(value, index) {
- value = iterator.call(context, value, index);
- if (result == null || value >= result)
- result = value;
- });
- return result;
- },
-
- min: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result;
- this.each(function(value, index) {
- value = iterator.call(context, value, index);
- if (result == null || value < result)
- result = value;
- });
- return result;
- },
-
- partition: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var trues = [], falses = [];
- this.each(function(value, index) {
- (iterator.call(context, value, index) ?
- trues : falses).push(value);
- });
- return [trues, falses];
- },
-
- pluck: function(property) {
- var results = [];
- this.each(function(value) {
- results.push(value[property]);
- });
- return results;
- },
-
- reject: function(iterator, context) {
- var results = [];
- this.each(function(value, index) {
- if (!iterator.call(context, value, index))
- results.push(value);
- });
- return results;
- },
-
- sortBy: function(iterator, context) {
- return this.map(function(value, index) {
- return {
- value: value,
- criteria: iterator.call(context, value, index)
- };
- }).sort(function(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }).pluck('value');
- },
-
- toArray: function() {
- return this.map();
- },
-
- zip: function() {
- var iterator = Prototype.K, args = $A(arguments);
- if (Object.isFunction(args.last()))
- iterator = args.pop();
-
- var collections = [this].concat(args).map($A);
- return this.map(function(value, index) {
- return iterator(collections.pluck(index));
- });
- },
-
- size: function() {
- return this.toArray().length;
- },
-
- inspect: function() {
- return '#<Enumerable:' + this.toArray().inspect() + '>';
- }
-};
-
-Object.extend(Enumerable, {
- map: Enumerable.collect,
- find: Enumerable.detect,
- select: Enumerable.findAll,
- filter: Enumerable.findAll,
- member: Enumerable.include,
- entries: Enumerable.toArray,
- every: Enumerable.all,
- some: Enumerable.any
-});
-function $A(iterable) {
- if (!iterable) return [];
- if (iterable.toArray) return iterable.toArray();
- var length = iterable.length || 0, results = new Array(length);
- while (length--) results[length] = iterable[length];
- return results;
-}
-
-if (Prototype.Browser.WebKit) {
- $A = function(iterable) {
- if (!iterable) return [];
- // In Safari, only use the `toArray` method if it's not a NodeList.
- // A NodeList is a function, has an function `item` property, and a numeric
- // `length` property. Adapted from Google Doctype.
- if (!(typeof iterable === 'function' && typeof iterable.length ===
- 'number' && typeof iterable.item === 'function') && iterable.toArray)
- return iterable.toArray();
- var length = iterable.length || 0, results = new Array(length);
- while (length--) results[length] = iterable[length];
- return results;
- };
-}
-
-Array.from = $A;
-
-Object.extend(Array.prototype, Enumerable);
-
-if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
-
-Object.extend(Array.prototype, {
- _each: function(iterator) {
- for (var i = 0, length = this.length; i < length; i++)
- iterator(this[i]);
- },
-
- clear: function() {
- this.length = 0;
- return this;
- },
-
- first: function() {
- return this[0];
- },
-
- last: function() {
- return this[this.length - 1];
- },
-
- compact: function() {
- return this.select(function(value) {
- return value != null;
- });
- },
-
- flatten: function() {
- return this.inject([], function(array, value) {
- return array.concat(Object.isArray(value) ?
- value.flatten() : [value]);
- });
- },
-
- without: function() {
- var values = $A(arguments);
- return this.select(function(value) {
- return !values.include(value);
- });
- },
-
- reverse: function(inline) {
- return (inline !== false ? this : this.toArray())._reverse();
- },
-
- reduce: function() {
- return this.length > 1 ? this : this[0];
- },
-
- uniq: function(sorted) {
- return this.inject([], function(array, value, index) {
- if (0 == index || (sorted ? array.last() != value : !array.include(value)))
- array.push(value);
- return array;
- });
- },
-
- intersect: function(array) {
- return this.uniq().findAll(function(item) {
- return array.detect(function(value) { return item === value });
- });
- },
-
- clone: function() {
- return [].concat(this);
- },
-
- size: function() {
- return this.length;
- },
-
- inspect: function() {
- return '[' + this.map(Object.inspect).join(', ') + ']';
- },
-
- toJSON: function() {
- var results = [];
- this.each(function(object) {
- var value = Object.toJSON(object);
- if (!Object.isUndefined(value)) results.push(value);
- });
- return '[' + results.join(', ') + ']';
- }
-});
-
-// use native browser JS 1.6 implementation if available
-if (Object.isFunction(Array.prototype.forEach))
- Array.prototype._each = Array.prototype.forEach;
-
-if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
- i || (i = 0);
- var length = this.length;
- if (i < 0) i = length + i;
- for (; i < length; i++)
- if (this[i] === item) return i;
- return -1;
-};
-
-if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
- i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
- var n = this.slice(0, i).reverse().indexOf(item);
- return (n < 0) ? n : i - n - 1;
-};
-
-Array.prototype.toArray = Array.prototype.clone;
-
-function $w(string) {
- if (!Object.isString(string)) return [];
- string = string.strip();
- return string ? string.split(/\s+/) : [];
-}
-
-if (Prototype.Browser.Opera){
- Array.prototype.concat = function() {
- var array = [];
- for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
- for (var i = 0, length = arguments.length; i < length; i++) {
- if (Object.isArray(arguments[i])) {
- for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
- array.push(arguments[i][j]);
- } else {
- array.push(arguments[i]);
- }
- }
- return array;
- };
-}
-Object.extend(Number.prototype, {
- toColorPart: function() {
- return this.toPaddedString(2, 16);
- },
-
- succ: function() {
- return this + 1;
- },
-
- times: function(iterator, context) {
- $R(0, this, true).each(iterator, context);
- return this;
- },
-
- toPaddedString: function(length, radix) {
- var string = this.toString(radix || 10);
- return '0'.times(length - string.length) + string;
- },
-
- toJSON: function() {
- return isFinite(this) ? this.toString() : 'null';
- }
-});
-
-$w('abs round ceil floor').each(function(method){
- Number.prototype[method] = Math[method].methodize();
-});
-function $H(object) {
- return new Hash(object);
-};
-
-var Hash = Class.create(Enumerable, (function() {
-
- function toQueryPair(key, value) {
- if (Object.isUndefined(value)) return key;
- return key + '=' + encodeURIComponent(String.interpret(value));
- }
-
- return {
- initialize: function(object) {
- this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
- },
-
- _each: function(iterator) {
- for (var key in this._object) {
- var value = this._object[key], pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
- },
-
- set: function(key, value) {
- return this._object[key] = value;
- },
-
- get: function(key) {
- // simulating poorly supported hasOwnProperty
- if (this._object[key] !== Object.prototype[key])
- return this._object[key];
- },
-
- unset: function(key) {
- var value = this._object[key];
- delete this._object[key];
- return value;
- },
-
- toObject: function() {
- return Object.clone(this._object);
- },
-
- keys: function() {
- return this.pluck('key');
- },
-
- values: function() {
- return this.pluck('value');
- },
-
- index: function(value) {
- var match = this.detect(function(pair) {
- return pair.value === value;
- });
- return match && match.key;
- },
-
- merge: function(object) {
- return this.clone().update(object);
- },
-
- update: function(object) {
- return new Hash(object).inject(this, function(result, pair) {
- result.set(pair.key, pair.value);
- return result;
- });
- },
-
- toQueryString: function() {
- return this.inject([], function(results, pair) {
- var key = encodeURIComponent(pair.key), values = pair.value;
-
- if (values && typeof values == 'object') {
- if (Object.isArray(values))
- return results.concat(values.map(toQueryPair.curry(key)));
- } else results.push(toQueryPair(key, values));
- return results;
- }).join('&');
- },
-
- inspect: function() {
- return '#<Hash:{' + this.map(function(pair) {
- return pair.map(Object.inspect).join(': ');
- }).join(', ') + '}>';
- },
-
- toJSON: function() {
- return Object.toJSON(this.toObject());
- },
-
- clone: function() {
- return new Hash(this);
- }
- }
-})());
-
-Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
-Hash.from = $H;
-var ObjectRange = Class.create(Enumerable, {
- initialize: function(start, end, exclusive) {
- this.start = start;
- this.end = end;
- this.exclusive = exclusive;
- },
-
- _each: function(iterator) {
- var value = this.start;
- while (this.include(value)) {
- iterator(value);
- value = value.succ();
- }
- },
-
- include: function(value) {
- if (value < this.start)
- return false;
- if (this.exclusive)
- return value < this.end;
- return value <= this.end;
- }
-});
-
-var $R = function(start, end, exclusive) {
- return new ObjectRange(start, end, exclusive);
-};
-
-var Ajax = {
- getTransport: function() {
- return Try.these(
- function() {return new XMLHttpRequest()},
- function() {return new ActiveXObject('Msxml2.XMLHTTP')},
- function() {return new ActiveXObject('Microsoft.XMLHTTP')}
- ) || false;
- },
-
- activeRequestCount: 0
-};
-
-Ajax.Responders = {
- responders: [],
-
- _each: function(iterator) {
- this.responders._each(iterator);
- },
-
- register: function(responder) {
- if (!this.include(responder))
- this.responders.push(responder);
- },
-
- unregister: function(responder) {
- this.responders = this.responders.without(responder);
- },
-
- dispatch: function(callback, request, transport, json) {
- this.each(function(responder) {
- if (Object.isFunction(responder[callback])) {
- try {
- responder[callback].apply(responder, [request, transport, json]);
- } catch (e) { }
- }
- });
- }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
- onCreate: function() { Ajax.activeRequestCount++ },
- onComplete: function() { Ajax.activeRequestCount-- }
-});
-
-Ajax.Base = Class.create({
- initialize: function(options) {
- this.options = {
- method: 'post',
- asynchronous: true,
- contentType: 'application/x-www-form-urlencoded',
- encoding: 'UTF-8',
- parameters: '',
- evalJSON: true,
- evalJS: true
- };
- Object.extend(this.options, options || { });
-
- this.options.method = this.options.method.toLowerCase();
-
- if (Object.isString(this.options.parameters))
- this.options.parameters = this.options.parameters.toQueryParams();
- else if (Object.isHash(this.options.parameters))
- this.options.parameters = this.options.parameters.toObject();
- }
-});
-
-Ajax.Request = Class.create(Ajax.Base, {
- _complete: false,
-
- initialize: function($super, url, options) {
- $super(options);
- this.transport = Ajax.getTransport();
- this.request(url);
- },
-
- request: function(url) {
- this.url = url;
- this.method = this.options.method;
- var params = Object.clone(this.options.parameters);
-
- if (!['get', 'post'].include(this.method)) {
- // simulate other verbs over post
- params['_method'] = this.method;
- this.method = 'post';
- }
-
- this.parameters = params;
-
- if (params = Object.toQueryString(params)) {
- // when GET, append parameters to URL
- if (this.method == 'get')
- this.url += (this.url.include('?') ? '&' : '?') + params;
- else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
- params += '&_=';
- }
-
- try {
- var response = new Ajax.Response(this);
- if (this.options.onCreate) this.options.onCreate(response);
- Ajax.Responders.dispatch('onCreate', this, response);
-
- this.transport.open(this.method.toUpperCase(), this.url,
- this.options.asynchronous);
-
- if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
-
- this.transport.onreadystatechange = this.onStateChange.bind(this);
- this.setRequestHeaders();
-
- this.body = this.method == 'post' ? (this.options.postBody || params) : null;
- this.transport.send(this.body);
-
- /* Force Firefox to handle ready state 4 for synchronous requests */
- if (!this.options.asynchronous && this.transport.overrideMimeType)
- this.onStateChange();
-
- }
- catch (e) {
- this.dispatchException(e);
- }
- },
-
- onStateChange: function() {
- var readyState = this.transport.readyState;
- if (readyState > 1 && !((readyState == 4) && this._complete))
- this.respondToReadyState(this.transport.readyState);
- },
-
- setRequestHeaders: function() {
- var headers = {
- 'X-Requested-With': 'XMLHttpRequest',
- 'X-Prototype-Version': Prototype.Version,
- 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
- };
-
- if (this.method == 'post') {
- headers['Content-type'] = this.options.contentType +
- (this.options.encoding ? '; charset=' + this.options.encoding : '');
-
- /* Force "Connection: close" for older Mozilla browsers to work
- * around a bug where XMLHttpRequest sends an incorrect
- * Content-length header. See Mozilla Bugzilla #246651.
- */
- if (this.transport.overrideMimeType &&
- (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
- headers['Connection'] = 'close';
- }
-
- // user-defined headers
- if (typeof this.options.requestHeaders == 'object') {
- var extras = this.options.requestHeaders;
-
- if (Object.isFunction(extras.push))
- for (var i = 0, length = extras.length; i < length; i += 2)
- headers[extras[i]] = extras[i+1];
- else
- $H(extras).each(function(pair) { headers[pair.key] = pair.value });
- }
-
- for (var name in headers)
- this.transport.setRequestHeader(name, headers[name]);
- },
-
- success: function() {
- var status = this.getStatus();
- return !status || (status >= 200 && status < 300);
- },
-
- getStatus: function() {
- try {
- return this.transport.status || 0;
- } catch (e) { return 0 }
- },
-
- respondToReadyState: function(readyState) {
- var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
-
- if (state == 'Complete') {
- try {
- this._complete = true;
- (this.options['on' + response.status]
- || this.options['on' + (this.success() ? 'Success' : 'Failure')]
- || Prototype.emptyFunction)(response, response.headerJSON);
- } catch (e) {
- this.dispatchException(e);
- }
-
- var contentType = response.getHeader('Content-type');
- if (this.options.evalJS == 'force'
- || (this.options.evalJS && this.isSameOrigin() && contentType
- && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
- this.evalResponse();
- }
-
- try {
- (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
- Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
- } catch (e) {
- this.dispatchException(e);
- }
-
- if (state == 'Complete') {
- // avoid memory leak in MSIE: clean up
- this.transport.onreadystatechange = Prototype.emptyFunction;
- }
- },
-
- isSameOrigin: function() {
- var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
- return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
- protocol: location.protocol,
- domain: document.domain,
- port: location.port ? ':' + location.port : ''
- }));
- },
-
- getHeader: function(name) {
- try {
- return this.transport.getResponseHeader(name) || null;
- } catch (e) { return null }
- },
-
- evalResponse: function() {
- try {
- return eval((this.transport.responseText || '').unfilterJSON());
- } catch (e) {
- this.dispatchException(e);
- }
- },
-
- dispatchException: function(exception) {
- (this.options.onException || Prototype.emptyFunction)(this, exception);
- Ajax.Responders.dispatch('onException', this, exception);
- }
-});
-
-Ajax.Request.Events =
- ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-Ajax.Response = Class.create({
- initialize: function(request){
- this.request = request;
- var transport = this.transport = request.transport,
- readyState = this.readyState = transport.readyState;
-
- if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
- this.status = this.getStatus();
- this.statusText = this.getStatusText();
- this.responseText = String.interpret(transport.responseText);
- this.headerJSON = this._getHeaderJSON();
- }
-
- if(readyState == 4) {
- var xml = transport.responseXML;
- this.responseXML = Object.isUndefined(xml) ? null : xml;
- this.responseJSON = this._getResponseJSON();
- }
- },
-
- status: 0,
- statusText: '',
-
- getStatus: Ajax.Request.prototype.getStatus,
-
- getStatusText: function() {
- try {
- return this.transport.statusText || '';
- } catch (e) { return '' }
- },
-
- getHeader: Ajax.Request.prototype.getHeader,
-
- getAllHeaders: function() {
- try {
- return this.getAllResponseHeaders();
- } catch (e) { return null }
- },
-
- getResponseHeader: function(name) {
- return this.transport.getResponseHeader(name);
- },
-
- getAllResponseHeaders: function() {
- return this.transport.getAllResponseHeaders();
- },
-
- _getHeaderJSON: function() {
- var json = this.getHeader('X-JSON');
- if (!json) return null;
- json = decodeURIComponent(escape(json));
- try {
- return json.evalJSON(this.request.options.sanitizeJSON ||
- !this.request.isSameOrigin());
- } catch (e) {
- this.request.dispatchException(e);
- }
- },
-
- _getResponseJSON: function() {
- var options = this.request.options;
- if (!options.evalJSON || (options.evalJSON != 'force' &&
- !(this.getHeader('Content-type') || '').include('application/json')) ||
- this.responseText.blank())
- return null;
- try {
- return this.responseText.evalJSON(options.sanitizeJSON ||
- !this.request.isSameOrigin());
- } catch (e) {
- this.request.dispatchException(e);
- }
- }
-});
-
-Ajax.Updater = Class.create(Ajax.Request, {
- initialize: function($super, container, url, options) {
- this.container = {
- success: (container.success || container),
- failure: (container.failure || (container.success ? null : container))
- };
-
- options = Object.clone(options);
- var onComplete = options.onComplete;
- options.onComplete = (function(response, json) {
- this.updateContent(response.responseText);
- if (Object.isFunction(onComplete)) onComplete(response, json);
- }).bind(this);
-
- $super(url, options);
- },
-
- updateContent: function(responseText) {
- var receiver = this.container[this.success() ? 'success' : 'failure'],
- options = this.options;
-
- if (!options.evalScripts) responseText = responseText.stripScripts();
-
- if (receiver = $(receiver)) {
- if (options.insertion) {
- if (Object.isString(options.insertion)) {
- var insertion = { }; insertion[options.insertion] = responseText;
- receiver.insert(insertion);
- }
- else options.insertion(receiver, responseText);
- }
- else receiver.update(responseText);
- }
- }
-});
-
-Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
- initialize: function($super, container, url, options) {
- $super(options);
- this.onComplete = this.options.onComplete;
-
- this.frequency = (this.options.frequency || 2);
- this.decay = (this.options.decay || 1);
-
- this.updater = { };
- this.container = container;
- this.url = url;
-
- this.start();
- },
-
- start: function() {
- this.options.onComplete = this.updateComplete.bind(this);
- this.onTimerEvent();
- },
-
- stop: function() {
- this.updater.options.onComplete = undefined;
- clearTimeout(this.timer);
- (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
- },
-
- updateComplete: function(response) {
- if (this.options.decay) {
- this.decay = (response.responseText == this.lastText ?
- this.decay * this.options.decay : 1);
-
- this.lastText = response.responseText;
- }
- this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
- },
-
- onTimerEvent: function() {
- this.updater = new Ajax.Updater(this.container, this.url, this.options);
- }
-});
-function $(element) {
- if (arguments.length > 1) {
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
- elements.push($(arguments[i]));
- return elements;
- }
- if (Object.isString(element))
- element = document.getElementById(element);
- return Element.extend(element);
-}
-
-if (Prototype.BrowserFeatures.XPath) {
- document._getElementsByXPath = function(expression, parentElement) {
- var results = [];
- var query = document.evaluate(expression, $(parentElement) || document,
- null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
- for (var i = 0, length = query.snapshotLength; i < length; i++)
- results.push(Element.extend(query.snapshotItem(i)));
- return results;
- };
-}
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Node) var Node = { };
-
-if (!Node.ELEMENT_NODE) {
- // DOM level 2 ECMAScript Language Binding
- Object.extend(Node, {
- ELEMENT_NODE: 1,
- ATTRIBUTE_NODE: 2,
- TEXT_NODE: 3,
- CDATA_SECTION_NODE: 4,
- ENTITY_REFERENCE_NODE: 5,
- ENTITY_NODE: 6,
- PROCESSING_INSTRUCTION_NODE: 7,
- COMMENT_NODE: 8,
- DOCUMENT_NODE: 9,
- DOCUMENT_TYPE_NODE: 10,
- DOCUMENT_FRAGMENT_NODE: 11,
- NOTATION_NODE: 12
- });
-}
-
-(function() {
- var element = this.Element;
- this.Element = function(tagName, attributes) {
- attributes = attributes || { };
- tagName = tagName.toLowerCase();
- var cache = Element.cache;
- if (Prototype.Browser.IE && attributes.name) {
- tagName = '<' + tagName + ' name="' + attributes.name + '">';
- delete attributes.name;
- return Element.writeAttribute(document.createElement(tagName), attributes);
- }
- if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
- return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
- };
- Object.extend(this.Element, element || { });
- if (element) this.Element.prototype = element.prototype;
-}).call(window);
-
-Element.cache = { };
-
-Element.Methods = {
- visible: function(element) {
- return $(element).style.display != 'none';
- },
-
- toggle: function(element) {
- element = $(element);
- Element[Element.visible(element) ? 'hide' : 'show'](element);
- return element;
- },
-
- hide: function(element) {
- element = $(element);
- element.style.display = 'none';
- return element;
- },
-
- show: function(element) {
- element = $(element);
- element.style.display = '';
- return element;
- },
-
- remove: function(element) {
- element = $(element);
- element.parentNode.removeChild(element);
- return element;
- },
-
- update: function(element, content) {
- element = $(element);
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) return element.update().insert(content);
- content = Object.toHTML(content);
- element.innerHTML = content.stripScripts();
- content.evalScripts.bind(content).defer();
- return element;
- },
-
- replace: function(element, content) {
- element = $(element);
- if (content && content.toElement) content = content.toElement();
- else if (!Object.isElement(content)) {
- content = Object.toHTML(content);
- var range = element.ownerDocument.createRange();
- range.selectNode(element);
- content.evalScripts.bind(content).defer();
- content = range.createContextualFragment(content.stripScripts());
- }
- element.parentNode.replaceChild(content, element);
- return element;
- },
-
- insert: function(element, insertions) {
- element = $(element);
-
- if (Object.isString(insertions) || Object.isNumber(insertions) ||
- Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
- insertions = {bottom:insertions};
-
- var content, insert, tagName, childNodes;
-
- for (var position in insertions) {
- content = insertions[position];
- position = position.toLowerCase();
- insert = Element._insertionTranslations[position];
-
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) {
- insert(element, content);
- continue;
- }
-
- content = Object.toHTML(content);
-
- tagName = ((position == 'before' || position == 'after')
- ? element.parentNode : element).tagName.toUpperCase();
-
- childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-
- if (position == 'top' || position == 'after') childNodes.reverse();
- childNodes.each(insert.curry(element));
-
- content.evalScripts.bind(content).defer();
- }
-
- return element;
- },
-
- wrap: function(element, wrapper, attributes) {
- element = $(element);
- if (Object.isElement(wrapper))
- $(wrapper).writeAttribute(attributes || { });
- else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
- else wrapper = new Element('div', wrapper);
- if (element.parentNode)
- element.parentNode.replaceChild(wrapper, element);
- wrapper.appendChild(element);
- return wrapper;
- },
-
- inspect: function(element) {
- element = $(element);
- var result = '<' + element.tagName.toLowerCase();
- $H({'id': 'id', 'className': 'class'}).each(function(pair) {
- var property = pair.first(), attribute = pair.last();
- var value = (element[property] || '').toString();
- if (value) result += ' ' + attribute + '=' + value.inspect(true);
- });
- return result + '>';
- },
-
- recursivelyCollect: function(element, property) {
- element = $(element);
- var elements = [];
- while (element = element[property])
- if (element.nodeType == 1)
- elements.push(Element.extend(element));
- return elements;
- },
-
- ancestors: function(element) {
- return $(element).recursivelyCollect('parentNode');
- },
-
- descendants: function(element) {
- return $(element).select("*");
- },
-
- firstDescendant: function(element) {
- element = $(element).firstChild;
- while (element && element.nodeType != 1) element = element.nextSibling;
- return $(element);
- },
-
- immediateDescendants: function(element) {
- if (!(element = $(element).firstChild)) return [];
- while (element && element.nodeType != 1) element = element.nextSibling;
- if (element) return [element].concat($(element).nextSiblings());
- return [];
- },
-
- previousSiblings: function(element) {
- return $(element).recursivelyCollect('previousSibling');
- },
-
- nextSiblings: function(element) {
- return $(element).recursivelyCollect('nextSibling');
- },
-
- siblings: function(element) {
- element = $(element);
- return element.previousSiblings().reverse().concat(element.nextSiblings());
- },
-
- match: function(element, selector) {
- if (Object.isString(selector))
- selector = new Selector(selector);
- return selector.match($(element));
- },
-
- up: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(element.parentNode);
- var ancestors = element.ancestors();
- return Object.isNumber(expression) ? ancestors[expression] :
- Selector.findElement(ancestors, expression, index);
- },
-
- down: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return element.firstDescendant();
- return Object.isNumber(expression) ? element.descendants()[expression] :
- Element.select(element, expression)[index || 0];
- },
-
- previous: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
- var previousSiblings = element.previousSiblings();
- return Object.isNumber(expression) ? previousSiblings[expression] :
- Selector.findElement(previousSiblings, expression, index);
- },
-
- next: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
- var nextSiblings = element.nextSiblings();
- return Object.isNumber(expression) ? nextSiblings[expression] :
- Selector.findElement(nextSiblings, expression, index);
- },
-
- select: function() {
- var args = $A(arguments), element = $(args.shift());
- return Selector.findChildElements(element, args);
- },
-
- adjacent: function() {
- var args = $A(arguments), element = $(args.shift());
- return Selector.findChildElements(element.parentNode, args).without(element);
- },
-
- identify: function(element) {
- element = $(element);
- var id = element.readAttribute('id'), self = arguments.callee;
- if (id) return id;
- do { id = 'anonymous_element_' + self.counter++ } while ($(id));
- element.writeAttribute('id', id);
- return id;
- },
-
- readAttribute: function(element, name) {
- element = $(element);
- if (Prototype.Browser.IE) {
- var t = Element._attributeTranslations.read;
- if (t.values[name]) return t.values[name](element, name);
- if (t.names[name]) name = t.names[name];
- if (name.include(':')) {
- return (!element.attributes || !element.attributes[name]) ? null :
- element.attributes[name].value;
- }
- }
- return element.getAttribute(name);
- },
-
- writeAttribute: function(element, name, value) {
- element = $(element);
- var attributes = { }, t = Element._attributeTranslations.write;
-
- if (typeof name == 'object') attributes = name;
- else attributes[name] = Object.isUndefined(value) ? true : value;
-
- for (var attr in attributes) {
- name = t.names[attr] || attr;
- value = attributes[attr];
- if (t.values[attr]) name = t.values[attr](element, value);
- if (value === false || value === null)
- element.removeAttribute(name);
- else if (value === true)
- element.setAttribute(name, name);
- else element.setAttribute(name, value);
- }
- return element;
- },
-
- getHeight: function(element) {
- return $(element).getDimensions().height;
- },
-
- getWidth: function(element) {
- return $(element).getDimensions().width;
- },
-
- classNames: function(element) {
- return new Element.ClassNames(element);
- },
-
- hasClassName: function(element, className) {
- if (!(element = $(element))) return;
- var elementClassName = element.className;
- return (elementClassName.length > 0 && (elementClassName == className ||
- new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
- },
-
- addClassName: function(element, className) {
- if (!(element = $(element))) return;
- if (!element.hasClassName(className))
- element.className += (element.className ? ' ' : '') + className;
- return element;
- },
-
- removeClassName: function(element, className) {
- if (!(element = $(element))) return;
- element.className = element.className.replace(
- new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
- return element;
- },
-
- toggleClassName: function(element, className) {
- if (!(element = $(element))) return;
- return element[element.hasClassName(className) ?
- 'removeClassName' : 'addClassName'](className);
- },
-
- // removes whitespace-only text node children
- cleanWhitespace: function(element) {
- element = $(element);
- var node = element.firstChild;
- while (node) {
- var nextNode = node.nextSibling;
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
- element.removeChild(node);
- node = nextNode;
- }
- return element;
- },
-
- empty: function(element) {
- return $(element).innerHTML.blank();
- },
-
- descendantOf: function(element, ancestor) {
- element = $(element), ancestor = $(ancestor);
-
- if (element.compareDocumentPosition)
- return (element.compareDocumentPosition(ancestor) & 8) === 8;
-
- if (ancestor.contains)
- return ancestor.contains(element) && ancestor !== element;
-
- while (element = element.parentNode)
- if (element == ancestor) return true;
-
- return false;
- },
-
- scrollTo: function(element) {
- element = $(element);
- var pos = element.cumulativeOffset();
- window.scrollTo(pos[0], pos[1]);
- return element;
- },
-
- getStyle: function(element, style) {
- element = $(element);
- style = style == 'float' ? 'cssFloat' : style.camelize();
- var value = element.style[style];
- if (!value || value == 'auto') {
- var css = document.defaultView.getComputedStyle(element, null);
- value = css ? css[style] : null;
- }
- if (style == 'opacity') return value ? parseFloat(value) : 1.0;
- return value == 'auto' ? null : value;
- },
-
- getOpacity: function(element) {
- return $(element).getStyle('opacity');
- },
-
- setStyle: function(element, styles) {
- element = $(element);
- var elementStyle = element.style, match;
- if (Object.isString(styles)) {
- element.style.cssText += ';' + styles;
- return styles.include('opacity') ?
- element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
- }
- for (var property in styles)
- if (property == 'opacity') element.setOpacity(styles[property]);
- else
- elementStyle[(property == 'float' || property == 'cssFloat') ?
- (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
- property] = styles[property];
-
- return element;
- },
-
- setOpacity: function(element, value) {
- element = $(element);
- element.style.opacity = (value == 1 || value === '') ? '' :
- (value < 0.00001) ? 0 : value;
- return element;
- },
-
- getDimensions: function(element) {
- element = $(element);
- var display = element.getStyle('display');
- if (display != 'none' && display != null) // Safari bug
- return {width: element.offsetWidth, height: element.offsetHeight};
-
- // All *Width and *Height properties give 0 on elements with display none,
- // so enable the element temporarily
- var els = element.style;
- var originalVisibility = els.visibility;
- var originalPosition = els.position;
- var originalDisplay = els.display;
- els.visibility = 'hidden';
- els.position = 'absolute';
- els.display = 'block';
- var originalWidth = element.clientWidth;
- var originalHeight = element.clientHeight;
- els.display = originalDisplay;
- els.position = originalPosition;
- els.visibility = originalVisibility;
- return {width: originalWidth, height: originalHeight};
- },
-
- makePositioned: function(element) {
- element = $(element);
- var pos = Element.getStyle(element, 'position');
- if (pos == 'static' || !pos) {
- element._madePositioned = true;
- element.style.position = 'relative';
- // Opera returns the offset relative to the positioning context, when an
- // element is position relative but top and left have not been defined
- if (Prototype.Browser.Opera) {
- element.style.top = 0;
- element.style.left = 0;
- }
- }
- return element;
- },
-
- undoPositioned: function(element) {
- element = $(element);
- if (element._madePositioned) {
- element._madePositioned = undefined;
- element.style.position =
- element.style.top =
- element.style.left =
- element.style.bottom =
- element.style.right = '';
- }
- return element;
- },
-
- makeClipping: function(element) {
- element = $(element);
- if (element._overflow) return element;
- element._overflow = Element.getStyle(element, 'overflow') || 'auto';
- if (element._overflow !== 'hidden')
- element.style.overflow = 'hidden';
- return element;
- },
-
- undoClipping: function(element) {
- element = $(element);
- if (!element._overflow) return element;
- element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
- element._overflow = null;
- return element;
- },
-
- cumulativeOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- } while (element);
- return Element._returnOffset(valueL, valueT);
- },
-
- positionedOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- if (element) {
- if (element.tagName.toUpperCase() == 'BODY') brea...
[truncated message content] |
|
From: <rgr...@us...> - 2014-01-23 17:39:02
|
Revision: 12273
http://sourceforge.net/p/xoops/svn/12273
Author: rgriffith
Date: 2014-01-23 17:39:00 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
Partial fix to #1268 - reduce db load if XoopsFormSelectUser is called multiple times in a page load
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php 2014-01-23 15:01:19 UTC (rev 12272)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselectuser.php 2014-01-23 17:39:00 UTC (rev 12273)
@@ -42,23 +42,47 @@
*/
function XoopsFormSelectUser($caption, $name, $include_anon = false, $value = null, $size = 1, $multiple = false)
{
- $limit = 200;
+ /**
+ * @var array|null - cache potentially expensive result for this session.
+ * Some modules use multiple copies of this element on a single page, and for
+ * sites with large user bases, that can be quite expensive when $value is null.
+ * @todo this should be replaced with a filter or autocomplete interface .
+ */
+ static $querycache = null;
+ /**
+ * @var int|null - cache record count from member_handler
+ */
+ static $countcache = null;
+
+ $limit = 100;
$select_element = new XoopsFormSelect('', $name, $value, $size, $multiple);
if ($include_anon) {
$select_element->addOption(0, $GLOBALS['xoopsConfig']['anonymous']);
}
$member_handler =& xoops_gethandler('member');
- $user_count = $member_handler->getUserCount();
+ if ($countcache===null) {
+ $countcache = $member_handler->getUserCount();
+ }
+ $user_count = $countcache;
$value = is_array($value) ? $value : (empty($value) ? array() : array($value));
if ($user_count > $limit && count($value) > 0) {
$criteria = new CriteriaCompo(new Criteria('uid', '(' . implode(',', $value) . ')', 'IN'));
+ $use_cache = false;
} else {
+ $use_cache = true;
$criteria = new CriteriaCompo();
$criteria->setLimit($limit);
}
$criteria->setSort('uname');
$criteria->setOrder('ASC');
- $users = $member_handler->getUserList($criteria);
+ if ($use_cache && !empty($querycache)) {
+ $users = $querycache;
+ } else {
+ $users = $member_handler->getUserList($criteria);
+ if ($use_cache) {
+ $querycache = $users;
+ }
+ }
$select_element->addOptionArray($users);
if ($user_count <= $limit) {
$this->XoopsFormElementTray($caption, "", $name);
|
|
From: <go...@us...> - 2014-01-23 15:01:26
|
Revision: 12272
http://sourceforge.net/p/xoops/svn/12272
Author: goffy
Date: 2014-01-23 15:01:19 +0000 (Thu, 23 Jan 2014)
Log Message:
-----------
corrections on english language files (cesag)
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/language/english/admin.php
XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php
XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/language/english/admin.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/language/english/admin.php 2014-01-21 17:10:06 UTC (rev 12271)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/language/english/admin.php 2014-01-23 15:01:19 UTC (rev 12272)
@@ -34,7 +34,7 @@
define('_AM_XNEWSLETTER_FORMIMAGE_PATH', "File presents in %s");
define('_AM_XNEWSLETTER_FORMACTION', "Action");
define('_AM_XNEWSLETTER_ERROR_NO_VALID_ID', "Error: no valid id!");
-define('_AM_XNEWSLETTER_OK', "Succesful");
+define('_AM_XNEWSLETTER_OK', "Successful");
define('_AM_XNEWSLETTER_FAILED', "failed");
define('_AM_XNEWSLETTER_SAVE', "Save");
define('_AM_XNEWSLETTER_DETAILS', "Show details");
@@ -50,7 +50,7 @@
define('_AM_ACCOUNTS_TYPE_NAME', "My account name");
define('_AM_ACCOUNTS_TYPE_YOURNAME', "John Doe");
define('_AM_ACCOUNTS_TYPE_YOUREMAIL', "na...@yo...");
-define('_AM_ACCOUNTS_TYPE_USERNAME', "username");
+define('_AM_ACCOUNTS_TYPE_USERNAME', "user name");
define('_AM_ACCOUNTS_TYPE_PWD', "password");
define('_AM_ACCOUNTS_TYPE_POP3_SERVER_IN', "pop3.yourdomain.com");
define('_AM_ACCOUNTS_TYPE_POP3_PORT_IN', "110");
@@ -100,7 +100,7 @@
define('_AM_XNEWSLETTER_THEREARE_LETTER', "There are <span class='bold'>%s</span> Newsletter in the Database");
define('_AM_XNEWSLETTER_THEREARE_PROTOCOL', "There are <span class='bold'>%s</span> Protocol in the Database");
define('_AM_XNEWSLETTER_THEREARE_ATTACHMENT', "There are <span class='bold'>%s</span> Attachment in the Database");
-define('_AM_XNEWSLETTER_THEREARE_MAILINGLIST', "There are <span class='bold'>%s</span> Mailinglist in the Database");
+define('_AM_XNEWSLETTER_THEREARE_MAILINGLIST', "There are <span class='bold'>%s</span> Mailing list in the Database");
define('_AM_XNEWSLETTER_THEREARE_BMH', "There are <span class='bold'>%s</span> Bounce Mails in the Database");
define('_AM_XNEWSLETTER_THEREARE_TASK', "There are <span class='bold'>%s</span> Task in the Database");
//Buttons
@@ -126,9 +126,9 @@
define('_AM_XNEWSLETTER_NEWATTACHMENT', "Add New Attachment");
define('_AM_XNEWSLETTER_ATTACHMENTLIST', "List Attachment");
define('_AM_XNEWSLETTER_ATTACHMENTWAIT', "Pending Attachment");
-define('_AM_XNEWSLETTER_NEWMAILINGLIST', "Add New Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLISTLIST', "List Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLISTWAIT', "Pending Mailinglist");
+define('_AM_XNEWSLETTER_NEWMAILINGLIST', "Add New Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLISTLIST', "List Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLISTWAIT', "Pending Mailing list");
define('_AM_XNEWSLETTER_RUNBMH', "Run Bounced email handler");
define('_AM_XNEWSLETTER_BMHLIST', "List Bounced email handlers");
define('_AM_XNEWSLETTER_BMHWAIT', "Pending Bounced email handlers");
@@ -140,18 +140,18 @@
define('_AM_XNEWSLETTER_ACCOUNTS_NAME', "Name");
define('_AM_XNEWSLETTER_ACCOUNTS_YOURNAME', "Your name");
define('_AM_XNEWSLETTER_ACCOUNTS_YOURMAIL', "Your mail");
-define('_AM_XNEWSLETTER_ACCOUNTS_USERNAME', "Username");
+define('_AM_XNEWSLETTER_ACCOUNTS_USERNAME', "User name");
define('_AM_XNEWSLETTER_ACCOUNTS_PASSWORD', "Password");
define('_AM_XNEWSLETTER_ACCOUNTS_INCOMING', "Incoming");
define('_AM_XNEWSLETTER_ACCOUNTS_SERVER_IN', "Server incoming");
define('_AM_XNEWSLETTER_ACCOUNTS_PORT_IN', "Port in");
-define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN', "Securetype in");
+define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN', "Secure type in");
define('_AM_XNEWSLETTER_ACCOUNTS_OUTGOING', "Outgoing");
define('_AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT', "Server outgoing");
define('_AM_XNEWSLETTER_ACCOUNTS_PORT_OUT', "Port out");
-define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT', "Securetype out");
+define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT', "Secure type out");
define('_AM_XNEWSLETTER_ACCOUNTS_DEFAULT', "Default account");
-define('_AM_XNEWSLETTER_ACCOUNTS_BOUNCE_INFO', "Addtional info for Bounced emails handling");
+define('_AM_XNEWSLETTER_ACCOUNTS_BOUNCE_INFO', "Additional info for Bounced emails handling");
define('_AM_XNEWSLETTER_ACCOUNTS_USE_BMH', "Use Bounced emails handling");
define('_AM_XNEWSLETTER_ACCOUNTS_INBOX', "Mailbox to check for Bounced emails");
define('_AM_XNEWSLETTER_ACCOUNTS_HARDBOX', "Use this mailbox as 'hard box'");
@@ -172,8 +172,8 @@
define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS', "Open folders ");
define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH', "Bounced email handler ");
define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_INBOX', "Mailbox");
-define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX', "Hardbox");
-define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX', "Softbox");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX', "Hard box");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX', "Soft box");
define('_AM_XNEWSLETTER_CAT_ADD', "Add a category");
define('_AM_XNEWSLETTER_CAT_EDIT', "Edit a category");
define('_AM_XNEWSLETTER_CAT_DELETE', "Delete a category");
@@ -258,14 +258,14 @@
define('_AM_XNEWSLETTER_PROTOCOL_LAST_STATUS', "Last status");
define('_AM_XNEWSLETTER_PROTOCOL_MISC', "Misc protocol items");
define('_AM_XNEWSLETTER_PROTOCOL_NO_SUBSCREMAIL', "No email of recipient found");
-define('_AM_XNEWSLETTER_MAILINGLIST_ADD', "Add a Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLIST_EDIT', "Edit a Mailinglist");
-define('_AM_XNEWSLETTER_MAILINGLIST_DELETE', "Delete a Mailinglist");
+define('_AM_XNEWSLETTER_MAILINGLIST_ADD', "Add a Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLIST_EDIT', "Edit a Mailing list");
+define('_AM_XNEWSLETTER_MAILINGLIST_DELETE', "Delete a Mailing list");
define('_AM_XNEWSLETTER_MAILINGLIST_ID', "Id");
define('_AM_XNEWSLETTER_MAILINGLIST_NAME', "Name");
define('_AM_XNEWSLETTER_MAILINGLIST_EMAIL', "Email");
define('_AM_XNEWSLETTER_MAILINGLIST_EMAIL_DESC', "Email, where subscription code should be sending to");
-define('_AM_XNEWSLETTER_MAILINGLIST_LISTNAME', "Listname");
+define('_AM_XNEWSLETTER_MAILINGLIST_LISTNAME', "List name");
define('_AM_XNEWSLETTER_MAILINGLIST_SUBSCRIBE', "Subscribe code");
define('_AM_XNEWSLETTER_MAILINGLIST_SUBSCRIBE_DESC', "{email} will be replaced by the email of the subscriber");
define('_AM_XNEWSLETTER_MAILINGLIST_UNSUBSCRIBE', "Unsubscribe code");
@@ -358,7 +358,7 @@
define('_AM_XNEWSLETTER_TASK_LETTER_ID', "Letter");
define('_AM_XNEWSLETTER_TASK_SUBSCR_ID', "Subscriber");
define('_AM_XNEWSLETTER_TASK_STATUS', "Status");
-define('_AM_XNEWSLETTER_TASK_STARTTIME', "Starttime");
+define('_AM_XNEWSLETTER_TASK_STARTTIME', "Start time");
define('_AM_XNEWSLETTER_TASK_SUBMITTER', "Submitter");
define('_AM_XNEWSLETTER_TASK_CREATED', "Created");
define('_AM_XNEWSLETTER_TASK_ERROR_CREATE', "Error creating item in task list");
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php 2014-01-21 17:10:06 UTC (rev 12271)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php 2014-01-23 15:01:19 UTC (rev 12272)
@@ -28,7 +28,7 @@
// Main
define('_MA_XNEWSLETTER_INDEX', "Home");
define('_MA_XNEWSLETTER_TITLE', "xNewsletter");
-define('_MA_XNEWSLETTER_DESC', "Newsletter module for xoops");
+define('_MA_XNEWSLETTER_DESC', "Newsletter module for Xoops");
define('_MA_XNEWSLETTER_WELCOME', "<h2>Welcome in our newsletter system</h2>We hope, we can keep you up to date with our newsletters. Feel free to subscribe to one or more of our newsletters. If you do not want a newsletter any more, than you can easily unsubscribe here. You also can unsubscribe in a simple way via a link in each of our newsletters.");
define('_MA_XNEWSLETTER_ACCOUNTS', "Accounts");
define('_MA_XNEWSLETTER_CAT', "Category");
@@ -46,7 +46,7 @@
define('_MA_XNEWSLETTER_SUBSCRIPTION_EXIST_NONE', "No subscriptions existing");
define('_MA_XNEWSLETTER_REGISTRATION_EXIST', "Existing registrations of this email");
define('_MA_XNEWSLETTER_REGISTRATION_NONE', "Your email isn't registered till now. For subscriptions we need further information. Please fill in registration form.<br />We want to inform you, that your ip-address will be saved for the purpose of transparency.");
-define('_MA_XNEWSLETTER_REGISTRATION_ADD', "If you want, you can add more than one person to one email, and later on you can make different suscriptions");
+define('_MA_XNEWSLETTER_REGISTRATION_ADD', "If you want, you can add more than one person to one email, and later on you can make different subscriptions");
define('_MA_XNEWSLETTER_SUBSCRIPTION_ADD', "Add a new subscription");
define('_MA_XNEWSLETTER_SUBSCRIPTION_EDIT', "Edit subscriptions");
define('_MA_XNEWSLETTER_SUBSCRIPTION_DELETE', "Delete subscriptions");
@@ -71,8 +71,8 @@
define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_NO_CHANGE', "No changes in selection newsletter '%nl'");
define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_DAT_QUITED_REMOVED', "Date quit from newsletter '%nl' successful removed");
define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_SENT_INFO', "Information mail sent to '%e'");
-define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED', "<span style='color:red'>Attention: quited by the webmaster!</span>");
-define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED_DETAIL', "<span style='color:red'>Attention: This subscription has been quited by the webmaster at %q as a result of bounced emails! If you want to reactivate the subscription, please let this newsletter checked.</span>");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED', "<span style='color:red'>Attention: deactivated by the webmaster!</span>");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED_DETAIL', "<span style='color:red'>Attention: This subscription has been deactivated by the webmaster at %q as a result of bounced emails! If you want to reactivate the subscription, please let this newsletter checked.</span>");
define('_MA_XNEWSLETTER_UNSUBSCRIPTION_OK', "The email '%e' have been successfully unsubscribed from newsletter '%n'");
define('_MA_XNEWSLETTER_UNSUBSCRIPTION_ERROR', "Error while unsubscribe '%e' from newsletter '%n'");
define('_MA_XNEWSLETTER_SUBSCRIPTION_UPDATE_OK', "Your Newsletter has changed");
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php 2014-01-21 17:10:06 UTC (rev 12271)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/language/english/modinfo.php 2014-01-23 15:01:19 UTC (rev 12272)
@@ -27,7 +27,7 @@
*/
// Admin
define('_MI_XNEWSLETTER_NAME', "xNewsletter");
-define('_MI_XNEWSLETTER_DESC', "Newsletter module for xoops");
+define('_MI_XNEWSLETTER_DESC', "Newsletter module for Xoops");
//Menu
define('_MI_XNEWSLETTER_ADMENU1', "Dashboard");
define('_MI_XNEWSLETTER_ADMENU2', "Accounts");
@@ -37,7 +37,7 @@
define('_MI_XNEWSLETTER_ADMENU6', "Newsletters");
define('_MI_XNEWSLETTER_ADMENU7', "Attachments");
define('_MI_XNEWSLETTER_ADMENU8', "Protocols");
-define('_MI_XNEWSLETTER_ADMENU9', "Mailinglists");
+define('_MI_XNEWSLETTER_ADMENU9', "Mailing lists");
define('_MI_XNEWSLETTER_ADMENU10', "Bounced email handler");
define('_MI_XNEWSLETTER_ADMENU11', "Maintenance");
define('_MI_XNEWSLETTER_ADMENU12', "Import");
@@ -57,7 +57,7 @@
define('_MI_XNEWSLETTER_EDITOR', "Editor");
define('_MI_XNEWSLETTER_KEYWORDS', "Keywords");
define('_MI_XNEWSLETTER_KEYWORDS_DESC', "Insert here the keywords (separate by comma)");
-define('_MI_XNEWSLETTER_ADMINPERPAGE', "Number of list entries in admin pages");
+define('_MI_XNEWSLETTER_ADMINPERPAGE', "Number of list entries in administration pages");
define('_MI_XNEWSLETTER_ADMINPERPAGE_DESC', "Specifies how many items you want to display per page in the list.");
define('_MI_XNEWSLETTER_ADVERTISE', "Code of advertise");
define('_MI_XNEWSLETTER_ADVERTISE_DESC', "Insert here the code of advertisement");
@@ -65,7 +65,7 @@
define('_MI_XNEWSLETTER_SOCIALACTIVE_DESC', "If you want to see the buttons of social networks, click on Yes");
define('_MI_XNEWSLETTER_SOCIALCODE', "Code of social networks");
define('_MI_XNEWSLETTER_SOCIALCODE_DESC', "Insert here the code of social networks");
-define('_MI_XNEWSLETTER_ATTACHMENT_MAXSIZE', "Max file size");
+define('_MI_XNEWSLETTER_ATTACHMENT_MAXSIZE', "Maximum file size");
define('_MI_XNEWSLETTER_ATTACHMENT_MAXSIZE_DESC', "Maximum file size for attachments");
define('_MI_XNEWSLETTER_ATTACHMENT_MIMETYPES', "Mime-types");
define('_MI_XNEWSLETTER_ATTACHMENT_MIMETYPES_DESC', "Allowed mime-types for attachments");
@@ -80,7 +80,7 @@
define('_MI_XNEWSLETTER_USE_SALUTATION', "Use field salutation");
define('_MI_XNEWSLETTER_USE_SALUTATION_DESC', "Please decide, whether you want use salutations like 'Mr.', 'Mrs.',...");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES', "Send e-mails in packages");
-define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC', "Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediatly. You can use this option only, if you can start cronjobs with external programs.");
+define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_DESC', "Number of e-mails, which should be sent in one package. 0 means, that all e-mails always be sent immediately. You can use this option only, if you can start cronjobs with external programs.");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME', "Time period for sending e-mails in packages");
define('_MI_XNEWSLETTER_SEND_IN_PACKAGES_TIME_DESC', "Time period in minutes, when the next package should be sent. Only used, if 'Send e-mails in packages' is bigger than 0.");
define('_MI_XNEWSLETTER_UPGRADEFAILED', "Error while updating module");
|
|
From: <rgr...@us...> - 2014-01-21 17:10:09
|
Revision: 12271
http://sourceforge.net/p/xoops/svn/12271
Author: rgriffith
Date: 2014-01-21 17:10:06 +0000 (Tue, 21 Jan 2014)
Log Message:
-----------
Cleanup for #1271 - fix some installer issues
Supress expected warnings for cleaner appearance
Optimize detection of install condition in /index.php (will generate warning when /mainfile.php is not found)
Protector icon date warning
Disparity in parameter expectation between page_end and cleanup
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/common.inc.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/module_icon.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php 2014-01-20 16:42:38 UTC (rev 12270)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php 2014-01-21 17:10:06 UTC (rev 12271)
@@ -19,12 +19,12 @@
* @version $Id$
*/
-$mainfile = dirname(__FILE__) . '/mainfile.php';
-if (file_exists($mainfile)) {
- include $mainfile;
-} elseif (file_exists(dirname(__FILE__) . '/install/index.php')) {
- header('Location: install/index.php');
- exit;
+include dirname(__FILE__) . '/mainfile.php';
+if (!defined('XOOPS_MAINFILE_INCLUDED')) {
+ if (file_exists(dirname(__FILE__) . '/install/index.php')) {
+ header('Location: install/index.php');
+ exit;
+ }
}
$xoopsPreload =& XoopsPreload::getInstance();
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php 2014-01-20 16:42:38 UTC (rev 12270)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php 2014-01-21 17:10:06 UTC (rev 12271)
@@ -28,7 +28,7 @@
defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
$install_rename_suffix = $_POST['instsuffix'];
-if (preg_match('/^[a-z0-9]{23}$/', $install_rename_suffix)) {
+if (preg_match('/^[a-f0-9]{23}$/', $install_rename_suffix)) {
$installer_modified = "install_remove_" . $install_rename_suffix;
install_finalize($installer_modified);
echo "OK";
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/common.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/common.inc.php 2014-01-20 16:42:38 UTC (rev 12270)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/common.inc.php 2014-01-21 17:10:06 UTC (rev 12271)
@@ -39,7 +39,7 @@
$xoopsOption['nocommon'] = true;
session_start();
}
-include_once '../mainfile.php';
+@include '../mainfile.php';
if (!defined("XOOPS_ROOT_PATH")) {
define("XOOPS_ROOT_PATH", str_replace("\\", "/", realpath('../')));
}
@@ -52,6 +52,7 @@
$xoopsLogger->activated = true;
*/
+date_default_timezone_set(@date_default_timezone_get());
include './class/installwizard.php';
include_once '../include/version.php';
include_once './include/functions.php';
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php 2014-01-20 16:42:38 UTC (rev 12270)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php 2014-01-21 17:10:06 UTC (rev 12271)
@@ -157,7 +157,7 @@
<script type="text/javascript">
function ajaxCleanup()
{
- new Ajax.Request(<?php echo "'".XOOPS_URL."/install/cleanup.php'"; ?>, {
+ new Ajax.Request(<?php echo "'".@constant('XOOPS_URL')."/install/cleanup.php'"; ?>, {
method: 'post',
parameters: {instsuffix: <?php echo isset($install_rename_suffix)?"'".$install_rename_suffix."'":"''"; ?> }
});
@@ -169,6 +169,6 @@
**/
var filename = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
if (filename === 'page_end.php') {
- Event.observe(window,"load",ajaxCleanup);
+ Event.observe(window, 'load', ajaxCleanup);
}
</script>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php 2014-01-20 16:42:38 UTC (rev 12270)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php 2014-01-21 17:10:06 UTC (rev 12271)
@@ -31,9 +31,8 @@
setcookie('xo_install_user', '', null, null, null);
defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
-$install_rename_suffix = uniqid(mt_rand());
+$install_rename_suffix = uniqid(substr(md5($x = mt_rand()) . $x, -10));
$installer_modified = "install_remove_" . $install_rename_suffix;
-//register_shutdown_function('install_finalize', $installer_modified);
$pageHasForm = false;
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/module_icon.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/module_icon.php 2014-01-20 16:42:38 UTC (rev 12270)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/module_icon.php 2014-01-21 17:10:06 UTC (rev 12271)
@@ -7,6 +7,7 @@
$mydirpath = $registry->getEntry('mydirpath');
$language = $registry->getEntry('language');
// end hack by Trabis
+date_default_timezone_set(@date_default_timezone_get());
$icon_cache_limit = 3600 ; // default 3600sec == 1hour
|
|
From: <rgr...@us...> - 2014-01-20 16:42:43
|
Revision: 12270
http://sourceforge.net/p/xoops/svn/12270
Author: rgriffith
Date: 2014-01-20 16:42:38 +0000 (Mon, 20 Jan 2014)
Log Message:
-----------
Fix #1271 - styles, scripts and images missing on last page of install
Move install cleanup from php shutdown function to end of page load using ajax call.
Disable previous button on last page of installer (code was no longer there!)
Also, add change from 2.6.0 to eliminate dummy mainfile.php in the distribution.
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/class/pathcontroller.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php
Removed Paths:
-------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/mainfile.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php 2014-01-17 19:53:51 UTC (rev 12269)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/index.php 2014-01-20 16:42:38 UTC (rev 12270)
@@ -19,7 +19,13 @@
* @version $Id$
*/
-include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mainfile.php';
+$mainfile = dirname(__FILE__) . '/mainfile.php';
+if (file_exists($mainfile)) {
+ include $mainfile;
+} elseif (file_exists(dirname(__FILE__) . '/install/index.php')) {
+ header('Location: install/index.php');
+ exit;
+}
$xoopsPreload =& XoopsPreload::getInstance();
$xoopsPreload->triggerEvent('core.index.start');
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/class/pathcontroller.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/class/pathcontroller.php 2014-01-17 19:53:51 UTC (rev 12269)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/class/pathcontroller.php 2014-01-20 16:42:38 UTC (rev 12270)
@@ -72,7 +72,7 @@
if ( substr( $path, -1 ) == '/' ) {
$path = substr( $path, 0, -1 );
}
- if ( file_exists( "$path/mainfile.php" ) ) {
+ if ( file_exists( "$path/mainfile.dist.php" ) ) {
$this->xoopsPath['root'] = $path;
}
// Firstly, locate XOOPS lib folder out of XOOPS root folder
@@ -165,7 +165,7 @@
$path = 'root';
if ( is_dir( $this->xoopsPath[$path] ) && is_readable( $this->xoopsPath[$path] ) ) {
@include_once "{$this->xoopsPath[$path]}/include/version.php";
- if ( file_exists( "{$this->xoopsPath[$path]}/mainfile.php" ) && defined( 'XOOPS_VERSION' ) ) {
+ if ( file_exists( "{$this->xoopsPath[$path]}/mainfile.dist.php" ) && defined( 'XOOPS_VERSION' ) ) {
$this->validPath[$path] = 1;
}
}
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/cleanup.php 2014-01-20 16:42:38 UTC (rev 12270)
@@ -0,0 +1,38 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+/**
+ * Cleanup from install
+ *
+ * This is intended to be called using Ajax after the page_end.php script has loaded.
+ * This eliminates the problem of assets (.js, .css, .png, etc.) not being available
+ * because the install folder has been renamed. All assets should be loaded by this
+ * point, and no further installer action is expected.
+ *
+ * @copyright The XOOPS project http://www.xoops.org/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL)
+ * @package installer
+ * @since 2.5.7
+ * @author Richard Griffith <ri...@ge...>
+ * @version $Id: page_end.php 12051 2013-09-15 01:45:10Z beckmi $
+ */
+
+require_once './include/common.inc.php';
+defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
+
+$install_rename_suffix = $_POST['instsuffix'];
+if (preg_match('/^[a-z0-9]{23}$/', $install_rename_suffix)) {
+ $installer_modified = "install_remove_" . $install_rename_suffix;
+ install_finalize($installer_modified);
+ echo "OK";
+} else {
+ echo "FAILED";
+}
+exit;
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php 2014-01-17 19:53:51 UTC (rev 12269)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/install_tpl.php 2014-01-20 16:42:38 UTC (rev 12270)
@@ -132,7 +132,8 @@
</div>
<div id="buttons">
- <?php if ($wizard->pageIndex != 0) { ?>
+ <?php if ($wizard->pageIndex != 0
+ && $wizard->pageIndex != array_search('end', array_keys($wizard->pages))) { ?>
<button type="button" onclick="history.back()">
<?php echo BUTTON_PREVIOUS; ?>
</button>
@@ -154,48 +155,20 @@
</body>
</html>
<script type="text/javascript">
+ function ajaxCleanup()
+ {
+ new Ajax.Request(<?php echo "'".XOOPS_URL."/install/cleanup.php'"; ?>, {
+ method: 'post',
+ parameters: {instsuffix: <?php echo isset($install_rename_suffix)?"'".$install_rename_suffix."'":"''"; ?> }
+ });
+ }
+
/**
- * Checking url in browser
- * if page is install/page_end.php
- * use folder rename variables from
- * page_end.php to fetch js and css
+ * Check url in browser to see if it is for 'page_end.php'
+ * If it is, launch the cleanup via ajax.
**/
- var pathArray = window.location.pathname.split( '/' );
var filename = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
- var chkUrl = pathArray[2]+"/"+filename;
- if (chkUrl === 'install/page_end.php') {
- //window.location = newinstallurl;
- loadjscssfile(newPro, 'js');
- loadjscssfile(newINST, 'js');
- loadjscssfile(newCSSDeflt, 'css');
- loadjscssfile(newCSS, 'css');
- } else {
- // Do nothing
+ if (filename === 'page_end.php') {
+ Event.observe(window,"load",ajaxCleanup);
}
-
-/**
- * Load js and css files to header
- *
- * @param filename Filename based on var using $installer_modified if folder is renamed
- *
- * @param filetype js=javascript css=cascading style sheat
- *
- * @return boolean always true
- */
-function loadjscssfile(filename, filetype)
-{
- if (filetype == "js") { //if filename is a external JavaScript file
- // alert('called');
- var fileref = document.createElement('script');
- fileref.setAttribute("type", "text/javascript");
- fileref.setAttribute("src", filename);
- } elseif (filetype == "css") { //if filename is an external CSS file
- var fileref = document.createElement("link");
- fileref.setAttribute("rel", "stylesheet");
- fileref.setAttribute("type", "text/css");
- fileref.setAttribute("href", filename);
- }
- if (typeof fileref != "undefined")
- document.getElementsByTagName("head")[0].appendChild(fileref);
- }
</script>
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php 2014-01-17 19:53:51 UTC (rev 12269)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/page_end.php 2014-01-20 16:42:38 UTC (rev 12270)
@@ -28,35 +28,13 @@
require_once './include/common.inc.php';
$_SESSION = array();
-setcookie( 'xo_install_user', '', null, null, null );
+setcookie('xo_install_user', '', null, null, null);
defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
-$installer_modified = "install_remove_" . uniqid(mt_rand());
-register_shutdown_function('install_finalize', $installer_modified);
+$install_rename_suffix = uniqid(mt_rand());
+$installer_modified = "install_remove_" . $install_rename_suffix;
+//register_shutdown_function('install_finalize', $installer_modified);
-/**
- * Placing folder renamed in $_SESSION
- * and echoing to document for use in install_tpl.php
- **/
-
-$_SESSION['newinstallPRO'] = XOOPS_URL.'/'.$installer_modified.'/js/prototype-1.6.0.3.js';
-$_SESSION['newinstallINST'] = XOOPS_URL.'/'.$installer_modified.'/js/xo-installer.js';
-if (file_exists('language/' . $wizard->language . '/style.css')) {
-$_SESSION['newinstallCSSDeflt'] = XOOPS_URL.'/'.$installer_modified.'/css/style.css';
-$_SESSION['newinstallCSS'] = XOOPS_URL.'/'.$installer_modified.'/language/' . $wizard->language . '/style.css';
-} else {
-$_SESSION['newinstallCSSDeflt'] = XOOPS_URL.'/'.$installer_modified.'/css/style.css';
-$_SESSION['newinstallCSS'] = '';
-}
-
-$js = '<script type="text/javascript">';
-$js .= 'var newPro = '.json_encode($_SESSION["newinstallPRO"]).';';
-$js .= 'var newINST = '.json_encode($_SESSION["newinstallINST"]).';';
-$js .= 'var newCSS = '.json_encode($_SESSION["newinstallCSS"]).';';
-$js .= 'var newCSS = '.json_encode($_SESSION["newinstallCSSDeflt"]).';';
-$js .= '</script>';
-echo $js;
-
$pageHasForm = false;
$content = "";
Deleted: XoopsCore/branches/2.5.x/2.5.7/htdocs/mainfile.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/mainfile.php 2014-01-17 19:53:51 UTC (rev 12269)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/mainfile.php 2014-01-20 16:42:38 UTC (rev 12270)
@@ -1,19 +0,0 @@
-<?php
-/**
- * XOOPS main configuration file
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @version $Id$
- */
-
-if (! defined('XOOPS_INSTALL')) {
- header('Location: install/index.php');
-}
|
|
From: <luc...@us...> - 2014-01-17 19:53:58
|
Revision: 12269
http://sourceforge.net/p/xoops/svn/12269
Author: luciorota
Date: 2014-01-17 19:53:51 +0000 (Fri, 17 Jan 2014)
Log Message:
-----------
add language: xNewsletter 1.2 german
Added Paths:
-----------
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/admin.php
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/blocks.php
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/help.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/index.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/index.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/activate.tpl
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/delete.tpl
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/index.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/info_change.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/update.tpl
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/main.php
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/modinfo.php
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/basic.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/index.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/kletterfreaks.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/naturfreunde_gruen.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/naturfreunde_rot.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/naturfreunde_weiss.html
XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/templates/xoops.html
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/admin.php
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/admin.php (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/admin.php 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,375 @@
+<?php
+/**
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : 1 Mon 2012/11/05 14:31:32 : Exp $
+ * ****************************************************************************
+ */
+//General
+define('_AM_XNEWSLETTER_FORMOK', "Daten erfolgreich gespeichert");
+define('_AM_XNEWSLETTER_FORMDELOK', "Daten erfolgreich gelöscht");
+define('_AM_XNEWSLETTER_FORMDELNOTOK', "Fehler beim Löschen");
+define('_AM_XNEWSLETTER_FORMSUREDEL', "Wollen Sie <span class='bold red'>%s</span> wirklich löschen?");
+define('_AM_XNEWSLETTER_FORMSUREDEL_LIST', "Wollen Sie alle Protokolleinträge zu <span class='bold red'>%s</span> wirklich löschen?");
+define('_AM_XNEWSLETTER_FORMSURERENEW', "Wollen Sie <span class='bold red'>%s</span> wirklich ändern?");
+define('_AM_XNEWSLETTER_FORMUPLOAD', "Hochladen");
+define('_AM_XNEWSLETTER_FORMIMAGE_PATH', "In %s vorhandene Dateien");
+define('_AM_XNEWSLETTER_FORMACTION', "Aktion");
+define('_AM_XNEWSLETTER_ERROR_NO_VALID_ID', "Fehler: Keine gültige ID!");
+define('_AM_XNEWSLETTER_OK', "Erfolgreich");
+define('_AM_XNEWSLETTER_FAILED', "Fehlgeschlagen");
+define('_AM_XNEWSLETTER_SAVE', "Speichern");
+define('_AM_XNEWSLETTER_DETAILS', "Details anzeigen");
+define('_AM_XNEWSLETTER_SEARCH', "Suche");
+define('_AM_XNEWSLETTER_SEARCH_EQUAL', "=");
+define('_AM_XNEWSLETTER_SEARCH_CONTAINS', "enthält");
+define('_AM_ACCOUNTS_TYPE_PHPMAIL', "php mail()");
+define('_AM_ACCOUNTS_TYPE_PHPSENDMAIL', "php sendmail()");
+define('_AM_ACCOUNTS_TYPE_POP3', "POP3");
+define('_AM_ACCOUNTS_TYPE_SMTP', "Imap");
+define('_AM_ACCOUNTS_TYPE_GMAIL', "Gmail");
+define('_AM_ACCOUNTS_TYPE_NOTREQUIRED', "Nicht erforderlich");
+define('_AM_ACCOUNTS_TYPE_NAME', "Mein Kontoname");
+define('_AM_ACCOUNTS_TYPE_YOURNAME', "Max Mustermann");
+define('_AM_ACCOUNTS_TYPE_YOUREMAIL', "mus...@yo...");
+define('_AM_ACCOUNTS_TYPE_USERNAME', "Benutzername");
+define('_AM_ACCOUNTS_TYPE_PWD', "Passwort");
+define('_AM_ACCOUNTS_TYPE_POP3_SERVER_IN', "pop3.yourdomain.com");
+define('_AM_ACCOUNTS_TYPE_POP3_PORT_IN', "110");
+define('_AM_ACCOUNTS_TYPE_POP3_SERVER_OUT', "mail.yourdomain.com");
+define('_AM_ACCOUNTS_TYPE_POP3_PORT_OUT', "25");
+define('_AM_ACCOUNTS_TYPE_SMTP_SERVER_IN', "imap.yourdomain.com");
+define('_AM_ACCOUNTS_TYPE_SMTP_PORT_IN', "143");
+define('_AM_ACCOUNTS_TYPE_SMTP_SERVER_OUT', "mail.yourdomain.com");
+define('_AM_ACCOUNTS_TYPE_SMTP_PORT_OUT', "25");
+define('_AM_ACCOUNTS_TYPE_GMAIL_USERNAME', "you...@gm...");
+define('_AM_ACCOUNTS_TYPE_GMAIL_SERVER_IN', "imap.gmail.com");
+define('_AM_ACCOUNTS_TYPE_GMAIL_PORT_IN', "993");
+define('_AM_ACCOUNTS_TYPE_SECURETYPE_IN', "tls");
+define('_AM_ACCOUNTS_TYPE_GMAIL_SERVER_OUT', "smtp.gmail.com");
+define('_AM_ACCOUNTS_TYPE_GMAIL_PORT_OUT', "465");
+define('_AM_ACCOUNTS_TYPE_SECURETYPE_OUT', "ssl");
+define('_AM_ACCOUNTS_TYPE_CHECK', "Bitte Einstellungen überprüfen");
+define('_AM_XNEWSLETTER_LETTER_ACTION', "Aktion nach dem Speichern");
+define('_AM_XNEWSLETTER_LETTER_ACTION_SAVED', "Gespeichert");
+define('_AM_XNEWSLETTER_LETTER_ACTION_NO', "Keine Aktion");
+define('_AM_XNEWSLETTER_LETTER_ACTION_COPYNEW', "Kopie als neuen Newsletter");
+define('_AM_XNEWSLETTER_LETTER_ACTION_PREVIEW', "Vorschau anzeigen");
+define('_AM_XNEWSLETTER_LETTER_ACTION_SEND', "Newsletter an alle Abonnenten versenden");
+define('_AM_XNEWSLETTER_LETTER_ACTION_RESEND', "Newsletter neuerlich an alle Abonnenten versenden, bei denen der Sendevorgang fehlgeschlagen ist");
+define('_AM_XNEWSLETTER_LETTER_ACTION_SENDTEST', "Newsletter testweise verschicken");
+define('_AM_XNEWSLETTER_LETTER_EMAIL_TEST', "E-Mail zum Testen des Newsletters");
+define('_AM_XNEWSLETTER_LETTER_EMAIL_ALTBODY', "Um den Inhalt korrekt anzeigen zu lassen, verwenden Sie bitte einen HTML-kompatiblen E-Mail-Client!");
+define('_AM_XNEWSLETTER_LETTER_ERROR_INVALID_ATT_ID', "Fehler beim Löschen des Anhanges (ungültige ID)");
+define('_AM_XNEWSLETTER_SEND_SUCCESS', "Newsletter versendet");
+define('_AM_XNEWSLETTER_SEND_SUCCESS_TEST', "Newsletter zum Testen versendet");
+define('_AM_XNEWSLETTER_SEND_SUCCESS_NUMBER', "Senden von %t Newsletter(n) erfolgreich");
+define('_AM_XNEWSLETTER_SEND_SUCCESS_ML', "Verarbeitung Mailinglist erfolgreich");
+define('_AM_XNEWSLETTER_SEND_SUCCESS_ML_DETAIL', "Senden '%a' an Mailinglist erfolgreich");
+define('_AM_XNEWSLETTER_SEND_ERROR_NUMBER', "Fehler beim Senden des Newsletters: %e von %t Newslettern wurden nicht gesendet");
+define('_AM_XNEWSLETTER_SEND_ERROR_PHPMAILER', "Fehler phpmailer: ");
+define('_AM_XNEWSLETTER_SEND_ERROR_NO_EMAIL', "Fehler: Keine gültige E-Mail-Adresse vorhanden");
+define('_AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID', "Fehler: Kein gültiger Newsletter ausgewählt");
+define('_AM_XNEWSLETTER_SEND_ERROR_INALID_TEMPLATE_PATH', "Fehler: Vorlagenpfad '%p' nicht gefunden");
+define('_AM_XNEWSLETTER_SEND_SURE_SENT', "Dieser Newsletter wurde bereits an alle Abonnenten versendet.<br/>Wollen Sie diesen Newsletter wirklich noch einmal an alle Abonnenten versenden?");
+define('_AM_XNEWSLETTER_SEND_ERROR_NO_SUBSCR', "Fehler: Keine gültige Anmeldungen für den (die) ausgewählten Newsletter vorhanden");
+//Index
+define('_AM_XNEWSLETTER_LETTER', "Statistik Newsletter");
+define('_AM_XNEWSLETTER_THEREARE_ACCOUNTS', "Es sind <span class='bold'>%s</span> Sender-Konten vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_CAT', "Es sind <span class='bold'>%s</span> Newsletterkategorien vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_SUBSCR', "Es sind <span class='bold'>%s</span> Abonnenten vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_CATSUBSCR', "Es sind <span class='bold'>%s</span> Abonnenten zu Newsletterkategorien vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_LETTER', "Es sind <span class='bold'>%s</span> Newsletter vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_PROTOCOL', "Es sind <span class='bold'>%s</span> Protokolleinträge vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_ATTACHMENT', "Es sind <span class='bold'>%s</span> Anhänge vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_MAILINGLIST', "Es sind <span class='bold'>%s</span> Mailinglisten vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_BMH', "Es sind <span class='bold'>%s</span> Bounced-Mail-Handler-Einträge vorhanden");
+define('_AM_XNEWSLETTER_THEREARE_TASK', "Es sind <span class='bold'>%s</span> Aufgaben vorhanden");
+//Buttons
+define('_AM_XNEWSLETTER_NEWACCOUNTS', "Sender-Konto hinzufügen");
+define('_AM_XNEWSLETTER_ACCOUNTSLIST', "Sender-Konten auflisten");
+define('_AM_XNEWSLETTER_ACCOUNTSWAIT', "Offene Sender-Konten");
+define('_AM_XNEWSLETTER_NEWCAT', "Newsletterkategorie hinzufügen");
+define('_AM_XNEWSLETTER_CATLIST', "Newsletterkategorien auflisten");
+define('_AM_XNEWSLETTER_CATWAIT', "Offene Newsletterkategorien");
+define('_AM_XNEWSLETTER_NEWSUBSCR', "Abonnent hinzufügen");
+define('_AM_XNEWSLETTER_SUBSCRLIST', "Abonnenten auflisten");
+define('_AM_XNEWSLETTER_SUBSCRWAIT', "Offene Abonnenten");
+define('_AM_XNEWSLETTER_NEWCATSUBSCR', "Abonnent zu Newsletterkategorie hinzufügen");
+define('_AM_XNEWSLETTER_CATSUBSCRLIST', "Abonnenten zu Newsletterkategorien auflisten");
+define('_AM_XNEWSLETTER_CATSUBSCRWAIT', "Offene Abonnenten zu Newsletterkategorien");
+define('_AM_XNEWSLETTER_NEWLETTER', "Newsletter hinzufügen");
+define('_AM_XNEWSLETTER_LETTERLIST', "Newsletter auflisten");
+define('_AM_XNEWSLETTER_LETTERWAIT', "Offene Newsletter");
+define('_AM_XNEWSLETTER_LETTER_DELETE_ALL', "Protokoll von diesem Newsletter löschen");
+define('_AM_XNEWSLETTER_NEWPROTOCOL', "Protokolleintrag hinzufügen");
+define('_AM_XNEWSLETTER_PROTOCOLLIST', "Protokolleinträge auflisten");
+define('_AM_XNEWSLETTER_PROTOCOLWAIT', "Offene Protokolleinträge");
+define('_AM_XNEWSLETTER_NEWATTACHMENT', "Anhang hinzufügen");
+define('_AM_XNEWSLETTER_ATTACHMENTLIST', "Anhänge auflisten");
+define('_AM_XNEWSLETTER_ATTACHMENTWAIT', "Offene Anhänge");
+define('_AM_XNEWSLETTER_NEWMAILINGLIST', "Mailingliste hinzufügen");
+define('_AM_XNEWSLETTER_MAILINGLISTLIST', "Mailinglisten auflisten");
+define('_AM_XNEWSLETTER_MAILINGLISTWAIT', "Offene Mailinglisten");
+define('_AM_XNEWSLETTER_RUNBMH', "Bounced-Mail-Handler starten");
+define('_AM_XNEWSLETTER_BMHLIST', "Ergebnisse Bounced-Mail-Handler auflisten");
+define('_AM_XNEWSLETTER_BMHWAIT', "Offene Ergebnisse Bounced-Mail-Handler");
+define('_AM_XNEWSLETTER_ACCOUNTS_ADD', "E-Mail-Konto hinzufügen");
+define('_AM_XNEWSLETTER_ACCOUNTS_EDIT', "E-Mail-Konto bearbeiten");
+define('_AM_XNEWSLETTER_ACCOUNTS_DELETE', "E-Mail-Konto löschen");
+define('_AM_XNEWSLETTER_ACCOUNTS_ID', "Id");
+define('_AM_XNEWSLETTER_ACCOUNTS_TYPE', "Typ");
+define('_AM_XNEWSLETTER_ACCOUNTS_NAME', "Name");
+define('_AM_XNEWSLETTER_ACCOUNTS_YOURNAME', "Anzeigename");
+define('_AM_XNEWSLETTER_ACCOUNTS_YOURMAIL', "E-Mail-Adresse");
+define('_AM_XNEWSLETTER_ACCOUNTS_USERNAME', "Benutzername");
+define('_AM_XNEWSLETTER_ACCOUNTS_PASSWORD', "Passwort");
+define('_AM_XNEWSLETTER_ACCOUNTS_INCOMING', "Eingangsserver");
+define('_AM_XNEWSLETTER_ACCOUNTS_SERVER_IN', "Mailserver");
+define('_AM_XNEWSLETTER_ACCOUNTS_PORT_IN', "Port");
+define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN', "Sicherheitstyp");
+define('_AM_XNEWSLETTER_ACCOUNTS_OUTGOING', "Ausgangsserver");
+define('_AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT', "Mailserver");
+define('_AM_XNEWSLETTER_ACCOUNTS_PORT_OUT', "Port");
+define('_AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT', "Sicherheitstyp");
+define('_AM_XNEWSLETTER_ACCOUNTS_DEFAULT', "Standard E-Mail-Konto");
+define('_AM_XNEWSLETTER_ACCOUNTS_BOUNCE_INFO', "Zusätzliche Infos für Bounced-Mail-Handler");
+define('_AM_XNEWSLETTER_ACCOUNTS_USE_BMH', "Bounced-Mail-Handler verwenden");
+define('_AM_XNEWSLETTER_ACCOUNTS_INBOX', "Mailbox für Überprüfung durch Bounced-Mail-Handler");
+define('_AM_XNEWSLETTER_ACCOUNTS_HARDBOX', "Verwende diese Mailbox als 'hardbox'");
+define('_AM_XNEWSLETTER_ACCOUNTS_HARDBOX_DESC', "Der Mailboxname muss mit 'INBOX.' beginnen. Sie können entweder einen Standard-Ordner in Ihrer Mailbox verwenden (z.B. INBOX.Trash) oder Sie erstellen einen eigenen Odner wie z.B.'hard' oder 'soft' (dies wird empfohlen). Wenn Sie einen neuen Ordnernamen angeben, wird dieser automatisch erstellt (diese Funktion wird jedoch von Gmail-Konten aus Sicherheitsgründen nicht unterstützt).");
+define('_AM_XNEWSLETTER_ACCOUNTS_MOVEHARD', "Als 'hard' klassifizierte Bounced Mails in 'hardbox' verschieben");
+define('_AM_XNEWSLETTER_ACCOUNTS_SOFTBOX', "Verwende diese Mailbox als 'softbox'");
+define('_AM_XNEWSLETTER_ACCOUNTS_MOVESOFT', "Als 'soft' klassifizierte Bounced Mails in 'softbox' verschieben");
+define('_AM_XNEWSLETTER_ACCOUNTS_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_ACCOUNTS_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_ACCOUNTS_ERROR_OPEN_MAILBOX', "Fehler beim Öffnen der Mailbox! Bitte Einstellungen überprüfen!");
+define('_AM_XNEWSLETTER_SAVE_AND_CHECK', "Speichern und Einstellungen überprüfen");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_OK', "erfolgreich ");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED', "fehlgeschlagen ");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_SKIPPED', "übersprungen ");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK', "Überprüfungsergebnis");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_INFO', "Zusätzliche Infos");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX', "Öffnen Mailbox ");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS', "Öffnen Ordner ");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH', "Bounced-Mail-Handler ");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_INBOX', "Mailbox");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX', "Hardbox");
+define('_AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX', "Softbox");
+define('_AM_XNEWSLETTER_CAT_ADD', "Newsletterkategorie hinzufügen");
+define('_AM_XNEWSLETTER_CAT_EDIT', "Newsletterkategorie bearbeiten");
+define('_AM_XNEWSLETTER_CAT_DELETE', "Newsletterkategorie löschen");
+define('_AM_XNEWSLETTER_CAT_ID', "Id");
+define('_AM_XNEWSLETTER_CAT_NAME', "Newsletter Name");
+define('_AM_XNEWSLETTER_CAT_INFO', "Zusätzliche Infos");
+define('_AM_XNEWSLETTER_CAT_GPERMS_CREATE', "Berechtigung zum Erstellen");
+define('_AM_XNEWSLETTER_CAT_GPERMS_CREATE_DESC', "<br/><span style='font-weight:normal'>- Erstellen neuer Newsletter<br/>- Bearbeiten, Löschen und Senden der eigenen Newsletter</span>");
+define('_AM_XNEWSLETTER_CAT_GPERMS_ADMIN', "Berechtigung zum Verwalten");
+define('_AM_XNEWSLETTER_CAT_GPERMS_ADMIN_DESC', "<br/><span style='font-weight:normal'>Bearbeiten, Löschen und Senden aller Newslettter dieser Kategorie</span>");
+define('_AM_XNEWSLETTER_CAT_GPERMS_READ', "Berechtigung zum Lesen/Abonnieren");
+define('_AM_XNEWSLETTER_CAT_GPERMS_LIST', "Berechtigung zum Anzeigen der Liste der Abonnenten");
+define('_AM_XNEWSLETTER_CAT_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_CAT_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_CAT_MAILINGLIST', "Mailingliste");
+define('_AM_XNEWSLETTER_SUBSCR_ADD', "Abonnenten hinzufügen");
+define('_AM_XNEWSLETTER_SUBSCR_EDIT', "Abonnenten bearbeiten");
+define('_AM_XNEWSLETTER_SUBSCR_DELETE', "Abonnenten löschen");
+define('_AM_XNEWSLETTER_SUBSCR_ID', "Id");
+define('_AM_XNEWSLETTER_SUBSCR_EMAIL', "E-Mail-Adresse");
+define('_AM_XNEWSLETTER_SUBSCR_FIRSTNAME', "Vorname");
+define('_AM_XNEWSLETTER_SUBSCR_LASTNAME', "Familienname");
+define('_AM_XNEWSLETTER_SUBSCR_UID', "Mitgliedsname");
+define('_AM_XNEWSLETTER_SUBSCR_SEX', "Anrede");
+define('_AM_XNEWSLETTER_SUBSCR_SEX_EMPTY', "");
+define('_AM_XNEWSLETTER_SUBSCR_SEX_MALE', "Herr");
+define('_AM_XNEWSLETTER_SUBSCR_SEX_FEMALE', "Frau");
+define('_AM_XNEWSLETTER_SUBSCR_SEX_FAMILY', "Familie");
+define('_AM_XNEWSLETTER_SUBSCR_SEX_COMP', "Firma");
+define('_AM_XNEWSLETTER_SUBSCR_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_SUBSCR_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_SUBSCR_ACTIVATED', "aktiviert?");
+define('_AM_XNEWSLETTER_SUBSCR_SHOW_ALL', "Alle anzeigen");
+define('_AM_XNEWSLETTER_CATSUBSCR_ADD', "Abonnent zu Newsletterkategorie hinzufügen");
+define('_AM_XNEWSLETTER_CATSUBSCR_EDIT', "Abonnent/Newsletterkategorie bearbeiten");
+define('_AM_XNEWSLETTER_CATSUBSCR_DELETE', "Abonnent/Newsletterkategorie löschen");
+define('_AM_XNEWSLETTER_CATSUBSCR_ID', "Id");
+define('_AM_XNEWSLETTER_CATSUBSCR_CATID', "Newsletter");
+define('_AM_XNEWSLETTER_CATSUBSCR_SUBSCRID', "Abonnenten");
+define('_AM_XNEWSLETTER_CATSUBSCR_QUITED', "Beendet");
+define('_AM_XNEWSLETTER_CATSUBSCR_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_CATSUBSCR_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_CATSUBSCR_SUREDELETE', "Wollen Sie <br />'%s'<br /> wirklich von<br />'%c' entfernen?");
+define('_AM_XNEWSLETTER_CATSUBSCR_QUIT_NONE', "Nein");
+define('_AM_XNEWSLETTER_CATSUBSCR_QUIT_NOW', "Jetzt beenden");
+define('_AM_XNEWSLETTER_CATSUBSCR_QUIT_REMOVE', "Beendigungsdatum wieder entfernen");
+define('_AM_XNEWSLETTER_LETTER_ADD', "Newsletter hinzufügen");
+define('_AM_XNEWSLETTER_LETTER_EDIT', "Newsletter bearbeiten");
+define('_AM_XNEWSLETTER_LETTER_DELETE', "Newsletter löschen");
+define('_AM_XNEWSLETTER_LETTER_ID', "Id");
+define('_AM_XNEWSLETTER_LETTER_TITLE', "Titel");
+define('_AM_XNEWSLETTER_LETTER_CONTENT', "Inhalt");
+define('_AM_XNEWSLETTER_LETTER_TEMPLATE', "Vorlage");
+define('_AM_XNEWSLETTER_LETTER_CATS', "Newsletterkategorie");
+define('_AM_XNEWSLETTER_LETTER_ATTACHMENT', "Anhänge");
+define('_AM_XNEWSLETTER_LETTER_STATUS', "Status");
+define('_AM_XNEWSLETTER_LETTER_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_LETTER_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_LETTER_ACCOUNTS_AVAIL', "Verfügbare Sende-Konten");
+define('_AM_XNEWSLETTER_LETTER_ACCOUNT', "Konto");
+define('_AM_XNEWSLETTER_LETTER_MAILINGLIST', "Mailingliste verwenden");
+define('_AM_XNEWSLETTER_LETTER_MAILINGLIST_NO', "Nein");
+define('_AM_XNEWSLETTER_ATTACHMENT_ADD', "Anhang hinzufügen");
+define('_AM_XNEWSLETTER_ATTACHMENT_EDIT', "Anhang bearbeiten");
+define('_AM_XNEWSLETTER_ATTACHMENT_DELETE', "Anhang löschen");
+define('_AM_XNEWSLETTER_ATTACHMENT_ID', "Id");
+define('_AM_XNEWSLETTER_ATTACHMENT_LETTER_ID', "newsletter");
+define('_AM_XNEWSLETTER_ATTACHMENT_NAME', "Name");
+define('_AM_XNEWSLETTER_ATTACHMENT_TYPE', "Dateityp");
+define('_AM_XNEWSLETTER_ATTACHMENT_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_ATTACHMENT_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_PROTOCOL_ADD', "Protokolleintrag hinzufügen");
+define('_AM_XNEWSLETTER_PROTOCOL_EDIT', "Protokolleintrag bearbeiten");
+define('_AM_XNEWSLETTER_PROTOCOL_DELETE', "Protokolleintrag löschen");
+define('_AM_XNEWSLETTER_PROTOCOL_ID', "Id");
+define('_AM_XNEWSLETTER_PROTOCOL_LETTER_ID', "Newsletter");
+define('_AM_XNEWSLETTER_PROTOCOL_SUBSCRIBER_ID', "Abonnent");
+define('_AM_XNEWSLETTER_PROTOCOL_STATUS', "Status");
+define('_AM_XNEWSLETTER_PROTOCOL_SUCCESS', "Erfolgreich");
+define('_AM_XNEWSLETTER_PROTOCOL_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_PROTOCOL_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_PROTOCOL_LAST_STATUS', "Letzter Status");
+define('_AM_XNEWSLETTER_PROTOCOL_MISC', "Diverse Protokolleinträge");
+define('_AM_XNEWSLETTER_PROTOCOL_NO_SUBSCREMAIL', "E-Mail-Adresse des Empfängers nicht mehr vorhanden");
+define('_AM_XNEWSLETTER_MAILINGLIST_ADD', "Mailingliste hinzufügen");
+define('_AM_XNEWSLETTER_MAILINGLIST_EDIT', "Mailingliste bearbeiten");
+define('_AM_XNEWSLETTER_MAILINGLIST_DELETE', "Mailingliste löschen");
+define('_AM_XNEWSLETTER_MAILINGLIST_ID', "Id");
+define('_AM_XNEWSLETTER_MAILINGLIST_NAME', "Name");
+define('_AM_XNEWSLETTER_MAILINGLIST_EMAIL', "E-Mail");
+define('_AM_XNEWSLETTER_MAILINGLIST_EMAIL_DESC', "An-/Abmeldungen an folgende E-Mail-Adresse senden");
+define('_AM_XNEWSLETTER_MAILINGLIST_LISTNAME', "Listenname");
+define('_AM_XNEWSLETTER_MAILINGLIST_SUBSCRIBE', "Code für Anmeldung");
+define('_AM_XNEWSLETTER_MAILINGLIST_SUBSCRIBE_DESC', "{email} wird durch die E-Mail-Adresse des Abonnenten ersetzt");
+define('_AM_XNEWSLETTER_MAILINGLIST_UNSUBSCRIBE', "Code für Abmeldung");
+define('_AM_XNEWSLETTER_MAILINGLIST_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_MAILINGLIST_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_BOUNCETYPE', "Bounce-Typ");
+define('_AM_XNEWSLETTER_BMH_EDIT', "Bounced-Mail-Handler-Eintrag bearbeiten");
+define('_AM_XNEWSLETTER_BMH_DELETE', "Bounced-Mail-Handler-Eintrag löschen");
+define('_AM_XNEWSLETTER_BMH_ID', "Id");
+define('_AM_XNEWSLETTER_BMH_RULE_NO', "Regel Nr.");
+define('_AM_XNEWSLETTER_BMH_RULE_CAT', "Regelkategorie");
+define('_AM_XNEWSLETTER_BMH_BOUNCETYPE', "Bounce-Typ");
+define('_AM_XNEWSLETTER_BMH_REMOVE', "Gelöscht");
+define('_AM_XNEWSLETTER_BMH_EMAIL', "E-Mail");
+define('_AM_XNEWSLETTER_BMH_SUBJECT', "Betreff");
+define('_AM_XNEWSLETTER_BMH_MEASURE', "Maßnahme");
+define('_AM_XNEWSLETTER_BMH_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_BMH_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_BMH_MEASURE_PENDING', "Offen");
+define('_AM_XNEWSLETTER_BMH_MEASURE_NOTHING', "Keine Maßnahme");
+define('_AM_XNEWSLETTER_BMH_MEASURE_QUIT', "Diesen Abonnenten vorübergehend stilllegen");
+define('_AM_XNEWSLETTER_BMH_MEASURE_DELETE', "Diesen Abonnenten löschen");
+define('_AM_XNEWSLETTER_BMH_MEASURE_QUITED', "Abonnent vorübergehend stillgelegt");
+define('_AM_XNEWSLETTER_BMH_MEASURE_DELETED', "Abonnent gelöscht");
+define('_AM_XNEWSLETTER_BMH_MEASURE_ALREADY_DELETED', "Abonnenten bereits gelöscht! Aktion nicht möglich!");
+define('_AM_XNEWSLETTER_BMH_MEASURE_DELETE_SURE', "Sind Sie sicher, dass Sie diese Registrierung mit allen Newsletteranmeldungen löschen wollen?<br /><br />Eine spätere Reaktivierung durch den Abonnenten ist nicht mehr möglich!<br/><br />");
+define('_AM_XNEWSLETTER_BMH_ERROR_NO_SUBSCRID', "Für die angegebene E-Mail-Adresse konnte keine Registrierung gefunden werden!");
+define('_AM_XNEWSLETTER_BMH_ERROR_NO_ACTIVE', "Bounced-Mail-Handler ist bei keinem E-Mail-Konto aktiviert");
+define('_AM_XNEWSLETTER_BMH_RSLT', "Ergebnis der Überprüfung der Mailbox %b<br/>Anzahl gelesene Nachrichten: %r<br/>Anzahl durchgeführte Aktionen: %a<br/>Anzahl ohne Aktionen: %n<br/>Anzahl verschobene Mails: %m<br/>Anzahl gelöschte Mails: %d<br/><br/><br/>");
+define('_AM_XNEWSLETTER_BMH_SUCCESSFUL', "Bounced-Mail-Handler erfolgreich beendet");
+define('_AM_XNEWSLETTER_BMH_MEASURE_ALL', "Alle anzeigen");
+define('_AM_XNEWSLETTER_BMH_MEASURE_SHOW_NONE', "Keine Bounced-Mail-Handler-Einträge für '%s' vorhanden");
+define('_AM_XNEWSLETTER_MAINTENANCE_CAT', "Kategorie");
+define('_AM_XNEWSLETTER_MAINTENANCE_DESCR', "Beschreibung");
+define('_AM_XNEWSLETTER_MAINTENANCE_PARAM', "Parameter");
+define('_AM_XNEWSLETTER_MAINTENANCE_ERROR', "Bei der Wartung ist ein Fehler aufgetreten");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETEDATE', "Alle unbestätigten Anmeldung vor diesem Datum löschen.<br />Achtung! Aktion kann nicht rückgängig gemacht werden! Bitte Datum korrekt prüfen!");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETEUSER', "Soll(en) die <b>%s</b> unbestätigte(n) Anmeldung(en) vor dem %s werden jetzt gelöscht.<br />Aktion ist unwiderruflich!");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETEPROTOCOL', "alle Protokolle löschen und Tabelle zurücksetzen");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETEPROTOK', "Protokolltabelle wurde gewartet.");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETENOTHING', "Derzeit keine Aktion notwendig.");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETEUSEROK', "Es wurden %s User entfernt");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_SUBCR', "Anmeldungen zu Newslettern löschen, wenn keine aufrechte Registrierung besteht");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_SUBCR_OK', "Es wurden %s fehlerhafte Anmeldungen entfernt");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_SUBCR_NODATA', "Keine fehlerhaften Datensätze in Tabelle catsubsr vorhanden");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_ML', "Daten Newsletterkategorien und Mailinglisten abgleichen und fehlerhafte Datensätze bereinigen");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_ML_OK', "%s fehlerhafte Daten Mailinglisten wurden bereinigt");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_ML_NODATA', "Keine fehlerhaften Datensätze Mailinglisten vorhanden");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_CATNL', "Daten Newsletterkategorien und Newsletter abgleichen und fehlerhafte Datensätze bereinigen");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_CATNL_OK', "%s fehlerhafte Daten bei Newslettern wurden bereinigt");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_INVALID_CATNL_NODATA', "Keine fehlerhaften Datensätze bei Newslettern vorhanden");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_IMPORT', "Importtabelle leeren und Tabelle zurücksetzen");
+define('_AM_XNEWSLETTER_MAINTENANCE_DELETE_IMPORT_OK', "Importtabelle wurde gewartet.");
+define('_AM_XNEWSLETTER_IMPORT_SEARCH', "Suche verfügbare E-Mail-Adressen für Import");
+define('_AM_XNEWSLETTER_IMPORT_PRESELECT_CAT', "Vorauswahl Newsletterkategorie");
+define('_AM_XNEWSLETTER_IMPORT_PLUGINS_AVAIL', "Verfügbare Plugins");
+define('_AM_XNEWSLETTER_IMPORT_CONTINUE', "Weiter");
+define('_AM_XNEWSLETTER_IMPORT_AFTER_READ', "Aktion nach dem Einlesen der Daten");
+define('_AM_XNEWSLETTER_IMPORT_READ_CHECK', "Daten zur Überprüfung anzeigen");
+define('_AM_XNEWSLETTER_IMPORT_CHECK_LIMIT', "Limit an E-Mail-Adressen für Import");
+define('_AM_XNEWSLETTER_IMPORT_CHECK_LIMIT_PACKAGE', "Limit an E-Mail-Adressen pro Verarbeitungschritt");
+define('_AM_XNEWSLETTER_IMPORT_NOLIMIT', "Ohne Limit");
+define('_AM_XNEWSLETTER_IMPORT_READ_IMPORT', "Daten ohne Überprüfung sofort importieren");
+define('_AM_XNEWSLETTER_IMPORT_SHOW', "Zeige %s bis %l von %n verfügbaren E-Mail-Adressen");
+define('_AM_XNEWSLETTER_IMPORT_NODATA', "Keine Daten gefunden");
+define('_AM_XNEWSLETTER_IMPORT_EMAIL_EXIST', "E-Mail bereits registriert");
+define('_AM_XNEWSLETTER_IMPORT_CATSUBSCR_EXIST', "Anmeldung bereits vorhanden");
+define('_AM_XNEWSLETTER_IMPORT_NOIMPORT', "-- Kein Import --");
+define('_AM_XNEWSLETTER_IMPORT_EXEC', "Import E-Mail-Adressen laut Einstellungen");
+define('_AM_XNEWSLETTER_IMPORT_RESULT_SKIP', "Import E-Mail-Adresse %e übersprungen");
+define('_AM_XNEWSLETTER_IMPORT_RESULT_FAILED', "Import E-Mail-Adresse %e fehlgeschlagen");
+define('_AM_XNEWSLETTER_IMPORT_RESULT_REG_OK', "Registrierung erfolgreich");
+define('_AM_XNEWSLETTER_IMPORT_RESULT_SUBSCR_OK', "Anmeldung zu Newsletter erfolgreich");
+define('_AM_XNEWSLETTER_IMPORT_SKIP_EXISTING', "Existierende Newsletteranmeldungen überspringen");
+define('_AM_XNEWSLETTER_IMPORT_FINISHED', "Verarbeitung %p von %t E-Mail-Adressen erfolgreich beendet");
+define('_AM_XNEWSLETTER_IMPORT_INFO', "Alle User aus den gewählten Gruppen zum Newsletter hinzufügen");
+define('_AM_XNEWSLETTER_IMPORT_CSV_OPT', "Optionen für CSV-Datei");
+define('_AM_XNEWSLETTER_IMPORT_CSV_FILE', "CSV-Datei:");
+define('_AM_XNEWSLETTER_IMPORT_CSV_DELIMITER', "Delimiter:");
+define('_AM_XNEWSLETTER_IMPORT_CSV_HEADER', "CSV-Datei mit Kopfzeile");
+define('_AM_XNEWSLETTER_IMPORT_CSV', "Eine Spalte ( email ) oder vier Spalten ( email | anrede | vorname | nachname)<br />siehe sample1col.csv und sample4col.csv in /plugins");
+define('_AM_XNEWSLETTER_IMPORT_XOOPSUSER', "Optionen für Import/Syncronisation XoopsUsers");
+define('_AM_XNEWSLETTER_IMPORT_XOOPSUSER_GROUPS', "Gruppe wählen");
+define('_AM_XNEWSLETTER_NEWTASK', "Neue Aufgabe erstellen");
+define('_AM_XNEWSLETTER_TASKLIST', "Aufgaben auflisten");
+define('_AM_XNEWSLETTER_TASK_ADD', "Aufgabe hinzufügen");
+define('_AM_XNEWSLETTER_TASK_EDIT', "Aufgabe bearbeiten");
+define('_AM_XNEWSLETTER_TASK_DELETE', "Aufgabe löschen");
+define('_AM_XNEWSLETTER_TASK_ID', "Id");
+define('_AM_XNEWSLETTER_TASK_LETTER_ID', "Newsletter");
+define('_AM_XNEWSLETTER_TASK_SUBSCR_ID', "Empfänger");
+define('_AM_XNEWSLETTER_TASK_STATUS', "Status");
+define('_AM_XNEWSLETTER_TASK_STARTTIME', "Startzeit");
+define('_AM_XNEWSLETTER_TASK_SUBMITTER', "Einsender");
+define('_AM_XNEWSLETTER_TASK_CREATED', "Erstellt am");
+define('_AM_XNEWSLETTER_TASK_ERROR_CREATE', "Fehler beim Erstellen des Aufgabenliste");
+define('_AM_XNEWSLETTER_TASK_NO_DATA', "Keine Aufgaben vorhanden");
+//Error NoFrameworks
+define('_AM_XNEWSLETTER_NOFRAMEWORKS', "Fehler: Sie verwenden das Frameworks \"admin module\" nicht. Bitte installieren Sie dieses Frameworks");
+define('_AM_XNEWSLETTER_MAINTAINEDBY', "wird unterstützt von ");
+define('_AM_XNEWSLETTER_SEND_ERROR_NO_LETTERCONTENT', "Kein Text zum Drucken vorhanden");
+define('_AM_XNEWSLETTER_FORMSEARCH_SUBSCR_EXIST', "Suche vorhandene Registrierungen anhand einer E-Mail-Adresse");
+define('_AM_XNEWSLETTER_SUBSCR_NO_CATSUBSCR', "Für diese E-Mail-Adresse sind keine Anmeldungen zu Newsletterkategorien vorhanden");
+//version 1.2
+define('_AM_XNEWSLETTER_IMPORT_ERROR_NO_PLUGIN', "Fehler: Erforderliche Datei 'plugins/%p.php' nicht gefunden!");
+define('_AM_XNEWSLETTER_IMPORT_ERROR_NO_FUNCTION', "Fehler: Erforderliche Funktion 'xnewsletter_plugin_getdata_%f' nicht vorhanden!");
+?>
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/blocks.php
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/blocks.php (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/blocks.php 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,30 @@
+<?php
+/**
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : 1 Mon 2012/11/05 14:31:32 : Exp $
+ * ****************************************************************************
+ */
+define('_MB_XNEWSLETTER_CATSUBSCR_ALLCAT', "Alle Newsletterkategorien");
+define('_MB_XNEWSLETTER_LETTER_DISPLAY', "Anzahl der Einträge");
+define('_MB_XNEWSLETTER_LETTER_TITLELENGTH', "Länge des Newsletternamens (0 bedeutet kein Limit)");
+define('_MB_XNEWSLETTER_LETTER_CATTODISPLAY', "Welche Newsletterkategorien angezeigt werden, wird über die Rechtevergabe bei den Kategorien geregelt");
+?>
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/help.html
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/help.html (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/help.html 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,212 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * goffy ( )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright goffy ( )
+ * @license gpl 2.0
+ * @package xNewsletter
+ * @author goffy ( )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+<div id="help-template" class="outer">
+ <h1 class="head">Help:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/xNewsletter/admin/index.php"
+ title="Zurück zur xNewsletter-Administration"> Zurück zur xNewsletter-Administration <img src="<{xoAdminIcons home.png}>" alt="Zurück zur xNewsletter-Administration"/>
+ </a></h1>
+ <!-- -----Help Content ---------- -->
+ <h4 class="odd">Beschreibung</h4>
+ <p class="even">
+ Newsletter-Modul für Xoops<br /><br />
+ Das Modul basiert auf dem PHPMailer und PHPMailer-BMH.<br />
+ Funktionen in Kürze:<br />
+ - Verwendung mehrere E-Mail-Konten möglich<br />
+ - Verwaltung mehrerer Newsletter möglich<br />
+ - Anmeldeverfahren optional mit Bestätigungsverfahren (double-opt-in)<br />
+ - Detailierte Rechteverwaltung für Anmeldeverfahren<br />
+ - Newsletter templatebasiert<br />
+ - Detailierte Rechteverwaltung je Gruppe und Newsletter (Abonnieren/Lesen, Schreiben, Senden)<br />
+ - Senden: testweises Senden, Wiederholung des Sendevorganges für alle Empfänger oder nur für fehlgeschlagene Sendevorgänge<br />
+ - Der Newsletter kann an eine unlimitiert Anzahl an Empfängern versendet werden oder in Paketen mit einer bestimmten Anzahl an Empfängern durch Verwendung eines Cronjobs<br />
+ - Bounced mail handler für die Verwaltung der ungültigen/nicht mehr gültigen E-Mail-Adressen<br />
+ - Optional Syncronisierung mit Mailinglisten (z.B. majordomo)<br />
+ - Wartungsfunktion enthalten<br />
+ - Protokollierung der wichtigsten Vorgänge<br />
+ <br />
+ </p>
+ <h4 class="odd">Installation/Deinstallation</h4>
+ <p class="even">
+ Es sind keine speziellen Maßnahmen erforderlich, führen Sie den Standardinstallationsprozess aus:<br/>
+ - Extrahieren Sie den Ordner xNewsletter in das Module-Verzeichnis<br/>
+ - Installieren Sie das Modul über Administration -> Module<br/>
+ Wenn Sie zustätzliche Informationen benötigen, lesen Sie die Installationshinweise unter <a href="http://goo.gl/adT2i">XOOPS Operations
+ Manual</a>.<br /><br /></p>
+ <h4 class="odd">Tutorial</h4>
+ <!-- -----Help Content ---------- -->
+
+
+ <h5 class="odd">Grundsätzliche Informationen</h5>
+ <p class="even">Das Modul basiert auf dem PHPMailer und PHPMailer-BMH
+ <br /><br /></p>
+
+ <h5 class="odd">An- und Abmeldungen zu Newslettern</h5>
+ <p class="even">
+ Für die einzelnen Newsletter bzw. für bestimmte Gruppen kann festgelegt werden, ob An-/Abmeldungen bzw. Änderungen eine Bestätigungsmail mit Aktivierungsschlüssel erforderlich ist oder nicht (verwendet Double-Opt-in).<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">E-Mail-Konten</h5>
+ <p class="even">
+ Sie können ein oder mehrere Konten verwenden. Das Verwenden von php mail(), php sendmail(), pop3, smtp und Googlemail ist möglich.<br/>
+ Mit einem Zusatzfeature können die Einstellungen überprüft werden.<br/>
+ <br />
+ Achtung: Funktionen wie das Testen der Kontoeinstellungen, das Versenden von Mails, die Verwendung des Bounced Mail Handlers funktionieren normalerweise nicht auf einen lokalen Server,... (Sie erhalten eine weiße Seite ohne Fehlermeldung).<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">Newsletter-Kategorien</h5>
+ <p class="even">
+ Sie können eine oder mehrere Newsletter (Newsletter-Kategorien) verwalten.<br/>
+ Die Berechtigungen für "Lesen", "Erstellen", "Verwalten" bzw. "Auflisten der Abonnenten" können für jede Newsletter-Kategorie seperat eingestellt werden.<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">Newsletter erstellen</h5>
+ <p class="even">
+ Die Newsletter können mit jedem Texteditor erstellt werden, der im aktuellen Xoops-Core installiert ist (z.B. TinyMCE). <br/>
+ Der Newsletter kann verschiedenen Vorlagen zugewiesen werden (siehe auch 'Newsletter - Templates').<br/>
+ Der Newsletter kann einer oder auch mehrerer Newsletterkategorien zugewiesen werden.<br/>
+ Einem Newsletter können bis zu 5 Dateien als Anlagen beigefügt werden.<br/><br/>
+ Alternativ können Sie auch einen Newsletter kopieren und als neuen Newsletter bearbeiten bzw. senden.<br/><br/>
+ Die Art des Texteditors, die zulässigen Dateitypen sowie die Dateigröße für Mailanhänge können in den Moduleinstellungen definiert werden.<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">Newsletter - Templates</h5>
+ <p class="even">
+ Die Newsletter basieren auf Templates.<br/>
+ Die Templates finden Sie unter language/{aktuellesprache}/templates.<br/>
+ Um ein neues Template zu erstellen müssen Sie nur in diesem Verzeichnis eine neue html-Datei erstellen und die Smarty-Variablen reinkopieren.<br/>
+ Achtung: es muss eine html-Datei sein, htm wird nicht erkannt!<br />
+ <br /><br /></p>
+
+ <h5 class="odd">Senden des Newsletters</h5>
+ <p class="even">
+ Sie können sich eine Vorschau vor dem Versenden anzeigen lassen.<br/>
+ Sie können sich den Newsletter testweise an eine von Ihnen festgelegte E-Mail-Adresse senden lassen.<br/>
+ Der Newsletter wird je Abonnent versendet.<br/>
+ Für jede Sendeaktion wird ein Protokolleintrag erstellt.<br/>
+ Wenn ein oder mehrere Sendevorgänge fehlgeschlagen sind, kann dies im Protokoll nachvollzogen werden.<br/>
+ Sie können den Sendevorgang jederzeit neu starten. Sie können dabei den Newsletter neuerlich an alle versenden oder nur an jene Abonnenten, bei denen der Sendevorgang bisher noch nicht erfolgreich abgeschlossen werden konnte.<br />
+ <br />
+ Sie können die E-Mails immer sofort senden oder die Anzahl an Empfängern je Sendevorgang limitieren (Paketweise versenden).<br/>
+ Die Anzahl der E-Mails sowie die Minuten bis zum nächsten Sendevorgang können in den Moduleinstellungen definiert werden (z.B. 200 E-Mails alle 60 Minuten).<br/>
+ Das erste Paket wird dann sofort gesendet. Der nächste Sendevorgang muss mit einem externen Cronjob gestartet werden, der die Datei "../modules/xNewsletter/cron.php" aufruft. Xoops kann dies in der derzeitigen Version (2.5.5) nicht übernehmen.<br/>
+ <br/>
+ <br/><br />
+ Achtung: Funktionen wie das Testen der Kontoeinstellungen, das Versenden von Mails, die Verwendung des Bounced Mail Handlers funktionieren normalerweise nicht auf einen lokalen Server,... (Sie erhalten eine weiße Seite ohne Fehlermeldung).<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">Aufgabenliste</h5>
+ <p class="even">
+ Wenn Sie die Anzahl der Emails je Sendevorgang limitieren, können Sie hier die Newsletter sehen, die für den nächsten Sendevorgang zur Verfügung stehen und ab wann diese mit dem nächsten Cronjob gesendet werden können.<br/>
+ Wenn Sie die Option Paketweises Senden nicht verwenden, muss diese Liste immer leer sein.<br/>
+ Normalerweise wird der Tab "Aufgabenliste" nicht angezeigt, wenn diese Option nicht aktiviert wurde.<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">Verwendung von Mailinglisten</h5>
+ <p class="even">
+ Wenn Sie bereits Mailinglisten verwenden/angelegt haben, so können sie die An-/Abmeldungen von einzelnen Newsletter-Kategorien auch mit den dazugehörigen Mailiglisten synchriónisieren lassen.<br/>
+ Ich verwende neben diesem Newslettermodul majordomo-Mailinglisten, weil man dann sowohl von diesem Modul aus als auch vom normalen E-Mail-Programm aus Newsletter versenden kann.<br/>
+ Einer der Nachteile von Mailinglisten ist, dass, sofern jemand bei zwei oder mehr Mailinglisten registriert ist, und ich einen Newsletter an alle Mailinglisten versende, diese Person den gleichen Newsletter mehrfach erhält. Mit xNewsletter erhält er diesen Newsletter nur einmal.
+ <br />
+ <b>xNewsletter kann keine Mailinglisten erstellen.</b>.
+ <br /><br /></p>
+
+ <h5 class="odd">Bounced mail handler (BMH)</h5>
+ <p class="even">
+ Wenn Sie Newsletter versenden, wird es immer wieder vorkommen, dass einzelne Mails nicht zugestellt werden können (bounced mails), weil z.B. die E-Mail-Adresse nicht mehr gültig ist, weil die Mailbox voll ist, usw.<br/>
+ Um solche Ereignisse zu verarbeiten und auch darauf zu reagieren, können Sie den BMH verwenden.
+ Sie können den BMH für jedes einzelne E-Mail-Konto aktivieren.<br/>
+ Nicht zustellbare Mails, die vom BMH als solche erkannt werden, können gelöscht oder in einen dafür vorgesehenen Ordner verschoben werden.<br/>
+ Mögliche Aktionen für nicht zugestellte Mails:<br/>
+ -- Keine Aktion (nur Ablage)<br/>
+ -- Vorübergehendes Stilllegen der Anmeldungen für die jeweilige E-Mail-Adresse<br/>
+ -- Löschen der Anmeldungen für die jeweilige E-Mail-Adresse<br/>
+ <br/>
+ <br />
+ <h6 class="odd">Arten von bounced mails</h6>
+ <u>bounce type hard:</u>
+ Dies bedeutet, dass ein ständiger Fehler vorliegt, z.B. Empfänger unbekannt, Domain unbekannt, usw.<br/>
+ Diese Mails werden nach Entdeckung/Klassifizierung als Typ hard gelöscht, deshalb wird empfohlen, die movehard-Option zu verwenden (die Mails werden dann nur in diesen Ordner verschoben, sie können die Mail später auch noch überprüfen, wenn Sie wollen).<br/>
+ <br />
+ <u>bounce type soft:</u><br/>
+ Dies bedeutet, dass ein vorübergehender Fehler vorliegt, z.B. Mailbox voll, Server momentan nicht verfügbar, usw.<br/>
+ Diese Mails werden nach Entdeckung/Klassifizierung als Typ soft nicht gelöscht, es wird jedoch trotzdem empfohlen, die movesoft-Option zu verwenden, um den Hauptordner Posteingang frei zu halten.<br/>
+ <br />
+ Achtung: Funktionen wie das Testen der Kontoeinstellungen, das Versenden von Mails, die Verwendung des Bounced Mail Handlers funktionieren normalerweise nicht auf einen lokalen Server,... (Sie erhalten eine weiße Seite ohne Fehlermeldung).<br/>
+ <br /><br /></p>
+
+ <h5 class="odd">Wartung</h5>
+ <p class="even">
+ Das Modul besitzt eine Wartungsfunktion, bei der einige mögliche Fehler in den Daten behoben werden können.
+ <br /><br /></p>
+
+ <h5 class="odd">Import</h5>
+ <p class="even">
+ Sie können e-Mail-Daten mit mehreren Plugins importieren:
+ <ul>
+ <li>csv</li>
+ <li>Modul rmbulletin</li>
+ <li>Modul smartpartner</li>
+ <li>Modul weblinks</li>
+ <li>Modul evennews</li>
+ <li>Modul subscribers</li>
+ <li>User aus xoops users</li>
+ <ul>)
+ Das Importtool arbeitet wie folgt:<br/>
+ - Hinzufügen der E-Mail zur Liste der Abonnenten<br/>
+ - Hinzufügen des Abonnenten zu einer Newsletterkategorie<br/>
+ Vor der Verwendung des Imorttools daher bitte mindestens eine Newsletterkategorie erstellen, da ansonsten die Email-Adressen keiner Kategorie zugeordnet werden können und daher kein Import erfolgt.<br/>
+ Es besteht die Möglichkeit, <br/>
+ - die zu importierenden E-Mail-Adressen ohne jegliche Prüfung zu importieren (empfohlen bei sehr großen Importmengen) oder<br/>
+ - nach dem Einlesen der Daten können Sie für e-Mail-Adresse noch überprüfen und entscheiden<br/>
+ -- ob Sie überhaupt importiert werden soll oder nicht<br/>
+ -- für welchen Newsletter die Anmeldung jeweils erfolgen soll<br/>
+ Wenn eine E-Mail-Adresse bereits registriert ist, sollte der Import dieser E-Mail übersprungen werden (standardmäßige Aktion).
+ <br />
+ Beispieldateien (sample1col.csv, sample4col.csv) für einen csv-Import finden Sie unter ../xNewsletter/plugins/
+ <br /><br />
+ <b>Achtung:</b>Bei den Registrierungen/Anmeldungen mit diesem Importtool werden keine E-Mail-Verständigungen an die jeweilige E-Mail-Adresse gesendet.<br />
+ <br /><br />
+ <b>Importieren von großen E-Maillisten:</b><br />
+ Um einen Speicherüberlauf zu verhindern, gibt es zwei Limits:<br />
+ - Erstes Limit: es können nur 100000 Zeilen (z.B. aus einer csv-Datei) in der temporären Importtabelle gespeichert werden<br />
+ - Zweites Limit: Sie können die Daten aus der temporären Tabelle in Paketen von max. 25000 endgültig importieren<br />
+ <br />
+ Der Import von mehr als 100000 E-Mails kann wie folgt durchgeführt werden:<br />
+ - Ersten Import durchführen E-Mail 1 bis 100000
+ - Engültigen Import E-Mails in Paketen von 25000
+ - Zweiten Import durchführen E-Mail 100001 bis 200000 (Option "Existierende Newsletteranmeldungen überspringen"wählen)
+ - Engültigen Import E-Mails in Paketen von 25000
+ und so weiter.<br />
+ Wenn die Dateigröße die erlaubte Upload-Größe nicht übersteigt, kann dieser Vorgang so oft wiederholt werden, bis alle E-Mails importiert sind.<br />
+ <br /><br />
+ Sollten Sie eine weiße Seite erhalten, ist dies kein Problem, denn, wenn sie die Option "Existierende Newsletteranmeldungen überspringen" wählen, startet die Importroutine immer bei der ersten noch nicht importierten E-Mail-Adresse.<br />
+ Reduzieren Sie in diesem Fall die Anzahl der zu importierenden EMails oder die Paketgröße und versuchen es einfach erneut.<br />
+ <br /><br /></p>
+
+</div>
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/index.html
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/index.html (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/help/index.html 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/index.html
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/index.html (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/index.html 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/activate.tpl
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/activate.tpl (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/activate.tpl 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,16 @@
+<p>Hallo {SEX} {FIRSTNAME} {LASTNAME}
+
+Sie haben sich mit der Emailadresse
+{EMAIL} von der IP-Adresse: {IP}
+für unseren Newsletter angemeldet.
+
+Um die Anmeldung abzuschließen, klicken Sie auf
+nachfolgenden Link:
+{ACTLINK}
+
+Haben Sie sich nicht angemeldet, ignorieren Sie diese Mail.
+
+-----------------------
+{X_SITENAME}
+({X_SITEURL})
+Webmaster {X_ADMINMAIL}</p>
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/delete.tpl
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/delete.tpl (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/delete.tpl 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,16 @@
+Hallo {SEX} {FIRSTNAME} {LASTNAME}
+
+Sie möchten sich von unserem Newsletter mit
+der Emailadresse {EMAIL} abmelden?
+(Gesendet von der IP: {IP})
+
+Um das Löschen abzuschließen, klicken Sie
+auf den nachfolgenden Link:
+{ACTLINK}
+
+Wollen Sie dies nicht, ignorieren Sie die Mail einfach.
+
+-----------------------
+{X_SITENAME}
+({X_SITEURL})
+Webmaster {X_ADMINMAIL}
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/index.html
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/index.html (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/index.html 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/info_change.html
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/info_change.html (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/info_change.html 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,13 @@
+<p>Hallo {SEX} {FIRSTNAME} {LASTNAME}</p>
+
+<p>Die Newsletteranmeldungen zur Emailadresse
+{EMAIL} wurden von <a href="{USERLINK}">{USERNAME}</a> mit der IP-Adresse {IP} geändert.</p>
+
+<p>Für weitere Informationen klicken Sie auf nachfolgenden Link:<br />
+{ACTLINK}</p>
+
+
+<p>-----------------------<br />
+{X_SITENAME}<br />
+({X_SITEURL})<br />
+Webmaster {X_ADMINMAIL}</p>
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/update.tpl
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/update.tpl (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/mail_template/update.tpl 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,16 @@
+Hallo {SEX} {FIRSTNAME} {LASTNAME}
+
+Sie wollen Änderung am Newsletter mit der Emailadresse
+{EMAIL} von der IP-Adresse: {IP}
+vornehmen.
+
+Um die Änderungen vornehmen zu können, klicken Sie auf
+nachfolgenden Link:
+{ACTLINK}
+
+Dieser Link ist nur 24 Stunden gültig.
+
+-----------------------
+{X_SITENAME}
+({X_SITEURL})
+Webmaster {X_ADMINMAIL}
\ No newline at end of file
Added: XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/main.php
===================================================================
--- XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/main.php (rev 0)
+++ XoopsLanguages/german/modules/xNewsletter/xNewsletter 1.2/xNewsletter/language/german/main.php 2014-01-17 19:53:51 UTC (rev 12269)
@@ -0,0 +1,91 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : 1 Mon 2012/11/05 14:31:32 : Exp $
+ * ****************************************************************************
+ */
+// Main
+define('_MA_XNEWSLETTER_INDEX', "Home");
+define('_MA_XNEWSLETTER_TITLE', "xNewsletter");
+define('_MA_XNEWSLETTER_DESC', "Newsletter-Modul für Xoops");
+define('_MA_XNEWSLETTER_WELCOME', "<h2>Willkommen bei unserem Newslettersystem</h2>Wir hoffen, wir können Sie damit immer auf dem aktuellen Stand halten. Seien Sie so frei und melden sich für einen oder für mehrere von unseren Newslettern an. Wenn Sie einen Newsletter nicht mehr erhalten wollen, können Sie sich hier auch auf einfachem Wege wieder abmelden. Sie können sich aber auch über einen Link, der bei jedem Newsletter angegeben ist, abmelden.");
+define('_MA_XNEWSLETTER_ACCOUNTS', "E-Mail-Konten");
+define('_MA_XNEWSLETTER_CAT', "Newsletterkategorien");
+define('_MA_XNEWSLETTER_SUBSCR', "Abonnenten");
+define('_MA_XNEWSLETTER_CATSUBSCR', "Abonnenten je Newsletterkategorien");
+define('_MA_XNEWSLETTER_LETTER', "Newsletter");
+define('_MA_XNEWSLETTER_PROTOCOL', "Protokoll");
+define('_MA_XNEWSLETTER_BMH', "Bounced-Mail-Handler");
+define('_MA_XNEWSLETTER_ADMIN', "Administrator");
+define('_MA_XNEWSLETTER_LETTER_CATS', "Gesendet mit Newsletter");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_SEARCH', "Suche nach Newsletteranmeldungen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_SEARCH_EMAIL', "Suche oder ergänze Newsletteranmeldungen für die E-Mail-Adresse: ");
+define('_AM_XNEWSLETTER_SUBSCRIPTION_SEARCH_ADD', "Suche / Ergänze Newsletteranmeldungen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_EXIST', "Bestehende Newsletteranmeldungen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_EXIST_NONE', "Es existieren derzeit keine Newsletteranmeldungen");
+define('_MA_XNEWSLETTER_REGISTRATION_EXIST', "Bestehende Registrierungen von dieser E-Mail-Adresse");
+define('_MA_XNEWSLETTER_REGISTRATION_NONE', "Ihre E-Mail-Adresse ist bis jetzt noch nicht registriert. Für Newsletteranmeldungen benötigen wir zusätzliche Informationen. Bitte ergänzen Sie das Registrierungsformular.<br/>Wir möchten Sie außerdem darauf hinweisen, dass zu Zwecken der Nachvollziehbarkeit Ihre IP-Adresse mitgespeichert wird.");
+define('_MA_XNEWSLETTER_REGISTRATION_ADD', "Wenn Sie wollen, können Sie eine oder mehrere Personen mit einer E-Mail-Adresse erfassen, und später können Sie auch unterschiedliche Newsletteranmeldungen durchführen.");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ADD', "Newsletteranmeldungen hinzufügen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_EDIT', "Newsletteranmeldungen bearbeiten");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_DELETE', "Newsletteranmeldungen löschen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_DELETE_SURE', "Sind Sie sicher, dass Sie Ihre Registrierung mit allen Newsletteranmeldungen löschen wollen?<br /><br />Wenn Sie nur einzelne Newsletteran-/abmeldungen durchführen wollen, klicken Sie bitte auf Bearbeiten!<br/><br />");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_INFO_PERS', "Ihre persönlichen Informationen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_SELECT_CATS', "Wählen Sie Ihre Newsletter");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_CATS_AVAIL', "Verfügbare Newsletter");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_NO_CATS_AVAIL', "Derzeit sind keine Newsletter verfügbar");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_OK', "Ihre Auswahl(en) wurden erfolgreich gespeichert");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR', "Beim Verarbeiten Ihrer An-/Abmeldungen ist ein Fehler aufgetreten");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_NOID', "Fehler: keine gültige Subscriber-id");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_NOEMAIL', "Fehler: keine gültige E-Mail-Adressse");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SENDACTKEY', "Fehler beim Senden des Aktivierungsschlüssels");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SAVESUBSCR', "Fehler beim Speichern der persönlichen Informationen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_INVALIDKEY', "Fehler: ungültiges Schlüsselformat");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_NODATAKEY', "Fehler: keine Daten zu Schlüssel");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_NOVALIDKEY', "Fehler: ungültiger Schlüssel");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SAVECATSUBSCR', "Fehler beim Speichern der An-/Abmeldeinformationen");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_REG_OK', "Ihrer persönlichen Informationen wurden erfolgreich registriert.");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_SUBSCRIBE', "Anmeldung bei Newsletter '%nl' erfolgreich");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_UNSUBSCRIBE', "Abmeldung bei Newsletter '%nl' erfolgreich");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_NO_CHANGE', "Keine Änderung bei Newsletter '%nl'");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_DAT_QUITED_REMOVED', "Beendigungsdatum bei Newsletter '%nl' erfolgreich gelöscht");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_PROT_SENT_INFO', "Hinweismail an '%e' gesendet.");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED', "<span style='color:red'>Achtung: Beendet durch den Webmaster!</span>");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_QUITED_DETAIL', "<span style='color:red'>Achtung: Diese Anmeldung wurde durch den Webmaster am %q beendet, da Mails nicht zustellbar waren! Wenn Sie die Anmeldung reaktivieren wollen, lassen Sie diesen Newsletter einfach ausgewählt.</span>");
+define('_MA_XNEWSLETTER_UNSUBSCRIPTION_OK', "Die E-Mail-Adresse '%e' wurde erfolgreich vom Newsletter '%n' abgemeldet");
+define('_MA_XNEWSLETTER_UNSUBSCRIPTION_ERROR', "Fehler beim Abmelden von '%e' vom Newsletter '%n'");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_UPDATE_OK', "Newsletterdaten erfolgreich geändert");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_REG_CLOSED', "Die Registrierung mit dieser Mailadresse ist abgeschlossen.");
+define('_MA_XNEWSLETTER_SUBSCRIPTIONSUBJECT', "Bestätigung des Newsletter bei ");
+define('_MA_XNEWSLETTER_SUBSCRIPTION_SUBJECT_CHANGE', "Hinweis über Änderungen Ihres Newsletters bei ")...
[truncated message content] |
|
From: <luc...@us...> - 2014-01-17 19:44:11
|
Revision: 12268
http://sourceforge.net/p/xoops/svn/12268
Author: luciorota
Date: 2014-01-17 19:44:03 +0000 (Fri, 17 Jan 2014)
Log Message:
-----------
commit release 1.2... could someone add a new on xoops.org site? tnx
Added Paths:
-----------
XoopsModules/xnewsletter/releases/1.2/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/about.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/accounts.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_footer.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_header.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/attachment.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/bmh.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/bmh_callback_database.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/cat.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/catsubscr.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/import.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/index.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/letter.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/mailinglist.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/maintain_tables.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/maintenance.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/menu.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/protocol.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/sendletter.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/subscr.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/task.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/blocks/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/blocks/blocks_catsubscr.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/blocks/blocks_letter.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/blocks/blocks_subscrinfo.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/blocks/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_accounts.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_attachment.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_bmh.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_cat.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_catsubscr.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_import.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_letter.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_mailinglist.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_protocol.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_subscr.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/class/xNewsletter_task.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/cron.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/css/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/css/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/css/style.css
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/credits.txt
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/install.txt
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/lang_diff.txt
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/licence.txt
XoopsModules/xnewsletter/releases/1.2/xNewsletter/docs/readme.txt
XoopsModules/xnewsletter/releases/1.2/xNewsletter/header.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/bookmarks/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/bookmarks/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/about.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/add.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/alert.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/arrow.gif
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/home.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/off.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/on.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_accounts.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_attachment.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_attachment_del.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_bmh.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_category.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_category_subscr.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_catsubscr_temp.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_check.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_clone.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_copy.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_delete.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_delete_2.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_details.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_edit.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_edit_2.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_failed.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_import.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_mailinglist.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_maintenance.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_newsletter.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_nothing.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_ok.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_preview.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_protocol.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_quit.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_resend.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_send.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_sendtest.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_subscribers.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xn_task.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/icons/xoopsmicrobutton.gif
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/kletterfreaks.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/nf_bg_green.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/nf_bg_red.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/nf_logo.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/nf_logo_trans.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/xoops-bg.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/letter_template/xoops-logo.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/images/xNewsletter.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/config.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/functions.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/install.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/mailinglist.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/onupdate.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/phpmailer_bmh/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/phpmailer_bmh/class.phpmailer-bmh.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/phpmailer_bmh/phpmailer-bmh_rules.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/search.inc.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/include/task.inc.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/index.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/admin.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/blocks.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/help/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/help/help.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/help/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/mail_template/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/mail_template/activate.tpl
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/mail_template/delete.tpl
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/mail_template/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/mail_template/info_change.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/mail_template/update.tpl
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/main.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/modinfo.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/templates/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/templates/basic.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/templates/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/english/templates/xoops.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/language/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/letter.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/csv.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/csv.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/evennews.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/rmbulletin.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/sample1col - Kopie.csv
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/sample1col.csv
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/sample4col.csv
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/smartpartner.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/subscribers.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/system_user.png
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/weblinks.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/plugins/xoopsuser.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/print.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/protocol.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/sendletter.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/sql/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/sql/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/sql/mysql.sql
XoopsModules/xnewsletter/releases/1.2/xNewsletter/subscription.php
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/admin/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/admin/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/xnewsletter_catsubscr_block_day.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/xnewsletter_catsubscr_block_recent.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/xnewsletter_letter_block_day.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/xnewsletter_letter_block_random.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/xnewsletter_letter_block_recent.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/blocks/xnewsletter_subscrinfo_block.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xNewsletter_footer.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xNewsletter_header.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xNewsletter_index.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xnewsletter_letter.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xnewsletter_letter_list.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xnewsletter_subscription.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/templates/xnewsletter_subscription_result.html
XoopsModules/xnewsletter/releases/1.2/xNewsletter/xoops_version.php
Added: XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/about.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/about.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/about.php 2014-01-17 19:44:03 UTC (rev 12268)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+include "admin_header.php";
+xoops_cp_header();
+//global $indexAdmin;
+
+echo $indexAdmin->addNavigation("about.php");
+echo $indexAdmin->renderabout('9P3B3FXKF868J', false);
+
+include "admin_footer.php";
+?>
\ No newline at end of file
Added: XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/accounts.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/accounts.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/accounts.php 2014-01-17 19:44:03 UTC (rev 12268)
@@ -0,0 +1,355 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+include "admin_header.php";
+xoops_cp_header();
+//global $indexAdmin;
+
+// We recovered the value of the argument op in the URL$
+$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
+$save_and_check = xNewsletter_CleanVars($_REQUEST, 'save_and_check', 'none', 'string');
+$accounts_id = xNewsletter_CleanVars($_REQUEST, 'accounts_id', 0, 'int');
+$post = xNewsletter_CleanVars($_REQUEST, 'post', '', 'string');
+
+if ( $post == "" && $op == "save_accounts" && $save_and_check =="none" ) $op = "edit_account";
+
+switch ($op)
+{
+ case "check_account":
+
+ $img_ok = "<img src='".XNEWSLETTER_ICON."/xn_ok.png' alt='"._AM_XNEWSLETTER_OK."' title='"._AM_XNEWSLETTER_OK."' /> ";
+ $img_failed = "<img src='".XNEWSLETTER_ICON."/xn_failed.png' alt='"._AM_XNEWSLETTER_FAILED."' title='"._AM_XNEWSLETTER_FAILED."' /> ";
+
+ echo $indexAdmin->addNavigation("accounts.php");
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
+ echo $indexAdmin->renderButton();
+
+ if ($accounts_id == 0) {
+ redirect_header("accounts.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+ } else {
+ $obj_account =& $accountsHandler->get($accounts_id);
+ }
+
+ $mailhost = $obj_account->getVar("accounts_server_in");
+ $port = $obj_account->getVar("accounts_port_in");
+ switch ($obj_account->getVar("accounts_type")) {
+ case _AM_ACCOUNTS_TYPE_VAL_POP3:
+ $service = "pop3";
+ break;
+ case _AM_ACCOUNTS_TYPE_VAL_SMTP:
+ case _AM_ACCOUNTS_TYPE_VAL_GMAIL:
+ $service = "imap";
+ break;
+ case "default":
+ default:
+ $service = "";
+ break;
+ }
+ $service_option = $obj_account->getVar("accounts_securetype_in");
+ $accounts_password = $obj_account->getVar("accounts_password");
+ $accounts_username = $obj_account->getVar("accounts_username");
+ $accounts_inbox = $obj_account->getVar("accounts_inbox"); $accounts_inbox_ok = 0;
+ $accounts_hardbox = $obj_account->getVar("accounts_hardbox"); $accounts_hardbox_ok = 0;
+ $accounts_softbox = $obj_account->getVar("accounts_softbox"); $accounts_softbox_ok = 0;
+
+ $command = $mailhost.":".$port;
+ if ($service !='') $command .= '/' . $service;
+ if ($service_option !='') $command .= '/' . $service_option;
+
+ echo "<table class='outer width100' cellspacing='1'>
+ <tr>
+ <th class='center width5'></th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_INFO."</th>
+ </tr>";
+
+ $mbox = @imap_open("{".$command."}", $accounts_username, $accounts_password); // or die ("can't connect: " . imap_last_error());
+ if ( $mbox === false ) {
+ echo "<tr>";
+ echo "<td class='center width5'>".$img_failed."</td>";
+ echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED."</td>";
+ echo "<td class='left'>".imap_last_error()."</td>";
+ echo "</tr>";
+ } else {
+ echo "<tr>";
+ echo "<td class='center width5'>".$img_ok."</td>";
+ echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK."</td>";
+ echo "<td class='left'></td>";
+ echo "</tr>";
+
+ $folders = imap_listmailbox($mbox, "{".$command."}", "*");
+ if ($folders == false) {
+ echo "<tr>";
+ echo "<td class='center width5'>".$img_failed."</td>";
+ echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED."</td>";
+ echo "<td class='left'>".imap_last_error()."</td>";
+ echo "</tr>";
+ } else {
+ echo "<tr>";
+ echo "<td class='center width5'>".$img_ok."</td>";
+ echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK."</td>";
+ echo "<td class='left'>";
+ if (is_array($folders)) {
+ reset ($folders);
+ sort($folders);
+ $foldercreated = 0;
+ while (list( $key, $val) = each ($folders)) {
+ echo "($key) ";
+ echo imap_utf7_decode (str_replace("{".$command."}","",$val)) . "<br>\n";
+ if ("{".$command."}".$accounts_inbox == $val) $accounts_inbox_ok = 1;
+ if ("{".$command."}".$accounts_hardbox == $val) {
+ $accounts_hardbox_ok = 1;
+ } else {
+ @imap_createmailbox($mbox, imap_utf7_encode('{'.$command.'}' . $accounts_hardbox));
+ $foldercreated = 1;
+ }
+ if ("{".$command."}".$accounts_softbox == $val) {
+ $accounts_softbox_ok = 1;
+ } else {
+ @imap_createmailbox($mbox, imap_utf7_encode('{'.$command.'}' . $accounts_softbox));
+ $foldercreated = 1;
+ }
+ }
+ if ($foldercreated == 1) {
+ $folders_recheck = imap_listmailbox($mbox, "{".$command."}", "*");
+ while (list( $key, $val) = each ($folders_recheck)) {
+ if ("{".$command."}".$accounts_hardbox == $val) $accounts_hardbox_ok = 1;
+ if ("{".$command."}".$accounts_softbox == $val) $accounts_softbox_ok = 1;
+ }
+ }
+ }
+
+ echo "</td>";
+ echo "</tr>";
+ echo "<tr>";
+ if ($obj_account->getVar("accounts_use_bmh") == '1') {
+ if ($accounts_inbox_ok == 1 && $accounts_hardbox_ok == 1 && $accounts_softbox_ok == 1) {
+ echo "<td class='center width5'>".$img_ok."</td>";
+ } else {
+ echo "<td class='center width5'>".$img_failed."</td>";
+ }
+ echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH."</td>";
+ echo "<td class='left'>";
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_INBOX." ";
+ if ($accounts_inbox_ok == 1) {echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK.$img_ok;} else {echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED.$img_failed;}
+ echo "<br />";
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX." ";
+ if ($accounts_hardbox_ok == 1) {echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK.$img_ok;} else {echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED.$img_failed;}
+ echo "<br />";
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_SOFTBOX." ";
+ if ($accounts_softbox_ok == 1) {echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK.$img_ok;} else {echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED.$img_failed;}
+ echo "<br />";
+ echo "</td>";
+ } else {
+ echo "<td class='center width5'>".$img_ok."</td>";
+ echo "<td class='left'>"._AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH._AM_XNEWSLETTER_ACCOUNTS_CHECK_SKIPPED."</td>";
+ echo "<td class='center'></td>";
+ }
+ echo "</tr>";
+ }
+ imap_close($mbox);
+ }
+
+ echo "</table>";
+ break;
+
+ case "list":
+ default:
+ echo $indexAdmin->addNavigation('accounts.php') ;
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, 'accounts.php?op=new_account', 'add');
+ echo $indexAdmin->renderButton();
+
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $criteria = new CriteriaCompo();
+ $criteria->setSort("accounts_id ASC, accounts_type");
+ $criteria->setOrder("ASC");
+ $numrows = $accountsHandler->getCount();
+ $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ $accounts_arr = $accountsHandler->getall($criteria);
+ if ( $numrows > $limit ) {
+ include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
+ $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
+ $pagenav = $pagenav->renderNav(4);
+ } else {
+ $pagenav = '';
+ }
+
+ // View Table
+ if ($numrows > 0)
+ {
+ echo "<table class='outer width100' cellspacing='1'>
+ <tr>
+ <th class='center width2'>"._AM_XNEWSLETTER_ACCOUNTS_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_TYPE."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_NAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURNAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURMAIL."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_DEFAULT."</th>
+ <th class='center width10'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ </tr>";
+
+ $class = "odd";
+
+ foreach (array_keys($accounts_arr) as $i)
+ {
+ echo "<tr class='".$class."'>";
+ $class = ($class == "even") ? "odd" : "even";
+ echo "<td class='center'>".$i."</td>";
+ $arr_accounts_type=array(
+ _AM_ACCOUNTS_TYPE_VAL_PHP_MAIL=>_AM_ACCOUNTS_TYPE_PHPMAIL,
+ _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL=>_AM_ACCOUNTS_TYPE_PHPSENDMAIL,
+ _AM_ACCOUNTS_TYPE_VAL_POP3=>_AM_ACCOUNTS_TYPE_POP3,
+ _AM_ACCOUNTS_TYPE_VAL_SMTP=>_AM_ACCOUNTS_TYPE_SMTP,
+ _AM_ACCOUNTS_TYPE_VAL_GMAIL=>_AM_ACCOUNTS_TYPE_GMAIL);
+ echo "<td class='center'>". $arr_accounts_type[$accounts_arr[$i]->getVar("accounts_type")]."</td>";
+ echo "<td class='center'>".$accounts_arr[$i]->getVar("accounts_name")."</td>";
+ echo "<td class='center'>".$accounts_arr[$i]->getVar("accounts_yourname")."</td>";
+ echo "<td class='center'>".$accounts_arr[$i]->getVar("accounts_yourmail")."</td>";
+ $verif_accounts_default = ( $accounts_arr[$i]->getVar("accounts_default") == 1 ) ? _YES : _NO;
+ echo "<td class='center'>".$verif_accounts_default."</td>";
+
+ echo "<td class='center width5'>";
+ echo " <a href='accounts.php?op=edit_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>";
+ echo " <a href='accounts.php?op=delete_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' /></a>";
+ if ($accounts_arr[$i]->getVar("accounts_type") != _AM_ACCOUNTS_TYPE_VAL_PHP_MAIL && $accounts_arr[$i]->getVar("accounts_type") != _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
+ echo " <a href='accounts.php?op=check_account&accounts_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_check.png alt='"._AM_ACCOUNTS_TYPE_CHECK."' title='"._AM_ACCOUNTS_TYPE_CHECK."' /></a>";
+ }
+ echo "</td>";
+ echo "</tr>";
+ }
+ echo "</table><br /><br />";
+ echo "<br /><div class='center'>" . $pagenav . "</div><br />";
+ } else {
+ echo "<table class='outer width100' cellspacing='1'>
+ <tr>
+ <th class='center width2'>"._AM_XNEWSLETTER_ACCOUNTS_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_TYPE."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_NAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURNAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_YOURMAIL."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_USERNAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_PASSWORD."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SERVER_IN."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_PORT_IN."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_PORT_OUT."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ACCOUNTS_DEFAULT."</th>
+ <th class='center width10'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ </tr>";
+ echo "</table><br /><br />";
+ }
+
+ break;
+
+ case "new_account":
+ echo $indexAdmin->addNavigation("accounts.php");
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
+ echo $indexAdmin->renderButton();
+ $obj =& $accountsHandler->create();
+ $obj = xNewsletter_setPost($obj,$_POST);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case "save_accounts":
+ if ( !$GLOBALS["xoopsSecurity"]->check() ) {
+ redirect_header("accounts.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ }
+
+ $obj =& $accountsHandler->get($accounts_id);
+ $_POST['accounts_id'] = $accounts_id;
+ $obj = xNewsletter_setPost($obj,$_POST);
+
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria("accounts_default", 1));
+ $count_accounts_default = $accountsHandler->getCount($criteria);
+ if ($count_accounts_default > 0) {
+ if ($obj->getVar("accounts_default") == 1) {
+ global $xoopsDB;
+ $verif_accounts_default = "1";
+ //reset old accounts_default
+ $sql = "UPDATE `".$xoopsDB->prefix("mod_xnewsletter_accounts")."` SET `accounts_default` = '0'";
+ $result= $xoopsDB->query($sql) or die ("MySQL-Error: " . mysql_error());
+ } else {
+ $verif_accounts_default = "0";
+ }
+ } else {
+ $verif_accounts_default = "1";
+ }
+ $obj->setVar("accounts_default", $verif_accounts_default);
+ if ($obj->getVar("accounts_yourmail") != "" && $obj->getVar("accounts_yourmail") != _AM_ACCOUNTS_TYPE_YOUREMAIL ) {
+ if ($accountsHandler->insert($obj)) {
+ if ($save_and_check == 'none') {
+ redirect_header("accounts.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
+ } else {
+ redirect_header("accounts.php?op=check_account&accounts_id=".$obj->getVar("accounts_id"), 2, _AM_XNEWSLETTER_FORMOK);
+ }
+ }
+ } else {
+ $obj->setErrors(_MA_XNEWSLETTER_SUBSCRIPTION_ERROR_NOEMAIL);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case "edit_account":
+ echo $indexAdmin->addNavigation("accounts.php");
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, 'accounts.php?op=new_account', 'add');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ACCOUNTSLIST, 'accounts.php?op=list', 'list');
+ echo $indexAdmin->renderButton();
+ $obj = $accountsHandler->get($accounts_id);
+ if ( !empty($_POST) ) xNewsletter_setPost($obj,$_POST);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case "delete_account":
+ $obj =& $accountsHandler->get($accounts_id);
+ if (isset($_POST["ok"]) && $_POST["ok"] == "1") {
+ if ( !$GLOBALS["xoopsSecurity"]->check() ) {
+ redirect_header("accounts.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ }
+ if ($accountsHandler->delete($obj)) {
+ redirect_header("accounts.php", 3, _AM_XNEWSLETTER_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array("ok" => 1, "accounts_id" => $accounts_id, "op" => "delete_account"), "accounts.php", sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $obj->getVar("accounts_name")));
+ }
+ break;
+}
+include "admin_footer.php";
+
+?>
\ No newline at end of file
Added: XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_footer.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_footer.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_footer.php 2014-01-17 19:44:03 UTC (rev 12268)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+echo "<br /><br /><div align='center'><a href='http://www.xoops.org' target='_blank'>
+ <img src='".XNEWSLETTER_ICON."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS' /></a>
+ </div>";
+echo " <div class='center small italic pad5'>
+ <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XNEWSLETTER_MAINTAINEDBY."
+ <a href='http://www.xoops.org' title='Visit' class='tooltip' rel='external'>XOOPS Community</a>
+ </div>";
+xoops_cp_footer();
+?>
\ No newline at end of file
Added: XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_header.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_header.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/admin_header.php 2014-01-17 19:44:03 UTC (rev 12268)
@@ -0,0 +1,92 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once XOOPS_ROOT_PATH . "/include/cp_functions.php";
+
+$dirname = basename(dirname(dirname( __FILE__ ) ));
+
+include_once XOOPS_ROOT_PATH . "/modules/" . $dirname . "/include/functions.php";
+include_once XOOPS_ROOT_PATH . "/modules/" . $dirname . "/include/config.php";
+
+$module_handler =& xoops_gethandler('module');
+$xoopsModule = & $module_handler->getByDirname($dirname);
+
+//Load languages
+xoops_loadLanguage('admin', $dirname);
+xoops_loadLanguage('modinfo', $dirname);
+xoops_loadLanguage('main', $dirname);
+
+if ( !xNewsletter_checkModuleAdmin() ) {
+ xoops_cp_header();
+ echo xoops_error(_AM_XNEWSLETTER_NOFRAMEWORKS);
+ xoops_cp_footer();
+ exit();
+}
+
+$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
+//$pathIcon = XOOPS_URL . "/modules/" . $dirname . "/images/icons";
+$indexAdmin = new ModuleAdmin();
+
+global $xoopsModuleConfig;
+if (empty($xoopsModuleConfig)) {
+ $config_handler =& xoops_gethandler("config");
+ $xoopsModuleConfig =& $config_handler->getConfigsByCat(0,$xoopsModule->mid());
+}
+
+$accountsHandler =& xoops_getModuleHandler('xNewsletter_accounts', $dirname);
+$catHandler =& xoops_getModuleHandler('xNewsletter_cat', $dirname);
+$subscrHandler =& xoops_getModuleHandler('xNewsletter_subscr', $dirname);
+$catsubscrHandler =& xoops_getModuleHandler('xNewsletter_catsubscr', $dirname);
+$letterHandler =& xoops_getModuleHandler('xNewsletter_letter', $dirname);
+$attachmentHandler =& xoops_getModuleHandler('xNewsletter_attachment', $dirname);
+$protocolHandler =& xoops_getModuleHandler('xNewsletter_protocol', $dirname);
+$mailinglistHandler =& xoops_getModuleHandler('xNewsletter_mailinglist', $dirname);
+$bmhHandler =& xoops_getModuleHandler('xNewsletter_bmh', $dirname);
+$importHandler =& xoops_getModuleHandler('xNewsletter_import', $dirname);
+$taskHandler =& xoops_getModuleHandler('xNewsletter_task', $dirname);
+
+$myts = MyTextSanitizer::getInstance();
+
+if ($xoopsUser) {
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) {
+ redirect_header(XOOPS_URL, 1, _NOPERM);
+ exit();
+ }
+} else {
+ redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
+ exit();
+}
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+
+?>
\ No newline at end of file
Added: XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/attachment.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/attachment.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/attachment.php 2014-01-17 19:44:03 UTC (rev 12268)
@@ -0,0 +1,179 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GNU General Public License 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+include "admin_header.php";
+xoops_cp_header();
+//global $pathIcon, $indexAdmin;
+
+// We recovered the value of the argument op in the URL$
+$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
+$attachment_id = xNewsletter_CleanVars($_REQUEST, 'attachment_id', 0, 'int');
+
+switch ($op)
+{
+ case "list":
+ default:
+ echo $indexAdmin->addNavigation('attachment.php');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, 'attachment.php?op=new_attachment', 'add');
+ echo $indexAdmin->renderButton();
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $criteria = new CriteriaCompo();
+ $criteria->setSort("attachment_letter_id DESC, attachment_id");
+ $criteria->setOrder("DESC");
+ $numrows = $attachmentHandler->getCount();
+ $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ $attachment_arr = $attachmentHandler->getall($criteria);
+ if ( $numrows > $limit ) {
+ include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
+ $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
+ $pagenav = $pagenav->renderNav(4);
+ } else {
+ $pagenav = '';
+ }
+
+ // View Table
+ if ($numrows>0)
+ {
+ echo "<table class='outer width100' cellspacing='1'>
+ <tr>
+ <th class='center width2'>"._AM_XNEWSLETTER_ATTACHMENT_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_LETTER_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_NAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_TYPE."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_SUBMITTER."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_CREATED."</th>
+ <th class='center width5'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ </tr>";
+
+ $class = "odd";
+
+ foreach (array_keys($attachment_arr) as $i)
+ {
+ echo "<tr class='".$class."'>";
+ $class = ($class == "even") ? "odd" : "even";
+ echo "<td class='center'>".$i."</td>";
+
+ $letter =& $letterHandler->get($attachment_arr[$i]->getVar("attachment_letter_id"));
+ $title_letter = $letter->getVar("letter_title");
+ echo "<td class='center'>".$title_letter."</td>";
+ echo "<td class='center'>".$attachment_arr[$i]->getVar("attachment_name")."</td>";
+ echo "<td class='center'>".$attachment_arr[$i]->getVar("attachment_type")."</td>";
+ echo "<td class='center'>".XoopsUser::getUnameFromId($attachment_arr[$i]->getVar("attachment_submitter"),"S")."</td>";
+ echo "<td class='center'>".formatTimeStamp($attachment_arr[$i]->getVar("attachment_created"),"S")."</td>";
+
+ echo "<td class='center width5' nowrap='nowrap'>
+ <a href='attachment.php?op=edit_attachment&attachment_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>
+ <a href='attachment.php?op=delete_attachment&attachment_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_delete.png alt='"._DELETE."' title='"._DELETE."' /></a>
+ </td>";
+ echo "</tr>";
+ }
+ echo "</table><br /><br />";
+ echo "<br /><div class='center'>" . $pagenav . "</div><br />";
+ } else {
+ echo "<table class='outer width100' cellspacing='1'>
+ <tr>
+ <th class='center width2'>"._AM_XNEWSLETTER_ATTACHMENT_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_LETTER_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_NAME."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_TYPE."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_SUBMITTER."</th>
+ <th class='center'>"._AM_XNEWSLETTER_ATTACHMENT_CREATED."</th>
+ <th class='center width5'>"._AM_XNEWSLETTER_FORMACTION."</th>
+ </tr>";
+ echo "</table><br /><br />";
+ }
+
+ break;
+
+ case "new_attachment":
+ echo $indexAdmin->addNavigation("attachment.php");
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, 'attachment.php?op=list', 'list');
+ echo $indexAdmin->renderButton();
+
+ $obj =& $attachmentHandler->create();
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case "save_attachment":
+ if ( !$GLOBALS["xoopsSecurity"]->check() ) {
+ redirect_header("attachment.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ }
+
+ $obj =& $attachmentHandler->get($attachment_id);
+
+ //Form attachment_letter_id
+ $obj->setVar("attachment_letter_id", xNewsletter_CleanVars( $_REQUEST, "attachment_letter_id", 0, "int") );
+ //Form attachment_name
+ $obj->setVar("attachment_name", xNewsletter_CleanVars( $_REQUEST, "attachment_name", "", "string") );
+ //Form attachment_type
+ $obj->setVar("attachment_type", xNewsletter_CleanVars( $_REQUEST, "attachment_type", 0, "int") );
+ //Form attachment_submitter
+ $obj->setVar("attachment_submitter", xNewsletter_CleanVars( $_REQUEST, "attachment_submitter", 0, "int") );
+ //Form attachment_created
+ $obj->setVar("attachment_created", xNewsletter_CleanVars( $_REQUEST, "attachment_created", time(), "int") );
+
+ if ($attachmentHandler->insert($obj)) {
+ redirect_header("attachment.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case "edit_attachment":
+ echo $indexAdmin->addNavigation("attachment.php");
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWATTACHMENT, 'attachment.php?op=new_attachment', 'add');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_ATTACHMENTLIST, 'attachment.php?op=list', 'list');
+ echo $indexAdmin->renderButton();
+ $obj = $attachmentHandler->get($attachment_id);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case "delete_attachment":
+ $obj =& $attachmentHandler->get($attachment_id);
+ if (isset($_POST["ok"]) && $_POST["ok"] == 1) {
+ if ( !$GLOBALS["xoopsSecurity"]->check() ) {
+ redirect_header("attachment.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ }
+ if ($attachmentHandler->delete($obj)) {
+ redirect_header("attachment.php", 3, _AM_XNEWSLETTER_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array("ok" => 1, "attachment_id" => $attachment_id, "op" => "delete_attachment"), $_SERVER["REQUEST_URI"], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $obj->getVar("attachment_letter_id")));
+ }
+ break;
+}
+include "admin_footer.php";
+?>
\ No newline at end of file
Added: XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/bmh.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/bmh.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.2/xNewsletter/admin/bmh.php 2014-01-17 19:44:03 UTC (rev 12268)
@@ -0,0 +1,404 @@
+<?php
+/**
+ * ****************************************************************************
+ * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
+ * ****************************************************************************
+ * XNEWSLETTER - MODULE FOR XOOPS
+ * Copyright (c) 2007 - 2012
+ * Goffy ( wedega.com )
+ *
+ * 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.
+ * ---------------------------------------------------------------------------
+ * @copyright Goffy ( wedega.com )
+ * @license GNU General Public License 2.0
+ * @package xNewsletter
+ * @author Goffy ( web...@we... )
+ *
+ * Version : $Id $
+ * ****************************************************************************
+ */
+
+include "admin_header.php";
+xoops_cp_header();
+//global $indexAdmin;
+
+// We recovered the value of the argument op in the URL$
+$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
+$bmh_id = xNewsletter_CleanVars($_REQUEST, 'bmh_id', 0, 'int');
+$bmh_measure = xNewsletter_CleanVars($_REQUEST, 'bmh_measure', 0, 'int');
+$filter = xNewsletter_CleanVars($_REQUEST, 'bmh_measure_filter', _AM_XNEWSLETTER_BMH_MEASURE_VAL_ALL, 'int');
+
+switch ($op)
+{
+case "bmh_delsubscr":
+
+ if ( (isset($_POST["ok"]) && $_POST["ok"] == 1) ) {
+ $count_err = 0;
+
+ $obj_bmh =& $bmhHandler->get($bmh_id);
+ $bmh_email = $obj_bmh->getVar("bmh_email");
+
+ $sql = "SELECT subscr_id FROM " . $xoopsDB->prefix("mod_xnewsletter_subscr") . " WHERE (";
+ $sql .= "subscr_email='" . $bmh_email . "'";
+ $sql .= ") LIMIT 1;";
+ if ( $user = $xoopsDB->query($sql) ) {
+ $row_user = $xoopsDB->fetchRow($user);
+ $subscr_id = intval($row_user[0]);
+ }
+ if ($subscr_id == 0) {
+ //set bmh_measure for all entries in bmh with this email
+ $sql_upd_measure = "UPDATE ".$xoopsDB->prefix("mod_xnewsletter_bmh")." SET `bmh_measure` = '"._AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING."'";
+ $sql_upd_measure .=" WHERE ((`".$xoopsDB->prefix("mod_xnewsletter_bmh")."`.`bmh_email` ='".$bmh_email."') AND (`".$xoopsDB->prefix("mod_xnewsletter_bmh")."`.`bmh_measure` ='0'))";
+ $xoopsDB->query($sql_upd_measure);
+ redirect_header("bmh.php?op=list", 5, _AM_XNEWSLETTER_BMH_ERROR_NO_SUBSCRID);
+ }
+ $obj_subscr =& $subscrHandler->get($subscr_id);
+
+ // delete subscriber
+ if (!$subscrHandler->delete($obj_subscr,true)) {
+ $actionprot_err = $obj_subscr->getHtmlErrors()."<br/><br/><br/>";
+ $count_err++;
+ }
+
+ //delete subscription
+ $crit_catsubscr = new CriteriaCompo();
+ $crit_catsubscr->add(new Criteria('catsubscr_subscrid', $subscr_id));
+ $numrows_catsubscr = $catsubscrHandler->getCount($crit_catsubscr);
+ if ($numrows_catsubscr > 0) {
+ $catsubscr_arr = $catsubscrHandler->getall($crit_catsubscr);
+ foreach (array_keys($catsubscr_arr) as $cat) {
+ $obj_catsubscr =& $catsubscrHandler->get($catsubscr_arr[$cat]->getVar("catsubscr_id"));
+ $obj_cat =& $catHandler->get($catsubscr_arr[$cat]->getVar("catsubscr_catid"));
+ $cat_mailinglist = $obj_cat->getVar("cat_mailinglist");
+
+ if ($catsubscrHandler->delete($obj_catsubscr, true)) {
+ //handle mailinglists
+ if ($cat_mailinglist > 0) {
+ require_once( XOOPS_ROOT_PATH."/modules/xNewsletter/include/mailinglist.php" );
+ subscribingMLHandler(0, $subscr_id, $cat_mailinglist);
+ }
+ } else {
+ $actionprot_err .= $obj_catsubscr->getHtmlErrors();
+ $count_err++;
+ }
+ }
+ }
+
+ if ($count_err == 0) {
+ redirect_header("bmh.php?op=handle_bmh&bmh_id=".$bmh_id."&bmh_measure="._AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE."&filter=".$filter, 3, _AM_XNEWSLETTER_FORMDELOK);
+ } else {
+ echo $actionprot_err;
+ }
+ } else {
+ xoops_confirm(array("ok" => 1, "bmh_id" => $bmh_id, "op" => "bmh_delsubscr", "filter" => $filter), "bmh.php", sprintf(_AM_XNEWSLETTER_BMH_MEASURE_DELETE_SURE));
+ }
+ break;
+
+ case "handle_bmh":
+ if ($bmh_id == 0) redirect_header("bmh.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+ if ($bmh_measure == 0) redirect_header("bmh.php", 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+
+ $obj_bmh =& $bmhHandler->get($bmh_id);
+
+ if ($obj_bmh->getVar("bmh_measure") == _AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE ) {
+ redirect_header("bmh.php?op=list&filter=".$filter."'", 3, _AM_XNEWSLETTER_BMH_MEASURE_ALREADY_DELETED);
+ }
+
+ $bmh_email = $obj_bmh->getVar("bmh_email");
+
+ if ($bmh_measure == _AM_XNEWSLETTER_BMH_MEASURE_VAL_QUIT) {
+ $sql = "UPDATE `".$xoopsDB->prefix("mod_xnewsletter_subscr")."` INNER JOIN `";
+ $sql .= $xoopsDB->prefix("mod_xnewsletter_catsubscr")."` ON `subscr_id` = `catsubscr_subscrid` ";
+ $sql .= "SET `catsubscr_quited` = ".time()." WHERE (((`subscr_email`)='";
+ $sql .= $bmh_email. "'))";
+ $result= $xoopsDB->queryF($sql) or die ("MySQL-Error: " . mysql_error());
+ }
+ //set bmh_measure for all entries in bmh with this email
+ $sql_upd = "UPDATE ".$xoopsDB->prefix("mod_xnewsletter_bmh")." SET ";
+ $sql_upd .="`bmh_measure` = '".$bmh_measure."'";
+ $sql_upd .=", `bmh_submitter` = '".$xoopsUser->uid()."'";
+ $sql_upd .=", `bmh_created` = '".time()."'";
+ $sql_upd .=" WHERE ((`".$xoopsDB->prefix("mod_xnewsletter_bmh")."`.`bmh_email` ='".$bmh_email."') AND (`".$xoopsDB->prefix("mod_xnewsletter_bmh")."`.`bmh_measure` ='0'))";
+ $result= $xoopsDB->queryF($sql_upd) or die ("MySQL-Error: " . mysql_error());
+
+ redirect_header("bmh.php?op=list&filter=".$filter, 3, _AM_XNEWSLETTER_FORMOK);
+
+ echo $obj_bmh->getHtmlErrors();
+ break;
+
+ case "run_bmh":
+
+ require_once('bmh_callback_database.php');
+ require_once(XOOPS_ROOT_PATH . '/modules/xNewsletter/include/phpmailer_bmh/class.phpmailer-bmh.php');
+
+ $accounts_crit = new CriteriaCompo();
+ $accounts_crit->add(new Criteria("accounts_use_bmh", "1"));
+ $numrows_acc = $accountsHandler->getCount($accounts_crit);
+
+ if ($numrows_acc > 0)
+ {
+ $accounts_arr = $accountsHandler->getall($accounts_crit);
+ $result_bmh = _AM_XNEWSLETTER_BMH_SUCCESSFUL."<br/>";
+
+ foreach (array_keys($accounts_arr) as $acc)
+ {
+ $bmh = new BounceMailHandler();
+ $bmh->verbose = VERBOSE_SIMPLE; //VERBOSE_REPORT; //VERBOSE_DEBUG; //VERBOSE_QUIET; // default is VERBOSE_SIMPLE
+ //$bmh->use_fetchstructure = true; // true is default, no need to speficy
+ //$bmh->testmode = true; // false is default, no need to specify
+ //$bmh->debug_body_rule = false; // false is default, no need to specify
+ //$bmh->debug_dsn_rule = false; // false is default, no need to specify
+ //$bmh->purge_unprocessed = false; // false is default, no need to specify
+ $bmh->disable_delete = true; // detected mails will be not deleted, default is false
+
+ /*
+ * for local mailbox (to process .EML files)
+ */
+ //$bmh->openLocalDirectory('/home/email/temp/mailbox');
+ //$bmh->processMailbox();
+
+ /*
+ * for remote mailbox
+ */
+ $bmh->mailhost = $accounts_arr[$acc]->getVar("accounts_server_in"); // your mail server
+ $bmh->mailbox_username = $accounts_arr[$acc]->getVar("accounts_username"); // your mailbox username
+ $bmh->mailbox_password = $accounts_arr[$acc]->getVar("accounts_password"); // your mailbox password
+ $bmh->port = $accounts_arr[$acc]->getVar("accounts_port_in"); // the port to access your mailbox, default is 143
+ if ($accounts_arr[$acc]->getVar("accounts_type") == _AM_ACCOUNTS_TYPE_VAL_POP3) {
+ $bmh->service = 'pop3'; // the service to use (imap or pop3), default is 'imap'
+ } else {
+ $bmh->service = 'imap'; // the service to use (imap or pop3), default is 'imap'
+ }
+ $bmh->service_option = $accounts_arr[$acc]->getVar("accounts_securetype_in"); // the service options (none, tls, notls, ssl, etc.), default is 'notls'
+ $bmh->boxname = $accounts_arr[$acc]->getVar("accounts_inbox"); // the mailbox to access, default is 'INBOX'
+ $verif_movehard = $accounts_arr[$acc]->getVar("accounts_movehard") == '1' ? true : false;
+ $bmh->moveHard = $verif_movehard; // default is false
+ $bmh->hardMailbox = $accounts_arr[$acc]->getVar("accounts_hardbox"); // default is 'INBOX.hard' - NOTE: must start with 'INBOX.'
+ $verif_movesoft = $accounts_arr[$acc]->getVar("accounts_movesoft") == '1' ? true : false;
+ $bmh->moveSoft = $verif_movesoft; // default is false
+ $bmh->softMailbox = $accounts_arr[$acc]->getVar("accounts_softbox"); // default is 'INBOX.soft' - NOTE: must start with 'INBOX.'
+ //$bmh->deleteMsgDate = '2009-01-05'; // format must be as 'yyyy-mm-dd'
+
+ /*
+ * rest used regardless what type of connection it is
+ */
+
+ $bmh->openMailbox();
+ $bmh->processMailbox();
+
+ $result_bmh .= str_replace("%b", $accounts_arr[$acc]->getVar("accounts_yourmail"), _AM_XNEWSLETTER_BMH_RSLT);
+ $result_bmh = str_replace("%r", $bmh->result_total, $result_bmh);
+ $result_bmh = str_replace("%a", $bmh->result_processed, $result_bmh);
+ $result_bmh = str_replace("%n", $bmh->result_unprocessed, $result_bmh);
+ $result_bmh = str_replace("%m", $bmh->result_moved, $result_bmh);
+ $result_bmh = str_replace("%d", $bmh->result_deleted, $result_bmh);
+ }
+ redirect_header("bmh.php", 5, $result_bmh);
+ } else {
+ redirect_header("bmh.php", 3, _AM_XNEWSLETTER_BMH_ERROR_NO_ACTIVE);
+ }
+ break;
+
+ case "list":
+ default:
+ echo $indexAdmin->addNavigation('bmh.php');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_RUNBMH, 'bmh.php?op=run_bmh', 'add');
+ echo $indexAdmin->renderButton();
+
+ $arr_measure_type=array(
+ _AM_XNEWSLETTER_BMH_MEASURE_VAL_ALL=>_AM_XNEWSLETTER_BMH_MEASURE_ALL,
+ _AM_XNEWSLETTER_BMH_MEASURE_VAL_PENDING=>_AM_XNEWSLETTER_BMH_MEASURE_PENDING,
+ _AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING=>_AM_XNEWSLETTER_BMH_MEASURE_NOTHING,
+ _AM_XNEWSLETTER_BMH_MEASURE_VAL_QUIT=>_AM_XNEWSLETTER_BMH_MEASURE_QUITED,
+ _AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE=>_AM_XNEWSLETTER_BMH_MEASURE_DELETED);
+
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $criteria = new CriteriaCompo();
+ if ($filter > -1) $criteria->add(new Criteria("bmh_measure", $filter));
+ $criteria->setSort("bmh_id");
+ $criteria->setOrder("DESC");
+ $numrows = $bmhHandler->getCount($criteria);
+ $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ $bmh_arr = $bmhHandler->getall($criteria);
+ if ( $numrows > $limit ) {
+ include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
+ $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list');
+ $pagenav = $pagenav->renderNav(4);
+ } else {
+ $pagenav = '';
+ }
+
+ //form to filter result
+ echo "<table class='outer width100' cellspacing='1'><tr class='odd'><td>";
+ echo "<form id='form_filter' enctype='multipart/form-data' method='post' action='bmh.php' name='form_filter'>";
+
+ $checked = ($filter == -1) ? "checked='checked'" : "";
+ echo "<input id='bmh_measure_all' type='radio' $checked value='-1' title='"._AM_XNEWSLETTER_BMH_MEASURE."' name='bmh_measure_filter' onclick='submit()' />
+ <label for='bmh_measure_all' name='bmh_measure_all'>"._AM_XNEWSLETTER_BMH_MEASURE_ALL."</label>";
+
+ $checked = ($filter == _AM_XNEWSLETTER_BMH_MEASURE_VAL_PENDING) ? "checked='checked'" : "";
+ echo "<input id='bmh_measure0' type='radio' $checked value='"._AM_XNEWSLETTER_BMH_MEASURE_VAL_PENDING."' title='"._AM_XNEWSLETTER_BMH_MEASURE."' name='bmh_measure_filter' onclick='submit()' />
+ <label for='bmh_measure0' name='bmh_measure0'>"._AM_XNEWSLETTER_BMH_MEASURE_PENDING."</label>";
+
+ $checked = ($filter == _AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING) ? "checked='checked'" : "";
+ echo "<input id='bmh_measure1' type='radio' $checked value='"._AM_XNEWSLETTER_BMH_MEASURE_VAL_NOTHING."' title='"._AM_XNEWSLETTER_BMH_MEASURE."' name='bmh_measure_filter' onclick='submit()' />
+ <label for='bmh_measure1' name='bmh_measure1'>"._AM_XNEWSLETTER_BMH_MEASURE_NOTHING."</label>";
+
+ $checked = ($filter == _AM_XNEWSLETTER_BMH_MEASURE_VAL_QUIT) ? "checked='checked'" : "";
+ echo "<input id='bmh_measure2' type='radio' $checked value='"._AM_XNEWSLETTER_BMH_MEASURE_VAL_QUIT."' title='"._AM_XNEWSLETTER_BMH_MEASURE."' name='bmh_measure_filter' onclick='submit()'>
+ <label for='bmh_measure2' name='bmh_measure2'>"._AM_XNEWSLETTER_BMH_MEASURE_QUITED."</label>";
+
+ $c...
[truncated message content] |