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...> - 2013-12-22 14:32:02
|
Revision: 12242
http://sourceforge.net/p/xoops/svn/12242
Author: luciorota
Date: 2013-12-22 14:31:57 +0000 (Sun, 22 Dec 2013)
Log Message:
-----------
added makeSelBoxOptionsArray() method to XoopsObjectTree object
Added Paths:
-----------
XoopsModules/wfdownloads/trunk/wfdownloads/class/tree.php
Added: XoopsModules/wfdownloads/trunk/wfdownloads/class/tree.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/tree.php (rev 0)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/tree.php 2013-12-22 14:31:57 UTC (rev 12242)
@@ -0,0 +1,74 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * WfdownloadsObjectTree
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author lucio <luc...@gm...>
+ * @package Wfdownloads
+ * @since 3.23
+ * @version $Id:$
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+include_once XOOPS_ROOT_PATH . '/class/tree.php';
+
+/**
+ * Form element that ...
+ */
+class WfdownloadsObjectTree extends XoopsObjectTree
+{
+ /**
+ * Make options for a select box from
+ *
+ * @param string $fieldName Name of the member variable from the node objects that should be used as the title for the options.
+ * @param int $key ID of the object to display as the root of select options
+ * @param string $optionsArray (reference to a string when called from outside) Result from previous recursions
+ * @param string $prefix_orig String to indent items at deeper levels
+ * @param string $prefix_curr String to indent the current item
+ * @return
+ * @access private
+ */
+ function _makeSelBoxOptionsArray( $fieldName, $key, &$optionsArray, $prefix_orig, $prefix_curr = '' )
+ {
+ if ($key > 0) {
+ $value = $this->_tree[$key]['obj']->getVar( $this->_myId );
+ $optionsArray[$value] = $prefix_curr . $this->_tree[$key]['obj']->getVar( $fieldName );
+ $prefix_curr .= $prefix_orig;
+ }
+ if ( isset( $this->_tree[$key]['child'] ) && !empty( $this->_tree[$key]['child'] ) ) {
+ foreach ($this->_tree[$key]['child'] as $childkey) {
+ $this->_makeSelBoxOptionsArray( $fieldName, $childkey, $optionsArray, $prefix_orig, $prefix_curr );
+ }
+ }
+ return $optionsArray;
+ }
+
+ /**
+ * Make a select box with options from the tree
+ *
+ * @param string $fieldName Name of the member variable from the node objects that should be used as the title for the options.
+ * @param string $prefix String to indent deeper levels
+ * @param bool $addEmptyOption Set TRUE to add an empty option with value "0" at the top of the hierarchy
+ * @param integer $key ID of the object to display as the root of select options
+ * @return array $optionsArray Associative array of value->name pairs, useful for {@link XoopsFormSelect}->addOptionArray method
+ */
+ function makeSelBoxOptionsArray( $fieldName, $prefix = '-', $addEmptyOption = false, $key = 0 )
+ {
+ $optionsArray = array();
+ if ( $addEmptyOption )
+ $optionsArray[0] = '';
+ return $this->_makeSelBoxOptionsArray( $fieldName, $key, $optionsArray, $prefix );
+ }
+
+}
|
|
From: <go...@us...> - 2013-12-20 09:58:49
|
Revision: 12241
http://sourceforge.net/p/xoops/svn/12241
Author: goffy
Date: 2013-12-20 09:58:46 +0000 (Fri, 20 Dec 2013)
Log Message:
-----------
only added missing items to changelog.txt
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt 2013-12-11 05:27:59 UTC (rev 12240)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt 2013-12-20 09:58:46 UTC (rev 12241)
@@ -2,6 +2,9 @@
--------------
- added newsletter info field is html compatible (luciorota)
- added new tag <{$title}> in letter templates (luciorota)
+ - added new error code if no emailaccount available (cesag/goffy)
+ - fixed bugs in display (cesag/goffy)
+ - fixed bug concerning attachements (horst/goffy)
- added new block for general info (feichtl/goffy)
- removed xoops captcha when unsubscribe by link (feichtl/goffy)
- transfered error text to language file (feichtl/goffy)
|
|
From: <rgr...@us...> - 2013-12-11 05:28:02
|
Revision: 12240
http://sourceforge.net/p/xoops/svn/12240
Author: rgriffith
Date: 2013-12-11 05:27:59 +0000 (Wed, 11 Dec 2013)
Log Message:
-----------
Apply patch from Irmtfan to prevent multiple inclusions of a module's xoops_version.php #1274
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/kernel/module.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/kernel/module.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/kernel/module.php 2013-12-10 21:44:07 UTC (rev 12239)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/kernel/module.php 2013-12-11 05:27:59 UTC (rev 12240)
@@ -224,10 +224,17 @@
*
* @param string $dirname Module directory
* @param bool $verbose Give an error on fail?
+ *
+ * @return bool true if loaded
*/
function loadInfo($dirname, $verbose = true)
{
+ static $modVersions;
$dirname = basename($dirname);
+ if(isset($modVersions[$dirname])) {
+ $this->modinfo = $modVersions[$dirname];
+ return true;
+ }
global $xoopsConfig;
if (file_exists($file = $GLOBALS['xoops']->path('modules/' . $dirname . '/language/' . $xoopsConfig['language'] . '/modinfo.php'))) {
include_once $file;
@@ -243,7 +250,8 @@
return false;
}
include $file;
- $this->modinfo = $modversion;
+ $modVersions[$dirname] = $modversion;
+ $this->modinfo = $modVersions[$dirname];
return true;
}
|
|
From: <rgr...@us...> - 2013-12-10 21:44:11
|
Revision: 12239
http://sourceforge.net/p/xoops/svn/12239
Author: rgriffith
Date: 2013-12-10 21:44:07 +0000 (Tue, 10 Dec 2013)
Log Message:
-----------
Fix potential security issues reported by Pedro Ribeiro of Agile Information Security.
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php 2013-12-10 21:35:46 UTC (rev 12238)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php 2013-12-10 21:44:07 UTC (rev 12239)
@@ -38,7 +38,7 @@
if (!$GLOBALS['xoopsSecurity']->check()) {
$GLOBALS['xoopsTpl']->assign('errormsg', implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
} else if (empty($_REQUEST['ok'])) {
- xoops_confirm(array('ok' => 1, 'delete_messages' => 1, 'op' => $_REQUEST['op'], 'msg_id'=> serialize(array_map("intval", $_POST['msg_id']))), $_SERVER['REQUEST_URI'], _PM_SURE_TO_DELETE);
+ xoops_confirm(array('ok' => 1, 'delete_messages' => 1, 'op' => $_REQUEST['op'], 'msg_id'=> json_encode(array_map("intval", $_POST['msg_id']))), $_SERVER['REQUEST_URI'], _PM_SURE_TO_DELETE);
include $GLOBALS['xoops']->path('footer.php');
exit();
} else {
|
|
From: <rgr...@us...> - 2013-12-10 21:35:52
|
Revision: 12238
http://sourceforge.net/p/xoops/svn/12238
Author: rgriffith
Date: 2013-12-10 21:35:46 +0000 (Tue, 10 Dec 2013)
Log Message:
-----------
Fix potential security issues reported by Pedro Ribeiro of Agile Information Security.
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/viewpmsg.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/class/protector.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php 2013-12-09 21:08:35 UTC (rev 12237)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/viewpmsg.php 2013-12-10 21:35:46 UTC (rev 12238)
@@ -42,9 +42,12 @@
include $GLOBALS['xoops']->path('footer.php');
exit();
} else {
- $_POST['msg_id'] = unserialize($_REQUEST['msg_id']);
- $size = count($_POST['msg_id']);
- $msg = $_POST['msg_id'];
+ $clean_msg_id = json_decode($_POST['msg_id'], true, 2);
+ if (!empty($clean_msg_id)) {
+ $clean_msg_id = array_map("intval", $clean_msg_id);
+ }
+ $size = count($clean_msg_id);
+ $msg =& $clean_msg_id;
for ($i = 0; $i < $size; $i++) {
$pm =& $pm_handler->get($msg[$i]);
if ($pm->getVar('to_userid') == $GLOBALS['xoopsUser']->getVar('uid')) {
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/viewpmsg.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/viewpmsg.php 2013-12-09 21:08:35 UTC (rev 12237)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/viewpmsg.php 2013-12-10 21:35:46 UTC (rev 12238)
@@ -33,13 +33,16 @@
exit();
} elseif (empty($_REQUEST['ok'])) {
include $GLOBALS['xoops']->path('header.php');
- xoops_confirm(array('ok' => 1, 'delete_messages' => 1, 'msg_id'=> serialize(array_map("intval", $_POST['msg_id']))), $_SERVER['REQUEST_URI'], _PM_SURE_TO_DELETE);
+ xoops_confirm(array('ok' => 1, 'delete_messages' => 1, 'msg_id'=> json_encode(array_map("intval", $_POST['msg_id']))), $_SERVER['REQUEST_URI'], _PM_SURE_TO_DELETE);
include $GLOBALS['xoops']->path('footer.php');
exit();
}
- $_POST['msg_id'] = unserialize($_REQUEST['msg_id']);
- $size = count($_POST['msg_id']);
- $msg =& $_POST['msg_id'];
+ $clean_msg_id = json_decode($_POST['msg_id'], true, 2);
+ if (!empty($clean_msg_id)) {
+ $clean_msg_id = array_map("intval", $clean_msg_id);
+ }
+ $size = count($clean_msg_id);
+ $msg =& $clean_msg_id;
for ($i = 0; $i < $size; $i++) {
$pm =& $pm_handler->get(intval($msg[$i]));
if ($pm->getVar('to_userid') == $xoopsUser->getVar('uid')) {
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/class/protector.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/class/protector.php 2013-12-09 21:08:35 UTC (rev 12237)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/class/protector.php 2013-12-10 21:35:46 UTC (rev 12238)
@@ -215,7 +215,11 @@
}
}
- mysql_query( "INSERT INTO ".XOOPS_DB_PREFIX."_".$this->mydirname."_log SET ip='".addslashes($ip)."',agent='".addslashes($agent)."',type='".addslashes($type)."',description='".addslashes($this->message)."',uid='".intval($uid)."',timestamp=NOW()" , $this->_conn ) ;
+ mysql_query( "INSERT INTO ".XOOPS_DB_PREFIX."_".$this->mydirname."_log SET ip='"
+ . mysql_real_escape_string($ip)."',agent='"
+ . mysql_real_escape_string($agent)."',type='"
+ . mysql_real_escape_string($type)."',description='"
+ . mysql_real_escape_string($this->message)."',uid='".intval($uid)."',timestamp=NOW()" , $this->_conn ) ;
$this->_logged = true ;
return true ;
|
|
From: <luc...@us...> - 2013-12-09 21:08:41
|
Revision: 12237
http://sourceforge.net/p/xoops/svn/12237
Author: luciorota
Date: 2013-12-09 21:08:35 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
added newsletter info field is html compatible
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/admin/cat.php
XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_cat.php
XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/trunk/xNewsletter/header.php
XoopsModules/xnewsletter/trunk/xNewsletter/index.php
XoopsModules/xnewsletter/trunk/xNewsletter/letter.php
XoopsModules/xnewsletter/trunk/xNewsletter/print.php
XoopsModules/xnewsletter/trunk/xNewsletter/protocol.php
XoopsModules/xnewsletter/trunk/xNewsletter/sendletter.php
XoopsModules/xnewsletter/trunk/xNewsletter/sql/mysql.sql
XoopsModules/xnewsletter/trunk/xNewsletter/templates/blocks/xnewsletter_catsubscr_block_day.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/blocks/xnewsletter_catsubscr_block_recent.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/blocks/xnewsletter_letter_block_day.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/blocks/xnewsletter_letter_block_random.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/blocks/xnewsletter_letter_block_recent.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/blocks/xnewsletter_subscrinfo_block.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xNewsletter_footer.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xNewsletter_header.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xNewsletter_index.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xnewsletter_letter.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xnewsletter_letter_list.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xnewsletter_subscription.html
XoopsModules/xnewsletter/trunk/xNewsletter/templates/xnewsletter_subscription_result.html
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/admin/cat.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/admin/cat.php 2013-12-09 20:59:44 UTC (rev 12236)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/admin/cat.php 2013-12-09 21:08:35 UTC (rev 12237)
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
@@ -31,310 +31,307 @@
//global $pathIcon, $indexAdmin;
global $xoopsModuleConfig;
// We recovered the value of the argument op in the URL$
-$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
+$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
$cat_id = xNewsletter_CleanVars($_REQUEST, 'cat_id', 0, 'int');
-switch ($op)
-{
- case "list":
- default:
- echo $indexAdmin->addNavigation('cat.php');
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCAT, 'cat.php?op=new_cat', 'add');
- echo $indexAdmin->renderButton();
- $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
- $criteria = new CriteriaCompo();
- $criteria->setSort("cat_id ASC, cat_name");
- $criteria->setOrder("ASC");
- $numrows = $catHandler->getCount();
- $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
- $criteria->setStart($start);
- $criteria->setLimit($limit);
- $cat_arr = $catHandler->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_CAT_ID."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_NAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_INFO."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_ADMIN."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_CREATE."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_LIST."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_READ."</th>";
- if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
- echo "<th class='center'>"._AM_XNEWSLETTER_CAT_MAILINGLIST."</th>";
- }
- echo "<th class='center width5'>"._AM_XNEWSLETTER_FORMACTION."</th>
- </tr>";
-
- $class = "odd";
+switch ($op) {
+ case "list" :
+ default:
+ echo $indexAdmin->addNavigation('cat.php');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCAT, 'cat.php?op=new_cat', 'add');
+ echo $indexAdmin->renderButton();
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $criteria = new CriteriaCompo();
+ $criteria->setSort("cat_id ASC, cat_name");
+ $criteria->setOrder("ASC");
+ $numrows = $catHandler->getCount();
+ $start = xNewsletter_CleanVars ( $_REQUEST, 'start', 0, 'int' );
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ $cat_arr = $catHandler->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 = '';
+ }
- $member_handler =& xoops_gethandler('member');
- $grouplist = $member_handler->getGroupList();
- global $xoopsModule;
- $mid = $xoopsModule->mid();
- $gperm_handler = xoops_gethandler('groupperm');
+ // View Table
+ if ($numrows > 0) {
+ echo "<table class='outer width100' cellspacing='1'>";
+ echo "<tr>";
+ echo " <th class='center width2'>"._AM_XNEWSLETTER_CAT_ID . "</th>";
+ echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_NAME . "</th>";
+ echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_INFO . "</th>";
+ echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_ADMIN . "</th>";
+ echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_CREATE . "</th>";
+ echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_LIST . "</th>";
+ echo " <th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_READ . "</th>";
+ if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_MAILINGLIST . "</th>";
+ }
+ echo "<th class='center width5'>" . _AM_XNEWSLETTER_FORMACTION . "</th>";
+ echo "</tr>";
- foreach (array_keys($cat_arr) as $i)
- {
- echo "<tr class='".$class."'>";
- $class = ($class == "even") ? "odd" : "even";
- echo "<td class='center'>".$i."</td>";
- echo "<td class='center'>".$cat_arr[$i]->getVar("cat_name")."</td>";
- echo "<td class='center'>".$cat_arr[$i]->getVar("cat_info")."</td>";
-
- //cat_gperms_admin;
- $arr_cat_gperms_admin = "";
- $cat_gperms_admin = "";
- $arr_cat_gperms_admin =& $gperm_handler->getGroupIds('newsletter_admin_cat', $i, $mid);
- sort ( $arr_cat_gperms_admin );
- foreach($arr_cat_gperms_admin as $groupid_admin) {
- $cat_gperms_admin .= $grouplist[$groupid_admin]." | ";
- }
- $cat_gperms_admin = substr($cat_gperms_admin, 0, -3);
- echo "<td class='center'>".$cat_gperms_admin."</td>";
-
- //cat_gperms_create
- $arr_cat_gperms_create = "";
- $cat_gperms_create = "";
- $arr_cat_gperms_create =& $gperm_handler->getGroupIds('newsletter_create_cat', $i, $mid);
- sort ( $arr_cat_gperms_create );
- foreach($arr_cat_gperms_create as $groupid_create) {
- $cat_gperms_create .= $grouplist[$groupid_create]." | ";
- }
- $cat_gperms_create = substr($cat_gperms_create, 0, -3);
- echo "<td class='center'>".$cat_gperms_create."</td>";
+ $class = "odd";
- //cat_gperms_list
- $cat_gperms_list = "";
- $arr_cat_gperms_list = "";
- $arr_cat_gperms_list = & $gperm_handler->getGroupIds('newsletter_list_cat', $i, $mid);
- sort ( $arr_cat_gperms_list );
- foreach($arr_cat_gperms_list as $groupid_list) {
- $cat_gperms_list .= $grouplist[$groupid_list]." | ";
- }
- $cat_gperms_list = substr($cat_gperms_list, 0, -3);
- echo "<td class='center'>".$cat_gperms_list."</td>";
-
- //cat_gperms_read
- $cat_gperms_read = "";
- $arr_cat_groupperms = "";
- $arr_cat_groupperms = & $gperm_handler->getGroupIds('newsletter_read_cat', $i, $mid);
- sort ( $arr_cat_groupperms );
- foreach($arr_cat_groupperms as $groupid_read) {
- $cat_gperms_read .= $grouplist[$groupid_read]." | ";
- }
- $cat_gperms_read = substr($cat_gperms_read, 0, -3);
- echo "<td class='center'>".$cat_gperms_read."</td>";
-
-
- if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
- echo "<td class='center'>".$cat_arr[$i]->getVar("cat_mailinglist")."</td>";
- }
- echo "<td class='center width5' nowrap='nowrap'>
- <a href='cat.php?op=edit_cat&cat_id=".$i."'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='"._EDIT."' title='"._EDIT."' /></a>
- <a href='cat.php?op=delete_cat&cat_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_CAT_ID."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_NAME."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_INFO."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_ADMIN."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_CREATE."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_READ."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_GPERMS_LIST."</th>
- <th class='center'>"._AM_XNEWSLETTER_CAT_MAILINGLIST."</th>
- <th class='center width5'>"._AM_XNEWSLETTER_FORMACTION."</th>
- </tr>";
- echo "</table><br /><br />";
- }
-
- break;
+ $member_handler =& xoops_gethandler('member');
+ $grouplist = $member_handler->getGroupList();
+ global $xoopsModule;
+ $mid = $xoopsModule->mid();
+ $gperm_handler = xoops_gethandler('groupperm');
- case "new_cat":
+ foreach (array_keys($cat_arr) as $i) {
+ echo "<tr class='" . $class . "'>";
+ $class = ($class == "even") ? "odd" : "even";
+ echo "<td class='center'>" . $i . "</td>";
+ echo "<td class='center'>" . $cat_arr[$i]->getVar("cat_name") . "</td>";
+ echo "<td>" . $cat_arr[$i]->getVar("cat_info") . "</td>";
+
+ // cat_gperms_admin;
+ $arr_cat_gperms_admin = "";
+ $cat_gperms_admin = "";
+ $arr_cat_gperms_admin =& $gperm_handler->getGroupIds('newsletter_admin_cat', $i, $mid);
+ sort ( $arr_cat_gperms_admin );
+ foreach($arr_cat_gperms_admin as $groupid_admin) {
+ $cat_gperms_admin .= $grouplist[$groupid_admin] . " | ";
+ }
+ $cat_gperms_admin = substr($cat_gperms_admin, 0, -3);
+ echo "<td class='center'>" . $cat_gperms_admin . "</td>";
+
+ // cat_gperms_create
+ $arr_cat_gperms_create = "";
+ $cat_gperms_create = "";
+ $arr_cat_gperms_create =& $gperm_handler->getGroupIds('newsletter_create_cat', $i, $mid);
+ sort ( $arr_cat_gperms_create );
+ foreach($arr_cat_gperms_create as $groupid_create) {
+ $cat_gperms_create .= $grouplist[$groupid_create]." | ";
+ }
+ $cat_gperms_create = substr($cat_gperms_create, 0, -3);
+ echo "<td class='center'>" . $cat_gperms_create . "</td>";
+
+ // cat_gperms_list
+ $cat_gperms_list = "";
+ $arr_cat_gperms_list = "";
+ $arr_cat_gperms_list = & $gperm_handler->getGroupIds('newsletter_list_cat', $i, $mid);
+ sort ( $arr_cat_gperms_list );
+ foreach($arr_cat_gperms_list as $groupid_list) {
+ $cat_gperms_list .= $grouplist[$groupid_list] . " | ";
+ }
+ $cat_gperms_list = substr($cat_gperms_list, 0, -3);
+ echo "<td class='center'>" . $cat_gperms_list . "</td>";
+
+ // cat_gperms_read
+ $cat_gperms_read = "";
+ $arr_cat_groupperms = "";
+ $arr_cat_groupperms = & $gperm_handler->getGroupIds('newsletter_read_cat', $i, $mid);
+ sort ( $arr_cat_groupperms );
+ foreach($arr_cat_groupperms as $groupid_read) {
+ $cat_gperms_read .= $grouplist[$groupid_read] . " | ";
+ }
+ $cat_gperms_read = substr($cat_gperms_read, 0, -3);
+ echo "<td class='center'>". $cat_gperms_read . "</td>";
+
+ if (isset($xoopsModuleConfig['xn_use_mailinglist']) && $xoopsModuleConfig['xn_use_mailinglist'] == 1) {
+ echo "<td class='center'>" . $cat_arr[$i]->getVar("cat_mailinglist") . "</td>";
+ }
+ echo "<td class='center width5' nowrap='nowrap'>";
+ echo "<a href='cat.php?op=edit_cat&cat_id=" . $i . "'><img src=".XNEWSLETTER_ICON."/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>";
+ echo " <a href='cat.php?op=delete_cat&cat_id=" . $i . "'><img src=" . XNEWSLETTER_ICON . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></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'>";
+ echo "<tr>";
+ echo "<th class='center width2'>" . _AM_XNEWSLETTER_CAT_ID . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_NAME . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_INFO . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_ADMIN . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_CREATE . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_READ . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_GPERMS_LIST . "</th>";
+ echo "<th class='center'>" . _AM_XNEWSLETTER_CAT_MAILINGLIST . "</th>";
+ echo "<th class='center width5'>" . _AM_XNEWSLETTER_FORMACTION . "</th>";
+ echo "</tr>";
+ echo "</table><br /><br />";
+ }
+ break;
+
+ case "new_cat" :
echo $indexAdmin->addNavigation("cat.php");
$indexAdmin->addItemButton(_AM_XNEWSLETTER_CATLIST, 'cat.php?op=list', 'list');
echo $indexAdmin->renderButton();
$obj =& $catHandler->create();
$form = $obj->getForm();
- $form->display();
- break;
-
- case "save_cat":
- if ( !$GLOBALS["xoopsSecurity"]->check() ) {
- redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
- }
-
- $obj =& $catHandler->get($cat_id);
-
- //Form cat_name
- $obj->setVar("cat_name", xNewsletter_CleanVars( $_REQUEST, "cat_name", "", "string") );
- //Form cat_info
- $obj->setVar("cat_info", xNewsletter_CleanVars( $_REQUEST, "cat_info", "", "string") );
-
- global $xoopsDB, $xoopsModule;
+ $form->display();
+ break;
- $mid = $xoopsModule->mid();
- $gperm_handler = xoops_gethandler('groupperm');
-
- //Form cat_mailinglist
- $cat_mailinglist = !empty($_REQUEST["cat_mailinglist"]) ? intval($_REQUEST["cat_mailinglist"]) : 0;
- $obj->setVar("cat_mailinglist", $cat_mailinglist);
-
- //Form cat_submitter
- $obj->setVar("cat_submitter", $xoopsUser->uid());
- //Form cat_created
- $obj->setVar("cat_created", time());
-
- if ($catHandler->insert($obj)) {
-
- $cat_id = $obj->getVar("cat_id");
-
- //Form cat_gperms_admin
- $arr_cat_gperms_create = $_POST["cat_gperms_admin"];
- if ($cat_id > 0) {
- $sql = "DELETE FROM `".$xoopsDB->prefix("group_permission")."` WHERE `gperm_name`='newsletter_admin_cat' AND `gperm_itemid`=$cat_id;";
- $xoopsDB->query($sql);
- }
- //admin
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
- $gperm->setVar('gperm_name', 'newsletter_admin_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- foreach($arr_cat_gperms_create as $key => $cat_groupperm) {
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', $cat_groupperm);
- $gperm->setVar('gperm_name', 'newsletter_admin_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- }
-
- //Form cat_gperms_create
- $arr_cat_gperms_create = $_POST["cat_gperms_create"];
- if ($cat_id > 0) {
- $sql = "DELETE FROM `".$xoopsDB->prefix("group_permission")."` WHERE `gperm_name`='newsletter_create_cat' AND `gperm_itemid`=$cat_id;";
- $xoopsDB->query($sql);
- }
- //admin
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
- $gperm->setVar('gperm_name', 'newsletter_create_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- foreach($arr_cat_gperms_create as $key => $cat_groupperm) {
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', $cat_groupperm);
- $gperm->setVar('gperm_name', 'newsletter_create_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- }
-
- //Form cat_gperms_read
- $arr_cat_gperms_read = $_POST["cat_gperms_read"];
- if ($cat_id > 0) {
- $sql = "DELETE FROM `".$xoopsDB->prefix("group_permission")."` WHERE `gperm_name`='newsletter_read_cat' AND `gperm_itemid`=$cat_id;";
- $xoopsDB->query($sql);
- }
- //admin
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
- $gperm->setVar('gperm_name', 'newsletter_read_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- foreach($arr_cat_gperms_read as $key => $cat_groupperm) {
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', $cat_groupperm);
- $gperm->setVar('gperm_name', 'newsletter_read_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- }
-
- //Form cat_gperms_list
- $arr_cat_gperms_list = $_POST["cat_gperms_list"];
- if ($cat_id > 0) {
- $sql = "DELETE FROM `".$xoopsDB->prefix("group_permission")."` WHERE `gperm_name`='newsletter_list_cat' AND `gperm_itemid`=$cat_id;";
- $xoopsDB->query($sql);
- }
- //admin
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
- $gperm->setVar('gperm_name', 'newsletter_list_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- foreach($arr_cat_gperms_list as $key => $cat_groupperm) {
- $gperm =& $gperm_handler->create();
- $gperm->setVar('gperm_groupid', $cat_groupperm);
- $gperm->setVar('gperm_name', 'newsletter_list_cat');
- $gperm->setVar('gperm_modid', $mid);
- $gperm->setVar('gperm_itemid', $cat_id);
- $gperm_handler->insert($gperm);
- unset($gperm);
- }
-
- redirect_header("cat.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
- }
+ case "save_cat":
+ if ( !$GLOBALS["xoopsSecurity"]->check() ) {
+ redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ }
+
+ $obj =& $catHandler->get($cat_id);
- echo $obj->getHtmlErrors();
- $form =& $obj->getForm();
- $form->display();
- break;
-
- case "edit_cat":
- echo $indexAdmin->addNavigation("cat.php");
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCAT, 'cat.php?op=new_cat', 'add');
- $indexAdmin->addItemButton(_AM_XNEWSLETTER_CATLIST, 'cat.php?op=list', 'list');
- echo $indexAdmin->renderButton();
- $obj = $catHandler->get($cat_id);
- $form = $obj->getForm();
- $form->display();
- break;
-
- case "delete_cat":
- $obj =& $catHandler->get($_REQUEST["cat_id"]);
- if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) {
- if ( !$GLOBALS["xoopsSecurity"]->check() ) {
- redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
- }
- if ($catHandler->delete($obj)) {
- redirect_header("cat.php", 3, _AM_XNEWSLETTER_FORMDELOK);
- } else {
- echo $obj->getHtmlErrors();
- }
- } else {
- xoops_confirm(array("ok" => 1, "cat_id" => $cat_id, "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $obj->getVar("cat_name")));
- }
- break;
+ // Form cat_name
+ $obj->setVar("cat_name", $_POST["cat_name"] );
+ // Form cat_info
+ $obj->setVar("cat_info", $_POST["cat_info"] );
+
+ global $xoopsDB, $xoopsModule;
+
+ $mid = $xoopsModule->mid();
+ $gperm_handler = xoops_gethandler('groupperm');
+
+ // Form cat_mailinglist
+ $cat_mailinglist = !empty($_REQUEST["cat_mailinglist"]) ? intval($_REQUEST["cat_mailinglist"]) : 0;
+ $obj->setVar("cat_mailinglist", $cat_mailinglist);
+
+ // Form cat_submitter
+ $obj->setVar("cat_submitter", $xoopsUser->uid());
+ // Form cat_created
+ $obj->setVar("cat_created", time());
+
+ if ($catHandler->insert($obj)) {
+ $cat_id = $obj->getVar("cat_id");
+
+ //Form cat_gperms_admin
+ $arr_cat_gperms_create = $_POST["cat_gperms_admin"];
+ if ($cat_id > 0) {
+ $sql = "DELETE FROM `" . $xoopsDB->prefix("group_permission") . "`";
+ $sql.= " WHERE `gperm_name`='newsletter_admin_cat' AND `gperm_itemid`={$cat_id};";
+ $xoopsDB->query($sql);
+ }
+ //admin
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
+ $gperm->setVar('gperm_name', 'newsletter_admin_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ foreach($arr_cat_gperms_create as $key => $cat_groupperm) {
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', $cat_groupperm);
+ $gperm->setVar('gperm_name', 'newsletter_admin_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ }
+
+ // Form cat_gperms_create
+ $arr_cat_gperms_create = $_POST["cat_gperms_create"];
+ if ($cat_id > 0) {
+ $sql = "DELETE FROM `".$xoopsDB->prefix("group_permission")."`";
+ $sql.= " WHERE `gperm_name`='newsletter_create_cat' AND `gperm_itemid`={$cat_id};";
+ $xoopsDB->query($sql);
+ }
+ //admin
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
+ $gperm->setVar('gperm_name', 'newsletter_create_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ foreach($arr_cat_gperms_create as $key => $cat_groupperm) {
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', $cat_groupperm);
+ $gperm->setVar('gperm_name', 'newsletter_create_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ }
+
+ // Form cat_gperms_read
+ $arr_cat_gperms_read = $_POST["cat_gperms_read"];
+ if ($cat_id > 0) {
+ $sql = "DELETE FROM `" . $xoopsDB->prefix("group_permission") . "`";
+ $sql.= " WHERE `gperm_name`='newsletter_read_cat' AND `gperm_itemid`={$cat_id};";
+ $xoopsDB->query($sql);
+ }
+ //admin
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
+ $gperm->setVar('gperm_name', 'newsletter_read_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ foreach($arr_cat_gperms_read as $key => $cat_groupperm) {
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', $cat_groupperm);
+ $gperm->setVar('gperm_name', 'newsletter_read_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ }
+
+ // Form cat_gperms_list
+ $arr_cat_gperms_list = $_POST["cat_gperms_list"];
+ if ($cat_id > 0) {
+ $sql = "DELETE FROM `" . $xoopsDB->prefix("group_permission") . "`";
+ $sql.= " WHERE `gperm_name`='newsletter_list_cat' AND `gperm_itemid`={$cat_id};";
+ $xoopsDB->query($sql);
+ }
+ //admin
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', XOOPS_GROUP_ADMIN);
+ $gperm->setVar('gperm_name', 'newsletter_list_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ foreach($arr_cat_gperms_list as $key => $cat_groupperm) {
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', $cat_groupperm);
+ $gperm->setVar('gperm_name', 'newsletter_list_cat');
+ $gperm->setVar('gperm_modid', $mid);
+ $gperm->setVar('gperm_itemid', $cat_id);
+ $gperm_handler->insert($gperm);
+ unset($gperm);
+ }
+
+ redirect_header("cat.php?op=list", 2, _AM_XNEWSLETTER_FORMOK);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case "edit_cat" :
+ echo $indexAdmin->addNavigation("cat.php");
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWCAT, 'cat.php?op=new_cat', 'add');
+ $indexAdmin->addItemButton(_AM_XNEWSLETTER_CATLIST, 'cat.php?op=list', 'list');
+ echo $indexAdmin->renderButton();
+ $obj = $catHandler->get($cat_id);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case "delete_cat" :
+ $obj =& $catHandler->get($_REQUEST["cat_id"]);
+ if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) {
+ if ( !$GLOBALS["xoopsSecurity"]->check() ) {
+ redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors()));
+ }
+ if ($catHandler->delete($obj)) {
+ redirect_header("cat.php", 3, _AM_XNEWSLETTER_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array("ok" => 1, "cat_id" => $cat_id, "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $obj->getVar("cat_name")));
+ }
+ break;
}
include "admin_footer.php";
-?>
\ No newline at end of file
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_cat.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_cat.php 2013-12-09 20:59:44 UTC (rev 12236)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_cat.php 2013-12-09 21:08:35 UTC (rev 12237)
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
@@ -27,159 +27,160 @@
*/
if (!defined("XOOPS_ROOT_PATH")) {
- die("XOOPS root path not defined");
+ die("XOOPS root path not defined");
}
class xnewsletter_cat extends XoopsObject
{
- //Constructor
- public function __construct()
- {
- $this->initVar("cat_id", XOBJ_DTYPE_INT, null, false, 8);
- $this->initVar("cat_name", XOBJ_DTYPE_TXTBOX, null, false, 100);
- $this->initVar("cat_info", XOBJ_DTYPE_TXTBOX);
- $this->initVar("cat_mailinglist", XOBJ_DTYPE_INT, null, false, 8);
- $this->initVar("cat_submitter", XOBJ_DTYPE_INT, null, false, 10);
- $this->initVar("cat_created", XOBJ_DTYPE_INT, null, false, 10);
- }
+ //Constructor
+ public function __construct()
+ {
+ $this->initVar("cat_id", XOBJ_DTYPE_INT, null, false, 8);
+ $this->initVar("cat_name", XOBJ_DTYPE_TXTBOX, null, false, 100);
+ $this->initVar("cat_info", XOBJ_DTYPE_TXTAREA, null, false);
+ $this->initVar("cat_mailinglist", XOBJ_DTYPE_INT, null, false, 8);
+ $this->initVar("cat_submitter", XOBJ_DTYPE_INT, null, false, 10);
+ $this->initVar("cat_created", XOBJ_DTYPE_INT, null, false, 10);
+ }
-
- public function getForm($action = false)
- {
- global $xoopsDB, $xoopsModuleConfig;
-
- include_once XOOPS_ROOT_PATH."/modules/xNewsletter/class/xNewsletter_mailinglist.php";
- $mailinglistHandler =& xoops_getModuleHandler("xNewsletter_mailinglist", "xNewsletter");
- $gperm_handler = xoops_gethandler('groupperm');
- global $xoopsModule;
- $mid = $xoopsModule->mid();
-
- if ($action === false) {
- $action = $_SERVER["REQUEST_URI"];
- }
-
- $title = $this->isNew() ? sprintf(_AM_XNEWSLETTER_CAT_ADD) : sprintf(_AM_XNEWSLETTER_CAT_EDIT);
- include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
- $form = new XoopsThemeForm($title, "form", $action, "post", true);
- $form->setExtra('enctype="multipart/form-data"');
-
- $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_CAT_NAME, "cat_name", 50, 255, $this->getVar("cat_name")), true);
- $form->addElement(new XoopsFormTextArea(_AM_XNEWSLETTER_CAT_INFO, "cat_info", $this->getVar("cat_info"), 4, 47), false);
+ public function getForm($action = false)
+ {
+ global $xoopsDB, $xoopsModuleConfig;
+
+ include_once XOOPS_ROOT_PATH . "/modules/xNewsletter/class/xNewsletter_mailinglist.php";
+ $mailinglistHandler =& xoops_getModuleHandler("xNewsletter_mailinglist", "xNewsletter");
+ $gperm_handler = xoops_gethandler('groupperm');
+ global $xoopsModule;
+ $mid = $xoopsModule->mid();
+
+ if ($action === false) {
+ $action = $_SERVER["REQUEST_URI"];
+ }
+
+ $title = $this->isNew() ? sprintf(_AM_XNEWSLETTER_CAT_ADD) : sprintf(_AM_XNEWSLETTER_CAT_EDIT);
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ $form = new XoopsThemeForm($title, "form", $action, "post", true);
+ $form->setExtra('enctype="multipart/form-data"');
+
+ $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_CAT_NAME, "cat_name", 50, 255, $this->getVar("cat_name",'e')), true);
+ $form->addElement(new XoopsFormDhtmlTextArea(_AM_XNEWSLETTER_CAT_INFO, "cat_info", $this->getVar("cat_info",'e')), false);
+
+ $member_handler = &xoops_gethandler('member');
+ $userGroups = $member_handler->getGroupList();
- $member_handler = &xoops_gethandler('member');
- $userGroups = $member_handler->getGroupList();
-
- // create admin checkbox
- foreach($userGroups as $group_id => $group_name) {
- if ($group_id == XOOPS_GROUP_ADMIN) {$group_id_admin = $group_id; $group_name_admin = $group_name;}
- }
- $select_perm_admin = new XoopsFormCheckBox("", "admin", XOOPS_GROUP_ADMIN);
- $select_perm_admin->addOption($group_id_admin, $group_name_admin);
- $select_perm_admin->setExtra("disabled='disabled'");
-
- // ********************************************************
- // permission read cat
- $cat_gperms_read = & $gperm_handler->getGroupIds('newsletter_read_cat', $this->getVar("cat_id"), $mid);
- $arr_cat_gperms_read = $this->isNew() ? "0" : $cat_gperms_read;
-
- $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_READ,'');
- // checkbox webmaster
- $perms_tray->addElement($select_perm_admin, false);
- // checkboxes other groups
- $select_perm = new XoopsFormCheckBox("", "cat_gperms_read", $arr_cat_gperms_read);
- foreach($userGroups as $group_id => $group_name) {
- if ($group_id != XOOPS_GROUP_ADMIN) $select_perm->addOption($group_id, $group_name);
- }
- $perms_tray->addElement($select_perm, false);
- $form->addElement($perms_tray, false);
- unset($perms_tray);
- unset($select_perm);
-
- // ********************************************************
- // permission create cat
- $cat_gperms_create =& $gperm_handler->getGroupIds('newsletter_create_cat', $this->getVar("cat_id"), $mid);
- $arr_cat_gperms_create = $this->isNew() ? "0" : $cat_gperms_create;
-
- $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_CREATE._AM_XNEWSLETTER_CAT_GPERMS_CREATE_DESC,'');
- // checkbox webmaster
- $perms_tray->addElement($select_perm_admin, false);
- // checkboxes other groups
- $select_perm = new XoopsFormCheckBox("", "cat_gperms_create", $arr_cat_gperms_create);
- foreach($userGroups as $group_id => $group_name) {
- if ($group_id != XOOPS_GROUP_ADMIN && $group_id != XOOPS_GROUP_ANONYMOUS) $select_perm->addOption($group_id, $group_name);
- }
- $perms_tray->addElement($select_perm, false);
- $form->addElement($perms_tray, false);
- unset($perms_tray);
- unset($select_perm);
-
- // ********************************************************
- // permission admin cat
- $cat_gperms_admin =& $gperm_handler->getGroupIds('newsletter_admin_cat', $this->getVar("cat_id"), $mid);
- $arr_cat_gperms_admin = $this->isNew() ? "0" : $cat_gperms_admin;
-
- $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_ADMIN._AM_XNEWSLETTER_CAT_GPERMS_ADMIN_DESC,'');
- // checkbox webmaster
- $perms_tray->addElement($select_perm_admin, false);
- // checkboxes other groups
- $select_perm = new XoopsFormCheckBox("", "cat_gperms_admin", $arr_cat_gperms_admin);
- foreach($userGroups as $group_id => $group_name) {
- if ($group_id != XOOPS_GROUP_ADMIN && $group_id != XOOPS_GROUP_ANONYMOUS) $select_perm->addOption($group_id, $group_name);
- }
- $perms_tray->addElement($select_perm, false);
- $form->addElement($perms_tray, false);
- unset($perms_tray);
- unset($select_perm);
-
- // ********************************************************
- // permission list subscriber of this cat
- $cat_gperms_list =& $gperm_handler->getGroupIds('newsletter_list_cat', $this->getVar("cat_id"), $mid);
- $arr_cat_gperms_admin = $this->isNew() ? "0" : $cat_gperms_list;
-
- $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_LIST,'');
- // checkbox webmaster
- $perms_tray->addElement($select_perm_admin, false);
- // checkboxes other groups
- $select_perm = new XoopsFormCheckBox("", "cat_gperms_list", $arr_cat_gperms_admin);
- foreach($userGroups as $group_id => $group_name) {
- if ($group_id != XOOPS_GROUP_ADMIN && $group_id != XOOPS_GROUP_ANONYMOUS) $select_perm->addOption($group_id, $group_name);
- }
- $perms_tray->addElement($select_perm, false);
- $form->addElement($perms_tray, false);
- unset($perms_tray);
- unset($select_perm);
-
- $cat_mailinglist = $this->isNew() ? "0" : $this->getVar("cat_mailinglist");
- $crit_mailinglist = new CriteriaCompo();
- $crit_mailinglist->setSort("mailinglist_id");
- $crit_mailinglist->setOrder("ASC");
- $numrows_mailinglist = $mailinglistHandler->getCount();
- if ($numrows_mailinglist > 0) {
- $opt_mailinglist = new XoopsFormRadio(_AM_XNEWSLETTER_LETTER_MAILINGLIST, "cat_mailinglist", $cat_mailinglist);
- $opt_mailinglist->addOption("0", _AM_XNEWSLETTER_LETTER_MAILINGLIST_NO);
- $mailinglist_arr = $mailinglistHandler->getall($crit_mailinglist);
- foreach (array_keys($mailinglist_arr) as $i) {
- $opt_mailinglist->addOption($i, $mailinglist_arr[$i]->getVar("mailinglist_name"));
- }
- $form->addElement($opt_mailinglist);
- }
+ // create admin checkbox
+ foreach($userGroups as $group_id => $group_name) {
+ if ($group_id == XOOPS_GROUP_ADMIN) {$group_id_admin = $group_id; $group_name_admin = $group_name;}
+ }
+ $select_perm_admin = new XoopsFormCheckBox("", "admin", XOOPS_GROUP_ADMIN);
+ $select_perm_admin->addOption($group_id_admin, $group_name_admin);
+ $select_perm_admin->setExtra("disabled='disabled'");
- $time = ($this->isNew()) ? time() : $this->getVar("cat_created");
- $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_ACCOUNTS_SUBMITTER, $GLOBALS['xoopsUser']->uname()));
- $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_ACCOUNTS_CREATED, formatTimestamp($time,'s') ));
-
- $form->addElement(new XoopsFormHidden("op", "save_cat"));
- $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
- return $form;
- }
+ // ********************************************************
+ // permission read cat
+ $cat_gperms_read = & $gperm_handler->getGroupIds('newsletter_read_cat', $this->getVar("cat_id"), $mid);
+ $arr_cat_gperms_read = $this->isNew() ? "0" : $cat_gperms_read;
+
+ $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_READ,'');
+ // checkbox webmaster
+ $perms_tray->addElement($select_perm_admin, false);
+ // checkboxes other groups
+ $select_perm = new XoopsFormCheckBox("", "cat_gperms_read", $arr_cat_gperms_read);
+ foreach($userGroups as $group_id => $group_name) {
+ if ($group_id != XOOPS_GROUP_ADMIN) $select_perm->addOption($group_id, $group_name);
+ }
+ $perms_tray->addElement($select_perm, false);
+ $form->addElement($perms_tray, false);
+ unset($perms_tray);
+ unset($select_perm);
+
+ // ********************************************************
+ // permission create cat
+ $cat_gperms_create =& $gperm_handler->getGroupIds('newsletter_create_cat', $this->getVar("cat_id"), $mid);
+ $arr_cat_gperms_create = $this->isNew() ? "0" : $cat_gperms_create;
+
+ $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_CREATE._AM_XNEWSLETTER_CAT_GPERMS_CREATE_DESC,'');
+ // checkbox webmaster
+ $perms_tray->addElement($select_perm_admin, false);
+ // checkboxes other groups
+ $select_perm = new XoopsFormCheckBox("", "cat_gperms_create", $arr_cat_gperms_create);
+ foreach($userGroups as $group_id => $group_name) {
+ if ($group_id != XOOPS_GROUP_ADMIN && $group_id != XOOPS_GROUP_ANONYMOUS) $select_perm->addOption($group_id, $group_name);
+ }
+ $perms_tray->addElement($select_perm, false);
+ $form->addElement($perms_tray, false);
+ unset($perms_tray);
+ unset($select_perm);
+
+ // ********************************************************
+ // permission admin cat
+ $cat_gperms_admin =& $gperm_handler->getGroupIds('newsletter_admin_cat', $this->getVar("cat_id"), $mid);
+ $arr_cat_gperms_admin = $this->isNew() ? "0" : $cat_gperms_admin;
+
+ $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_ADMIN._AM_XNEWSLETTER_CAT_GPERMS_ADMIN_DESC,'');
+ // checkbox webmaster
+ $perms_tray->addElement($select_perm_admin, false);
+ // checkboxes other groups
+ $select_perm = new XoopsFormCheckBox("", "cat_gperms_admin", $arr_cat_gperms_admin);
+ foreach($userGroups as $group_id => $group_name) {
+ if ($group_id != XOOPS_GROUP_ADMIN && $group_id != XOOPS_GROUP_ANONYMOUS) $select_perm->addOption($group_id, $group_name);
+ }
+ $perms_tray->addElement($select_perm, false);
+ $form->addElement($perms_tray, false);
+ unset($perms_tray);
+ unset($select_perm);
+
+ // ********************************************************
+ // permission list subscriber of this cat
+ $cat_gperms_list =& $gperm_handler->getGroupIds('newsletter_list_cat', $this->getVar("cat_id"), $mid);
+ $arr_cat_gperms_admin = $this->isNew() ? "0" : $cat_gperms_list;
+
+ $perms_tray = new XoopsFormElementTray(_AM_XNEWSLETTER_CAT_GPERMS_LIST,'');
+ // checkbox webmaster
+ $perms_tray->addElement($select_perm_admin, false);
+ // checkboxes other groups
+ $select_perm = new XoopsFormCheckBox("", "cat_gperms_list", $arr_cat_gperms_admin);
+ foreach($userGroups as $group_id => $group_name) {
+ if ($group_id != XOOPS_GROUP_ADMIN && $group_id != XOOPS_GROUP_ANONYMOUS) $select_perm->addOption($group_id, $group_name);
+ }
+ $perms_tray->addElement($select_perm, false);
+ $form->addElement($perms_tray, false);
+ unset($perms_tray);
+ unset($select_perm);
+
+ $cat_mailinglist = $this->isNew() ? "0" : $this->getVar("cat_mailinglist");
+ $crit_mailinglist = new CriteriaCompo();
+ $crit_mailinglist->setSort("mailinglist_id");
+ $crit_mailinglist->setOrder("ASC");
+ $numrows_mailinglist = $mailinglistHandler->getCount();
+ if ($numrows_mailinglist > 0) {
+ $opt_mailinglist = new XoopsFormRadio(_AM_XNEWSLETTER_LETTER_MAILINGLIST, "cat_mailinglist", $cat_mailinglist);
+ $opt_mailinglist->addOption("0", _AM_XNEWSLETTER_LETTER_MAILINGLIST_NO);
+ $mailinglist_arr = $mailinglistHandler->getall($crit_mailinglist);
+ foreach (array_keys($mailinglist_arr) as $i) {
+ $opt_mailinglist->addOption($i, $mailinglist_arr[$i]->getVar("mailinglist_name"));
+ }
+ $form->addElement($opt_mailinglist);
+ }
+
+ $time = ($this->isNew()) ? time() : $this->getVar("cat_created");
+ $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_ACCOUNTS_SUBMITTER, $GLOBALS['xoopsUser']->uname()));
+ $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_ACCOUNTS_CREATED, formatTimestamp($time,'s') ));
+
+ $form->addElement(new XoopsFormHidden("op", "save_cat"));
+ $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));
+ return $form;
+ }
}
+
+
class xNewsletterxnewsletter_catHandler extends XoopsPersistableObjectHandler
{
- public function __construct(&$db)
- {
- parent::__construct($db, "mod_xnewsletter_cat", "xnewsletter_cat", "cat_id", "cat_name");
- }
-}
-?>
\ No newline at end of file
+ public function __construct(&$db)
+ {
+ parent::__construct($db, "mod_xnewsletter_cat", "xnewsletter_cat", "cat_id", "cat_name");
+ }
+}
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt 2013-12-09 20:59:44 UTC (rev 12236)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt 2013-12-09 21:08:35 UTC (rev 12237)
@@ -1,39 +1,40 @@
-Version 1.2
---------------
- - added possibility to use title tag in letter templates (luciorota)
- - added new block for general info (feichtl/goffy)
- - removed xoops captcha when unsubscribe by link (feichtl/goffy)
- - transfered error text to language file (feichtl/goffy)
- - fixed bug when filter subscribers in admin/subscr.php (feichtl/goffy)
- - french translation (pierredelu)
- - corrected english language files (cesag)
- - added plugin for import from module 'subscribers' (cesag/goffy)
- - changed english language file from ansi to utf8 without bom, corrected translation errors (cesag/goffy)
- - changed redirect_header from subscription.php to index.php after successful deleting a subscription (cesag/goffy)
- - added plugin for module 'evennews' (tatane/goffy)
- - added the possibility to show a list of subscriptions for each subscriber in admin/tab subscriber (goffy)
- - added the possibility to clone a newsletter (luciorota)
- - updated help file concerning import tool (goffy)
- - changed query to queryF to solve problems while running imports (goffy)
- - Fix error $protocolHandler (alfred)
- - added the possibility to search for subscriptions concerning an email, if the current user have the right to see/edit subscriptions of other persons (goffy)
- - resize images to xoops standard 16x16 (mamba/goffy)
- - fixed bug in showing tasklist, if email is deleted between creation of task and execution (goffy)
- - fix sql-injection (alfred)
- - Update Adminindex (alfred)
- - fix userinput (alfred)
-
-Version 1.1
---------------
- - Add option to send newsletters in packages by using a cronjob (goffy)
- - Rebuilt importtool based on temporary table (goffy)
- - Changed table names to new xoops table scheme(table name starts with mod_) (goffy)
- - Add Importtool for rmbulletin, xoopsuser, csv, weblinks, smartpartner (goffy)
- - Fix images from xoops (goffy)
- - Fix errors in languages(alfred)
- - fix error none subscriber for send newsletter (goffy)
- - fix error in blocks (goffy)
-
-Version 1.0
---------------
- - Original release xNewsletter (goffy,alfred)
+Version 1.2
+--------------
+ - added newsletter info field is html compatible (luciorota)
+ - added new tag <{$title}> in letter templates (luciorota)
+ - added new block for general info (feichtl/goffy)
+ - removed xoops captcha when unsubscribe by link (feichtl/goffy)
+ - transfered error text to language file (feichtl/goffy)
+ - fixed bug when filter subscribers in admin/subscr.php (feichtl/goffy)
+ - french translation (pierredelu)
+ - corrected english language files (cesag)
+ - added plugin for import from module 'subscribers' (cesag/goffy)
+ - changed english language file from ansi to utf8 without bom, corrected translation errors (cesag/goffy)
+ - changed redirect_header from subscription.php to index.php after successful deleting a subscription (cesag/goffy)
+ - added plugin for module 'evennews' (tatane/goffy)
+ - added the possibility to show a list of subscriptions for each subscriber in admin/tab subscriber (goffy)
+ - added the possibility to clone a newsletter (luciorota)
+ - updated help file concerning import tool (goffy)
+ - changed query to queryF to solve problems while running imports (goffy)
+ - Fix error $protocolHandler (alfred)
+ - added the possibility to search for subscriptions concerning an email, if the current user have the right to see/edit subscriptions of other persons (goffy)
+ - resize images to xoops standard 16x16 (mamba/goffy)
+ - fixed bug in showing tasklist, if email is deleted between creation of task and execution (goffy)
+ - fix sql-injection (alfred)
+ - Update Adminindex (alfred)
+ - fix userinput (alfred)
+
+Version 1.1
+--------------
+ - Add option to send newsletters in packages by using a cronjob (goffy)
+ - Rebuilt importtool based on temporary table (goffy)
+ - Changed table names to new xoops table scheme(table name starts with mod_) (goffy)
+ - Add Importtool for rmbulletin, xoopsuser, csv, weblinks, smartpartner (goffy)
+ - Fix images from xoops (goffy)
+ - Fix errors in languages(alfred)
+ - fix error none subscriber for send newsletter (goffy)
+ - fix error in blocks (goffy)
+
+Version 1.0
+--------------
+ - Original release xNewsletter (goffy,alfred)
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/header.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/header.php 2013-12-09 20:59:44 UTC (rev 12236)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/header.php 2013-12-09 21:08:35 UTC (rev 12237)
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* ****************************************************************************
* - A Project by Developers TEAM For Xoops - ( http://www.xoops.org )
@@ -32,27 +32,25 @@
include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/include/config.php";
include_once XNEWSLETTER_PATH . "/include/functions.php";
-$myts = & MyTextSanitizer::getInstance();
-$style = XNEWSLETTER_URL . "/css/style.css";
+$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());
+ $config_handler =& xoops_gethandler("config");
+ $xoopsModuleConfig =& $config_handler->getConfigsByCat(0,$xoopsModule->mid());
}
// Get the module instances
-$accountsHandler =& xoops_getModuleHandler('xNewsletter_accounts',XNEWSLETTER_DIRNAME);
-$catHandler =& xoops_getModuleHandler('xNewsletter_cat',XNEWSLETTER_DIRNAME);
-$subscrHandler =& xoops_getModuleHandler('xNewsletter_subscr',XNEWSLETTER_DIRNAME);
-$catsubscrHandler =& xoops_getModuleHandler('xNewsletter_catsubscr',XNEWSLETTER_DIRNAME);
-$letterHandler =& xoops_getModuleHandler('xNewsletter_letter',XNEWSLETTER_DIRNAME);
-$attachmentHandler =& xoops_getModuleHandler('xNewsletter_attachment',XNEWSLETTER_DIRNAME);
-$protocolHandler =& xoops_getModuleHandler('xNewsletter_protocol',XNEWSLETTER_DIRNAME);
-$mailinglistHandler =& xoops_getModuleHandler('xNewsletter_mailinglist',XNEWSLETTER_DIRNAME);
+$accountsHandler =& xoops_getModuleHandler('xNewsletter_accounts', XNEWSLETTER_DIRNAME);
+$catHandler =& xoops_getModuleHandler('xNewsletter_cat', XNEWSLETTER_DIRNAME);
+$subscrHandler =& xoops_getModuleHandler('xNewsletter_subscr', XNEWSLETTER_DIRNAME);
+$catsubscrHandler =& xoops_getModuleHandler('xNewsletter_catsubscr', XNEWSLETTER_DIRNAME);
+$letterHandler =& xoops_getModuleHandler('xNewsletter_letter', XNEWSLETTER_DIRNAME);
+$attachmentHandler =& xoops_getModuleHandler('xNewsletter_attachment', XNEWSLETTER_DIRNAME);
+$protocolHandler =& xoops_getModuleHandler('xNewsletter_protocol', XNEWSLETTER_DIRNAME);
+$mailinglistHandler =& xoops_getModuleHandler('xNewsletter_mailinglist', XNEWSLETTER_DIRNAME);
-xoops_loadLanguage('modinfo', XNEWSLETTER_DIRNAME);
-xoops_loadLanguage('main', XNEWSLETTER_DIRNAME);
-xoops_loadLanguage('admin', XNEWSLETTER_DIRNAME);
-
-?>
\ No newline at end of file
+xoops_loadLanguage('modinfo', XNEWSLETTER_DIRNAME);
+xoops_loadLanguage('main', XNEWSLETTER_DIRNAME);
+xoops_loadLanguage('admin', XNEWSLETTER_DIRNAME);
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/index.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/index.php 2013-12-09 20:59:44 UTC (rev 12236)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/index.php 2013-12-09 21:08:35 UTC (rev 12237)
@@ -31,11 +31,11 @@
$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
if ($op == "list_letter") {
- $xoopsOption['template_main'] = 'xNewsletter_letter_list.html';
+ $xoopsOption['template_main'] = 'xNewsletter_letter_list.html';
} elseif ($op == "show_preview") {
$xoopsOption['template_main'] = 'xNewsletter_letter.html';
} else {
- $xoopsOption['template_main'] = 'xNewsletter_index.html';
+ $xoopsOption['template_main'] = 'xNewsletter_index.html';
}
include XOOPS_ROOT_PATH."/header.php";
@@ -49,111 +49,105 @@
$xoTheme->addMeta('meta', 'description', strip_tags(_MA_XNEWSLETTER_DESC));
$xoopsTpl->assign('adv', $GLOBALS['xoopsModuleConfig']['advertise']);
-switch ($op)
-{
- case "show_preview":
-
- $template_path = XNEWSLETTER_PATH . '/language/'.$GLOBALS['xoopsConfig']['language'].'/templates/';
- if (!is_dir($template_path))
- $template_path = XNEWSLETTER_PATH . '/language/english/templates/';
-
- $obj =& $letterHandler->get($_REQUEST["letter_id"]);
- $template = $template_path . $obj->getVar("letter_template").".html";
-
- $xoopsTpl->assign('sex', _AM_XNEWSLETTER_SUBSCR_SEX_MALE);
- $xoopsTpl->assign('firstname', _AM_XNEWSLETTER_SUBSCR_FIRSTNAME);
- $xoopsTpl->assign('lastname', _AM_XNEWSLETTER_SUBSCR_LASTNAME);
- $xoopsTpl->assign('content', $obj->getVar("letter_content", "n"));
- $xoopsTpl->assign('unsubscribe_url', XOOPS_URL.'/modules/xNewsletter/');
- $xoopsTpl->assign('catsubscr_id', "0");
+switch ($op) {
+ case "show_preview" :
+ $template_path = XNEWSLETTER_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/templates/';
+ if (!is_dir($template_path)) {
+ $template_path = XNEWSLETTER_PATH . '/language/english/templates/';
+ }
- $content = "";
- $content .= "<h2>".$obj->getVar("letter_title")."</h2>";
- $content .= "<div style='clear:both;'><div style='padding:10px;border:1px solid black;'>";
- $content .= $xoopsTpl->fetch($template);
- $content .= "</div></div><a href='".XNEWSLETTER_URL."/index.php?op=list_letter'>"._BACK."</a></div><div style='clear:both;'>";
- $xoopsTpl->assign('content', $content);
-
- break;
-
- case "list_letter":
+ $obj =& $letterHandler->get($_REQUEST["letter_id"]);
+ $template = $template_path . $obj->getVar("letter_template").".html";
- $letters = array();
- $criteria = new CriteriaCompo();
- $criteria->setSort("letter_id");
- $criteria->setOrder("DESC");
- $numrows = $letterHandler->getCount();
- $letter_arr = $letterHandler->getall($criteria);
-
- // Table View
- if ($numrows > 0)
- {
- $langs = array("letter_title" => _AM_XNEWSLETTER_LETTER_TITLE,
- //"letter_content" => _AM_XNEWSLETTER_LETTER_CONTENT,
- "letter_cats" => _MA_XNEWSLETTER_LETTER_CATS,
- "letter_created" => _AM_XNEWSLETTER_LETTER_CREATED,
- "btn_showpreview" => _AM_XNEWSLETTER_LETTER_ACTION_PREVIEW
- );
- $xoopsTpl->assign($langs);
- $xoopsTpl->assign("pathImageIcon", XNEWSLETTER_ICON);
-
- //get newsletters available for current user
- $gperm_handler =& xoops_gethandler('groupperm');
- $mid = $xoopsModule->mid();
- $member_handler =& xoops_gethandler('member');
- $currentuid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
- if ($currentuid == 0) {
- $my_group_ids = array(XOOPS_GROUP_ANONYMOUS);
- } else {
- $my_group_ids = $member_handler->getGroupsByUser( $currentuid ) ;
- }
+ $xoopsTpl->assign('sex', _AM_XNEWSLETTER_SUBSCR_SEX_MALE);
+ $xoopsTpl->assign('firstname', _AM_XNEWSLETTER_SUBSCR_FIRSTNAME);
+ $xoopsTpl->assign('lastname', _AM_XNEWSLETTER_SUBSCR_LASTNAME);
+ $xoopsTpl->assign('content', $obj->getVar("letter_content", "n"));
+ $xoopsTpl->assign('unsubscribe_url', XOOPS_URL . '/modules/xNewsletter/');
+ $xoopsTpl->assign('catsubscr_id', "0");
- $letters = array();
- foreach (array_keys($letter_arr) as $letter) {
- $count_cats_avail = 0;
- $letter_cats = "";
- $cat_arr = explode("|" , $letter_arr[$letter]->getVar("letter_cats"));
- foreach($cat_arr as $cat) {
- $cat_obj = $catHandler->get($cat);
- $show = $gperm_handler->checkRight( 'newsletter_read_cat', $cat_obj->getVar("cat_id"), $my_group_ids, $mid ) ;
- if ($show == 1) {
- $count_cats_avail++;
- $letter_cats .= $cat_obj->getVar("cat_name")."<br/>";
- }
- }
- $letter_cats = substr($letter_cats, 0, -5);
- if ($count_cats_avail > 0) {
- $letters[] = array(
- "letter_id" => $letter,
- "letter_title" => $letter_arr[$letter]->getVar("letter_title"),
- //"letter_content" => $letter_arr[$letter]->getVar("letter_content"),
- "letter_cats" => $letter_cats,
- "letter_created" => formatTimeStamp($letter_arr[$letter]->getVar("letter_created"),"M")
- );
- }
- }
+ $content = "";
+ $content .= "<h2>" . $obj->getVar("letter_title") . "</h2>";
+ $content .= "<div style='clear:both;'><div style='padding:10px;border:1px solid black;'>";
+ $content .= $xoopsTpl->fetch($template);
+ $content .= "</div></div><a href='" . XNEWSLETTER_URL . "/index.php?op=list_letter'>" . _BACK . "</a></div><div style='clear:both;'>";
+ $xoopsTpl->assign('content', $content);
+ break;
- if ( count($letters) == 0 ) {
- redirect_header("index.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
- }
-
- } else {
- redirect_header("index.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
- }
- $xoopsTpl->assign('letters', $letters);
- break;
-
- case "list":
- default:
- $xoopsTpl->assign('xnewsletter_content', _MA_XNEWSLETTER_WELCOME);
- break;
-
+ case "list_letter" :
+ $letters = array();
+ $criteria = new CriteriaCompo();
+ $criteria->setSort("letter_id");
+ $criteria->setOrder("DESC");
+ $numrows = $letterHandler->getCount();
+ $letter_arr = $letterHandler->getall($criteria);
+
+ // Table View
+ if ($numrows > 0) {
+ $langs = array(
+ "letter_title" => _AM_XNEWSLETTER_LETTER_TITLE,
+ //"letter_content" => _AM_XNEWSLETTER_LETTER_CONTENT,
+ "letter_cats" => _MA_XNEWSLETTER_LETTER_CATS,
+ "letter_created" => _AM_XNEWSLETTER_LETTER_CREATED,
+ "btn_showpreview" => _AM_XNEWSLETTER_LETTER_ACTION_PREVIEW
+ );
+ $xoopsTpl->assign($langs);
+ $xoopsTpl->assign("pathImageIcon", XNEWSLETTER_ICON);
+
+ // get newsletters available for current user
+ $gperm_handler =& xoops_gethandler('groupperm');
+ $mid = $xoopsModule->mid();
+ $member_handler =& xoops_gethandler('member');
+ $currentuid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
+ if ($currentuid == 0) {
+ $my_group_ids = array(XOOPS_GROUP_ANONYMOUS);
+ } else {
+ $my_group_ids = $member_handler->getGroupsByUser( $currentuid );
+ }
+
+ $letters = array();
+ foreach (array_keys($letter_arr) as $letter) {
+ $count_cats_avail = 0;
+ $letter_cats = "";
+ $cat_arr = explode("|" , $letter_arr[$letter]->getVar(...
[truncated message content] |
|
From: <luc...@us...> - 2013-12-09 20:59:47
|
Revision: 12236
http://sourceforge.net/p/xoops/svn/12236
Author: luciorota
Date: 2013-12-09 20:59:44 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
code aesthetical
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2013-12-07 22:43:32 UTC (rev 12235)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2013-12-09 20:59:44 UTC (rev 12236)
@@ -98,7 +98,7 @@
} else {
$imgurl = (isset($_POST["imgurl"]) && $_POST["imgurl"] != "blank.png") ? $myts -> addslashes($_POST["imgurl"]) : "";
}
- // Formulize module support (2006/05/04) jpc
+ // Formulize module support (2006/05/04) jpc
if (wfdownloads_checkModule('formulize') < 300) {
$formulize_fid = (isset($_POST["formulize_fid"])) ? (int)$_POST["formulize_fid"] : 0;
}
@@ -124,7 +124,7 @@
$category->setVar('doxcode', isset($_POST['doxcode']));
$category->setVar('doimage', isset($_POST['doimage']));
$category->setVar('dobr', isset($_POST['dobr']));
- // Formulize module support (2006/05/04) jpc
+ // Formulize module support (2006/05/04) jpc
if (wfdownloads_checkModule('formulize')) {
$category->setVar('formulize_fid', $formulize_fid);
}
@@ -212,16 +212,15 @@
$adminMenu = new ModuleAdmin();
$adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_CATEGORIES, "{$currentFile}?op=categories.list", 'list');
-// $adminMenu->addItemButton(_AM_WFDOWNLOADS_CCATEGORY_CREATENEW, "{$currentFile}?op=category.add", 'add');
echo $adminMenu->renderButton();
if (isset($_REQUEST['cid'])) {
$category = $wfdownloads->getHandler('category')->get($_REQUEST['cid']);
} else {
$category = $wfdownloads->getHandler('category')->create();
- }
- $form = $category->getForm();
- $form -> display();
+ }
+ $form = $category->getForm();
+ $form -> display();
include 'admin_footer.php';
break;
@@ -234,7 +233,6 @@
echo $indexAdmin->addNavigation($currentFile);
$adminMenu = new ModuleAdmin();
-// $adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_CATEGORIES, "{$currentFile}?op=categories.list", 'list');
$adminMenu->addItemButton(_AM_WFDOWNLOADS_CCATEGORY_CREATENEW, "{$currentFile}?op=category.add", 'add');
echo $adminMenu->renderButton();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-12-07 22:43:32 UTC (rev 12235)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-12-09 20:59:44 UTC (rev 12236)
@@ -37,7 +37,6 @@
$adminMenu = new ModuleAdmin();
$adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_DOWNLOADS, "{$currentFile}?op=downloads.list", 'list');
-// $adminMenu->addItemButton(_AM_WFDOWNLOADS_FFS_DOWNLOADTITLE, "{$currentFile}?op=download.add", 'add');
echo $adminMenu->renderButton();
$lid = WfdownloadsRequest::getInt('lid', 0);
@@ -608,7 +607,6 @@
echo $indexAdmin->addNavigation($currentFile);
$adminMenu = new ModuleAdmin();
-// $adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_DOWNLOADS, $currentFile . "?op=downloads.list", 'list');
$adminMenu->addItemButton(_AM_WFDOWNLOADS_FFS_DOWNLOADTITLE, $currentFile . "?op=download.add", 'add');
echo $adminMenu->renderButton();
@@ -793,7 +791,6 @@
echo $indexAdmin->addNavigation($currentFile);
$adminMenu = new ModuleAdmin();
-// $adminMenu->addItemButton(_MI_WFDOWNLOADS_MENU_DOWNLOADS, $currentFile . "?op=downloads.list", 'list');
$adminMenu->addItemButton(_AM_WFDOWNLOADS_FFS_DOWNLOADTITLE, $currentFile . "?op=download.add", 'add');
echo $adminMenu->renderButton();
@@ -837,7 +834,8 @@
$ip_log_array = $ip_log->toArray();
$ip_log_array['uname'] = XoopsUserUtility::getUnameFromId(
$ip_log_array['uid']
- ); //($ip_log_array['uid'] != 0) ? $userList[$ip_log_array['uid']] : _AM_WFDOWNLOADS_ANONYMOUS;
+ );
+ //($ip_log_array['uid'] != 0) ? $userList[$ip_log_array['uid']] : _AM_WFDOWNLOADS_ANONYMOUS;
$ip_log_array['date_timestamp'] = formatTimestamp($ip_log_array['date']);
$GLOBALS['xoopsTpl']->append('ip_logs', $ip_log_array);
}
|
|
From: <luc...@us...> - 2013-12-07 22:43:35
|
Revision: 12235
http://sourceforge.net/p/xoops/svn/12235
Author: luciorota
Date: 2013-12-07 22:43:32 +0000 (Sat, 07 Dec 2013)
Log Message:
-----------
added possibility to use title tag in letter templates
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt 2013-11-26 23:01:25 UTC (rev 12234)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/docs/changelog.txt 2013-12-07 22:43:32 UTC (rev 12235)
@@ -1,38 +1,39 @@
-Version 1.2
---------------
- - added new block for general info (feichtl/goffy)
- - removed xoops captcha when unsubscribe by link (feichtl/goffy)
- - transfered error text to language file (feichtl/goffy)
- - fixed bug when filter subscribers in admin/subscr.php (feichtl/goffy)
- - french translation (pierredelu)
- - corrected english language files (cesag)
- - added plugin for import from module 'subscribers' (cesag/goffy)
- - changed english language file from ansi to utf8 without bom, corrected translation errors (cesag/goffy)
- - changed redirect_header from subscription.php to index.php after successful deleting a subscription (cesag/goffy)
- - added plugin for module 'evennews' (tatane/goffy)
- - added the possibility to show a list of subscriptions for each subscriber in admin/tab subscriber (goffy)
- - added the possibility to clone a newsletter (luciorota)
- - updated help file concerning import tool (goffy)
- - changed query to queryF to solve problems while running imports (goffy)
- - Fix error $protocolHandler (alfred)
- - added the possibility to search for subscriptions concerning an email, if the current user have the right to see/edit subscriptions of other persons (goffy)
- - resize images to xoops standard 16x16 (mamba/goffy)
- - fixed bug in showing tasklist, if email is deleted between creation of task and execution (goffy)
- - fix sql-injection (alfred)
- - Update Adminindex (alfred)
- - fix userinput (alfred)
-
-Version 1.1
---------------
- - Add option to send newsletters in packages by using a cronjob (goffy)
- - Rebuilt importtool based on temporary table (goffy)
- - Changed table names to new xoops table scheme(table name starts with mod_) (goffy)
- - Add Importtool for rmbulletin, xoopsuser, csv, weblinks, smartpartner (goffy)
- - Fix images from xoops (goffy)
- - Fix errors in languages(alfred)
- - fix error none subscriber for send newsletter (goffy)
- - fix error in blocks (goffy)
-
-Version 1.0
---------------
- - Original release xNewsletter (goffy,alfred)
+Version 1.2
+--------------
+ - added possibility to use title tag in letter templates (luciorota)
+ - added new block for general info (feichtl/goffy)
+ - removed xoops captcha when unsubscribe by link (feichtl/goffy)
+ - transfered error text to language file (feichtl/goffy)
+ - fixed bug when filter subscribers in admin/subscr.php (feichtl/goffy)
+ - french translation (pierredelu)
+ - corrected english language files (cesag)
+ - added plugin for import from module 'subscribers' (cesag/goffy)
+ - changed english language file from ansi to utf8 without bom, corrected translation errors (cesag/goffy)
+ - changed redirect_header from subscription.php to index.php after successful deleting a subscription (cesag/goffy)
+ - added plugin for module 'evennews' (tatane/goffy)
+ - added the possibility to show a list of subscriptions for each subscriber in admin/tab subscriber (goffy)
+ - added the possibility to clone a newsletter (luciorota)
+ - updated help file concerning import tool (goffy)
+ - changed query to queryF to solve problems while running imports (goffy)
+ - Fix error $protocolHandler (alfred)
+ - added the possibility to search for subscriptions concerning an email, if the current user have the right to see/edit subscriptions of other persons (goffy)
+ - resize images to xoops standard 16x16 (mamba/goffy)
+ - fixed bug in showing tasklist, if email is deleted between creation of task and execution (goffy)
+ - fix sql-injection (alfred)
+ - Update Adminindex (alfred)
+ - fix userinput (alfred)
+
+Version 1.1
+--------------
+ - Add option to send newsletters in packages by using a cronjob (goffy)
+ - Rebuilt importtool based on temporary table (goffy)
+ - Changed table names to new xoops table scheme(table name starts with mod_) (goffy)
+ - Add Importtool for rmbulletin, xoopsuser, csv, weblinks, smartpartner (goffy)
+ - Fix images from xoops (goffy)
+ - Fix errors in languages(alfred)
+ - fix error none subscriber for send newsletter (goffy)
+ - fix error in blocks (goffy)
+
+Version 1.0
+--------------
+ - Original release xNewsletter (goffy,alfred)
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php 2013-11-26 23:01:25 UTC (rev 12234)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php 2013-12-07 22:43:32 UTC (rev 12235)
@@ -1,426 +1,420 @@
-<?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 $
- * ****************************************************************************
- */
-
-if (!defined("XOOPS_ROOT_PATH")) {
- die("XOOPS root path not defined");
-}
-
-function Create_Tasklist($op, $letter_id, $xn_send_in_packages, $xn_send_in_packages_time) {
- global $xoopsUser, $xoopsDB, $letterHandler, $subscrHandler, $protocolHandler;
-
- $submitter = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
-
- //check data before creating task list
- if ($letter_id == 0)
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
-
- $obj_letter =& $letterHandler->get($letter_id);
- if (count($obj_letter)==0)
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
-
- //read categories
- $letter_cats = $obj_letter->getVar("letter_cats");
- if ( $letter_cats == "") //no cats
- redirect_header("letter.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
-
- if ($op=="send_test") {
- //check for valid email for testing
- $letter_email_test = $obj_letter->getVar("letter_email_test");
- if ($letter_email_test=="")
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_EMAIL);
- }
-
- //get emails of subscribers
- $recipients = array();
- if ($op == "send_test") {
- $recipients[] = 0;
- } else {
- //read all subscribers
- $sql = "SELECT subscr_id, subscr_actkey ";
- $sql .= "FROM ".$xoopsDB->prefix("mod_xnewsletter_subscr")." INNER JOIN ".$xoopsDB->prefix("mod_xnewsletter_catsubscr")." ON subscr_id = catsubscr_subscrid ";
- $sql .= "WHERE subscr_activated=1 AND (((catsubscr_catid) In (";
- $sql .= str_replace("|",",",$letter_cats);
- $sql .= "))) GROUP BY subscr_id;";
-
- $subscribers = $xoopsDB->query($sql) or die();
-
- while ($subscriber = $xoopsDB->fetchArray($subscribers)) {
- $subscr_id = $subscriber["subscr_id"];
- if ($op == 'resend_letter') {
- //read subscribers, where send failed
- $protocol_crit = new CriteriaCompo();
- $protocol_crit->add(new Criteria("protocol_letter_id", $letter_id));
- $protocol_crit->add(new Criteria("protocol_subscriber_id", $subscr_id));
- $protocol_crit->add(new Criteria("protocol_success", 1));
- $protocol_numrows = $protocolHandler->getCount($protocol_crit);
- if ($protocol_numrows > 0) $subscr_id = 0; //letter already successfully sent
- }
- if ($subscr_id > 0) {
- if ($subscriber["subscr_actkey"] == "") {
- $u = $subscrHandler->get($subscr_id);
- $subscriber["subscr_actkey"] = xoops_makepass();
- $u->setVar("subscr_actkey", $subscriber["subscr_actkey"] );
- $subscrHandler->insert($u);
- unset($u);
- }
- $recipients[] = $subscriber["subscr_id"];
- }
- }
- }
-
- if (count($recipients) == 0) {
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_SUBSCR);
- } else {
- //creating task list
- $counter = 0;
- $task_starttime = time() - 1;
- foreach($recipients as $subscriber_id)
- {
- //calculate start time, if letter should be sent in packages
- if ($xn_send_in_packages > 0) {
- if ($counter == $xn_send_in_packages) {
- $task_starttime = $task_starttime + 60*$xn_send_in_packages_time;
- $counter = 0;
- }
- }
- $counter++;
- //create task list item
- $sql = "INSERT INTO `".$xoopsDB->prefix('mod_xnewsletter_task')."` (`task_letter_id`, `task_subscr_id`, `task_starttime`, `task_submitter`, `task_created` ) VALUES ($letter_id, ".$subscriber_id.", $task_starttime, ".$submitter.",".time().")";
- if (!$xoopsDB->queryF($sql)) {
- $obj_protocol =& $protocolHandler->create();
- $obj_protocol->setVar("protocol_letter_id", $letter_id);
- $obj_protocol->setVar("protocol_subscriber_id", $subscriber_id);
- $obj_protocol->setVar("protocol_status", _AM_XNEWSLETTER_TASK_ERROR_CREATE);
- $obj_protocol->setVar("protocol_success", "0");
- $obj_protocol->setVar("protocol_submitter", $submitter);
- $obj_protocol->setVar("protocol_created", time());
- $protocolHandler->insert($obj_protocol);
- unset($obj_protocol);
- }
- }
- }
- return true;
-}
-
-
-function Execute_Tasks( $xn_send_in_packages, $letter_id = 0 ) {
-
- require_once XOOPS_ROOT_PATH."/modules/xNewsletter/include/functions.php";
-
- require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.phpmailer.php" );
- require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.pop3.php" );
- require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.smtp.php" );
-
- global $XoopsTpl, $xoopsDB, $xoopsUser, $letterHandler, $accountsHandler, $subscrHandler, $attachmentHandler, $xoopsModuleConfig;
-
- $protocolHandler =& xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
-
- if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
- }
- //get template path
- $template_path = XNEWSLETTER_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/templates/';
- if (!is_dir($template_path)) $template_path = XNEWSLETTER_PATH.'/language/english/templates/';
- if (!is_dir($template_path)) {
- return str_replace("%p",$template_path, _AM_XNEWSLETTER_SEND_ERROR_INALID_TEMPLATE_PATH);
- }
-
- //get letters ready to send groups by letter_id
- $sql = "SELECT `task_letter_id` FROM ".$xoopsDB->prefix('mod_xnewsletter_task');
- if ($letter_id > 0) $sql .= " WHERE (`task_letter_id`=".$letter_id.")";
- $sql .= " GROUP BY `task_letter_id`";
- if (!$task_letters = $xoopsDB->query($sql))
- {
- return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
- }
-
- while ($task_letter = $xoopsDB->fetchArray($task_letters)) {
-
- $letter_id = $task_letter["task_letter_id"];
-
- $obj_letter =& $letterHandler->get($letter_id);
- if (count($obj_letter)==0)
- {
- return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
- }
-
- //read categories
- $letter_cats = $obj_letter->getVar("letter_cats");
- if ( $letter_cats == "") //no cats
- {
- return _MA_XNEWSLETTER_LETTER_NONEAVAIL;
- }
-
- //read data of account
- $letter_account = $obj_letter->getVar("letter_account");
- if ( $letter_account == "" && $letter_account == 0) return _MA_XNEWSLETTER_ACCOUNTS_NONEAVAIL;
- $obj_account = $accountsHandler->get($letter_account);
- $account_type = $obj_account->getVar("accounts_type");
- $account_yourname = $obj_account->getVar("accounts_yourname");
- $account_yourmail = $obj_account->getVar("accounts_yourmail");
- $account_username = $obj_account->getVar("accounts_username");
- $account_password = $obj_account->getVar("accounts_password");
- $account_server_out = $obj_account->getVar("accounts_server_out");
- $account_port_out = $obj_account->getVar("accounts_port_out");
- $account_securetype_out = $obj_account->getVar("accounts_securetype_out");
-
- //create basic mail body
- $letter_title = $obj_letter->getVar("letter_title");
- $letter_content = $obj_letter->getVar("letter_content", "n");
-
- $tpl = new XoopsTpl();
- $tpl->assign('content', $letter_content);
-
- // read template
- $letter_template = $obj_letter->getVar("letter_template");
-
- //get emails of subscribers
- $recipients = array();
- $sql_tasklist = "SELECT `task_id`, `task_subscr_id` FROM ".$xoopsDB->prefix('mod_xnewsletter_task')." WHERE ((`task_letter_id`= ".$letter_id.") AND (`task_starttime` < ".time()."))";
- if (!$task_letters = $xoopsDB->query($sql_tasklist)) {
- return $task_letters->getErrors();
- }
- $recipients = array();
- while ($task_letter = $xoopsDB->fetchArray($task_letters)) {
- $subscr_id = $task_letter["task_subscr_id"];
- $task_id = $task_letter["task_id"];
- if ($subscr_id==0) {
- $recipients[] = array(
- "task_id" => $task_id,
- "address" => $obj_letter->getVar("letter_email_test"),
- "firstname" => "John",
- "lastname" => "Doe",
- "subscr_sex" => "Mr.",
- "subscriber_id" => "0",
- "catsubscr_id" => "0",
- "subscriber_actkey" => "Test"
- );
- } else {
- $sql_subscr = "SELECT * FROM ".$xoopsDB->prefix('mod_xnewsletter_subscr')." WHERE `subscr_id`= ".$subscr_id;
- if (!$task_subscrs = $xoopsDB->query($sql_subscr))
- {
- return $task_subscrs->getErrors();
- }
-
- $subscriber = $xoopsDB->fetchArray($task_subscrs);
- $recipients[] = array(
- "task_id" => $task_id,
- "address" => $subscriber["subscr_email"],
- "firstname" => $subscriber["subscr_firstname"],
- "lastname" => $subscriber["subscr_lastname"],
- "subscr_sex" => $subscriber["subscr_sex"],
- "subscriber_id" => $subscriber["subscr_id"],
- "subscriber_actkey" => $subscriber["subscr_actkey"]
- );
- }
- if ($xn_send_in_packages > 0 && count($recipients)==$xn_send_in_packages) break;
- }
-
- if (count($recipients) == 0) {
- return null;
- }
-
- //read attachments
- $attachment_crit = new CriteriaCompo();
- $attachment_crit->add(new Criteria("attachment_letter_id", $letter_id));
- $attachment_crit->setSort("attachment_id");
- $attachment_crit->setOrder("ASC");
- $att_numrows= $attachmentHandler->getCount($attachment_crit);
- if ($att_numrows > 0) {
- $attachment_arr = $attachmentHandler->getall($attachment_crit);
- foreach (array_keys($attachment_arr) as $attid) {
- $uploaddir = XOOPS_UPLOAD_PATH.$xoopsModuleConfig['xn_attachment_path'];
- if (substr($uploaddir, -1)!="/") $uploaddir .= "/"; //check, whether path seperator is existing
- $uploaddir .= $letter_id."/";
- $attachments[] = $uploaddir.$attachment_arr[$attid]->getVar("attachment_name");
- }
- } else {
- $attachments = array();
- }
-
- $senderuid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
- $count_total = 0;
- $count_err = 0;
-
- try {
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- $pop = new POP3();
- $pop->Authorise($account_server_out, $account_port_out, 30, $account_username, $account_password, 1);
- }
-
- $mail = new PHPMailer();
-
- $mail->CharSet = _CHARSET; //use xoops default character set
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- //$mail->IsSendmail(); Fix Error
- }
-
- $mail->Username = $account_username; // SMTP account username
- $mail->Password = $account_password; // SMTP account password
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_POP3) {
- $mail->IsSMTP();
- //$mail->SMTPDebug = 2;
- $mail->Host = $account_server_out;
- }
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_SMTP || $account_type == _AM_ACCOUNTS_TYPE_VAL_GMAIL) {
- $mail->Port = $account_port_out; // set the SMTP port
- $mail->Host = $account_server_out; //sometimes necessary to repeat
- }
-
- if ($account_securetype_out !="") {
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = $account_securetype_out; // sets the prefix to the server
- }
-
- $mail->SetFrom($account_yourmail, $account_yourname);
- $mail->AddReplyTo($account_yourmail, $account_yourname);
- $mail->Subject = $letter_title;
-
- foreach ($recipients as $recipient) {
-
- $subscriber_id = $recipient["subscriber_id"];
-
- $tpl->assign('sex', $recipient["subscr_sex"]);
- $tpl->assign('firstname', $recipient["firstname"]);
- $tpl->assign('lastname', $recipient["lastname"]);
- $tpl->assign('subscr_email', $recipient["address"]);
-
- $code = XOOPS_URL . "||" . $subscriber_id . "||" . $recipient["subscriber_actkey"] . "||" . $recipient["address"];
- $code = base64_encode( $code );
- $link = XOOPS_URL . "/modules/xNewsletter/subscription.php?op=unsub&email=" . $recipient["address"] . "&actkey=" . $code;
- $tpl->assign('unsubscribe_link', $link);
-
- $body = $tpl->fetch($template_path.$letter_template.'.html');
-
- $mail->AddAddress($recipient["address"], $recipient["firstname"]." ".$recipient["lastname"]);
-
- //$mail->AltBody = _AM_XNEWSLETTER_LETTER_EMAIL_ALTBODY;
-
- $mail->MsgHTML($body);
- $mail->AltBody = strip_tags($body . "\n" . $link);
-
- foreach ($attachments as $attachment) {
- if ( file_exists($attachment)) {
- $mail->AddAttachment($attachment);
- echo "<br>att exist:".$attachment;
- } else {
- echo "<br>att not exist:".$attachment;
- }
- }
- $count_total ++;
- if ( $mail->Send()) {
- if ($subscriber_id == 0) {
- $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_TEST." (".$recipient["address"].")";
- } else {
- $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS;
- }
- $protocol_success = "1";
- } else {
- $protocol_status = _AM_XNEWSLETTER_FAILED . "-> " . $mail->ErrorInfo;
- $protocol_success = "0";
- $count_err ++;
- }
- //create item in protocol for this email
- $text_clean = array("<strong>", "</strong>", "<br/>", "<br />");
- $protocol_status = str_replace($text_clean,"",$protocol_status);
-
- $mail->ClearAddresses();
-
- //delete item in table task
- $sql_del="DELETE FROM ".$xoopsDB->prefix('mod_xnewsletter_task')." WHERE `task_id`=".$recipient["task_id"];
- $result = $xoopsDB->queryF($sql_del);
-
- $obj_protocol =& $protocolHandler->create();
- $obj_protocol->setVar("protocol_letter_id", $letter_id);
- $obj_protocol->setVar("protocol_subscriber_id", $subscriber_id);
- $obj_protocol->setVar("protocol_status", $protocol_status);
- $obj_protocol->setVar("protocol_success", $protocol_success);
- $obj_protocol->setVar("protocol_submitter", $senderuid);
- $obj_protocol->setVar("protocol_created", time());
-
- if ($protocolHandler->insert($obj_protocol)) {
- //create protocol is ok
- } else {
- echo $obj_protocol->getHtmlErrors();
- }
- unset($obj_protocol);
- }
-
- unset($mail);
-
- } catch (phpmailerException $e) {
- $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_PHPMAILER . $e->errorMessage(); //error messages from PHPMailer
- $count_err ++;
- $protocol_success = "0";
- } catch (Exception $e) {
- $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_PHPMAILER . $e->getMessage(); //error messages from anything else!
- $count_err ++;
- $protocol_success = "0";
- }
-
- }
-
- //create final protocol item
- if ($count_err > 0) {
- $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_NUMBER;
- $protocol_status = str_replace("%e",$count_err,$protocol_status);
- $protocol_status = str_replace("%t",$count_total,$protocol_status);
- $protocol_success = 0;
- } else {
- $protocol_success = 1;
- if ($count_total > 0) {
- $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_NUMBER;
- $protocol_status = str_replace("%t",$count_total,$protocol_status);
- } else {
- $protocol_status = '';
- }
- }
- $obj_protocol =& $protocolHandler->create();
- $obj_protocol->setVar("protocol_letter_id", $letter_id);
- $obj_protocol->setVar("protocol_subscriber_id", "0");
- $obj_protocol->setVar("protocol_status", $protocol_status);
- $obj_protocol->setVar("protocol_success", $protocol_success);
- $obj_protocol->setVar("protocol_submitter", $senderuid);
- $obj_protocol->setVar("protocol_created", time());
-
- if ($protocolHandler->insert($obj_protocol)) {
- //create protocol is ok
- } else {
- echo $obj_protocol->getHtmlErrors();
- }
- unset($obj_protocol);
-
- return $protocol_status;
-}
-
-?>
\ No newline at end of file
+<?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 $
+ * ****************************************************************************
+ */
+
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+
+function Create_Tasklist($op, $letter_id, $xn_send_in_packages, $xn_send_in_packages_time) {
+ global $xoopsUser, $xoopsDB, $letterHandler, $subscrHandler, $protocolHandler;
+
+ $submitter = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
+
+ //check data before creating task list
+ if ($letter_id == 0) {
+ redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
+ }
+
+ $obj_letter =& $letterHandler->get($letter_id);
+ if (count($obj_letter)==0) {
+ redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
+ }
+
+ //read categories
+ $letter_cats = $obj_letter->getVar("letter_cats");
+ if ( $letter_cats == "") {
+ //no cats
+ redirect_header("letter.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
+ }
+
+ if ($op=="send_test") {
+ //check for valid email for testing
+ $letter_email_test = $obj_letter->getVar("letter_email_test");
+ if ($letter_email_test=="")
+ redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_EMAIL);
+ }
+
+ //get emails of subscribers
+ $recipients = array();
+ if ($op == "send_test") {
+ $recipients[] = 0;
+ } else {
+ //read all subscribers
+ $sql = "SELECT subscr_id, subscr_actkey ";
+ $sql .= "FROM ".$xoopsDB->prefix("mod_xnewsletter_subscr")." INNER JOIN ".$xoopsDB->prefix("mod_xnewsletter_catsubscr")." ON subscr_id = catsubscr_subscrid ";
+ $sql .= "WHERE subscr_activated=1 AND (((catsubscr_catid) In (";
+ $sql .= str_replace("|",",",$letter_cats);
+ $sql .= "))) GROUP BY subscr_id;";
+
+ $subscribers = $xoopsDB->query($sql) or die();
+
+ while ($subscriber = $xoopsDB->fetchArray($subscribers)) {
+ $subscr_id = $subscriber["subscr_id"];
+ if ($op == 'resend_letter') {
+ //read subscribers, where send failed
+ $protocol_crit = new CriteriaCompo();
+ $protocol_crit->add(new Criteria("protocol_letter_id", $letter_id));
+ $protocol_crit->add(new Criteria("protocol_subscriber_id", $subscr_id));
+ $protocol_crit->add(new Criteria("protocol_success", 1));
+ $protocol_numrows = $protocolHandler->getCount($protocol_crit);
+ if ($protocol_numrows > 0) $subscr_id = 0; //letter already successfully sent
+ }
+ if ($subscr_id > 0) {
+ if ($subscriber["subscr_actkey"] == "") {
+ $u = $subscrHandler->get($subscr_id);
+ $subscriber["subscr_actkey"] = xoops_makepass();
+ $u->setVar("subscr_actkey", $subscriber["subscr_actkey"] );
+ $subscrHandler->insert($u);
+ unset($u);
+ }
+ $recipients[] = $subscriber["subscr_id"];
+ }
+ }
+ }
+
+ if (count($recipients) == 0) {
+ redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_SUBSCR);
+ } else {
+ //creating task list
+ $counter = 0;
+ $task_starttime = time() - 1;
+ foreach($recipients as $subscriber_id) {
+ //calculate start time, if letter should be sent in packages
+ if ($xn_send_in_packages > 0) {
+ if ($counter == $xn_send_in_packages) {
+ $task_starttime = $task_starttime + 60*$xn_send_in_packages_time;
+ $counter = 0;
+ }
+ }
+ $counter++;
+ //create task list item
+ $sql = "INSERT INTO `".$xoopsDB->prefix('mod_xnewsletter_task')."` (`task_letter_id`, `task_subscr_id`, `task_starttime`, `task_submitter`, `task_created` ) VALUES ($letter_id, ".$subscriber_id.", $task_starttime, ".$submitter.",".time().")";
+ if (!$xoopsDB->queryF($sql)) {
+ $obj_protocol =& $protocolHandler->create();
+ $obj_protocol->setVar("protocol_letter_id", $letter_id);
+ $obj_protocol->setVar("protocol_subscriber_id", $subscriber_id);
+ $obj_protocol->setVar("protocol_status", _AM_XNEWSLETTER_TASK_ERROR_CREATE);
+ $obj_protocol->setVar("protocol_success", "0");
+ $obj_protocol->setVar("protocol_submitter", $submitter);
+ $obj_protocol->setVar("protocol_created", time());
+ $protocolHandler->insert($obj_protocol);
+ unset($obj_protocol);
+ }
+ }
+ }
+return true;
+}
+
+
+
+function Execute_Tasks( $xn_send_in_packages, $letter_id = 0 ) {
+ require_once XOOPS_ROOT_PATH."/modules/xNewsletter/include/functions.php";
+
+ require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.phpmailer.php" );
+ require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.pop3.php" );
+ require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.smtp.php" );
+
+ global $XoopsTpl, $xoopsDB, $xoopsUser, $letterHandler, $accountsHandler, $subscrHandler, $attachmentHandler, $xoopsModuleConfig;
+
+ $protocolHandler =& xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
+
+ if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+ }
+ //get template path
+ $template_path = XNEWSLETTER_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/templates/';
+ if (!is_dir($template_path)) $template_path = XNEWSLETTER_PATH.'/language/english/templates/';
+ if (!is_dir($template_path)) {
+ return str_replace("%p",$template_path, _AM_XNEWSLETTER_SEND_ERROR_INALID_TEMPLATE_PATH);
+ }
+
+ //get letters ready to send groups by letter_id
+ $sql = "SELECT `task_letter_id` FROM ".$xoopsDB->prefix('mod_xnewsletter_task');
+ if ($letter_id > 0) $sql .= " WHERE (`task_letter_id`=".$letter_id.")";
+ $sql .= " GROUP BY `task_letter_id`";
+ if (!$task_letters = $xoopsDB->query($sql)) {
+ return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
+ }
+
+ while ($task_letter = $xoopsDB->fetchArray($task_letters)) {
+ $letter_id = $task_letter["task_letter_id"];
+ $obj_letter =& $letterHandler->get($letter_id);
+ if (count($obj_letter)==0) {
+ return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
+ }
+
+ //read categories
+ $letter_cats = $obj_letter->getVar("letter_cats");
+ if ( $letter_cats == "") {
+ //no cats
+ return _MA_XNEWSLETTER_LETTER_NONEAVAIL;
+ }
+
+ //read data of account
+ $letter_account = $obj_letter->getVar("letter_account");
+ if ( $letter_account == "" && $letter_account == 0) return _MA_XNEWSLETTER_ACCOUNTS_NONEAVAIL;
+ $obj_account = $accountsHandler->get($letter_account);
+ $account_type = $obj_account->getVar("accounts_type");
+ $account_yourname = $obj_account->getVar("accounts_yourname");
+ $account_yourmail = $obj_account->getVar("accounts_yourmail");
+ $account_username = $obj_account->getVar("accounts_username");
+ $account_password = $obj_account->getVar("accounts_password");
+ $account_server_out = $obj_account->getVar("accounts_server_out");
+ $account_port_out = $obj_account->getVar("accounts_port_out");
+ $account_securetype_out = $obj_account->getVar("accounts_securetype_out");
+
+ //create basic mail body
+ $letter_title = $obj_letter->getVar("letter_title");
+ $letter_content = $obj_letter->getVar("letter_content", "n");
+
+ $tpl = new XoopsTpl();
+ $tpl->assign('content', $letter_content);
+ $tpl->assign('title', $letter_title);
+
+ // read template
+ $letter_template = $obj_letter->getVar("letter_template");
+
+ //get emails of subscribers
+ $recipients = array();
+ $sql_tasklist = "SELECT `task_id`, `task_subscr_id` FROM ".$xoopsDB->prefix('mod_xnewsletter_task')." WHERE ((`task_letter_id`= ".$letter_id.") AND (`task_starttime` < ".time()."))";
+ if (!$task_letters = $xoopsDB->query($sql_tasklist)) {
+ return $task_letters->getErrors();
+ }
+ $recipients = array();
+ while ($task_letter = $xoopsDB->fetchArray($task_letters)) {
+ $subscr_id = $task_letter["task_subscr_id"];
+ $task_id = $task_letter["task_id"];
+ if ($subscr_id==0) {
+ $recipients[] = array(
+ "task_id" => $task_id,
+ "address" => $obj_letter->getVar("letter_email_test"),
+ "firstname" => "John",
+ "lastname" => "Doe",
+ "subscr_sex" => "Mr.",
+ "subscriber_id" => "0",
+ "catsubscr_id" => "0",
+ "subscriber_actkey" => "Test"
+ );
+ } else {
+ $sql_subscr = "SELECT * FROM ".$xoopsDB->prefix('mod_xnewsletter_subscr')." WHERE `subscr_id`= ".$subscr_id;
+ if (!$task_subscrs = $xoopsDB->query($sql_subscr)) {
+ return $task_subscrs->getErrors();
+ }
+
+ $subscriber = $xoopsDB->fetchArray($task_subscrs);
+ $recipients[] = array(
+ "task_id" => $task_id,
+ "address" => $subscriber["subscr_email"],
+ "firstname" => $subscriber["subscr_firstname"],
+ "lastname" => $subscriber["subscr_lastname"],
+ "subscr_sex" => $subscriber["subscr_sex"],
+ "subscriber_id" => $subscriber["subscr_id"],
+ "subscriber_actkey" => $subscriber["subscr_actkey"]
+ );
+ }
+ if ($xn_send_in_packages > 0 && count($recipients)==$xn_send_in_packages) break;
+ }
+
+ if (count($recipients) == 0) {
+ return null;
+ }
+
+ //read attachments
+ $attachment_crit = new CriteriaCompo();
+ $attachment_crit->add(new Criteria("attachment_letter_id", $letter_id));
+ $attachment_crit->setSort("attachment_id");
+ $attachment_crit->setOrder("ASC");
+ $att_numrows= $attachmentHandler->getCount($attachment_crit);
+ if ($att_numrows > 0) {
+ $attachment_arr = $attachmentHandler->getall($attachment_crit);
+ foreach (array_keys($attachment_arr) as $attid) {
+ $uploaddir = XOOPS_UPLOAD_PATH.$xoopsModuleConfig['xn_attachment_path'];
+ if (substr($uploaddir, -1)!="/") $uploaddir .= "/"; //check, whether path seperator is existing
+ $uploaddir .= $letter_id."/";
+ $attachments[] = $uploaddir.$attachment_arr[$attid]->getVar("attachment_name");
+ }
+ } else {
+ $attachments = array();
+ }
+
+ $senderuid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
+ $count_total = 0;
+ $count_err = 0;
+
+ try {
+ if ($account_type == _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
+ $pop = new POP3();
+ $pop->Authorise($account_server_out, $account_port_out, 30, $account_username, $account_password, 1);
+ }
+
+ $mail = new PHPMailer();
+
+ $mail->CharSet = _CHARSET; //use xoops default character set
+
+ if ($account_type == _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
+ //$mail->IsSendmail(); Fix Error
+ }
+
+ $mail->Username = $account_username; // SMTP account username
+ $mail->Password = $account_password; // SMTP account password
+
+ if ($account_type == _AM_ACCOUNTS_TYPE_VAL_POP3) {
+ $mail->IsSMTP();
+ //$mail->SMTPDebug = 2;
+ $mail->Host = $account_server_out;
+ }
+
+ if ($account_type == _AM_ACCOUNTS_TYPE_VAL_SMTP || $account_type == _AM_ACCOUNTS_TYPE_VAL_GMAIL) {
+ $mail->Port = $account_port_out; // set the SMTP port
+ $mail->Host = $account_server_out; //sometimes necessary to repeat
+ }
+
+ if ($account_securetype_out !="") {
+ $mail->SMTPAuth = true;
+ $mail->SMTPSecure = $account_securetype_out; // sets the prefix to the server
+ }
+
+ $mail->SetFrom($account_yourmail, $account_yourname);
+ $mail->AddReplyTo($account_yourmail, $account_yourname);
+ $mail->Subject = $letter_title;
+
+ foreach ($recipients as $recipient) {
+ $subscriber_id = $recipient["subscriber_id"];
+
+ $tpl->assign('sex', $recipient["subscr_sex"]);
+ $tpl->assign('firstname', $recipient["firstname"]);
+ $tpl->assign('lastname', $recipient["lastname"]);
+ $tpl->assign('subscr_email', $recipient["address"]);
+
+ $code = XOOPS_URL . "||" . $subscriber_id . "||" . $recipient["subscriber_actkey"] . "||" . $recipient["address"];
+ $code = base64_encode( $code );
+ $link = XOOPS_URL . "/modules/xNewsletter/subscription.php?op=unsub&email=" . $recipient["address"] . "&actkey=" . $code;
+ $tpl->assign('unsubscribe_link', $link);
+
+ $body = $tpl->fetch($template_path.$letter_template.'.html');
+
+ $mail->AddAddress($recipient["address"], $recipient["firstname"]." ".$recipient["lastname"]);
+
+ //$mail->AltBody = _AM_XNEWSLETTER_LETTER_EMAIL_ALTBODY;
+
+ $mail->MsgHTML($body);
+ $mail->AltBody = strip_tags($body . "\n" . $link);
+
+ foreach ($attachments as $attachment) {
+ if ( file_exists($attachment)) {
+ $mail->AddAttachment($attachment);
+ echo "<br>att exist:".$attachment;
+ } else {
+ echo "<br>att not exist:".$attachment;
+ }
+ }
+ $count_total ++;
+ if ( $mail->Send()) {
+ if ($subscriber_id == 0) {
+ $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_TEST." (".$recipient["address"].")";
+ } else {
+ $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS;
+ }
+ $protocol_success = "1";
+ } else {
+ $protocol_status = _AM_XNEWSLETTER_FAILED . "-> " . $mail->ErrorInfo;
+ $protocol_success = "0";
+ $count_err ++;
+ }
+ //create item in protocol for this email
+ $text_clean = array("<strong>", "</strong>", "<br/>", "<br />");
+ $protocol_status = str_replace($text_clean,"",$protocol_status);
+
+ $mail->ClearAddresses();
+
+ //delete item in table task
+ $sql_del="DELETE FROM ".$xoopsDB->prefix('mod_xnewsletter_task')." WHERE `task_id`=".$recipient["task_id"];
+ $result = $xoopsDB->queryF($sql_del);
+
+ $obj_protocol =& $protocolHandler->create();
+ $obj_protocol->setVar("protocol_letter_id", $letter_id);
+ $obj_protocol->setVar("protocol_subscriber_id", $subscriber_id);
+ $obj_protocol->setVar("protocol_status", $protocol_status);
+ $obj_protocol->setVar("protocol_success", $protocol_success);
+ $obj_protocol->setVar("protocol_submitter", $senderuid);
+ $obj_protocol->setVar("protocol_created", time());
+
+ if ($protocolHandler->insert($obj_protocol)) {
+ //create protocol is ok
+ } else {
+ echo $obj_protocol->getHtmlErrors();
+ }
+ unset($obj_protocol);
+ }
+
+ unset($mail);
+
+ } catch (phpmailerException $e) {
+ $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_PHPMAILER . $e->errorMessage(); //error messages from PHPMailer
+ $count_err ++;
+ $protocol_success = "0";
+ } catch (Exception $e) {
+ $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_PHPMAILER . $e->getMessage(); //error messages from anything else!
+ $count_err ++;
+ $protocol_success = "0";
+ }
+ }
+
+ //create final protocol item
+ if ($count_err > 0) {
+ $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_NUMBER;
+ $protocol_status = str_replace("%e",$count_err,$protocol_status);
+ $protocol_status = str_replace("%t",$count_total,$protocol_status);
+ $protocol_success = 0;
+ } else {
+ $protocol_success = 1;
+ if ($count_total > 0) {
+ $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_NUMBER;
+ $protocol_status = str_replace("%t",$count_total,$protocol_status);
+ } else {
+ $protocol_status = '';
+ }
+ }
+ $obj_protocol =& $protocolHandler->create();
+ $obj_protocol->setVar("protocol_letter_id", $letter_id);
+ $obj_protocol->setVar("protocol_subscriber_id", "0");
+ $obj_protocol->setVar("protocol_status", $protocol_status);
+ $obj_protocol->setVar("protocol_success", $protocol_success);
+ $obj_protocol->setVar("protocol_submitter", $senderuid);
+ $obj_protocol->setVar("protocol_created", time());
+
+ if ($protocolHandler->insert($obj_protocol)) {
+ //create protocol is ok
+ } else {
+ echo $obj_protocol->getHtmlErrors();
+ }
+ unset($obj_protocol);
+
+ return $protocol_status;
+}
|
|
From: <luc...@us...> - 2013-11-26 23:01:28
|
Revision: 12234
http://sourceforge.net/p/xoops/svn/12234
Author: luciorota
Date: 2013-11-26 23:01:25 +0000 (Tue, 26 Nov 2013)
Log Message:
-----------
fixed bug in submit form when anonymous users try to submit
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-11-26 17:15:27 UTC (rev 12233)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-11-26 23:01:25 UTC (rev 12234)
@@ -447,7 +447,7 @@
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
include_once XOOPS_ROOT_PATH . '/class/tree.php';
- $groups = $xoopsUser->getGroups();
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
$use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
|
|
From: <go...@us...> - 2013-11-26 17:15:30
|
Revision: 12233
http://sourceforge.net/p/xoops/svn/12233
Author: goffy
Date: 2013-11-26 17:15:27 +0000 (Tue, 26 Nov 2013)
Log Message:
-----------
added new error code if no emailaccount available (cesag/goffy)
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php
XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php 2013-11-26 14:08:09 UTC (rev 12232)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php 2013-11-26 17:15:27 UTC (rev 12233)
@@ -178,7 +178,9 @@
}
//read data of account
- $obj_account = $accountsHandler->get($obj_letter->getVar("letter_account"));
+ $letter_account = $obj_letter->getVar("letter_account");
+ if ( $letter_account == "" && $letter_account == 0) return _MA_XNEWSLETTER_ACCOUNTS_NONEAVAIL;
+ $obj_account = $accountsHandler->get($letter_account);
$account_type = $obj_account->getVar("accounts_type");
$account_yourname = $obj_account->getVar("accounts_yourname");
$account_yourmail = $obj_account->getVar("accounts_yourmail");
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php 2013-11-26 14:08:09 UTC (rev 12232)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/language/english/main.php 2013-11-26 17:15:27 UTC (rev 12233)
@@ -86,4 +86,6 @@
define('_MA_XNEWSLETTER_SUBSCRIPTION_UNFINISHED', "<span style='color:red'>Attention: the registration has not been confirm till now. Please click on the activating link in the e-mail we sent you. If you did not get this e-mail, please click <a href='%link'>here</a> to get this mail once more.</span>");
define('_MA_XNEWSLETTER_PLEASE_LOGIN', "The email address %s belongs to a registered user. <br /> please login to change the data.");
define('_MA_XNEWSLETTER_LETTER_NONEAVAIL', "No newsletters available for the moment");
+//1.2.2
+define('_MA_XNEWSLETTER_ACCOUNTS_NONEAVAIL', "No email-accounts available for the moment");
?>
\ No newline at end of file
|
|
From: <go...@us...> - 2013-11-26 14:08:13
|
Revision: 12232
http://sourceforge.net/p/xoops/svn/12232
Author: goffy
Date: 2013-11-26 14:08:09 +0000 (Tue, 26 Nov 2013)
Log Message:
-----------
fixed bugs in display (cesag/goffy)
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_letter.php
XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_subscr.php
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_letter.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_letter.php 2013-11-21 22:19:06 UTC (rev 12231)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_letter.php 2013-11-26 14:08:09 UTC (rev 12232)
@@ -169,6 +169,7 @@
$crit_accounts->setSort("accounts_id");
$crit_accounts->setOrder("ASC");
$numrows_accounts = $accountsHandler->getCount($crit_accounts);
+ $account_default = 0;
if ($this->isNew()) {
$accounts_arr = $accountsHandler->getall($crit_accounts);
foreach ($accounts_arr as $account) {
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_subscr.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_subscr.php 2013-11-21 22:19:06 UTC (rev 12231)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/class/xNewsletter_subscr.php 2013-11-26 14:08:09 UTC (rev 12232)
@@ -99,13 +99,13 @@
$form->addElement(new XoopsFormLabel("<span style='text-decoration:underline'>"._MA_XNEWSLETTER_SUBSCRIPTION_INFO_PERS."</span>",""));
$subscr_id = $this->isNew() ? 0 : $this->getVar("subscr_id");
if ($subscr_id > 0 || $this->getVar("subscr_email") != "") {
- $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_SUBSCR_EMAIL.": ", $this->getVar("subscr_email")));
+ $form->addElement(new XoopsFormLabel(_AM_XNEWSLETTER_SUBSCR_EMAIL, $this->getVar("subscr_email")));
$form->addElement(new XoopsFormHidden("subscr_email", $this->getVar("subscr_email")));
} else {
- $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_EMAIL.": ", "subscr_email", 50, 255, $this->getVar("subscr_email")), true);
+ $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_EMAIL, "subscr_email", 50, 255, $this->getVar("subscr_email")), true);
}
if ($xoopsModuleConfig["xn_use_salutation"] == 1) {
- $select_subscr_sex = new XoopsFormSelect(_AM_XNEWSLETTER_SUBSCR_SEX.": ", "subscr_sex", $this->getVar("subscr_sex"));
+ $select_subscr_sex = new XoopsFormSelect(_AM_XNEWSLETTER_SUBSCR_SEX, "subscr_sex", $this->getVar("subscr_sex"));
$select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_EMPTY,_AM_XNEWSLETTER_SUBSCR_SEX_EMPTY);
$select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_FEMALE,_AM_XNEWSLETTER_SUBSCR_SEX_FEMALE);
$select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_MALE,_AM_XNEWSLETTER_SUBSCR_SEX_MALE);
@@ -113,9 +113,9 @@
$select_subscr_sex->addOption(_AM_XNEWSLETTER_SUBSCR_SEX_FAMILY,_AM_XNEWSLETTER_SUBSCR_SEX_FAMILY);
$form->addElement($select_subscr_sex);
}
- $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_FIRSTNAME.": ", "subscr_firstname", 50, 255, $this->getVar("subscr_firstname")), false);
+ $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_FIRSTNAME, "subscr_firstname", 50, 255, $this->getVar("subscr_firstname")), false);
- $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_LASTNAME.": ", "subscr_lastname", 50, 255, $this->getVar("subscr_lastname")), false);
+ $form->addElement(new XoopsFormText(_AM_XNEWSLETTER_SUBSCR_LASTNAME, "subscr_lastname", 50, 255, $this->getVar("subscr_lastname")), false);
$form->addElement(new XoopsFormLabel("<br/><br/>", ""));
|
|
From: <luc...@us...> - 2013-11-21 22:19:13
|
Revision: 12231
http://sourceforge.net/p/xoops/svn/12231
Author: luciorota
Date: 2013-11-21 22:19:06 +0000 (Thu, 21 Nov 2013)
Log Message:
-----------
update jQuery Thickbox plugin to 3.1
fixed: jQuery bug in template
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_header.html
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Added Paths:
-----------
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/loadingAnimation.gif
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox-compressed.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox.css
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery.ThickBox/thickbox.js
Removed Paths:
-------------
XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery-latest.js
XoopsModules/wfdownloads/trunk/wfdownloads/js/thickbox-compressed.js
XoopsModules/wfdownloads/trunk/wfdownloads/thickbox.css
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-11-20 18:30:26 UTC (rev 12230)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-11-21 22:19:06 UTC (rev 12231)
@@ -128,8 +128,11 @@
$catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
+ $xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
+ $xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
+ $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
- $xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
+
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
// Breadcrumb
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-11-20 18:30:26 UTC (rev 12230)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-11-21 22:19:06 UTC (rev 12231)
@@ -1,4 +1,6 @@
-<b><u>=> Version 3.23 Beta (2013-10-16)</u></b>
+<b><u>=> Version 3.23 Beta (2013-11-21)</u></b>
+- update jQuery Thickbox plugin to 3.1 (luciorota)
+- fixed: jQuery bug in template (luciorota)
- standardization of English language files (cesag)
- fixed: typos in english folder (cesag)
- module standardization: header.php, admin/admin_header.php, xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-11-20 18:30:26 UTC (rev 12230)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-11-21 22:19:06 UTC (rev 12231)
@@ -48,8 +48,11 @@
$xoopsOption['template_main'] = 'wfdownloads_index.html';
include XOOPS_ROOT_PATH . '/header.php';
+$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
+$xoTheme->addScript(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox-compressed.js');
+$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/js/jquery.ThickBox/thickbox.css');
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
-$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
+
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
// Breadcrumb
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery-latest.js
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery-latest.js 2013-11-20 18:30:26 UTC (rev 12230)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/js/jquery-latest.js 2013-11-21 22:19:06 UTC (rev 12231)
@@ -1,2530 +0,0 @@
-(function () {
- /*
- * jQuery 1.1.4 - New Wave Javascript
- *
- * Copyright (c) 2007 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2007/09/30 12:52:44 $
- * $Rev: 2862 $
- */
-// Map over jQuery in case of overwrite
- if (typeof jQuery != "undefined")
- var _jQuery = jQuery;
-
- var jQuery = window.jQuery = function (a, c) {
- // If the context is global, return a new object
- if (window == this || !this.init)
- return new jQuery(a, c);
-
- return this.init(a, c);
- };
-
-// Map over the $ in case of overwrite
- if (typeof $ != "undefined")
- var _$ = $;
-
-// Map the jQuery namespace to the '$' one
- window.$ = jQuery;
-
- var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
-
- jQuery.fn = jQuery.prototype = {
- init: function (a, c) {
- // Make sure that a selection was provided
- a = a || document;
-
- // Handle HTML strings
- if (typeof a == "string") {
- var m = quickExpr.exec(a);
- if (m && (m[1] || !c)) {
- // HANDLE: $(html) -> $(array)
- if (m[1])
- a = jQuery.clean([ m[1] ]);
-
- // HANDLE: $("#id")
- else {
- var tmp = document.getElementById(m[3]);
- if (tmp)
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if (tmp.id != m[3])
- return jQuery().find(a);
- else {
- this[0] = tmp;
- this.length = 1;
- return this;
- }
- else
- a = [];
- }
-
- // HANDLE: $(expr)
- } else
- return new jQuery(c).find(a);
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if (jQuery.isFunction(a))
- return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ](a);
-
- return this.setArray(
- // HANDLE: $(array)
- a.constructor == Array && a ||
-
- // HANDLE: $(arraylike)
- // Watch for when an array-like object is passed as the selector
- (a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray(a) ||
-
- // HANDLE: $(*)
- [ a ]);
- },
- jquery: "1.1.4",
-
- size: function () {
- return this.length;
- },
-
- length: 0,
-
- get: function (num) {
- return num == undefined ?
-
- // Return a 'clean' array
- jQuery.makeArray(this) :
-
- // Return just the object
- this[num];
- },
- pushStack: function (a) {
- var ret = jQuery(a);
- ret.prevObject = this;
- return ret;
- },
- setArray: function (a) {
- this.length = 0;
- Array.prototype.push.apply(this, a);
- return this;
- },
- each: function (fn, args) {
- return jQuery.each(this, fn, args);
- },
- index: function (obj) {
- var pos = -1;
- this.each(function (i) {
- if (this == obj) pos = i;
- });
- return pos;
- },
-
- attr: function (key, value, type) {
- var obj = key;
-
- // Look for the case where we're accessing a style value
- if (key.constructor == String)
- if (value == undefined)
- return this.length && jQuery[ type || "attr" ](this[0], key) || undefined;
- else {
- obj = {};
- obj[ key ] = value;
- }
-
- // Check to see if we're setting style values
- return this.each(function (index) {
- // Set all the styles
- for (var prop in obj)
- jQuery.attr(
- type ? this.style : this,
- prop, jQuery.prop(this, obj[prop], type, index, prop)
- );
- });
- },
-
- css: function (key, value) {
- return this.attr(key, value, "curCSS");
- },
-
- text: function (e) {
- if (typeof e != "object" && e != null)
- return this.empty().append(document.createTextNode(e));
-
- var t = "";
- jQuery.each(e || this, function () {
- jQuery.each(this.childNodes, function () {
- if (this.nodeType != 8)
- t += this.nodeType != 1 ?
- this.nodeValue : jQuery.fn.text([ this ]);
- });
- });
- return t;
- },
-
- wrap: function () {
- // The elements to wrap the target around
- var a, args = arguments;
-
- // Wrap each of the matched elements individually
- return this.each(function () {
- if (!a)
- a = jQuery.clean(args, this.ownerDocument);
-
- // Clone the structure that we're using to wrap
- var b = a[0].cloneNode(true);
-
- // Insert it before the element to be wrapped
- this.parentNode.insertBefore(b, this);
-
- // Find the deepest point in the wrap structure
- while (b.firstChild)
- b = b.firstChild;
-
- // Move the matched element to within the wrap structure
- b.appendChild(this);
- });
- },
- append: function () {
- return this.domManip(arguments, true, 1, function (a) {
- this.appendChild(a);
- });
- },
- prepend: function () {
- return this.domManip(arguments, true, -1, function (a) {
- this.insertBefore(a, this.firstChild);
- });
- },
- before: function () {
- return this.domManip(arguments, false, 1, function (a) {
- this.parentNode.insertBefore(a, this);
- });
- },
- after: function () {
- return this.domManip(arguments, false, -1, function (a) {
- this.parentNode.insertBefore(a, this.nextSibling);
- });
- },
- end: function () {
- return this.prevObject || jQuery([]);
- },
- find: function (t) {
- var data = jQuery.map(this, function (a) {
- return jQuery.find(t, a);
- });
- return this.pushStack(/[^+>] [^+>]/.test(t) || t.indexOf("..") > -1 ?
- jQuery.unique(data) : data);
- },
- clone: function (deep) {
- deep = deep != undefined ? deep : true;
- var $this = this.add(this.find("*"));
- if (jQuery.browser.msie) {
- // Need to remove events on the element and its descendants
- $this.each(function () {
- this._$events = {};
- for (var type in this.$events)
- this._$events[type] = jQuery.extend({}, this.$events[type]);
- }).unbind();
- }
-
- // Do the clone
- var r = this.pushStack(jQuery.map(this, function (a) {
- return a.cloneNode(deep);
- }));
-
- if (jQuery.browser.msie) {
- $this.each(function () {
- // Add the events back to the original and its descendants
- var events = this._$events;
- for (var type in events)
- for (var handler in events[type])
- jQuery.event.add(this, type, events[type][handler], events[type][handler].data);
- this._$events = null;
- });
- }
-
- // copy form values over
- if (deep) {
- var inputs = r.add(r.find('*')).filter('select,input[@type=checkbox]');
- $this.filter('select,input[@type=checkbox]').each(function (i) {
- if (this.selectedIndex)
- inputs[i].selectedIndex = this.selectedIndex;
- if (this.checked)
- inputs[i].checked = true;
- });
- }
-
- // Return the cloned set
- return r;
- },
-
- filter: function (t) {
- return this.pushStack(
- jQuery.isFunction(t) &&
- jQuery.grep(this, function (el, index) {
- return t.apply(el, [index]);
- }) ||
-
- jQuery.multiFilter(t, this));
- },
-
- not: function (t) {
- return this.pushStack(
- t.constructor == String &&
- jQuery.multiFilter(t, this, true) ||
-
- jQuery.grep(this, function (a) {
- return ( t.constructor == Array || t.jquery )
- ? jQuery.inArray(a, t) < 0
- : a != t;
- })
- );
- },
-
- add: function (t) {
- return this.pushStack(jQuery.merge(
- this.get(),
- t.constructor == String ?
- jQuery(t).get() :
- t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?
- t : [t])
- );
- },
- is: function (expr) {
- return expr ? jQuery.multiFilter(expr, this).length > 0 : false;
- },
-
- val: function (val) {
- return val == undefined ?
- ( this.length ? this[0].value : null ) :
- this.attr("value", val);
- },
-
- html: function (val) {
- return val == undefined ?
- ( this.length ? this[0].innerHTML : null ) :
- this.empty().append(val);
- },
-
- slice: function () {
- return this.pushStack(Array.prototype.slice.apply(this, arguments));
- },
- domManip: function (args, table, dir, fn) {
- var clone = this.length > 1, a;
-
- return this.each(function () {
- if (!a) {
- a = jQuery.clean(args, this.ownerDocument);
- if (dir < 0)
- a.reverse();
- }
-
- var obj = this;
-
- if (table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr"))
- obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
-
- jQuery.each(a, function () {
- if (jQuery.nodeName(this, "script")) {
- if (this.src)
- jQuery.ajax({ url: this.src, async: false, dataType: "script" });
- else
- jQuery.globalEval(this.text || this.textContent || this.innerHTML || "");
- } else
- fn.apply(obj, [ clone ? this.cloneNode(true) : this ]);
- });
- });
- }
- };
-
- jQuery.extend = jQuery.fn.extend = function () {
- // copy reference to target object
- var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
-
- // Handle a deep copy situation
- if (target.constructor == Boolean) {
- deep = target;
- target = arguments[1] || {};
- }
-
- // extend jQuery itself if only one argument is passed
- if (al == 1) {
- target = this;
- a = 0;
- }
-
- var prop;
-
- for (; a < al; a++)
- // Only deal with non-null/undefined values
- if ((prop = arguments[a]) != null)
- // Extend the base object
- for (var i in prop) {
- // Prevent never-ending loop
- if (target == prop[i])
- continue;
-
- // Recurse if we're merging object values
- if (deep && typeof prop[i] == 'object' && target[i])
- jQuery.extend(target[i], prop[i]);
-
- // Don't bring in undefined values
- else if (prop[i] != undefined)
- target[i] = prop[i];
- }
-
- // Return the modified object
- return target;
- };
-
- jQuery.extend({
- noConflict: function (deep) {
- window.$ = _$;
- if (deep)
- window.jQuery = _jQuery;
- return jQuery;
- },
-
- // This may seem like some crazy code, but trust me when I say that this
- // is the only cross-browser way to do this. --John
- isFunction: function (fn) {
- return !!fn && typeof fn != "string" && !fn.nodeName &&
- fn.constructor != Array && /function/i.test(fn + "");
- },
-
- // check if an element is in a XML document
- isXMLDoc: function (elem) {
- return elem.documentElement && !elem.body ||
- elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
- },
-
- // Evalulates a script in a global context
- // Evaluates Async. in Safari 2 :-(
- globalEval: function (data) {
- data = jQuery.trim(data);
- if (data) {
- if (window.execScript)
- window.execScript(data);
- else if (jQuery.browser.safari)
- // safari doesn't provide a synchronous global eval
- window.setTimeout(data, 0);
- else
- eval.call(window, data);
- }
- },
-
- nodeName: function (elem, name) {
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
- },
- // args is for internal usage only
- each: function (obj, fn, args) {
- if (args) {
- if (obj.length == undefined)
- for (var i in obj)
- fn.apply(obj[i], args);
- else
- for (var i = 0, ol = obj.length; i < ol; i++)
- if (fn.apply(obj[i], args) === false) break;
-
- // A special, fast, case for the most common use of each
- } else {
- if (obj.length == undefined)
- for (var i in obj)
- fn.call(obj[i], i, obj[i]);
- else
- for (var i = 0, ol = obj.length, val = obj[0];
- i < ol && fn.call(val, i, val) !== false; val = obj[++i]) {
- }
- }
-
- return obj;
- },
-
- prop: function (elem, value, type, index, prop) {
- // Handle executable functions
- if (jQuery.isFunction(value))
- value = value.call(elem, [index]);
-
- // exclude the following css properties to add px
- var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
-
- // Handle passing in a number to a CSS property
- return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
- value + "px" :
- value;
- },
-
- className: {
- // internal only, use addClass("class")
- add: function (elem, c) {
- jQuery.each((c || "").split(/\s+/), function (i, cur) {
- if (!jQuery.className.has(elem.className, cur))
- elem.className += ( elem.className ? " " : "" ) + cur;
- });
- },
-
- // internal only, use removeClass("class")
- remove: function (elem, c) {
- elem.className = c != undefined ?
- jQuery.grep(elem.className.split(/\s+/),function (cur) {
- return !jQuery.className.has(c, cur);
- }).join(" ") : "";
- },
-
- // internal only, use is(".class")
- has: function (t, c) {
- return jQuery.inArray(c, (t.className || t).toString().split(/\s+/)) > -1;
- }
- },
- swap: function (e, o, f) {
- for (var i in o) {
- e.style["old" + i] = e.style[i];
- e.style[i] = o[i];
- }
- f.apply(e, []);
- for (var i in o)
- e.style[i] = e.style["old" + i];
- },
-
- css: function (e, p) {
- if (p == "height" || p == "width") {
- var old = {}, oHeight, oWidth, d = ["Top", "Bottom", "Right", "Left"];
-
- jQuery.each(d, function () {
- old["padding" + this] = 0;
- old["border" + this + "Width"] = 0;
- });
-
- jQuery.swap(e, old, function () {
- if (jQuery(e).is(':visible')) {
- oHeight = e.offsetHeight;
- oWidth = e.offsetWidth;
- } else {
- e = jQuery(e.cloneNode(true))
- .find(":radio").removeAttr("checked").end()
- .css({
- visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
- }).appendTo(e.parentNode)[0];
-
- var parPos = jQuery.css(e.parentNode, "position") || "static";
- if (parPos == "static")
- e.parentNode.style.position = "relative";
-
- oHeight = e.clientHeight;
- oWidth = e.clientWidth;
-
- if (parPos == "static")
- e.parentNode.style.position = "static";
-
- e.parentNode.removeChild(e);
- }
- });
-
- return p == "height" ? oHeight : oWidth;
- }
-
- return jQuery.curCSS(e, p);
- },
-
- curCSS: function (elem, prop, force) {
- var ret, stack = [], swap = [];
-
- // A helper method for determining if an element's values are broken
- function color(a) {
- if (!jQuery.browser.safari)
- return false;
-
- var ret = document.defaultView.getComputedStyle(a, null);
- return !ret || ret.getPropertyValue("color") == "";
- }
-
- if (prop == "opacity" && jQuery.browser.msie) {
- ret = jQuery.attr(elem.style, "opacity");
- return ret == "" ? "1" : ret;
- }
-
- if (prop.match(/float/i))
- prop = styleFloat;
-
- if (!force && elem.style[prop])
- ret = elem.style[prop];
-
- else if (document.defaultView && document.defaultView.getComputedStyle) {
-
- if (prop.match(/float/i))
- prop = "float";
-
- prop = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
- var cur = document.defaultView.getComputedStyle(elem, null);
-
- if (cur && !color(elem))
- ret = cur.getPropertyValue(prop);
-
- // If the element isn't reporting its values properly in Safari
- // then some display: none elements are involved
- else {
- // Locate all of the parent display: none elements
- for (var a = elem; a && color(a); a = a.parentNode)
- stack.unshift(a);
-
- // Go through and make them visible, but in reverse
- // (It would be better if we knew the exact display type that they had)
- for (a = 0; a < stack.length; a++)
- if (color(stack[a])) {
- swap[a] = stack[a].style.display;
- stack[a].style.display = "block";
- }
-
- // Since we flip the display style, we have to handle that
- // one special, otherwise get the value
- ret = prop == "display" && swap[stack.length - 1] != null ?
- "none" :
- document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop) || "";
-
- // Finally, revert the display styles back
- for (a = 0; a < swap.length; a++)
- if (swap[a] != null)
- stack[a].style.display = swap[a];
- }
-
- if (prop == "opacity" && ret == "")
- ret = "1";
-
- } else if (elem.currentStyle) {
- var newProp = prop.replace(/\-(\w)/g, function (m, c) {
- return c.toUpperCase();
- });
- ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
- }
-
- return ret;
- },
-
- clean: function (a, doc) {
- var r = [];
- doc = doc || document;
-
- jQuery.each(a, function (i, arg) {
- if (!arg) return;
-
- if (arg.constructor == Number)
- arg = arg.toString();
-
- // Convert html string into DOM nodes
- if (typeof arg == "string") {
- // Trim whitespace, otherwise indexOf won't work as expected
- var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
-
- var wrap =
- // option or optgroup
- !s.indexOf("<opt") &&
- [1, "<select>", "</select>"] ||
-
- !s.indexOf("<leg") &&
- [1, "<fieldset>", "</fieldset>"] ||
-
- s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
- [1, "<table>", "</table>"] ||
-
- !s.indexOf("<tr") &&
- [2, "<table><tbody>", "</tbody></table>"] ||
-
- // <thead> matched above
- (!s.indexOf("<td") || !s.indexOf("<th")) &&
- [3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
-
- !s.indexOf("<col") &&
- [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
-
- // IE can't serialize <link> and <script> tags normally
- jQuery.browser.msie &&
- [1, "div<div>", "</div>"] ||
-
- [0, "", ""];
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + arg + wrap[2];
-
- // Move to the right depth
- while (wrap[0]--)
- div = div.lastChild;
-
- // Remove IE's autoinserted <tbody> from table fragments
- if (jQuery.browser.msie) {
-
- // String was a <table>, *may* have spurious <tbody>
- if (!s.indexOf("<table") && s.indexOf("<tbody") < 0)
- tb = div.firstChild && div.firstChild.childNodes;
-
- // String was a bare <thead> or <tfoot>
- else if (wrap[1] == "<table>" && s.indexOf("<tbody") < 0)
- tb = div.childNodes;
-
- for (var n = tb.length - 1; n >= 0; --n)
- if (jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length)
- tb[n].parentNode.removeChild(tb[n]);
-
- // IE completely kills leading whitespace when innerHTML is used
- if (/^\s/.test(arg))
- div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]), div.firstChild);
-
- }
-
- arg = jQuery.makeArray(div.childNodes);
- }
-
- if (0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")))
- return;
-
- if (arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options)
- r.push(arg);
- else
- r = jQuery.merge(r, arg);
-
- });
-
- return r;
- },
-
- attr: function (elem, name, value) {
- var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
-
- // Safari mis-reports the default selected property of a hidden option
- // Accessing the parent's selectedIndex property fixes it
- if (name == "selected" && jQuery.browser.safari)
- elem.parentNode.selectedIndex;
-
- // Certain attributes only work when accessed via the old DOM 0 way
- if (fix[name]) {
- if (value != undefined) elem[fix[name]] = value;
- return elem[fix[name]];
- } else if (jQuery.browser.msie && name == "style")
- return jQuery.attr(elem.style, "cssText", value);
-
- else if (value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method"))
- return elem.getAttributeNode(name).nodeValue;
-
- // IE elem.getAttribute passes even for style
- else if (elem.tagName) {
-
- if (value != undefined) elem.setAttribute(name, value);
- if (jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem))
- return elem.getAttribute(name, 2);
- return elem.getAttribute(name);
-
- // elem is actually elem.style ... set the style
- } else {
- // IE actually uses filters for opacity
- if (name == "opacity" && jQuery.browser.msie) {
- if (value != undefined) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- elem.zoom = 1;
-
- // Set the alpha filter to set the opacity
- elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/, "") +
- (parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
- }
-
- return elem.filter ?
- (parseFloat(elem.filter.match(/opacity=([^)]*)/)[1]) / 100).toString() : "";
- }
- name = name.replace(/-([a-z])/ig, function (z, b) {
- return b.toUpperCase();
- });
- if (value != undefined) elem[name] = value;
- return elem[name];
- }
- },
- trim: function (t) {
- return (t || "").replace(/^\s+|\s+$/g, "");
- },
-
- makeArray: function (a) {
- var r = [];
-
- // Need to use typeof to fight Safari childNodes crashes
- if (typeof a != "array")
- for (var i = 0, al = a.length; i < al; i++)
- r.push(a[i]);
- else
- r = a.slice(0);
-
- return r;
- },
-
- inArray: function (b, a) {
- for (var i = 0, al = a.length; i < al; i++)
- if (a[i] == b)
- return i;
- return -1;
- },
- merge: function (first, second) {
- // We have to loop this way because IE & Opera overwrite the length
- // expando of getElementsByTagName
-
- // Also, we need to make sure that the correct elements are being returned
- // (IE returns comment nodes in a '*' query)
- if (jQuery.browser.msie) {
- for (var i = 0; second[i]; i++)
- if (second[i].nodeType != 8)
- first.push(second[i]);
- } else
- for (var i = 0; second[i]; i++)
- first.push(second[i]);
-
- return first;
- },
- unique: function (first) {
- var r = [], num = jQuery.mergeNum++;
-
- try {
- for (var i = 0, fl = first.length; i < fl; i++)
- if (num != first[i].mergeNum) {
- first[i].mergeNum = num;
- r.push(first[i]);
- }
- } catch (e) {
- r = first;
- }
-
- return r;
- },
-
- mergeNum: 0,
- grep: function (elems, fn, inv) {
- // If a string is passed in for the function, make a function
- // for it (a handy shortcut)
- if (typeof fn == "string")
- fn = eval("false||function(a,i){return " + fn + "}");
-
- var result = [];
-
- // Go through the array, only saving the items
- // that pass the validator function
- for (var i = 0, el = elems.length; i < el; i++)
- if (!inv && fn(elems[i], i) || inv && !fn(elems[i], i))
- result.push(elems[i]);
-
- return result;
- },
- map: function (elems, fn) {
- // If a string is passed in for the function, make a function
- // for it (a handy shortcut)
- if (typeof fn == "string")
- fn = eval("false||function(a){return " + fn + "}");
-
- var result = [];
-
- // Go through the array, translating each of the items to their
- // new value (or values).
- for (var i = 0, el = elems.length; i < el; i++) {
- var val = fn(elems[i], i);
-
- if (val !== null && val != undefined) {
- if (val.constructor != Array) val = [val];
- result = result.concat(val);
- }
- }
-
- return result;
- }
- });
-
- /*
- * Whether the W3C compliant box model is being used.
- *
- * @property
- * @name $.boxModel
- * @type Boolean
- * @cat JavaScript
- */
- var userAgent = navigator.userAgent.toLowerCase();
-
-// Figure out what browser is being used
- jQuery.browser = {
- version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
- safari: /webkit/.test(userAgent),
- opera: /opera/.test(userAgent),
- msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
- mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
- };
-
- var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
-
- jQuery.extend({
- // Check to see if the W3C box model is being used
- boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
-
- styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
-
- props: {
- "for": "htmlFor",
- "class": "className",
- "float": styleFloat,
- cssFloat: styleFloat,
- styleFloat: styleFloat,
- innerHTML: "innerHTML",
- className: "className",
- value: "value",
- disabled: "disabled",
- checked: "checked",
- readonly: "readOnly",
- selected: "selected",
- maxlength: "maxLength"
- }
- });
-
- jQuery.each({
- parent: "a.parentNode",
- parents: "jQuery.parents(a)",
- next: "jQuery.nth(a,2,'nextSibling')",
- prev: "jQuery.nth(a,2,'previousSibling')",
- siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
- children: "jQuery.sibling(a.firstChild)"
- }, function (i, n) {
- jQuery.fn[ i ] = function (a) {
- var ret = jQuery.map(this, n);
- if (a && typeof a == "string")
- ret = jQuery.multiFilter(a, ret);
- return this.pushStack(jQuery.unique(ret));
- };
- });
-
- jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after"
- }, function (i, n) {
- jQuery.fn[ i ] = function () {
- var a = arguments;
- return this.each(function () {
- for (var j = 0, al = a.length; j < al; j++)
- jQuery(a[j])[n](this);
- });
- };
- });
-
- jQuery.each({
- removeAttr: function (key) {
- jQuery.attr(this, key, "");
- this.removeAttribute(key);
- },
- addClass: function (c) {
- jQuery.className.add(this, c);
- },
- removeClass: function (c) {
- jQuery.className.remove(this, c);
- },
- toggleClass: function (c) {
- jQuery.className[ jQuery.className.has(this, c) ? "remove" : "add" ](this, c);
- },
- remove: function (a) {
- if (!a || jQuery.filter(a, [this]).r.length)
- this.parentNode.removeChild(this);
- },
- empty: function () {
- while (this.firstChild)
- this.removeChild(this.firstChild);
- }
- }, function (i, n) {
- jQuery.fn[ i ] = function () {
- return this.each(n, arguments);
- };
- });
-
-// DEPRECATED
- jQuery.each([ "eq", "lt", "gt", "contains" ], function (i, n) {
- jQuery.fn[ n ] = function (num, fn) {
- return this.filter(":" + n + "(" + num + ")", fn);
- };
- });
-
- jQuery.each([ "height", "width" ], function (i, n) {
- jQuery.fn[ n ] = function (h) {
- return h == undefined ?
- ( this.length ? jQuery.css(this[0], n) : null ) :
- this.css(n, h.constructor == String ? h : h + "px");
- };
- });
-
- var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
- "(?:[\\w*_-]|\\\\.)" :
- "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
- quickChild = new RegExp("^[/>]\\s*(" + chars + "+)"),
- quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
- quickClass = new RegExp("^([#.]?)(" + chars + "*)");
-
- jQuery.extend({
- expr: {
- "": "m[2]=='*'||jQuery.nodeName(a,m[2])",
- "#": "a.getAttribute('id')==m[2]",
- ":": {
- // Position Checks
- lt: "i<m[3]-0",
- gt: "i>m[3]-0",
- nth: "m[3]-0==i",
- eq: "m[3]-0==i",
- first: "i==0",
- last: "i==r.length-1",
- even: "i%2==0",
- odd: "i%2",
-
- // Child Checks
- "first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
- "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
- "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
-
- // Parent Checks
- parent: "a.firstChild",
- empty: "!a.firstChild",
-
- // Text Check
- contains: "(a.textContent||a.innerText||'').indexOf(m[3])>=0",
-
- // Visibility
- visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
- hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
-
- // Form attributes
- enabled: "!a.disabled",
- disabled: "a.disabled",
- checked: "a.checked",
- selected: "a.selected||jQuery.attr(a,'selected')",
-
- // Form elements
- text: "'text'==a.type",
- radio: "'radio'==a.type",
- checkbox: "'checkbox'==a.type",
- file: "'file'==a.type",
- password: "'password'==a.type",
- submit: "'submit'==a.type",
- image: "'image'==a.type",
- reset: "'reset'==a.type",
- button: '"button"==a.type||jQuery.nodeName(a,"button")',
- input: "/input|select|textarea|button/i.test(a.nodeName)",
-
- // :has()
- has: "jQuery.find(m[3],a).length"
- },
- // DEPRECATED
- "[": "jQuery.find(m[2],a).length"
- },
-
- // The regular expressions that power the parsing engine
- parse: [
- // Match: [@value='test'], [@foo]
- /^\[ *(@)([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
-
- // DEPRECATED
- // Match: [div], [div p]
- /^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
-
- // Match: :contains('foo')
- /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
-
- // Match: :even, :last-chlid, #id, .class
- new RegExp("^([:.#]*)(" + chars + "+)")
- ],
-
- multiFilter: function (expr, elems, not) {
- var old, cur = [];
-
- while (expr && expr != old) {
- old = expr;
- var f = jQuery.filter(expr, elems, not);
- expr = f.t.replace(/^\s*,\s*/, "");
- cur = not ? elems = f.r : jQuery.merge(cur, f.r);
- }
-
- return cur;
- },
- find: function (t, context) {
- // Quickly handle non-string expressions
- if (typeof t != "string")
- return [ t ];
-
- // Make sure that the context is a DOM Element
- if (context && !context.nodeType)
- context = null;
-
- // Set the correct context (if none is provided)
- context = context || document;
-
- // DEPRECATED
- // Handle the common XPath // expression
- if (!t.indexOf("//")) {
- //context = context.documentElement;
- t = t.substr(2, t.length);
-
- // DEPRECATED
- // And the / root expression
- } else if (!t.indexOf('/') && !context.ownerDocument) {
- context = context.documentElement;
- t = t.substr(1, t.length);
- if (t.indexOf('/') >= 1)
- t = t.substr(t.indexOf('/'), t.length);
- }
-
- // Initialize the search
- var ret = [context], done = [], last;
-
- // Continue while a selector expression exists, and while
- // we're no longer looping upon ourselves
- while (t && last != t) {
- var r = [];
- last = t;
-
- // DEPRECATED
- t = jQuery.trim(t).replace(/^\/\//, "");
-
- var foundToken = false;
-
- // An attempt at speeding up child selectors that
- // point to a specific element tag
- var re = quickChild;
- var m = re.exec(t);
-
- if (m) {
- var nodeName = m[1].toUpperCase();
-
- // Perform our own iteration and filter
- for (var i = 0; ret[i]; i++)
- for (var c = ret[i].firstChild; c; c = c.nextSibling)
- if (c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()))
- r.push(c);
-
- ret = r;
- t = t.replace(re, "");
- if (t.indexOf(" ") == 0) continue;
- foundToken = true;
- } else {
- // (.. and /) DEPRECATED
- re = /^((\/?\.\.)|([>\/+~]))\s*(\w*)/i;
-
- if ((m = re.exec(t)) != null) {
- r = [];
-
- var nodeName = m[4], mergeNum = jQuery.mergeNum++;
- m = m[1];
-
- for (var j = 0, rl = ret.length; j < rl; j++)
- if (m.indexOf("..") < 0) {
- var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
- for (; n; n = n.nextSibling)
- if (n.nodeType == 1) {
- if (m == "~" && n.mergeNum == mergeNum) break;
-
- if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase()) {
- if (m == "~") n.mergeNum = mergeNum;
- r.push(n);
- }
-
- if (m == "+") break;
- }
- // DEPRECATED
- } else
- r.push(ret[j].parentNode);
-
- ret = r;
-
- // And remove the token
- t = jQuery.trim(t.replace(re, ""));
- foundToken = true;
- }
- }
-
- // See if there's still an expression, and that we haven't already
- // matched a token
- if (t && !foundToken) {
- // Handle multiple expressions
- if (!t.indexOf(",")) {
- // Clean the result set
- if (context == ret[0]) ret.shift();
-
- // Merge the result sets
- done = jQuery.merge(done, ret);
-
- // Reset the context
- r = ret = [context];
-
- // Touch up the selector string
- t = " " + t.substr(1, t.length);
-
- } else {
- // Optimize for the case nodeName#idName
- var re2 = quickID;
- var m = re2.exec(t);
-
- // Re-organize the results, so that they're consistent
- if (m) {
- m = [ 0, m[2], m[3], m[1] ];
-
- } else {
- // Otherwise, do a traditional filter check for
- // ID, class, and element selectors
- re2 = quickClass;
- m = re2.exec(t);
- }
-
- m[2] = m[2].replace(/\\/g, "");
-
- var elem = ret[ret.length - 1];
-
- // Try to do a global search by ID, where we can
- if (m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem)) {
- // Optimization for HTML document case
- var oid = elem.getElementById(m[2]);
-
- // Do a quick check for the existence of the actual ID attribute
- // to avoid selecting by the name attribute in IE
- // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
- if ((jQuery.browser.msie || jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2])
- oid = jQuery('[@id="' + m[2] + '"]', elem)[0];
-
- // Do a quick check for node name (where applicable) so
- // that div#foo searches will be really fast
- ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
- } else {
- // We need to find all descendant elements
- for (var i = 0; ret[i]; i++) {
- // Grab the tag name being searched for
- var tag = m[1] != "" || m[0] == "" ? "*" : m[2];
-
- // Handle IE7 being really dumb about <object>s
- if (tag == "*" && ret[i].nodeName.toLowerCase() == "object")
- tag = "param";
-
- r = jQuery.merge(r, ret[i].getElementsByTagName(tag));
- }
-
- // It's faster to filter by class and be done with it
- if (m[1] == ".")
- r = jQuery.classFilter(r, m[2]);
-
- // Same with ID filtering
- if (m[1] == "#") {
- var tmp = [];
-
- // Try to find the element with the ID
- for (var i = 0; r[i]; i++)
- if (r[i].getAttribute("id") == m[2]) {
- tmp = [ r[i] ];
- break;
- }
-
- r = tmp;
- }
-
- ret = r;
- }
-
- t = t.replace(re2, "");
- }
-
- }
-
- // If a selector string still exists
- if (t) {
- // Attempt to filter it
- var val = jQuery.filter(t, r);
- ret = r = val.r;
- t = jQuery.trim(val.t);
- }
- }
-
- // An error occurred with the selector;
- // just return an empty set instead
- if (t)
- ret = [];
-
- // Remove the root context
- if (ret && context == ret[0])
- ret.shift();
-
- // And combine the results
- done = jQuery.merge(done, ret);
-
- return done;
- },
-
- classFilter: function (r, m, not) {
- m = " " + m + " ";
- var tmp = [];
- for (var i = 0; r[i]; i++) {
- var pass = (" " + r[i].className + " ").indexOf(m) >= 0;
- if (!not && pass || not && !pass)
- tmp.push(r[i]);
- }
- return tmp;
- },
-
- filter: function (t, r, not) {
- var last;
-
- // Look for common filter expressions
- while (t && t != last) {
- last = t;
-
- var p = jQuery.parse, m;
-
- for (var i = 0; p[i]; i++) {
- m = p[i].exec(t);
-
- if (m) {
- // Remove what we just matched
- t = t.substring(m[0].length);
-
- m[2] = m[2].replace(/\\/g, "");
- break;
- }
- }
-
- if (!m)
- break;
-
- // :not() is a special case that can be optimized by
- // keeping it out of the expression list
- if (m[1] == ":" && m[2] == "not")
- r = jQuery.filter(m[3], r, true).r;
-
- // We can get a big speed boost by filtering by class here
- else if (m[1] == ".")
- r = jQuery.classFilter(r, m[2], not);
-
- else if (m[1] == "@") {
- var tmp = [], type = m[3];
-
- for (var i = 0, rl = r.length; i < rl; i++) {
- var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
-
- if (z == null || /href|src|selected/.test(m[2]))
- z = jQuery.attr(a, m[2]) || '';
-
- if ((type == "" && !!z ||
- type == "=" && z == m[5] ||
- type == "!=" && z != m[5] ||
- type == "^=" && z && !z.indexOf(m[5]) ||
- type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
- (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not)
- tmp.push(a);
- }
-
- r = tmp;
-
- // We can get a speed boost by handling nth-child here
- } else if (m[1] == ":" && m[2] == "nth-child") {
- var num = jQuery.mergeNum++, tmp = [],
- test = /(\d*)n\+?(\d*)/.exec(
- m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
- !/\D/.test(m[3]) && "n+" + m[3] || m[3]),
- first = (test[1] || 1) - 0, last = test[2] - 0;
-
- for (var i = 0, rl = r.length; i < rl; i++) {
- var node = r[i], parentNode = node.parentNode;
-
- if (num != parentNode.mergeNum) {
- var c = 1;
-
- for (var n = parentNode.firstChild; n; n = n.nextSibling)
- if (n.nodeType == 1)
- n.nodeIndex = c++;
-
- parentNode.mergeNum = num;
- }
-
- var add = false;
-
- if (first == 1) {
- if (last == 0 || node.nodeIndex == last)
- add = true;
- } else if ((node.nodeIndex + last) % first == 0)
- add = true;
-
- if (add ^ not)
- tmp.push(node);
- }
-
- r = tmp;
-
- // Otherwise, find the expression to execute
- } else {
- var f = jQuery.expr[m[1]];
- if (typeof f != "string")
- f = jQuery.expr[m[1]][m[2]];
-
- // Build a custom macro to enclose it
- f = eval("false||function(a,i){return " + f + "}");
-
- // Execute it against the current filter
- r = jQuery.grep(r, f, not);
- }
- }
-
- // Return an array of filtered elements (r)
- // and the modified expression string (t)
- return { r: r, t: t };
- },
- parents: function (elem) {
- var matched = [];
- var cur = elem.parentNode;
- while (cur && cur != document) {
- matched.push(cur);
- cur = cur.parentNode;
- }
- return matched;
- },
- nth: function (cur, result, dir, elem) {
- result = result || 1;
- var num = 0;
-
- for (; cur; cur = cur[dir])
- if (cur.nodeType == 1 && ++num == result)
- break;
-
- return cur;
- },
- sibling: function (n, elem) {
- var r = [];
-
- for (; n; n = n.nextSibling) {
- if (n.nodeType == 1 && (!elem || n != elem))
- r.push(n);
- }
-
- return r;
- }
- });
- /*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code orignated from
- * Dean Edwards' addEvent library.
- */
- jQuery.event = {
-
- // Bind an event to an element
- // Original by Dean Edwards
- add: function (element, type, handler, data) {
- // For whatever reason, IE has trouble passing the window object
- // around, causing it to be cloned in the process
- if (jQuery.browser.msie && element.setInterval != undefined)
- element = window;
-
- // Make sure that the function being executed has a unique ID
- if (!handler.guid)
- handler.guid = this.guid++;
-
- // if data is passed, bind to handler
- if (data != undefined) {
- // Create temporary function pointer to original handler
- var fn = handler;
-
- // Create unique handler function, wrapped around original handler
- handler = function () {
- // Pass arguments and context to original handler
- return fn.apply(this, arguments);
- };
-
- // Store data in unique handler
- handler.data = data;
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- handler.guid = fn.guid;
- }
-
- // Init the element's event structure
- if (!element.$events)
- element.$events = {};
-
- if (!element.$handle)
- element.$handle = function () {
- // returned undefined or false
- var val;
-
- // Handle the second event of a trigger and when
- // an event is called after a page has unloaded
- if (typeof jQuery == "undefined" || jQuery.event.triggered)
- return val;
-
- val = jQuery.event.handle.apply(element, arguments);
-
- return val;
- };
-
- // Get the current list of functions bound to this event
- var handlers = element.$events[type];
-
- // Init the event handler queue
- if (!handlers) {
- handlers = element.$events[type] = {};
-
- // And bind the global event handler to the element
- if (element.addEventListener)
- element.addEventListener(type, element.$handle, false);
- else
- element.attachEvent("on" + type, element.$handle);
- }
-
- // Add the function to the element's handler list
- handlers[handler.guid] = handler;
-
- // Keep track of which events have been used, for global triggering
- this.global[type] = true;
- },
-
- guid: 1,
- global: {},
-
- // Detach an event or set of events from an element
- remove: function (element, type, handler) {
- var events = element.$events, ret, index;
-
- if (events) {
- // type is actually an event object here
- if (type && type.type) {
- handler = type.handler;
- type = type.type;
- }
-
- if (!type) {
- for (type in event...
[truncated message content] |
|
From: <go...@us...> - 2013-11-20 18:30:30
|
Revision: 12230
http://sourceforge.net/p/xoops/svn/12230
Author: goffy
Date: 2013-11-20 18:30:26 +0000 (Wed, 20 Nov 2013)
Log Message:
-----------
fixed bug concerning attachements (horst/goffy)
cleaned up code
Modified Paths:
--------------
XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php
Modified: XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php 2013-11-19 18:30:35 UTC (rev 12229)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/include/task.inc.php 2013-11-20 18:30:26 UTC (rev 12230)
@@ -70,7 +70,6 @@
$subscribers = $xoopsDB->query($sql) or die();
while ($subscriber = $xoopsDB->fetchArray($subscribers)) {
- //echo "subscr_email:".$subscriber["subscr_email"]
$subscr_id = $subscriber["subscr_id"];
if ($op == 'resend_letter') {
//read subscribers, where send failed
@@ -137,7 +136,7 @@
require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.pop3.php" );
require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.smtp.php" );
- global $XoopsTpl, $xoopsDB, $xoopsUser, $letterHandler, $accountsHandler, $subscrHandler, $attachmentHandler;
+ global $XoopsTpl, $xoopsDB, $xoopsUser, $letterHandler, $accountsHandler, $subscrHandler, $attachmentHandler, $xoopsModuleConfig;
$protocolHandler =& xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
@@ -150,7 +149,6 @@
if (!is_dir($template_path)) $template_path = XNEWSLETTER_PATH.'/language/english/templates/';
if (!is_dir($template_path)) {
return str_replace("%p",$template_path, _AM_XNEWSLETTER_SEND_ERROR_INALID_TEMPLATE_PATH);
- //redirect_header("letter.php", 5, str_replace("%p",$template_path, _AM_XNEWSLETTER_SEND_ERROR_INALID_TEMPLATE_PATH));
}
//get letters ready to send groups by letter_id
@@ -159,7 +157,6 @@
$sql .= " GROUP BY `task_letter_id`";
if (!$task_letters = $xoopsDB->query($sql))
{
- //ToDo Protocol
return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
}
@@ -170,18 +167,14 @@
$obj_letter =& $letterHandler->get($letter_id);
if (count($obj_letter)==0)
{
- //ToDo Protocol
return _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID;
- //redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
}
//read categories
$letter_cats = $obj_letter->getVar("letter_cats");
if ( $letter_cats == "") //no cats
{
- //ToDo Protocol
return _MA_XNEWSLETTER_LETTER_NONEAVAIL;
- //redirect_header("letter.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
}
//read data of account
@@ -201,7 +194,6 @@
$tpl = new XoopsTpl();
$tpl->assign('content', $letter_content);
- //$tpl->assign('unsubscribe_url', XOOPS_URL.'/modules/xNewsletter/');
// read template
$letter_template = $obj_letter->getVar("letter_template");
@@ -210,12 +202,10 @@
$recipients = array();
$sql_tasklist = "SELECT `task_id`, `task_subscr_id` FROM ".$xoopsDB->prefix('mod_xnewsletter_task')." WHERE ((`task_letter_id`= ".$letter_id.") AND (`task_starttime` < ".time()."))";
if (!$task_letters = $xoopsDB->query($sql_tasklist)) {
- //ToDo Protocol
return $task_letters->getErrors();
}
$recipients = array();
while ($task_letter = $xoopsDB->fetchArray($task_letters)) {
- //echo "<br/>letter_id:".$letter_id." subcr_id:".$task_letter["task_subscr_id"];
$subscr_id = $task_letter["task_subscr_id"];
$task_id = $task_letter["task_id"];
if ($subscr_id==0) {
@@ -233,32 +223,24 @@
$sql_subscr = "SELECT * FROM ".$xoopsDB->prefix('mod_xnewsletter_subscr')." WHERE `subscr_id`= ".$subscr_id;
if (!$task_subscrs = $xoopsDB->query($sql_subscr))
{
- //ToDo Protocol
return $task_subscrs->getErrors();
}
- //while ($subscriber = $xoopsDB->fetchArray($task_subscrs)) {
- //echo " email:".$subscriber["subscr_email"];
- $subscriber = $xoopsDB->fetchArray($task_subscrs);
- $recipients[] = array(
- "task_id" => $task_id,
- "address" => $subscriber["subscr_email"],
- "firstname" => $subscriber["subscr_firstname"],
- "lastname" => $subscriber["subscr_lastname"],
- "subscr_sex" => $subscriber["subscr_sex"],
- "subscriber_id" => $subscriber["subscr_id"],
- "subscriber_actkey" => $subscriber["subscr_actkey"]
- );
- //echo "<br/>count:".count($recipients)." address:".$subscriber["subscr_email"]." firstname:".$subscriber["subscr_firstname"]." lastname:".$subscriber["subscr_lastname"]." subscr_sex:".$subscriber["subscr_sex"]." subscriber_id:".$subscriber["subscr_id"]." subscriber_actkey:".$subscriber["subscr_actkey"];
-
- //}
+ $subscriber = $xoopsDB->fetchArray($task_subscrs);
+ $recipients[] = array(
+ "task_id" => $task_id,
+ "address" => $subscriber["subscr_email"],
+ "firstname" => $subscriber["subscr_firstname"],
+ "lastname" => $subscriber["subscr_lastname"],
+ "subscr_sex" => $subscriber["subscr_sex"],
+ "subscriber_id" => $subscriber["subscr_id"],
+ "subscriber_actkey" => $subscriber["subscr_actkey"]
+ );
}
if ($xn_send_in_packages > 0 && count($recipients)==$xn_send_in_packages) break;
}
if (count($recipients) == 0) {
- //ToDo Protocol
- //return _AM_XNEWSLETTER_SEND_ERROR_NO_SUBSCR;
return null;
}
@@ -271,14 +253,15 @@
if ($att_numrows > 0) {
$attachment_arr = $attachmentHandler->getall($attachment_crit);
foreach (array_keys($attachment_arr) as $attid) {
- $uploaddir = XOOPS_UPLOAD_PATH.$xoopsModuleConfig['xn_attachment_path'].$letter_id."/";
+ $uploaddir = XOOPS_UPLOAD_PATH.$xoopsModuleConfig['xn_attachment_path'];
+ if (substr($uploaddir, -1)!="/") $uploaddir .= "/"; //check, whether path seperator is existing
+ $uploaddir .= $letter_id."/";
$attachments[] = $uploaddir.$attachment_arr[$attid]->getVar("attachment_name");
}
} else {
$attachments = array();
}
- //$senderuid = $xoopsUser->uid(); //ToDo
$senderuid = (is_object($xoopsUser) && isset($xoopsUser)) ? $xoopsUser->uid(): 0;
$count_total = 0;
$count_err = 0;
@@ -321,8 +304,6 @@
$mail->AddReplyTo($account_yourmail, $account_yourname);
$mail->Subject = $letter_title;
-
-
foreach ($recipients as $recipient) {
$subscriber_id = $recipient["subscriber_id"];
@@ -347,11 +328,15 @@
$mail->AltBody = strip_tags($body . "\n" . $link);
foreach ($attachments as $attachment) {
- if ( file_exists($attachment)) $mail->AddAttachment($attachment);
+ if ( file_exists($attachment)) {
+ $mail->AddAttachment($attachment);
+ echo "<br>att exist:".$attachment;
+ } else {
+ echo "<br>att not exist:".$attachment;
+ }
}
$count_total ++;
if ( $mail->Send()) {
- //$protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS;
if ($subscriber_id == 0) {
$protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_TEST." (".$recipient["address"].")";
} else {
@@ -432,7 +417,7 @@
echo $obj_protocol->getHtmlErrors();
}
unset($obj_protocol);
-
+
return $protocol_status;
}
|
|
From: <bi...@us...> - 2013-11-19 18:30:38
|
Revision: 12229
http://sourceforge.net/p/xoops/svn/12229
Author: bitc3r0
Date: 2013-11-19 18:30:35 +0000 (Tue, 19 Nov 2013)
Log Message:
-----------
Some changes to adapt to new rmcommon version
Modified Paths:
--------------
RMC/modules/xthemes/trunk/xthemes/css/themes.css
RMC/modules/xthemes/trunk/xthemes/preloads/core.php
RMC/modules/xthemes/trunk/xthemes/templates/xt_index.php
RMC/modules/xthemes/trunk/xthemes/templates/xt_navigation.php
RMC/modules/xthemes/trunk/xthemes/templates/xt_settings.php
RMC/modules/xthemes/trunk/xthemes/templates/xt_themes.php
RMC/modules/xthemes/trunk/xthemes/themes.php
RMC/modules/xthemes/trunk/xthemes/xoops_version.php
Modified: RMC/modules/xthemes/trunk/xthemes/css/themes.css
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/css/themes.css 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/css/themes.css 2013-11-19 18:30:35 UTC (rev 12229)
@@ -470,4 +470,5 @@
display: block;
width: 100%; height: 100%;
border-radius: 0 0 2px 2px;
+ border: 0;
}
\ No newline at end of file
Modified: RMC/modules/xthemes/trunk/xthemes/preloads/core.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/preloads/core.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/preloads/core.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -11,19 +11,19 @@
{
public function eventCoreIncludeCommonLanguage(){
-
+
load_mod_locale('xthemes');
define('XTPATH', XOOPS_ROOT_PATH.'/modules/xthemes');
define('XTURL', XOOPS_URL.'/modules/xthemes');
-
+
require_once XTPATH.'/class/xtassembler.class.php';
$GLOBALS['xtAssembler'] = new XtAssembler();
$GLOBALS['xtFunctions'] = new XtFunctions();
-
+
load_theme_locale($GLOBALS['xtAssembler']->theme()->getInfo('dir'));
-
+
}
-
+
public function eventCoreHeaderAddMeta(){
global $xtAssembler;
/**
@@ -32,12 +32,12 @@
if(!defined('XOOPS_CPFUNC_LOADED')){
$xtAssembler->init();
}
-
+
}
-
+
public function eventCoreIndexStart(){
-
+
define('XTHEMES_IS_HOME', 1);
-
+
}
}
Modified: RMC/modules/xthemes/trunk/xthemes/templates/xt_index.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/templates/xt_index.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/templates/xt_index.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -1,3 +1,4 @@
+<h1 class="cu-section-title"><?php _e('Dashboard', 'xthemes'); ?></h1>
<div class="outer themes">
<div class="th"><?php _e('Recent Themes on Xoops Mexico','xthemes'); ?></div>
<div class="even waiting" id="recent-themes">
Modified: RMC/modules/xthemes/trunk/xthemes/templates/xt_navigation.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/templates/xt_navigation.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/templates/xt_navigation.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -1,4 +1,4 @@
-<h1 class="rmc_titles"><?php _e('Menus and Navigation','xthemes'); ?></h1>
+<h1 class="cu-section-title"><?php _e('Menus and Navigation','xthemes'); ?></h1>
<p class="introduction">
<?php echo sprintf(__('This theme have %u different menus that can be configured with xThemes menus.','xthemes'), count($menus)); ?>
Modified: RMC/modules/xthemes/trunk/xthemes/templates/xt_settings.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/templates/xt_settings.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/templates/xt_settings.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -1,4 +1,4 @@
-<h1 class="rmc_titles"><?php echo sprintf(__('%s Settings','xthemes'), $xtAssembler->theme()->getInfo("name")); ?></h1>
+<h1 class="cu-section-title"><?php echo sprintf(__('%s Settings','xthemes'), $xtAssembler->theme()->getInfo("name")); ?></h1>
<form name="formSettings" id="frm-settings" action="settings.php" method="post" class="form-horizontal">
<ul class="nav nav-tabs xt-settings-tabs">
Modified: RMC/modules/xthemes/trunk/xthemes/templates/xt_themes.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/templates/xt_themes.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/templates/xt_themes.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -1,3 +1,4 @@
+<h1 class="cu-section-title"><?php _e('Available Themes', 'xthemes'); ?></h1>
<div class="xt_current">
<?php if($current): ?>
<div class="xt_current_screenshot">
@@ -101,7 +102,7 @@
</div>
<div id="xt-previewer-blocker"></div>
<div id="xt-previewer">
- <div class="title"><span></span><span class="icon icon-close close"></span></div>
+ <div class="title"><span></span><span class="close">×</span></div>
<div class="website"></div>
</div>
Modified: RMC/modules/xthemes/trunk/xthemes/themes.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/themes.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/themes.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -18,7 +18,7 @@
function xt_show_themes(){
global $tpl, $xtf, $xoopsSecurity, $xtAssembler;
- $xtf->menu_options();
+ $xtf->toolbar();
$current = $xtAssembler->theme();
// Read all available themes
@@ -54,6 +54,9 @@
$tpl->add_local_script('xthemes.js', 'xthemes');
$tpl->add_head_script("var xoops_url = '".XOOPS_URL."';");
$tpl->assign('xoops_pagetitle', __('Themes Manager','xthemes'));
+
+ $bc = RMBreadCrumb::get();
+ $bc->add_crumb(__('Themes', 'xthemes'));
xoops_cp_header();
Modified: RMC/modules/xthemes/trunk/xthemes/xoops_version.php
===================================================================
--- RMC/modules/xthemes/trunk/xthemes/xoops_version.php 2013-11-18 22:11:28 UTC (rev 12228)
+++ RMC/modules/xthemes/trunk/xthemes/xoops_version.php 2013-11-19 18:30:35 UTC (rev 12229)
@@ -27,7 +27,7 @@
$modversion['name'] = 'XThemes';
$modversion['version'] = 1.5;
$modversion['rmnative'] = '1';
-$modversion['rmversion'] = array('major'=>1,'minor'=>5, 'revision'=>23,'stage'=>-1,'name'=>'XThemes');
+$modversion['rmversion'] = array('major'=>1,'minor'=>5, 'revision'=>28,'stage'=>0,'name'=>'XThemes');
$modversion['updateurl'] = "http://www.xoopsmexico.net/modules/vcontrol/?action=check&id=9";
$modversion['description'] = 'A module to manage themes from Red México';
$modversion['credits'] = "Eduardo Cortés <i.b...@gm...>";
|
|
From: <be...@us...> - 2013-11-18 22:11:31
|
Revision: 12228
http://sourceforge.net/p/xoops/svn/12228
Author: beckmi
Date: 2013-11-18 22:11:28 +0000 (Mon, 18 Nov 2013)
Log Message:
-----------
Adding missing $ret
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/include/update.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/include/update.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/include/update.php 2013-11-12 18:24:19 UTC (rev 12227)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/include/update.php 2013-11-18 22:11:28 UTC (rev 12228)
@@ -32,6 +32,7 @@
function xoops_module_update_system(&$module, $prev_version = null)
{
// irmtfan bug fix: solve templates duplicate issue
+ $ret = null;
if ($prev_version < 211) {
$ret = update_system_v211($module);
}
|
|
From: <bi...@us...> - 2013-11-12 18:24:23
|
Revision: 12227
http://sourceforge.net/p/xoops/svn/12227
Author: bitc3r0
Date: 2013-11-12 18:24:19 +0000 (Tue, 12 Nov 2013)
Log Message:
-----------
Some minor changes in twop6 theme
Modified Paths:
--------------
RMC/rmcommon/trunk/rmcommon/class/proxy.php
RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php
RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php
Modified: RMC/rmcommon/trunk/rmcommon/class/proxy.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/class/proxy.php 2013-11-10 14:54:25 UTC (rev 12226)
+++ RMC/rmcommon/trunk/rmcommon/class/proxy.php 2013-11-12 18:24:19 UTC (rev 12227)
@@ -31,7 +31,7 @@
function get(){
- global $exmConfig;
+ global $xoopsConfig;
// Creamos la petición
$hdrs = array(
'http'=>array(
Modified: RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php 2013-11-10 14:54:25 UTC (rev 12226)
+++ RMC/rmcommon/trunk/rmcommon/themes/twop6/class/twop6functions.class.php 2013-11-12 18:24:19 UTC (rev 12227)
@@ -66,16 +66,16 @@
public function moduleMenu($m){
global $xoopsModule, $xoopsUser;
-
+
if(!is_a($xoopsModule, 'XoopsModule')){
$mod = RMFunctions::load_module($m);
} else {
if($xoopsModule->dirname()==$m)
$mod = $xoopsModule;
else
- $mod = RMFunctions::load_module($m);
+ $mod = RMFunctions::get()->load_module($m);
}
-
+
if(!is_a($mod, 'XoopsModule')) return false;
// Check user
@@ -119,10 +119,9 @@
public function moduleSubmenu($submenu, $mod){
if(!is_array($submenu)) return array();
-
foreach($submenu as $i => $menu){
if($menu=='divider') continue;
- $submenu[$i]['link'] = strpos($menu['link'], 'http://')!==FALSE && strpos($menu['link'], 'ftp://')!==FALSE ? $menu['link'] : XOOPS_URL.'/modules/'.$mod->getVar('dirname','n').'/'.$menu['link'];
+ $submenu[$i]['link'] = strpos($menu['link'], 'http://')===TRUE && strpos($menu['link'], 'ftp://')===TRUE ? $menu['link'] : XOOPS_URL.'/modules/'.$mod->getVar('dirname','n').'/'.$menu['link'];
}
return $submenu;
Modified: RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php
===================================================================
--- RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php 2013-11-10 14:54:25 UTC (rev 12226)
+++ RMC/rmcommon/trunk/rmcommon/themes/twop6/theme.php 2013-11-12 18:24:19 UTC (rev 12227)
@@ -128,7 +128,7 @@
<?php endif; ?>
<li class="dropdown">
- <a href="#" title="<?php _e('Modules Box','twop6'); ?>" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
<i class="xo-icon xicon-modules"></i>
<?php _e('Modules','twop6'); ?>
<b class="caret"></b>
|
|
From: <luc...@us...> - 2013-11-10 14:54:31
|
Revision: 12226
http://sourceforge.net/p/xoops/svn/12226
Author: luciorota
Date: 2013-11-10 14:54:25 +0000 (Sun, 10 Nov 2013)
Log Message:
-----------
Xoops Core 2.5.6 language pack ITA UTF8
Modified Paths:
--------------
XoopsLanguages/italian/core/2.5.6/Changelog_Traduzione.txt
Modified: XoopsLanguages/italian/core/2.5.6/Changelog_Traduzione.txt
===================================================================
--- XoopsLanguages/italian/core/2.5.6/Changelog_Traduzione.txt 2013-11-09 22:10:38 UTC (rev 12225)
+++ XoopsLanguages/italian/core/2.5.6/Changelog_Traduzione.txt 2013-11-10 14:54:25 UTC (rev 12226)
@@ -1,7 +1,7 @@
*********************************************************************************
***************** CHANGELOG TRADUZIONE per CORE XOOPS ***************************
---------------------------------------------------------------------------------
--- Ultimo aggiornamento: 23/07/2013 -------------------- by Xoops Italia --------
+-- Ultimo aggiornamento: 10/11/2013 -------------------- by Xoops Italia --------
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
|
|
From: <be...@us...> - 2013-11-09 22:10:43
|
Revision: 12225
http://sourceforge.net/p/xoops/svn/12225
Author: beckmi
Date: 2013-11-09 22:10:38 +0000 (Sat, 09 Nov 2013)
Log Message:
-----------
added missing apostrophe corrections for Date types in CleanVars in /class/model/write.php
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-11-09 22:09:17 UTC (rev 12224)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-11-09 22:10:38 UTC (rev 12225)
@@ -38,7 +38,7 @@
- added missing info about new language constants in Fast Comments (irmtfan/mamba)
- fixed Undefined index: uid in file /modules/profile/userinfo.php line 24 (cesag/mamba)
- set minimum PHP version to 5.3.7 (mamba)
-- added missing apostrophe functions for Date types in CleanVars in /class/model/write.php
+- added missing apostrophe corrections for Date types in CleanVars in /class/model/write.php
Security fixes
|
|
From: <be...@us...> - 2013-11-09 22:09:21
|
Revision: 12224
http://sourceforge.net/p/xoops/svn/12224
Author: beckmi
Date: 2013-11-09 22:09:17 +0000 (Sat, 09 Nov 2013)
Log Message:
-----------
added missing apostrophe corrections for Date types in CleanVars in /class/model/write.php
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/model/write.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-10-31 16:19:43 UTC (rev 12223)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-11-09 22:09:17 UTC (rev 12224)
@@ -37,8 +37,10 @@
- bug in commentrenderer.php (Roby73/irmtfan)
- added missing info about new language constants in Fast Comments (irmtfan/mamba)
- fixed Undefined index: uid in file /modules/profile/userinfo.php line 24 (cesag/mamba)
-- set minimum PHP version to 5.3.7
+- set minimum PHP version to 5.3.7 (mamba)
+- added missing apostrophe functions for Date types in CleanVars in /class/model/write.php
+
Security fixes
- XSS issues reported by Mehdi Dadkhah (rgriffith)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/model/write.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/model/write.php 2013-10-31 16:19:43 UTC (rev 12223)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/model/write.php 2013-11-09 22:09:17 UTC (rev 12224)
@@ -55,12 +55,15 @@
switch ($v["data_type"]) {
case XOBJ_DTYPE_TIMESTAMP:
$cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTAMPSTRING, $cleanv) : date(_DBTIMESTAMPSTRING, strtotime($cleanv));
+ $cleanv = str_replace('\\"', '"', $this->handler->db->quote($cleanv));
break;
case XOBJ_DTYPE_TIME:
$cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBTIMESTRING, $cleanv) : date(_DBTIMESTRING, strtotime($cleanv));
+ $cleanv = str_replace('\\"', '"', $this->handler->db->quote($cleanv));
break;
case XOBJ_DTYPE_DATE:
$cleanv = !is_string($cleanv)&&is_numeric($cleanv) ? date(_DBDATESTRING, $cleanv) : date(_DBDATESTRING, strtotime($cleanv));
+ $cleanv = str_replace('\\"', '"', $this->handler->db->quote($cleanv));
break;
case XOBJ_DTYPE_UNICODE_TXTBOX:
if ($v['required'] && $cleanv != '0' && $cleanv == '') {
|
|
From: <go...@us...> - 2013-10-31 16:19:45
|
Revision: 12223
http://sourceforge.net/p/xoops/svn/12223
Author: goffy
Date: 2013-10-31 16:19:43 +0000 (Thu, 31 Oct 2013)
Log Message:
-----------
deleted not needed file (goffy)
Removed Paths:
-------------
XoopsModules/xnewsletter/trunk/xNewsletter/include/sendletter.php
Deleted: XoopsModules/xnewsletter/trunk/xNewsletter/include/sendletter.php
===================================================================
--- XoopsModules/xnewsletter/trunk/xNewsletter/include/sendletter.php 2013-10-30 22:40:04 UTC (rev 12222)
+++ XoopsModules/xnewsletter/trunk/xNewsletter/include/sendletter.php 2013-10-31 16:19:43 UTC (rev 12223)
@@ -1,305 +0,0 @@
-<?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 $
- * ****************************************************************************
- */
-
-if (!defined("XOOPS_ROOT_PATH")) {
- die("XOOPS root path not defined");
-}
-
-require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.phpmailer.php" );
-require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.pop3.php" );
-require_once( XOOPS_ROOT_PATH."/class/mail/phpmailer/class.smtp.php" );
-
-global $XoopsTpl;
-
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
-}
-
-$op = xNewsletter_CleanVars($_REQUEST, 'op', 'list', 'string');
-$letter_id = xNewsletter_CleanVars($_REQUEST, 'letter_id', 0, 'int');
-
-if ($letter_id == 0) {
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
-}
-
-//get template path
-$template_path = XOOPS_ROOT_PATH.'/modules/xNewsletter/language/'.$GLOBALS['xoopsConfig']['language'].'/templates/';
-if (!is_dir($template_path)) $template_path = XOOPS_ROOT_PATH.'/modules/xNewsletter/language/english/templates/';
-if (!is_dir($template_path)) {
- redirect_header("letter.php", 5, str_replace("%p",$template_path, _AM_XNEWSLETTER_SEND_ERROR_INALID_TEMPLATE_PATH));
-}
-
-$obj_letter =& $letterHandler->get($letter_id);
-if (count($obj_letter)==0)
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_LETTERID);
-
-//read categories
-$letter_cats = $obj_letter->getVar("letter_cats");
-if ( $letter_cats == "") { //no cats
- redirect_header("letter.php", 3, _MA_XNEWSLETTER_LETTER_NONEAVAIL);
-}
-
-if ($op=="send_test") {
- //check for valid email for testing
- $letter_email_test = $obj_letter->getVar("letter_email_test");
- if ($letter_email_test=="")
- redirect_header("letter.php", 3, _AM_XNEWSLETTER_SEND_ERROR_NO_EMAIL);
-}
-
-//read data of account
-$obj_account = $accountsHandler->get($obj_letter->getVar("letter_account"));
-$account_type = $obj_account->getVar("accounts_type");
-$account_yourname = $obj_account->getVar("accounts_yourname");
-$account_yourmail = $obj_account->getVar("accounts_yourmail");
-$account_username = $obj_account->getVar("accounts_username");
-$account_password = $obj_account->getVar("accounts_password");
-$account_server_out = $obj_account->getVar("accounts_server_out");
-$account_port_out = $obj_account->getVar("accounts_port_out");
-$account_securetype_out = $obj_account->getVar("accounts_securetype_out");
-
-//create basic mail body
-$letter_title = $obj_letter->getVar("letter_title");
-$letter_content = $obj_letter->getVar("letter_content", "n");
-
-$tpl = new XoopsTpl();
-$tpl->assign('content', $letter_content);
-$tpl->assign('unsubscribe_url', XOOPS_URL.'/modules/xNewsletter/');
-
-// read template
-$letter_template = $obj_letter->getVar("letter_template");
-
-//get emails of subscribers
-$recipients = array();
-if ($op=="send_test") {
- $recipients[] = array(
- "address"=> $letter_email_test,
- "firstname" => "John",
- "lastname" => "Doe",
- "subscr_sex" => "Mr.",
- "subscriber_id" => "0",
- "catsubscr_id" => "0",
- "subscriber_actkey" => "Test"
- );
-} else {
- //read all subscribers
- $sql = "SELECT subscr_id, subscr_email, subscr_firstname, subscr_lastname, subscr_sex, subscr_actkey ";
- $sql .= "FROM ".$xoopsDB->prefix("xnewsletter_subscr")." INNER JOIN ".$xoopsDB->prefix("xnewsletter_catsubscr")." ON subscr_id = catsubscr_subscrid ";
- $sql .= "WHERE subscr_activated=1 AND (((catsubscr_catid) In (";
- $sql .= str_replace("|",",",$letter_cats);
- $sql .= "))) GROUP BY subscr_id, subscr_email, subscr_firstname, subscr_lastname, subscr_sex;";
-
- $subscribers = $xoopsDB->query($sql) or die();
-
- while ($subscriber = mysql_fetch_assoc($subscribers)) {
- //echo "subscr_email:".$subscriber["subscr_email"]
- $subscr_id = $subscriber["subscr_id"];
- if ($op == 'resend_letter') {
- //read subscribers, where send failed
- $protocol_crit = new CriteriaCompo();
- $protocol_crit->add(new Criteria("protocol_letter_id", $letter_id));
- $protocol_crit->add(new Criteria("protocol_subscriber_id", $subscr_id));
- $protocol_crit->add(new Criteria("protocol_success", 1));
- $protocol_numrows = $protocolHandler->getCount($protocol_crit);
- if ($protocol_numrows > 0) $subscr_id = 0; //letter already successfully sent
- }
- if ($subscr_id > 0) {
- if ($subscriber["subscr_actkey"] == "") {
- $u = $subscrHandler->get($subscr_id);
- $subscriber["subscr_actkey"] = xoops_makepass();
- $u->setVar("subscr_actkey", $subscriber["subscr_actkey"] );
- $subscrHandler->insert($u);
- unset($u);
- }
- $recipients[] = array(
- "address"=> $subscriber["subscr_email"],
- "firstname" => $subscriber["subscr_firstname"],
- "lastname" => $subscriber["subscr_lastname"],
- "subscr_sex" => $subscriber["subscr_sex"],
- "subscriber_id" => $subscriber["subscr_id"],
- "subscriber_actkey" => $subscriber["subscr_actkey"]
- );
- }
- }
-}
-//read attachments
-$attachment_crit = new CriteriaCompo();
-$attachment_crit->add(new Criteria("attachment_letter_id", $letter_id));
-$attachment_crit->setSort("attachment_id");
-$attachment_crit->setOrder("ASC");
-$att_numrows= $attachmentHandler->getCount($attachment_crit);
-if ($att_numrows > 0) {
- $attachment_arr = $attachmentHandler->getall($attachment_crit);
- foreach (array_keys($attachment_arr) as $attid) {
- $uploaddir = XOOPS_UPLOAD_PATH.$xoopsModuleConfig['xn_attachment_path'].$letter_id."/";
- $attachments[] = $uploaddir.$attachment_arr[$attid]->getVar("attachment_name");
- }
-} else {
- $attachments = array();
-}
-
-$senderuid = $xoopsUser->uid();
-$count_total = 0;
-$count_err = 0;
-
-try {
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- $pop = new POP3();
- $pop->Authorise($account_server_out, $account_port_out, 30, $account_username, $account_password, 1);
- }
-
- $mail = new PHPMailer();
-
- $mail->CharSet = _CHARSET; //use xoops default character set
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- //$mail->IsSendmail(); Fix Error
- }
-
- $mail->Username = $account_username; // SMTP account username
- $mail->Password = $account_password; // SMTP account password
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_POP3) {
- $mail->IsSMTP();
- //$mail->SMTPDebug = 2;
- $mail->Host = $account_server_out;
- }
-
- if ($account_type == _AM_ACCOUNTS_TYPE_VAL_SMTP || $account_type == _AM_ACCOUNTS_TYPE_VAL_GMAIL) {
- $mail->Port = $account_port_out; // set the SMTP port
- $mail->Host = $account_server_out; //sometimes necessary to repeat
- }
-
- if ($account_securetype_out !="") {
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = $account_securetype_out; // sets the prefix to the server
- }
-
- $mail->SetFrom($account_yourmail, $account_yourname);
- $mail->AddReplyTo($account_yourmail, $account_yourname);
- $mail->Subject = $letter_title;
-
- foreach ($recipients as $recipient) {
- $subscriber_id = $recipient["subscriber_id"];
-
- $tpl->assign('sex', $recipient["subscr_sex"]);
- $tpl->assign('firstname', $recipient["firstname"]);
- $tpl->assign('lastname', $recipient["lastname"]);
- $tpl->assign('subscr_email', $recipient["address"]);
-
- $code = XOOPS_URL . "||" . $subscriber_id . "||" . $recipient["subscriber_actkey"] . "||" . $recipient["address"];
- $code = base64_encode( $code );
- $link = XOOPS_URL . "/modules/xNewsletter/subscription.php?op=unsub&email=" . $recipient["address"] . "&actkey=" . $code;
- $tpl->assign('unsubscribe_link', $link);
-
- $body = $tpl->fetch($template_path.$letter_template.'.html');
-
- $mail->AddAddress($recipient["address"], $recipient["firstname"]." ".$recipient["lastname"]);
-
- //$mail->AltBody = _AM_XNEWSLETTER_LETTER_EMAIL_ALTBODY;
-
- $mail->MsgHTML($body);
- $mail->AltBody = strip_tags($body . "\n" . $link);
-
- foreach ($attachments as $attachment) {
- if ( file_exists($attachment)) $mail->AddAttachment($attachment);
- }
- $count_total ++;
- $mail->Send();
- $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS;
- $protocol_success = "1";
- //create item in protocol for this email
- $text_clean = array("<strong>", "</strong>", "<br/>", "<br />");
- $protocol_status = str_replace($text_clean,"",$protocol_status);
-
- $protocolHandler =& xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
- $obj_protocol =& $protocolHandler->create();
- $obj_protocol->setVar("protocol_letter_id", $letter_id);
- $obj_protocol->setVar("protocol_subscriber_id", $subscriber_id);
- $obj_protocol->setVar("protocol_status", $protocol_status);
- $obj_protocol->setVar("protocol_success", $protocol_success);
- $obj_protocol->setVar("protocol_submitter", $senderuid);
- $obj_protocol->setVar("protocol_created", time());
-
- if ($protocolHandler->insert($obj_protocol)) {
- //create protocol is ok
- } else {
- echo $obj_protocol->getHtmlErrors();
- }
-
- $mail->ClearAddresses();
-
- }
-
- unset($mail);
-
-} catch (phpmailerException $e) {
- $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_PHPMAILER . $e->errorMessage(); //error messages from PHPMailer
- $count_err ++;
- $protocol_success = "0";
-} catch (Exception $e) {
- $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_PHPMAILER . $e->getMessage(); //error messages from anything else!
- $count_err ++;
- $protocol_success = "0";
-}
-
-//create final protocol item
-if ($count_err > 0) {
- $protocol_status = _AM_XNEWSLETTER_SEND_ERROR_NUMBER;
- $protocol_status = str_replace("%e",$count_err,$protocol_status);
- $protocol_status = str_replace("%t",$count_total,$protocol_status);
- $protocol_success = 0;
-} else {
- $protocol_success = 1;
- if ($op=="send_test") {
- $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_TEST;
- } else {
- $protocol_status = _AM_XNEWSLETTER_SEND_SUCCESS_NUMBER;
- $protocol_status = str_replace("%t",$count_total,$protocol_status);
- }
-
-}
-//create item in protocol
-$protocolHandler =& xoops_getModuleHandler("xNewsletter_protocol", "xNewsletter");
-$obj_protocol =& $protocolHandler->create();
-$obj_protocol->setVar("protocol_letter_id", $letter_id);
-$obj_protocol->setVar("protocol_subscriber_id", "0");
-$obj_protocol->setVar("protocol_status", $protocol_status);
-$obj_protocol->setVar("protocol_success", $protocol_success);
-$obj_protocol->setVar("protocol_submitter", $senderuid);
-$obj_protocol->setVar("protocol_created", time());
-
-if ($protocolHandler->insert($obj_protocol)) {
- //create protocol is ok
- redirect_header("letter.php", 3, $protocol_status);
-} else {
- echo $obj_protocol->getHtmlErrors();
-}
-
-?>
\ No newline at end of file
|
|
From: <luc...@us...> - 2013-10-30 22:40:08
|
Revision: 12222
http://sourceforge.net/p/xoops/svn/12222
Author: luciorota
Date: 2013-10-30 22:40:04 +0000 (Wed, 30 Oct 2013)
Log Message:
-----------
return empty array if requested array is null
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php 2013-10-30 21:28:59 UTC (rev 12221)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php 2013-10-30 22:40:04 UTC (rev 12222)
@@ -657,7 +657,7 @@
$result = (string)$filter->_remove($filter->_decode((string)$source));
break;
case 'ARRAY' :
- $result = (array)$source;
+ $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_\.-]*)*$/';
|
|
From: <be...@us...> - 2013-10-30 21:29:04
|
Revision: 12221
http://sourceforge.net/p/xoops/svn/12221
Author: beckmi
Date: 2013-10-30 21:28:59 +0000 (Wed, 30 Oct 2013)
Log Message:
-----------
Updating to TinyMCE 2.5.10
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/table/js/table.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopscode/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/js/xoopsemotions.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/langs/en.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/langs/en_dlg.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/js/xoopsimagebrowser.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/js/xoopsimagemanager.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/langs/en.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/langs/en_dlg.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagemanager.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/js/xoopsmlcontent.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/langs/en.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/langs/en_dlg.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/xoopsmlcontent.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsquote/editor_plugin.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/tiny_mce.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/tiny_mce_popup.js
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-10-30 21:28:59 UTC (rev 12221)
@@ -47,6 +47,7 @@
- jQuery Form to 3.42.0 (mamba)
- HTML Purifier to 4.5.0 (mamba)
- Smarty to 2.6.28 (mamba)
+ - TinyMCE to 3.5.10 (mamba)
===============================
2013/04/21: Version 2.5.6 Final
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt 2013-10-30 21:28:59 UTC (rev 12221)
@@ -1,3 +1,19 @@
+Version 3.5.10 (2013-10-24)
+ Fixed bug where dialogs using inlinepopups plugin would display incorrectly sometimes
+ Fixed bug in paste plugin word import that was removing type from lists
+ Fixed bug where IE 11 wouldn't be properly detected if IE 10 emulation was enabled.
+Version 3.5.9 (2013-10-10)
+ Added IE 11 compatibility. IE 11 is treated as Gecko but it has still many IE bugs.
+ Fixed bug where importing CSS classes would fail if it contained @import rules to remote domain on Gecko.
+ Fixed bug in spelling plugin where misspelt words are not always marked.
+ Fixed bug where script tag was removed when nested inside a div or p.
+ Fixed full screen plugin state migration from original editor.
+ Fixed edgecase on up/down arrow keys scrolling with native lists.
+ Fixed bug where space can scroll webpage when using keyboard to access toolbar buttons.
+ Fixed bug where up/down arrow keys scroll entire webpage when using keyboard nav in menu ui.
+ Fixed bug where applying ins/del as inline elements would apply them as blocks.
+ Fixed bug where backspace on a space after an image would produce a BR on WebKit.
+ Fixed bug where it wasn't possible to change block type of text blocks.
Version 3.5.8 (2012-11-20)
Fixed bug where html5 data attributes where stripped from contents.
Fixed bug where toolbar was annouced multiple times with JAWS on Firefox.
@@ -170,7 +186,7 @@
Added new types and selector options to make it easier to create editor instances with different configs.
Added new preview of formatting options in various listboxes.
Added new preview_styles option that enables control over what gets previewed.
- Fixed bug where content css would be loaded twice into iframe.
+ Fixed bug where content css would be loaded twice into iframe.
Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
@@ -178,7 +194,7 @@
Version 3.4.9 (2012-02-23)
Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
- Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
+ Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
Fixed bug in Gecko where undo wasn't added when focus was lost.
Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
@@ -205,8 +221,8 @@
Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
Fixed bug where a stranded bullet point would get created in WebKit.
Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
- Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
- Fix white space in between spans from being deleted.
+ Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
+ Fix white space in between spans from being deleted.
Fixed bug where scrollbars where visible in the character map dialog on Gecko.
Fixed issue with missing translation for one of the emoticons.
Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt 2013-10-30 21:28:59 UTC (rev 12221)
@@ -20,7 +20,7 @@
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
+can use it too, but we suggest you first think carefuly about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js 2013-10-30 21:28:59 UTC (rev 12221)
@@ -1 +1 @@
-(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<span color="$1">$2</span>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();
+(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();
\ No newline at end of file
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js 2013-10-30 21:28:59 UTC (rev 12221)
@@ -1 +1 @@
-(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file
+(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm 2013-10-30 21:28:59 UTC (rev 12221)
@@ -46,7 +46,7 @@
settings['strict_loading_mode'] = true;
settings.save_onsavecallback = function() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
+ moveContent();
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
window.close();
};
@@ -56,11 +56,15 @@
}
function moveContent() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
+ // find the original editor, execute restore state in it's plugin instance
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor);
+
+ // prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent()
+ tinymce.dom.Event.remove(window, "beforeunload", unloadHandler);
}
function closeFullscreen() {
- moveContent();
+ // moveContent() will be called by the unload handler
window.close();
}
@@ -78,18 +82,21 @@
function render() {
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
- e.value = window.opener.tinyMCE.get(oeID).getContent();
-
vp = dom.getViewPort();
settings.width = vp.w;
settings.height = vp.h - 15;
- tinymce.dom.Event.add(window, 'resize', function() {
- var vp = dom.getViewPort();
+ settings.oninit = function() {
+ var ed = tinyMCE.activeEditor;
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed);
- tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
- });
+ tinymce.dom.Event.add(window, 'resize', function() {
+ var vp = dom.getViewPort();
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
+ });
+ }
+
tinyMCE.init(settings);
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js 2013-10-30 21:28:59 UTC (rev 12221)
@@ -1 +1 @@
-(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file
+(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId("mce_inlinepopups_");h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js 2013-10-30 21:28:59 UTC (rev 12221)
@@ -1 +1 @@
-(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding...
[truncated message content] |
|
From: <be...@us...> - 2013-10-30 21:28:08
|
Revision: 12220
http://sourceforge.net/p/xoops/svn/12220
Author: beckmi
Date: 2013-10-30 21:28:03 +0000 (Wed, 30 Oct 2013)
Log Message:
-----------
Updating to TinyMCE 2.5.10
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/table/js/table.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/tiny_mce.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/tiny_mce_popup.js
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt 2013-10-30 02:19:09 UTC (rev 12219)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/changelog.txt 2013-10-30 21:28:03 UTC (rev 12220)
@@ -1,3 +1,19 @@
+Version 3.5.10 (2013-10-24)
+ Fixed bug where dialogs using inlinepopups plugin would display incorrectly sometimes
+ Fixed bug in paste plugin word import that was removing type from lists
+ Fixed bug where IE 11 wouldn't be properly detected if IE 10 emulation was enabled.
+Version 3.5.9 (2013-10-10)
+ Added IE 11 compatibility. IE 11 is treated as Gecko but it has still many IE bugs.
+ Fixed bug where importing CSS classes would fail if it contained @import rules to remote domain on Gecko.
+ Fixed bug in spelling plugin where misspelt words are not always marked.
+ Fixed bug where script tag was removed when nested inside a div or p.
+ Fixed full screen plugin state migration from original editor.
+ Fixed edgecase on up/down arrow keys scrolling with native lists.
+ Fixed bug where space can scroll webpage when using keyboard to access toolbar buttons.
+ Fixed bug where up/down arrow keys scroll entire webpage when using keyboard nav in menu ui.
+ Fixed bug where applying ins/del as inline elements would apply them as blocks.
+ Fixed bug where backspace on a space after an image would produce a BR on WebKit.
+ Fixed bug where it wasn't possible to change block type of text blocks.
Version 3.5.8 (2012-11-20)
Fixed bug where html5 data attributes where stripped from contents.
Fixed bug where toolbar was annouced multiple times with JAWS on Firefox.
@@ -170,7 +186,7 @@
Added new types and selector options to make it easier to create editor instances with different configs.
Added new preview of formatting options in various listboxes.
Added new preview_styles option that enables control over what gets previewed.
- Fixed bug where content css would be loaded twice into iframe.
+ Fixed bug where content css would be loaded twice into iframe.
Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
@@ -178,7 +194,7 @@
Version 3.4.9 (2012-02-23)
Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
- Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
+ Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
Fixed bug in Gecko where undo wasn't added when focus was lost.
Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
@@ -205,8 +221,8 @@
Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
Fixed bug where a stranded bullet point would get created in WebKit.
Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
- Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
- Fix white space in between spans from being deleted.
+ Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
+ Fix white space in between spans from being deleted.
Fixed bug where scrollbars where visible in the character map dialog on Gecko.
Fixed issue with missing translation for one of the emoticons.
Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt 2013-10-30 02:19:09 UTC (rev 12219)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/license.txt 2013-10-30 21:28:03 UTC (rev 12220)
@@ -20,7 +20,7 @@
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
+can use it too, but we suggest you first think carefuly about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js 2013-10-30 02:19:09 UTC (rev 12219)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
@@ -1 +1 @@
-(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file
+(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm 2013-10-30 02:19:09 UTC (rev 12219)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm 2013-10-30 21:28:03 UTC (rev 12220)
@@ -46,7 +46,7 @@
settings['strict_loading_mode'] = true;
settings.save_onsavecallback = function() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
+ moveContent();
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
window.close();
};
@@ -56,11 +56,15 @@
}
function moveContent() {
- window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
+ // find the original editor, execute restore state in it's plugin instance
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor);
+
+ // prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent()
+ tinymce.dom.Event.remove(window, "beforeunload", unloadHandler);
}
function closeFullscreen() {
- moveContent();
+ // moveContent() will be called by the unload handler
window.close();
}
@@ -78,18 +82,21 @@
function render() {
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
- e.value = window.opener.tinyMCE.get(oeID).getContent();
-
vp = dom.getViewPort();
settings.width = vp.w;
settings.height = vp.h - 15;
- tinymce.dom.Event.add(window, 'resize', function() {
- var vp = dom.getViewPort();
+ settings.oninit = function() {
+ var ed = tinyMCE.activeEditor;
+ window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed);
- tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
- });
+ tinymce.dom.Event.add(window, 'resize', function() {
+ var vp = dom.getViewPort();
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
+ });
+ }
+
tinyMCE.init(settings);
}
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js 2013-10-30 02:19:09 UTC (rev 12219)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
@@ -1 +1 @@
-(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file
+(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId("mce_inlinepopups_");h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js 2013-10-30 02:19:09 UTC (rev 12219)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js 2013-10-30 21:28:03 UTC (rev 12220)
@@ -1 +1 @@
-(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j){var h=this.editor,f=b(h,"paste_text_linebreaktype"),k=b(h,"paste_text_replacements"),g=tinymce.is;function e(m){c(m,function(n){if(n.constructor==RegExp){j=j.replace(n,"")}else{j=j.replace(n[0],n[1])}})}if((typeof(j)==="string")&&(j.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(j)){e([/[\n\r]+/g])}else{e([/\r+/g])}e([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"]]);var d=Number(b(h,"paste_max_consecutive_linebreaks"));if(d>-1){var l=new RegExp("\n{"+(d+1)+",}","g");var i="";while(i.length<d){i+="\n"}e([[l,i]])}j=h.dom.decode(tinymce.html.Entities.encodeRaw(j));if(g(k,"array")){e(k)}else{if(g(k,"string")){e(new RegExp(k,"gi"))}}if(f=="none"){e([[/\n+/g," "]])}else{if(f=="br"){e([[/\n/g,"<br />"]])}else{if(f=="p"){e([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{e([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}h.execCommand("mceInsertContent",false,j)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
\ No newline at end of file
+(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\...
[truncated message content] |
|
From: <be...@us...> - 2013-10-30 02:19:15
|
Revision: 12219
http://sourceforge.net/p/xoops/svn/12219
Author: beckmi
Date: 2013-10-30 02:19:09 +0000 (Wed, 30 Oct 2013)
Log Message:
-----------
replacing broder with border
Modified Paths:
--------------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_table.html
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt 2013-10-30 02:19:09 UTC (rev 12219)
@@ -1,6 +1,7 @@
2013-10-04 v3.07 RC 4
- fix: sorting in the category view (walkero/mamba)
- partial update to PSR-2 (mamba)
+- replacing broder with border (walkero/mamba)
2013-08-08 v3.07 RC 3
- fix: image is not sized properly (mamba)
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_index.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_index.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_index.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -26,7 +26,7 @@
<td class="even" align="left">
<h4><{$lang_latest_list}></h4>
<{if $photonavdisp }>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -45,7 +45,7 @@
</table>
<{if $photonavdisp }>
<hr/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_photo.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_photo.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_photo.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -4,7 +4,7 @@
<td class="even">
<br/>
<{include file="db:myalbum0_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}> <{$photo.title}></span>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_list.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_list.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_list.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum0_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -59,7 +59,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -82,7 +82,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_table.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_table.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_table.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum0_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -55,7 +55,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -87,7 +87,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_index.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_index.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_index.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -26,7 +26,7 @@
<td class="even" align="left">
<h4><{$lang_latest_list}></h4>
<{if $photonavdisp }>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -45,7 +45,7 @@
</table>
<{if $photonavdisp }>
<hr/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_photo.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_photo.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_photo.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -4,7 +4,7 @@
<td class="even">
<br/>
<{include file="db:myalbum1_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}> <{$photo.title}></span>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_list.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_list.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_list.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum1_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -59,7 +59,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -82,7 +82,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_table.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_table.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_table.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum1_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -55,7 +55,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -87,7 +87,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_index.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_index.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_index.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -26,7 +26,7 @@
<td class="even" align="left">
<h4><{$lang_latest_list}></h4>
<{if $photonavdisp }>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -45,7 +45,7 @@
</table>
<{if $photonavdisp }>
<hr/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_photo.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_photo.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_photo.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -4,7 +4,7 @@
<td class="even">
<br/>
<{include file="db:myalbum2_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}> <{$photo.title}></span>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_list.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_list.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_list.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum2_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -59,7 +59,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -82,7 +82,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_table.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_table.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_table.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum2_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -55,7 +55,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -87,7 +87,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_index.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_index.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_index.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -26,7 +26,7 @@
<td class="even" align="left">
<h4><{$lang_latest_list}></h4>
<{if $photonavdisp }>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -45,7 +45,7 @@
</table>
<{if $photonavdisp }>
<hr/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_photo.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_photo.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_photo.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -4,7 +4,7 @@
<td class="even">
<br/>
<{include file="db:myalbum_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}> <{$photo.title}></span>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_list.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_list.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_list.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -59,7 +59,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -82,7 +82,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_table.html
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_table.html 2013-10-27 21:52:05 UTC (rev 12218)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_table.html 2013-10-30 02:19:09 UTC (rev 12219)
@@ -5,7 +5,7 @@
<td class="even">
<br/>
<{include file="db:myalbum_header.html"}>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span> <{$lang_total}><{$photo_total_sum}>
@@ -55,7 +55,7 @@
<b><{$lang_cursortedby}></b>
<br/>
<br/>
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
@@ -87,7 +87,7 @@
<{if $photo_small_sum > 1 }>
<hr/>
<div align="center">
- <table broder='0' cellpadding='0' cellspacing='0' width='100%'>
+ <table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>
<{$photonavinfo}>
|
|
From: <luc...@us...> - 2013-10-27 21:52:11
|
Revision: 12218
http://sourceforge.net/p/xoops/svn/12218
Author: luciorota
Date: 2013-10-27 21:52:05 +0000 (Sun, 27 Oct 2013)
Log Message:
-----------
add release 1.1 to releases
Added Paths:
-----------
XoopsModules/xnewsletter/releases/1.1/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/about.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/accounts.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/admin_footer.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/admin_header.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/attachment.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/bmh.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/bmh_callback_database.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/cat.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/catsubscr.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/import.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/index.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/letter.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/mailinglist.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/maintenance.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/menu.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/protocol.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/sendletter.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/subscr.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/task.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/blocks/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/blocks/blocks_catsubscr.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/blocks/blocks_letter.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/blocks/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_accounts.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_attachment.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_bmh.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_cat.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_catsubscr.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_import.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_letter.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_mailinglist.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_protocol.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_subscr.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/class/xNewsletter_task.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/cron.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/css/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/css/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/css/style.css
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/changelog.txt
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/credits.txt
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/install.txt
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/lang_diff.txt
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/licence.txt
XoopsModules/xnewsletter/releases/1.1/xNewsletter/docs/readme.txt
XoopsModules/xnewsletter/releases/1.1/xNewsletter/header.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/bookmarks/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/bookmarks/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/about.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/add.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/alert.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/arrow.gif
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/home.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/off.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/on.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_accounts.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_attachment.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_attachment_del.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_bmh.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_category.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_category_subscr.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_catsubscr_temp.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_check.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_copy.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_delete.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_delete_2.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_details.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_edit.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_edit_2.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_failed.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_import.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_mailinglist.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_maintenance.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_newsletter.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_nothing.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_ok.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_preview.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_protocol.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_quit.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_resend.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_send.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_sendtest.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_subscribers.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xn_task.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/icons/xoopsmicrobutton.gif
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/letter_template/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/letter_template/xoops-bg.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/letter_template/xoops-logo.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/images/xNewsletter.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/config.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/functions.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/install.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/mailinglist.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/onupdate.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/phpmailer_bmh/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/phpmailer_bmh/class.phpmailer-bmh.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/phpmailer_bmh/phpmailer-bmh_rules.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/search.inc.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/include/task.inc.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/index.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/admin.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/blocks.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/help/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/help/help.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/help/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/mail_template/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/mail_template/activate.tpl
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/mail_template/delete.tpl
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/mail_template/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/mail_template/info_change.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/mail_template/update.tpl
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/main.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/modinfo.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/templates/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/templates/basic.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/templates/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/english/templates/xoops.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/language/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/letter.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/csv.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/csv.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/evennews.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/rmbulletin.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/sample1col.csv
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/sample4col.csv
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/smartpartner.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/subscribers.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/system_user.png
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/weblinks.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/plugins/xoopsuser.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/print.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/protocol.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/sendletter.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/sql/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/sql/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/sql/mysql.sql
XoopsModules/xnewsletter/releases/1.1/xNewsletter/subscription.php
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/admin/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/admin/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/xnewsletter_catsubscr_block_day.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/xnewsletter_catsubscr_block_recent.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/xnewsletter_letter_block_day.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/xnewsletter_letter_block_random.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/blocks/xnewsletter_letter_block_recent.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xNewsletter_footer.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xNewsletter_header.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xNewsletter_index.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xnewsletter_letter.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xnewsletter_letter_list.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xnewsletter_subscription.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/templates/xnewsletter_subscription_result.html
XoopsModules/xnewsletter/releases/1.1/xNewsletter/xoops_version.php
Added: XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/about.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/about.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/about.php 2013-10-27 21:52:05 UTC (rev 12218)
@@ -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.1/xNewsletter/admin/accounts.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/accounts.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/accounts.php 2013-10-27 21:52:05 UTC (rev 12218)
@@ -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.1/xNewsletter/admin/admin_footer.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/admin_footer.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/admin_footer.php 2013-10-27 21:52:05 UTC (rev 12218)
@@ -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.1/xNewsletter/admin/admin_header.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/admin_header.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/admin_header.php 2013-10-27 21:52:05 UTC (rev 12218)
@@ -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.1/xNewsletter/admin/attachment.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/attachment.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/attachment.php 2013-10-27 21:52:05 UTC (rev 12218)
@@ -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.1/xNewsletter/admin/bmh.php
===================================================================
--- XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/bmh.php (rev 0)
+++ XoopsModules/xnewsletter/releases/1.1/xNewsletter/admin/bmh.php 2013-10-27 21:52:05 UTC (rev 12218)
@@ -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>";
+
+ $checked = ($filter == _AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE) ? "checked='checked'" : "";
+ echo "<input id='bmh_measure3' type='radio' $checked value='"._AM_XNEWSLETTER_BMH_MEASURE_VAL_DELETE."' title='"._AM_XNEWSLETTER_BMH_MEASURE."' name='bmh_measure_filter' onclick='submit()' />
+ <label for='bmh_measure3' name='bmh_measure3'>"._AM_XNEWSLETTER_BMH_MEASURE_DELETED."</label>";
+ echo "</form>";
+ echo "</td></tr></table>";
+
+ // View Table
+ if ($numrows>0)
+ {
+ echo "<table class='outer width100' cellspacing='1'>
+ <tr>
+ <th class='center width2'>"._AM_XNEWSLETTER_BMH_ID."</th>
+ <th class='center'>"._AM_XNEWSLETTER_BMH_RULE_NO."</th>
+ <th class='center'>"._AM_XNEWSLETTER_BMH_RULE_CAT."</th>
+ <th class='center'>"._AM_XNEWSLETTER_BMH_BOUNCETYPE."</th>
+ <th class='center'>"._AM_XNEWSLETTER_BMH_REMOVE."</th>
+ <th class='center'>"._AM_XNEWSLETTER_BMH_EMAIL."</th>
+...
[truncated message content] |